Repository navigation
fix(web): open a default tab when nothing is chosen in the document pane - #101
Merged
Merged
Conversation
After a reload with nothing chosen and nothing newly filed, the pane's selection was null: the body rendered empty and the UI kit logged that the value named no tab and no pane. The tab the person needed, the live preview, had also scrolled off the strip's edge, and an unselected strip scrolls nothing into view. With nothing chosen, show the live app once the build has started, else ask the page to open the document furthest along the project's flow, so it is read like any the person picks. A selected tab scrolls into view. Closes #92
|
Triage: Pass No changes needed from you. A maintainer will review this pull request. Triage will approve, request review. |
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.
Closes #92
What changed
apps/web/src/pages/workspace/artifact-pane.tsx:defaultTabnames what the pane shows when nothing is chosen, the live app once the build has started, else the filed document furthest along the project's flow.resolveSelectionapplies it: the live app the pane selects itself; a document it asks the page to open throughonSelect, so the document is read like any the person picks. The person's own choice always wins.artifact-pane.test.tsx: covers the default.Why
After a reload with nothing chosen and nothing newly filed, the selection was null, so the panel body rendered empty and the console repeated the UI kit's "
valuenames none of its tabs / panes" errors. The live preview tab had also scrolled off the strip; a selected tab is scrolled into view by the kit, an unselected strip is not. Details in #92.How it was verified
tsc --noEmit -p apps/webpasses;oxlint --deny-warningsand Prettier pass on the changed files.bun --conditions=intx-src test apps/web/src/pages/workspacepasses (22 tests, 2 new).ArtifactPaneunder the repo's complexity limit.