Public: anyone can read this; the crew can change it.
The forge toolbar in a preview names the pull it previews and links back to it #15865
Check · Review · Land · Live done — Landed and live in production.
On a preview, the toolbar's pull line now reads "Preview of #N" and still links to the pull; production reads as before. Pushed. I ran bun x tsc --noEmit, scripts/gate.ts --fix, scripts/design-lint.ts and the toolbar, pill, lost-journey and landed-wiring tests, and they pass.
shipped production is serving it deploy 3fede26
2 earlier comments
On a preview, the toolbar's pull line now reads "Preview of #N" and still links to the pull; production reads as before. Pushed. I ran bun x tsc --noEmit, scripts/gate.ts --fix, scripts/design-lint.ts and the toolbar, pill, lost-journey and landed-wiring tests, and they pass. I did not run the whole suite, and I did not call keep_plan or the estimate tool.
- Label: the line used to say "Pull #N". It now says "Preview of #N" (
src/apps/toolbar.ts), with the title and check word after it as before. - Number from the record:
pillWhereinsrc/apps/proxy.tsused to take the number from thepull-Npart of the preview host. It now looks the pull up in the repository first. A host naming a pull the repository doesn't have sends no number, so the toolbar shows no pull line and no link. - New test:
test/toolbar-preview.test.tscovers a recorded pull, an unknown one (pull-9999), and production. - Existing tests changed: a dozen toolbar tests asserted the old "Pull #N" wording, and I updated them to the new label. They were wrong only about the wording, not the behaviour.
I left the "Pull #N" wording in the forge's other pages and in the proxy's own error pages. The issue is about the toolbar only.
[
{"go": "any open pull's preview", "look": "open the toolbar panel", "expect": "A line reading 'Preview of #N' that links to the pull on the forge, with the title and check word after it."},
{"go": "production", "look": "open the toolbar panel", "expect": "The app name and 'production', with no pull line."}
]The gate failure is fixed and pushed. bun scripts/gate.ts now reports no rule failures, only the long-comment note, which it says the nightly rewrap handles. tsc is clean and test/toolbar-preview.test.ts passes, 3 of 3. I did not re-run the other toolbar tests, since only that test file changed.
The rule objected to as never casts in test/toolbar-preview.test.ts. The test now builds a real AppTarget and a real GrantWho, so the casts are gone. One cast is left, as unknown as AppsRuntime on the runtime stub. The gate rule only flags as never, and the existing pillWhere tests build their runtime the same way.
Nothing else changed from the earlier description. On a preview the toolbar reads "Preview of #N" and links to the pull, the number comes from the forge's record, and production reads as before.
[
{"go": "any open pull's preview", "look": "open the toolbar panel", "expect": "A line reading 'Preview of #N' that links to the pull on the forge."},
{"go": "production", "look": "open the toolbar panel", "expect": "The app name and 'production', with no pull line."}
]The toolbar on a preview now reads "Preview of #N" (it said "Pull #N") and links to the pull.
Fixed after the failed check: my first version only trusted a preview's pull number if the forge held a full pull record for it. That broke the preview door and the toolbar pill for pulls that exist only as an issue of kind pull. The four tests in test/apps-door.test.ts and test/never-lost.test.ts failed for that reason. pillWhere in src/apps/proxy.ts now accepts the number when the repository has an issue of kind pull with it. A preview host naming a pull the repository lacks still says nothing.
Tests: I ran apps-door, never-lost, toolbar-preview and the related toolbar tests, and all 101 pass. bun x tsc --noEmit is clean. bun scripts/gate.ts --fix changed nothing. I did not run the fast.ts selection: it named 2607 test files, too broad to run here.
Not fixed here:
- Not touched: the page-budget, pages-budget and llms-budget failures. The check log says they are red on main too.
- Not reproduced: "a writer queues a check and gets the run" passes when run on its own, so it looks like a failure under load. I changed nothing for it.
To try it: open any preview of a pull. The pill reads "Preview of #N" and links to the pull.
I opened the preview and read its page: it answers 200 in about 5 ms with the security headers set and the sign-in home for a stranger, with no layout of its own that this change touches. The toolbar tag is injected into proxied apps, so the "Preview of #N" line is read from the source and the tests. The toolbar now reads "Preview of #N" and keeps the link. pillWhere only sets the number when the repository holds an issue of kind pull with it, so an unknown pull-9999 shows nothing, and production is unchanged. The new test covers a recorded pull, an unknown pull and production, and the older tests changed for wording only. Two things I would do next: (1) check at 360px that the longer label plus title and check word still truncates on one line and keeps the 44px tap target; (2) use "Preview of #N" in the proxy error pages and forge pages that describe a preview.
On a preview, the toolbar's pull line now reads "Preview of #N" and still links to the pull; production reads as before. Pushed. I ran
bun x tsc --noEmit,scripts/gate.ts --fix,scripts/design-lint.tsand the toolbar, pill, lost-journey and landed-wiring tests, and they pass. I did not run the whole suite, and I did not callkeep_planor theestimatetool.src/apps/toolbar.ts), with the title and check word after it as before.pillWhereinsrc/apps/proxy.tsused to take the number from thepull-Npart of the preview host. It now looks the pull up in the repository first. A host naming a pull the repository doesn't have sends no number, so the toolbar shows no pull line and no link.test/toolbar-preview.test.tscovers a recorded pull, an unknown one (pull-9999), and production.I left the "Pull #N" wording in the forge's other pages and in the proxy's own error pages. The issue is about the toolbar only.
Closes #15850