fix(preview): hide starter scaffold during generation - #135
Merged
Conversation
Persist an explicit app-preview building/ready transition. Keep the branded loader visible until generated content and the iframe are loaded, while preserving hot reload for existing projects.
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.
Summary
building→readypreview-content transition instead of treating an open port as finished content.Linear
Not linked — direct production UX fix requested during preview reliability QA.
Plan
No repository plan document; the implementation plan and acceptance evidence are in the task transcript.
What's Included
Typed readiness contract
data-app-preview-statusto the persisted/replayed UI-message contract.buildingonly for freshly scaffolded template projects andreadyafter successful model execution.Browser presentation
Documentation
Architecture
The agent Worker owns content readiness because it knows whether a workspace was freshly scaffolded and when model generation completed. The typed stream part is persisted with the run, replayed after refresh, and projected into memory-only web UI state. The web client never inspects cross-origin iframe contents or guesses with a timer.
Decisions Made
loadEdge Cases Handled
buildingstate restores the loaderHow to Review
packages/types/src/ui-message.tsandagent-run-app-builder.tsfor the contract.use-sandbox-surface-sync.tsfor live and hydrated event projection.preview-side-panel.tsxfor the presentation transition.Test Plan
pnpm turbo skills:buildpnpm turbo typecheck lint build --force— 55/55 taskspnpm architecture:check— 849 modules / 1761 dependenciespnpm deadcodegit diff --check