Skip to content

Artifacts: wider gallery, full-page viewer - #2714

Merged
samjulien merged 3 commits into
mainfrom
claude/artifacts-polish-6d188a
Dec 2, 2026
Merged

samjulien merged 3 commits into
mainfrom
claude/artifacts-polish-6d188a

Conversation

@samjulien

@samjulien samjulien commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

From the screen-by-screen audit of the Artifacts screens.

System change: a wide page width (for Guido)

This PR changes the layout contract. PageShell gets a third width, wide, beside prose and full:

  • wide is max-w-4xl (896px). prose stays max-w-3xl (768px).
  • It is for a grid of cards that a person picks out by how they look. Only the Artifacts gallery uses it. Rows and forms stay prose.
  • PageColumn is not changed. PageShell adds max-w-4xl after the column's own max-w-3xl class (WIDE_COLUMN in page-parts.tsx), and the later class wins.
  • The layout skill (openbot-screen-layout) describes wide and full, and its red-flag row now reads: wide or full on rows or a form.

#906 edits lines near this in page-parts.tsx and page-shell.tsx. The hunks here are kept to the ShellWidth type, one constant and one line in PageShell, and do not touch the lines #906 changes.

What changes

Gallery. The page uses a new wide width on PageShell (max-w-4xl, 896px). It holds 3 cards a row on a desktop window (about 280px each), 2 when the column is narrower, and 1 on a phone. The columns follow the column's own width (a container query), so a window with the sidebar open gets the right count.

Viewer. A tile opens the artifact full page in the main pane, edge to edge. It no longer opens in a 560px panel, or in a sheet over a dimmed page on a narrower window. The sidebar stays usable. The list stays drawn under the viewer, hidden, so Back returns to it at the same scroll position, with focus on the tile that opened it.

Viewer controls. Full page, the three rows of controls (about 130px) are now one header row (44px): Back, the title, the tabs as a segmented control, then the version, Share, Download and More. A narrow window wraps the row. Every control keeps its screen-reader name. The tabs still work with the arrow keys.

What stays the same

  • /artifacts?artifact=<id> and /artifacts/<id> both still open the artifact. Both now show the same full page.
  • Browser Back closes the artifact. The Back button goes back in the history when the gallery opened it, and to the gallery when a link opened it.
  • Escape closes the artifact, as the sheet did on a narrow window. A menu, a select or a dialog over the viewer closes first. A text field keeps its Escape, so a half-written comment is not lost.
  • Opened with "Open full screen" from the panel beside a conversation, Back says "Back" and goes back to the conversation. Opened from anywhere else, it says "Back to Artifacts".
  • The panel beside a conversation is not changed.
  • The artifacts host (people outside the organization) gets the same one-row header.

Trade-offs

  • The version's author line ("Forecaster · 2 days ago") is not under the version stepper in the full page. The version list shows the author and the time of every version. The panel still shows the line.
  • "Open full screen" is no longer in the menu on the Artifacts page, because the artifact is already full page there. The panel beside a conversation still has it.

Screenshots

Web app, 1440px (narrow: 700px), from artifacts-screens.test.tsx with OPENBOT_APP_SHOTS.

Light

Before After
Gallery Gallery before, light Gallery after, light
Viewer, opened from the gallery Viewer, opened from the gallery before, light Viewer, opened from the gallery after, light
Viewer, narrow window (700px) Viewer, narrow window (700px) before, light Viewer, narrow window (700px) after, light
Artifact on its own address Artifact on its own address before, light Artifact on its own address after, light

Dark

Before After
Gallery Gallery before, dark Gallery after, dark
Viewer, opened from the gallery Viewer, opened from the gallery before, dark Viewer, opened from the gallery after, dark
Viewer, narrow window (700px) Viewer, narrow window (700px) before, dark Viewer, narrow window (700px) after, dark
Artifact on its own address Artifact on its own address before, dark Artifact on its own address after, dark

