Repository navigation
Preview lifecycle: a stopped site's screenshot in the chat, captured in both apps - #5273
Merged
Merged
Conversation
…e menu when narrow Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in both apps, with start particles Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t-preview-header
# Conflicts: # apps/ui/src/components/session-view/index.test.tsx # apps/ui/src/components/session-view/index.tsx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t-preview-lifecycle # Conflicts: # apps/ui/src/components/site-preview/index.tsx # apps/ui/src/components/site-preview/style.module.css
Collaborator
📊 Performance Test ResultsComparing 38e908c vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
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.
Related issues
trunkonce it merges.How AI was used in this PR
Claude Code ported the rebuild's preview lifecycle, using Rich's build as the spec. Before writing code, I confirmed four choices:
Claude checked the result live in
studio ui(capture, stop, start, light and dark). In the packaged Desktop app, a temporary e2e probe confirmed that the webview capture saved the page and that the stopped site showed it. I reviewed the diff.Proposed Changes
studio uicaptures through the browser the CLI already uses for the agent's screenshots, only when it's installed, so it never downloads one.studio uinever showed a screenshot, and Desktop only took one when a site started.Both apps share one cache,
~/.studio/previews, in@studio/common:studio ui: a route captures through a function the CLI passes in, checking the page is on the requested site.Differences from Rich's build
Screenshots
studio ui, a site's own page: stopped, hovering the screenshot, starting:A new chat while the site runs, then after it stops:

Dark mode:

The packaged Desktop app, stopped after the first load:

Testing Instructions
studio ui, which now shows screenshots too, and in dark mode.Checks run:
apps/ui,apps/studio,apps/local,packages/commonand the CLI commands: 1,990 passing. New tests cover the cache, the capture trigger and the stopped chat.sitesandlocalizatione2e on a packaged build: passing. One sites test failed when run alongside localization, because that test changes the app language; it passed when sites ran on its own.Pre-merge Checklist
🤖 Generated with Claude Code