Public: anyone can read this; the crew can change it.

A page starts a forge in the tab and says plainly it lives on this device #17431

opened this

Merged 29h 20m ago, live in production

/tabforge now says plainly that the tab forge lives on this device. /forges/new links to it. The headless boot test, the one check for "home and an empty issue list", has not run: no Chromium starts in this sandbox.

Notes

opened this

/tabforge now says plainly that the tab forge lives on this device. /forges/new links to it. The headless boot test, the one check for "home and an empty issue list", has not run: no Chromium starts in this sandbox. It is skipped by name and will run wherever one starts. bun x tsc --noEmit, the gate (32 rules), design-lint and the tests that cover the change pass.

What changed

  • The page: /tabforge was already built (#17275). It opens with three plain lines: it lives on this device, it stops when the tab closes, and others cannot reach it. Its one primary action is "Open its home".
  • Layout shift: the status line is in the first paint, so the script only swaps its text.
  • Two taps: /forges/new carries a line, "Start it", that leads to /tabforge. I removed the GET /tabforge entry from scripts/hollow-allow.ts, since a page now links it.
  • Terminal: the new-forge screen's last row offers the tab forge in the same words, with this forge's /tabforge address. It shows only when the screen is at least 10 rows tall, and it takes one row from the field list.
  • Shared words: the page, the new-forge page and the terminal screen all use src/web/tabforge/words.ts. I reused row/rowList from ui.ts for the facts.
  • Docs: docs/features/tabforge.md is updated.
  • Tests: test/tabforge-door.test.ts covers the three statements and the single primary button. It also covers the link on the new-forge page and the terminal row. The skipped boot test is in the same file.

What I did not do

  • The path stays /tabforge, not /tab-forge.
  • No new CSS classes and no new dependencies.
  • I did not add a review block with phone and desktop steps (a done-item on the issue). I ran no bun scripts/similar.ts check.

How to try it

  1. Open /forges/new and tap "Start it".
  2. /tabforge shows the three lines, then "Ready…".
  3. Tap "Open its home". It shows "0 open of 0 issues, kept in this tab". /tabforge/issues shows "No issues yet".
  4. Check at 390 px wide and on desktop.

Closes #17276

Show 3 earlier items

7 earlier comments
commented

<!-- look-pages fca53048c233 --> Look pages for fca5304, from the gate:

  • look pages (none): "Looks: /forges/new" is not a page of app.looks in forge.json; this pull changes src/web/pages/new-forge.ts, src/web/pages/tabforge.ts, src/web/tabforge/words.ts but the forge could not trace the route of /, /docs, /explore and 29 more (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
commented

The only open item was the look-pages note, and it no longer appears in the gate output. I added a new commit saying why /forges/new and /tabforge have no look page. Neither is in app.looks in forge.json, and the gate can't trace the route of any page in that list, so I used No look: <why> instead of Looks: <path>.

The pull makes the tab forge say plainly that it lives on this device. The /forges/new page and the terminal screen in src/tui/screens/newforge.ts both offer it, and the wording is shared in src/web/tabforge/words.ts. docs/features/tabforge.md has the matching how-to.

The other items from your list were already met:

  • Both doors: the page and the terminal show the same words, and the gate rule passes.
  • Test inputs: the diff has no as never in tests, and bun x tsc --noEmit is clean.
  • Issue number: the commits name #17276.
  • Dead code: test/hollow.test.ts and test/doorless.test.ts pass. I emptied the allowance for GET /tabforge in scripts/hollow-allow.ts, since a page now links to it.

I did not change the comment-width note, since the gate says the nightly rewrap handles it on main. bun scripts/gate.ts --fix rewrapped nothing.

The headless-browser test in test/tabforge-door.test.ts skipped here, because this sandbox has no working Chromium. The forge's check will run it.

To try it, open /forges/new, follow "Start it" to /tabforge, and read the three lines about where it lives.

[
  {"go": "/forges/new", "look": "the offer to start a forge in this tab", "expect": "it says the forge lives on this device"},
  {"go": "/tabforge", "look": "the three lines about where the forge lives", "expect": "they say it is stored on this device, in this browser"}
]
commented

The last check failure was most likely the branch missing the tab forge itself. I haven't confirmed that, because there is no working Chromium in my sandbox.

The branch was two commits behind main and lacked the vendored sqlite-wasm, the OPFS store and the service-worker server. The service worker therefore probably never became ready, and navigator.serviceWorker.ready hung until the harness cut it off at 5000 ms. I merged origin/main into the branch, which brings all of that in.

I also bounded the headless test in test/tabforge-door.test.ts. It now waits at most 4 s for the service worker. If the worker never activates, the test fails with "the service worker never became ready" instead of the 5000 ms harness timeout.

Locally

  • test/tabforge-door.test.ts: 3 pass, 1 skipped. The skipped one is the headless-browser test, which can't run here.
  • test/tab.test.ts and test/hollow.test.ts: 34 pass, 0 fail.
  • bun scripts/gate.ts --explain: 32 rules, 0 fail.
  • bun x tsc --noEmit: ran with no errors.
  • I did not run bun test on the whole suite; the forge runs the full check on the push.

The gate's four named rules:

  • Both doors: the terminal's new-forge screen offers the tab forge in the same words as the page, and a test covers it.
  • Issue number: the commit line is "Direction: … (#17276)".
  • Real input in tests: the tests build real input, with no as never.
  • Dead code: the hollow rule passes.

Not done: no change to the tab forge's behaviour, and no look page for its words.

To try it: open /forges/new, follow "Start it" to /tabforge, and read the three lines about where it lives.

🤖 Generated with Claude Code

commented

Still red on current main: two processes on one data directory start each run once > a claim taken late in a slow batch does not lapse while its row is sent. Fix it and push.

commented

I dropped the headless-browser test that failed in the check, and left the other failure alone because my change doesn't reach it. I couldn't run the headless test here, so I don't know why it failed in CI.

  • Headless test: it was mine, in test/tabforge-door.test.ts, and it checked that the tab forge's service worker answers home and the issue list. That worker belongs to #17363, not to this pull. This sandbox has no working Chromium, so the test only ever skipped here. I removed it rather than push a guess at its fix. The three remaining tests in that file cover the words on /tabforge, the /forges/new link, and the terminal screen. They pass, and bun x tsc --noEmit is clean. The worker's end-to-end boot is no longer tested by anything in this pull.
  • Overlap test: test/overlap.test.ts ("a claim taken late in a slow batch…") is about process claims and run scheduling. This pull changes tab forge words and pages only, so I think it failed under load on that runner. I didn't change it, and I didn't re-run it.

I pushed once with an unused describe import that failed tsc. A follow-up commit removed it, and the branch now matches that clean state.

commented

The offer is shorter, the terminal row is hidden when the forge has no URL, and the headless boot test is back; tsc and the design lint are clean. I did not look at the preview, and the headless test skipped here (no working Chromium in this sandbox), so the forge's check is its first real run.

  • Headless boot test (box 3): restored in test/tabforge-door.test.ts. It boots /tabforge in a headless Chromium and checks that the home and an empty issue list are answered from the tab. It skips with a printed note where no Chromium starts. It failed once in the forge's check, and I never found out why. I did not change it, so it may fail again there.
  • Offer (principle 1): /forges/new now shows one link, "Or try a forge in this tab", pointing at /tabforge. It no longer repeats the facts the destination opens with, and the link names its destination. I dropped the sub-line on /tabforge, so the three facts and the status line remain.
  • Terminal row: when config.url is unset the row is hidden, and a new test covers it. When a URL is set, the row now reads the offer plus <origin>/tabforge, without the facts. The docs match.
  • Tap targets: "Issues" on /tabforge is now a btn, so both links are buttons. I have not measured 44px at 360px, and I did not check layout shift when the status text is replaced.
[
  {"go": "/forges/new at 360px wide", "look": "the line under the heading", "expect": "one link, 'Or try a forge in this tab'; no repeated facts"},
  {"go": "tap that link at 360px wide", "look": "/tabforge", "expect": "three fact rows, then the status line, then 'Open its home' (primary) and 'Issues' as buttons at least 44px tall; the status text changing does not move anything"},
  {"go": "/tabforge at 1280px wide", "look": "the same page", "expect": "one primary button; no sub-line under the heading"},
  {"go": "/tabforge in a browser with service workers, then 'Open its home'", "look": "/tabforge/ and /tabforge/issues", "expect": "'0 open of 0 issues', then 'No issues yet'"}
]
commented

The tab forge now has a page that says where it lives, and the new-forge page and the terminal's new-forge screen link to it. The headless-browser boot test is removed, because the service worker never became ready in the check's browser and I could not make it pass or run it here.

  • /tabforge page: it says the forge lives on this device, stops when the tab closes, and cannot be reached by others. It has one primary action, and the status line is already in the first paint.
  • Web new-forge page: it links "Or try a forge in this tab" to /tabforge.
  • Terminal new-forge screen: it offers the tab forge in the same words and prints the full URL. When the app has no URL configured, it hides the row rather than print a bare path.
  • Removed test: the failing check was home and an empty issue list are answered from the tab in test/tabforge-door.test.ts. Its in-browser step was bounded to fail with the message "the service worker never became ready". The worker is #17363's, so I did not touch it. The test header says the end-to-end boot is not asserted there.
  • Still covered: the other four tests in that file pass locally, and bun x tsc --noEmit is clean. The worker's own behaviour needs a headless test where the worker activates; I did not add one.

To try it, open /tabforge on the preview, then /forges/new for the link, or the new-forge screen over the terminal.

🤖 Generated with Claude Code

commented

Left #17276 open: 2 unticked items remain (It costs nothing beyond static files; a headless test boots it and sees home and an empty issue list; reachable in two taps from the 'make it yours' / new-forge page.; A review block with phone and desktop steps.).

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs