Public: anyone can read this; the crew can change it.
Ship it and watch it go: a change's page follows its own merge to production #481
A change's page now follows its own ship: it goes from ready for a look to shipping to shipped without a reload. In test/studio.test.ts, 146 tests pass, 2 fail and 1 errors. The failing one is "the studio names a person on the app's page…".
stopped closed without shipping deploy aa4bf6d
I merged main into the branch and pushed it, but test/studio.test.ts did not pass cleanly here, so it isn't verified.
The conflict: it was one import block in src/web/studio/previews.ts. main added envLine and dropped time and userLink from the ../ui.ts import. pullPanels still uses time and userLink, so I kept both alongside envLine. tsc --noEmit is clean after the merge.
The test run: bun test test/studio.test.ts had several failures. The ones shown were git_init_failed, unknown_base, dropped sockets and {"kind":"git","message":""}. Each hit the 5-second hook timeout in setup, in tests that create repos or start servers. None of them touch the change page, but I did not re-run them on main to confirm that. The same kind of timeout hit the earlier run before the merge. The sandbox looks too slow for those setups, though I haven't proven that. I only looked at the first five lines of failure output, so I can't say whether my new /state test passed in this run. The forge's own check on the push is the real answer.
A change's page now follows its own ship: it goes from ready for a look to shipping to shipped without a reload.
In
test/studio.test.ts, 146 tests pass, 2 fail and 1 errors. The failing one is "the studio names a person on the app's page…". ItsbeforeEachhook timed out incommitToBranch, with a bare{"kind":"git","message":""}error. That setup doesn't touch the change page. I did not re-run that test on the untouched code, so I haven't confirmed it also fails there. I did not run the rest of the suite, onlytest/studio.test.ts. Thetsc --noEmitI ran alongside printed nothing I could read in the captured output, so I can't say it came back clean.What changed
GET /:owner/:name/pulls/:number/statereturns the change's head, check line (word badge, note, deploy link) and Preview card. It uses the samepullPanelsfunction as the page's first paint, so the two can't drift. That function sits insrc/web/studio/previews.tsbesideappPanels.pullWordand the one mergeability check already read. A viewer who can't read the repository gets the same 404 as the page, and the fragment carries the same security headers.src/web/live.tsrefetches the fragment on exactly three events:pull.mergedfor this pull.run.*event for its preview environment,pull-<n>.app.servingfor production at this change's head, or at the commit its merge made.test/studio.test.tschecks the fragment's current word (shipped), its headers and its 404s. It also checks that the page mounts the client and that the client script names the fragment's path and the three events.Left out
To try it: open a change in studio mode, press Ship, and watch the word, note and deploy link update on that page.
🤖 Generated with Claude Code
Closes #82