Skip to content

fix(web): open a default tab when nothing is chosen in the document pane - #101

Merged
brianjfox merged 1 commit into
mainfrom
fix/pane-default-tab-main
Nov 2, 2026
Merged

brianjfox merged 1 commit into
mainfrom
fix/pane-default-tab-main

Conversation

@brianjfox

Copy link
Copy Markdown
Contributor

Closes #92

What changed

  • apps/web/src/pages/workspace/artifact-pane.tsx: defaultTab names 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. resolveSelection applies it: the live app the pane selects itself; a document it asks the page to open through onSelect, 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 "value names 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/web passes; oxlint --deny-warnings and Prettier pass on the changed files.
  • bun --conditions=intx-src test apps/web/src/pages/workspace passes (22 tests, 2 new).
  • The default was kept out of the component body as a pure function, which also keeps ArtifactPane under the repo's complexity limit.

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
@corbits-triage

corbits-triage Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

Triage will approve, request review.

@brianjfox
brianjfox added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit e34d951 Nov 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document pane renders empty after a reload until a tab is clicked, with the newest tab scrolled out of view

1 participant