fix: don't show file tree view in playground output for single file#10212
Open
fix: don't show file tree view in playground output for single file#10212
Conversation
…y a single file Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/4c9e82f8-89d1-4169-a1dd-aa09c14ed865 Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
timotheeguerin
approved these changes
Mar 31, 2026
Copilot
AI
changed the title
[WIP] Update playground logic to handle single file output
fix: don't show file tree view in playground output for single file
Mar 31, 2026
commit: |
Member
|
@copilot run formatter |
Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/e8083b9a-6f02-42fa-adfe-73ae10f81a15 Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Contributor
Author
timotheeguerin
approved these changes
Mar 31, 2026
Collaborator
|
You can try these changes here
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an emitter produces a single output file nested in a folder (e.g.
src/openapi.yaml), the playground unnecessarily renders the full tree view with folder navigation panel. This adds clutter for emitters whose output is always nested.showFileTreecondition infile-viewer.tsxto requireoutputFiles.length > 1before considering folder nesting:Single nested file now renders with the simple tab view; tree view still activates for 2+ nested files or 3+ flat files.