[ENG-3784] Close the install on a refresh and a deploy, not a blank page - #219
Merged
mariojgt merged 1 commit intoSep 7, 2026
Conversation
A finished install leaves two things undone that nothing in the CLI can do for the user. The preview they are looking at loaded before the widget tag existed, so it renders no "Report a vulnerability" button. And every change setup makes is a source change, so the deployed site keeps serving its previous build until the next deploy. Both now get said out loud. The `guide` checklist ends with a refresh block and a deploy block, and `setup` closes with the same two lines addressed to the assistant, so it relays them rather than reporting success against a page that shows nothing. The refresh block only appears when the widget tag is really in the source with this project's UUID — there is no point sending someone to refresh a page that was never going to render a button. The deploy block appears whenever a site is provisioned, since the build hooks, guard and production marker still need a deploy even with "widget": false. The install prompt gets the same two asks, with an explicit bound: remind the user to deploy, do not deploy anything. Also realigns the prompt across README.md, GETTING-STARTED.md and field-test/prompt.txt. They are meant to be byte-identical and had not been since the sandbox/protection wording landed in README alone, which left the field-test gate measuring a prompt nobody pastes. tests/install-prompt.test.ts now fails on drift. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Author
|
/review |
|
Adds clear refresh and deploy reminders consistently across docs, CLI, and tests. 🎯 Quality: 100% Elite · 📦 Size: Medium 📈 This month: Your 71st PR — above team average · Averaging Excellent |
patchstackdave
approved these changes
Sep 7, 2026
mariojgt
deleted the
mariot/eng-3784-force-a-refresh-after-install-completes-and-tell-the-user-to
branch
September 7, 2026 10:20
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 ENG-3784
What changed
A finished install now ends by naming the two things the user still has to do, in the CLI output and in the install prompt:
setupwrites is a source change, so the live site keeps serving its previous build.guide's checklist grows a block for each, andsetupcloses with the same two lines addressed to the assistant, so it relays them instead of reporting success against a page that shows nothing.Why the blank page happens
setupeditsindex.html(or, on a code root, the layout). A preview tab that was already open holds the HTML from before that edit, and the widget script only runs on a page load — so the button is absent until the page reloads. Nothing in the process can change that: the CLI's only outputs are file writes and an HTTPS POST, and it has no channel to the browser or iframe showing the preview.On the auto-refresh half of the ticket
Connect cannot force it, on any platform. This is not a per-builder gap to work around — no builder exposes a "reload the preview" call to a process running inside the workspace, so there is nothing to call.
What happens today is incidental and works most of the time: Vite-based builders watch
index.htmland issue a full reload when it changes, and framework fast-refresh does the same for a code root. It fails when the dev server was not running during setup, when the preview is a built preview rather than an HMR one, when the platform never adopted the CLI's on-disk edits, or when the preview socket had dropped."Usually reloads, sometimes not" is why the wording is conditional — "Builders that hot reload refresh it themselves; if the button is missing, refresh the preview once" — rather than "refresh now". That satisfies the ticket's requirement not to tell someone to refresh a page that just refreshed itself.
A genuinely forced refresh would have to come from the dashboard's install-guide page polling for the site to connect, which is not this repo.
Fix
widgetTagInPlace()insrc/guide.ts, and two closing blocks in the checklist."widget": false.runSetupends withTell the user:and the two lines, so the relay is explicit rather than hoped for.AGENT-INSTALL.md,README.mdandGETTING-STARTED.md.Also in here: the install prompt had drifted
The prompt is meant to be byte-identical in
README.md,GETTING-STARTED.mdandfield-test/prompt.txt. It has not been since the sandbox/protection wording landed in README alone — the other two kept the older short version. That meant the field-test gate was measuring a prompt nobody pastes, so this change could not be validated without fixing it first.All three are now aligned on the README wording, and
tests/install-prompt.test.tscompares them and fails on drift. Happy to split this into its own PR if you would rather review it separately.Verified
npm test(2465 passing, 7 skipped) andnpm run typecheckare green. Nine new tests cover both notices and their gates, plus the three-way prompt identity.The field-test gate has not passed yet.
node field-test/run.mjs --persona hostile --rounds 3is required for a change to the prompt,src/guide.tsorAGENT-INSTALL.md. Two attempts were killed mid-round-1 by session teardown, so there is no scorecard — not a red run, no run. This needs a completed gate before merge. Worth noting the fixture installs the published package, so it can only validate the prompt shape here; the checklist changes want a re-run after publication.Out of scope, worth a follow-up
The ticket asks to verify behaviour across feature-flag states. Connect's output has no flag dependence — it renders from local project state and reads no flag — so that verification belongs with whoever owns the widget and dashboard UIs.
Also worth confirming how much of the original non-render ENG-3684 already explains, since the dogfooding sessions may predate that fix.
Docs: updated in this PR (
AGENT-INSTALL.md,README.md,GETTING-STARTED.md,MAINTAINING.md).🤖 Generated with Claude Code