OpenBot Desktop (workbench, macOS frame, 1280 × 820, after). The window buttons sit over the logo here because of the workbench's own script bug, which the polish-ui-bugs PR fixes; the real app is not affected.

Light Dark
Gallery Desktop gallery, light Desktop gallery, dark
Viewer Desktop viewer, light Desktop viewer, dark

Checks

  • bun run typecheck, bun run lint, bun run format:check
  • bun test app/tests/ui-look-guard.test.ts app/tests/color-scheme.test.ts app/tests/design-tokens.test.ts and the other artifact unit tests
  • OPENBOT_APP_BROWSER=1 bun test app/tests/artifacts-screens.test.tsx: 185 pass (flows, host, and every screen in light and dark at 1440, 700 and 390px). artifact-collab-browser.test.tsx: 7 pass.
  • After the review fixes: the 8 Artifacts page tests, the conversation flows and the gallery, viewer, full-screen and host layouts in light and dark at 3 widths (29), and the design-system guard tests (33) pass.
  • New browser tests: Escape closes the artifact after a menu over it, Back says "Back" when opened from a conversation, 3/2/1 cards a row at 1440/700/390px, the header row is 48px or less and holds the title, tabs, version, Share and More, the tabs work from the keyboard, Back keeps the scroll and the focus, and links to an artifact still open it.

Only the Artifacts screens, PageShell's width option and the layout skill's width text. No overlap with #2698, #2689, #2701 or #906 hunks in code. The skill's red-flag row for width="wide" sits next to rows #2701 edits, so whichever lands second resolves one small doc conflict.

Changelog

Artifacts.

  • A wider gallery, and an artifact opens full page. The Artifacts gallery is wider, with three
    cards a row on a desktop window, two when the window is narrower and one on a phone. An artifact
    opens full page in the main pane, edge to edge, instead of in a side panel or a sheet, with its
    controls (Back, the title, the tabs, the version, Share, Download, More) in one row. Back, the
    browser's Back and Escape return to the gallery where you left it. Links to an artifact open the
    same full page. The panel beside a conversation is unchanged.

- PageShell gets a `wide` width (max-w-4xl) for a grid of cards. The
  Artifacts gallery uses it: 3 cards a row on a desktop window, 2 when
  the column is narrower, 1 on a phone. The columns follow the column's
  width (container query), not the window's.
- An artifact opened from the gallery shows full page in the main pane,
  over the list, not in a 560px panel or a sheet. The sidebar stays. The
  list stays drawn under it, so Back finds it at the same scroll, with
  focus on the tile that opened it. `?artifact=<id>` and
  `/artifacts/<id>` both still open it.
- Full page, the viewer's controls are one header row: Back, the title,
  the tabs, then the version, Share, Download and More. The version's
  author line moves into the version list. The panel beside a
  conversation keeps its layout.
davidmckayv
davidmckayv previously approved these changes Dec 2, 2026

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, once CI is green. The new wide width leaves the audit log alone, the gallery shows 3, 2 or 1 cards a row as the window narrows, and the full-page viewer's header wraps cleanly at 390px and in Desktop's 1000px window. Author names now truncate in the narrower cards, a fair trade.

- Escape closes the full-page artifact, as the sheet it replaced did on
  a narrow window. A menu, a select or a dialog over the viewer closes
  first, and a field keeps its Escape.
- Opened with the panel's Open full screen, the artifact's page says
  "Back" and goes back to the conversation, not "Back to Artifacts".
- The `wide` width is set in PageShell over the column's own class, so
  PageColumn is unchanged.

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed at c73eb51: Escape closes the viewer and clears ?artifact= in all eight browser/theme/width runs, leaves fields and open menus alone, Back says Back from a conversation. Holds.

@samjulien
samjulien added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit 7e097af Dec 2, 2026
35 of 36 checks passed
@samjulien
samjulien deleted the claude/artifacts-polish-6d188a branch December 2, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants