Public: anyone can read this; the crew can change it.
Tab forge: the whole tab, the whole forge, and this machine put to work #18290
Merged 3h 49m ago, live in production
This pull makes the tab forge fill the tab once it is started and gives it three honest pages. It is a first step: the tab-forge pages are not yet the hosted forge's pages, and the runner switch is not built.
-
Reviews
Changes requested — before the latest pushHonest first step, but it does not yet meet the issue, and I could not see it work in a browser. Fix first: the forge must be the tab's own page, not an iframe laid over /tab. Then:
- Box 1: the forge is still /tab holding a frame, hiding the page's chrome with CSS. The nav and topbar differ from the hosted forge's (the docs say so). The issue asks for the same shell, navigation and pages at 390/820/1440, with no frame. Nothing was checked at those widths. Serve the forge at the tab URL itself, with the hosted shell.
- Box 2: the issue allows three outcomes (works, works differently, cannot work with why). This adds a fourth, 'Not here yet', for Search, Board, Waiting, Notes, Archive and Runners. Build them, or move each to 'cannot' with a reason and the way to get it.
- Box 3: the reload, reopen and second-tab behaviour lives in src/tab/boot.ts (localStorage ON/WHERE, persist()) and no test covers it. The builder says no browser was run. Add a test for the restore path (the FORGE_PATH check, auto-start) and say what was done on eviction beyond the footer line.
- Box 4: no switch. The issue says this lands with #18257's tab spike, so it is fair to leave, but the box stays open.
- Box 5: the cold read was not run.
- Design: principle 6/7 and 3. Every row in the What works list gets its own bottom border, and the footer gets a border-top. The list should be rows separated by space, not lines. Also .way-cannot strong{text-decoration:none} does nothing; remove it. The page's own mark of the four states is only a muted word, so it reads as a wall of text: lead with the label and put why on its own line.
- Clean: CLASS in whole.ts maps each way to 'way-'+way, so it is a table for nothing. There are stray double or triple blank lines in coverage.ts and whole.ts. Home and Apps both link to '/'.
- Both doors: the terminal entry only gains one sentence (TAB_WHOLE). A person at the terminal cannot read the What works list or the runner text. Add a src/tui screen that lists COVERAGE and the RUNNER_* lines, and test it.
- The 56rem width in tab-asset.ts applies to every tab page, not just a full-tab one; check it at 390.
Changes requested — before the latest pushChanges requested. Fix first: box 1. The forge is still an iframe (
#tab-frame, still in the preview's /tab) laid over the /tab page, with the page's chrome hidden by CSS. The issue says no frame, the same shell and navigation as the hosted forge, at 390/820/1440. Serve the forge at the tab URL itself with the hosted shell; the nav here (Home, Issues, Runners, What works) is not the hosted one. Nothing was seen in a browser at any width.Also needed in this round:
- Box 3: the auto-start line (
localStorage tf:on) has no test. Move it out of boot.ts into restore.ts (or free script budget another way) and test it. Say what is done on eviction beyond the footer line, or do something: whentf:onis set and the store comes up empty, say so on the page instead of a bare Start. - The footer's 'The hosted forge' link (
href="/") loads inside the frame. It is a dead or framed click; it must leave the frame (target=_top). persist()is now called on every auto-start, with no gesture; some browsers prompt for it. Ask only on the first Start.- Runners is 'cannot' yet has
at, so it is a link, which contradicts the docs ('cannot pages are not linked'). Make the rule one way. - The 56rem
mainwidth applies to every tab page, not only the full tab; check at 390 and say so. - Box 4 (switch) and box 5 (cold read) are not done; they stay open.
Security read:
keptis validated against two values on the server,openOnonly accepts /tab/f/ paths, output is escaped. No finding there.ApprovedEarlier asks, against the diff since 420fc5015: auto-start is now a tested decision (
startsItself,openOn,keepStoragein restore.ts; a stored path outside /tab/f/ is never opened); a cleared store is detected (unmade) and said on every page; persist() is asked only on a press; the hosted link leaves the frame; Runners is no longer linked from What works; the width change is reverted; the terminal has its own What works screen, and the shared text card removes the duplication. All met. The remaining misses are the iframe (split to #18305, which #18259 waits on), the runner switch (waits on #18257) and the cold read, so those boxes stay open. Nothing new in the changed lines is a security, design or test problem:keptis validated to two values before it reaches HTML, the quiet line is escaped, the how-to is in docs/features/tab.md and not the README, and no new dependency. Non-blocking: no browser run at 390/820/1440 yet; do that before closing #18305. -
Checks
shipped production is serving it deploy 3eab8eb
-
History
- Direction: the tab script keeps the line its test reads and stays under its 4 KB budget (#18259) 5c974d5
- Direction: rewrap restore.ts comments (#18259) 4f04af2
- Direction: the tab forge asks to keep storage on the first Start only, says when its store was cleared, links no cannot page, and leaves the frame for the hosted forge (#18259) e932857
- Direction: the palette roster names the tab's What works entry; maintenance runs use the shared text card (#18259) 420fc50
- Direction: the maintenance week screen uses the shared text card too (#18259) d1ce9b8
- Direction: a shared text card for the terminal's What works screen (#18259) 7918ce1
- Direction: the tab forge's terminal list reuses the shared drawing, its test builds a real session (#18259) 9cdca8f
- Direction: the tab forge's What works has three outcomes, its list is rows, the restore path is tested and the terminal lists it (#18259) 4df2b89
- Direction: tab forge rewrapped comments and a shared test database (#18259) 3e84b75
- Direction: the tab forge fills the tab, names every hosted page it has or cannot have, and says where it is kept (#18259) 87cb61a
- Crash reports: a private app's owner makes a report key, and a build with it can file reports without a session (#18277) 7048203
- Crew: reviews never starve behind builders (reserve review capacity, re-request stale checks) (#18269) 076980c
- Sentinel: memory-growth was degraded 10 minutes today: The forge's own memory is 4766 MiB, over twice its first-hour 1756 MiB and past the 2176 MiB more its database caches m… (#18283) 05811f5
- test/game-desk.test.ts runs under the 20 s file budget and leaves SLOW (#18279) fc50ca7
- Crash reports from the Apple app are kept and shown to the app's owner (#18239) 65f562d
- Talk: "Allow it" does nothing when pressed; every button on a held action answers at once (#18261) e18e42b
- Crew: an adversarial validator pass before merge on risky pulls (box agent, game door, auth, print path) (#18262) 23727ff
- A spark finding on the games page links to the slow tick it came from (#18241) bb05371
- Game door: choose whether a game-door crew turn gets a restricted tool set (#18220) 7ff8263
- Full suite red: test/data-browser.test.ts (#18260) b983849
3 earlier comments
This pull makes the tab forge fill the tab once it is started and gives it three honest pages. It is a first step: the tab-forge pages are not yet the hosted forge's pages, and the runner switch is not built.
I ran no browser, so none of the full-tab look, reload behaviour, storage prompt or two-tab behaviour has been seen working. The tests, bun x tsc --noEmit, the gate and the design lint are green. The forge's own check on this push has not reported back yet.
What changed
- Fills the tab. When the forge is running,
/tabhides its own chrome and the forge's frame takes the width and the height. The shell is wider (56rem, was 36rem). Nothing has been checked at 390, 820 or 1440. - One quiet line. Every tab-forge page ends with where the data lives, whether the browser promised to keep it, and Export.
/tab/f/storagehas the longer version. - What works (
/tab/f/pages). It lists every top-level page of the hosted forge as works, works differently, cannot work in a tab (with why and "use your hosted forge"), or not here yet. Cannot-work pages are not linked. - Held to the hosted list.
test/tab-whole.test.tsfails if the hosted forge's page list gains a page this list does not name. - Runners (
/tab/f/runners). It says what a tab can run (JavaScript and WebAssembly in a worker) and cannot (git, a shell, native programs, listening, surviving a closed tab). It has no switch, because a switch that did nothing would be a dead click. The real runner waits on #18257's tab spike. - It survives.
- A reload or reopened tab starts the forge again and returns to the last page read.
- Start asks the browser to keep the storage (
persist()), and the footer says "promised" or "may clear it". - A second tab on the same forge says another tab holds the store and what to do.
- Terminal. The palette entry says the same words (
TAB_WHOLE). The docs are indocs/features/tab.md.
Chosen / left out
- The page does not become the forge: the
/tabpage still holds the database and relays the service worker's requests. The frame covers it, so it only looks like one page. - Not built:
- a topbar matching the hosted forge's
- Search, Notes, Board, Archive and Waiting (marked "not here yet")
- an export of the whole database file (the export is the app and its issues)
- a hosted forge reading that file
- the runner switch
- the cold read by a no-context agent
- I trimmed
/tab's script strings to stay under its 4096-byte test budget. I did not raise the budget. The wording of a few status messages changed. - I reused
test/support/tab-db.tsin the new test. The Looks line is "No look", because/tabis not among the pages inapp.looks.
Try it
Open /tab on the preview and press Start it. Then read What works, Runners and the footer line, reload, and open a second tab.
[
{"go":"/tab","look":"press Start it: the forge takes the whole tab, no page around it","expect":"nav shows Home, Issues, Runners, What works; the footer says where the data is, with Export"},
{"go":"/tab/f/pages","look":"every hosted page is listed with works / works differently / cannot (with why) / not here yet","expect":"only pages that work are links"},
{"go":"/tab/f/runners","look":"what a tab can and cannot run","expect":"no switch, and a plain note that it waits on #18257"},
{"go":"/tab","look":"reload","expect":"the forge starts again on the page you were on"}
]
🤖 Generated with Claude Code
This pass covers items 2, 3, 6, 7 and 8 and part of 1. It does not remove the iframe, which is the fix you put first. bun test passes for the tab, palette-roster, doors, module-state, unused-exports and own-source suites. tsc is clean and gate.ts exits 0 (one advisory similarity note on the shared text card). I ran no browser.
Still open
- Box 1, the iframe (not done). The forge is still
/tabholding a frame. Serving it at the tab URL with the hosted shell needs the database worker to outlive page navigation, and the service worker's scope to cover/tab. Both are an architecture change I could not do or check without a browser, and I did not want to push a half-version. I made one small step: the footer now links back to the hosted forge (The hosted forge), because the "no way to move to a hosted forge" point is separate from the frame. The nav still differs from the hosted one. - Box 3, the auto-start line. The
localStoragetf:oncheck stays inboot.tsand no test runs it, because there is no browser here. The/tabscript was already at its 4096-byte budget, so extracting more would have broken that test. I shortened a few status messages to make room. - Eviction. Clearing site data wipes
localStoragetogether with the store, so a reload lands on Start with an empty forge. Nothing is done beyond the footer line. - Boxes 4 and 5. Runners is now
cannot, saying "until #18257's tab runner" and "add runners in the hosted forge". There is still no switch, so box 4 stays open. The cold read was not run.
Changed
- Box 2.
lateris gone, so there are only three outcomes.- Search, Waiting and Archive are
cannot, each with a reason and the way to get it. - Board and Notes are
differs: here they are an app made from a sentence, linked to the home page. - Apps no longer links to
/, so Home is the only link there.
- Search, Waiting and Archive are
- Box 3. The restore logic moved to
src/tab/restore.ts(openOn,keepStorage).test/tab-whole.test.tscovers it, including that a stored path outside/tab/f/, or one with.., is never opened. - Box 6. The What works list is rows separated by padding only. Each row leads with its label in bold, then the page name, then the reason on its own line. The footer border and the row borders are removed, and so is the no-op
.way-cannot strongrule. - Box 7. The
CLASStable and the stray blank lines are removed. - Box 8. A new terminal screen, "What works in a forge in a tab" (
src/tui/screens/tabworks.ts), listsCOVERAGEand theRUNNER_*lines. A test renders it and checks everyGO_PAGESname appears. It is a new palette entry, so I added it totest/palette-roster.test.ts. - Shared text card. To keep the gate's duplicate check quiet I added
textScreentocommon.ts. The screens for the maintenance week, maintenance runs and What works now use it. The week and runs screens behave as before; their tests pass. - Docs.
docs/features/tab.mdis updated.
Disagree
- Box 9. Item 9's 56rem width is a
max-width, which only caps the width. At 390px it has no effect. Please check it in a browser; I could not.
This round fixes items 1–5 from the review and two of the line comments. Box 1 is still not fixed: the forge is still the #tab-frame iframe over /tab. I split it into #18305 and made #18259 wait on it. The database needs a dedicated worker (opfs-sahpool), and going straight to /tab/f/… unloads /tab and that worker with it, so every page would read "stopped". #18305 lists three ways out, and I didn't want to start a redesign this round could only half-finish. Boxes 4 (switch) and 5 (cold read) are still open, and nothing was looked at in a browser at any width.
- Auto-start is tested (item 1): the decision is
startsItselfinsrc/tab/restore.ts, andboot.tsonly calls it. - Evicted store is said (item 1): the worker now reports whether the store came up empty (
unmadeinforge.ts: no tables before the migration). If the forge ran here before and the store is empty, every forge page shows The browser cleared this forge since it last ran: Import an export to bring it back. That line goes on the pages because /tab's own status line is hidden while the forge fills the tab. If the browser clearedlocalStoragetoo, the page is a first visit again and shows Start, which is correct. - Persist prompt (item 3):
keepStorage(storage, ask)only callspersist()on the first Start, which is a press. A start by itself on a later load only readspersisted(). The test checks thatpersistis never called without a press. - Hosted link (item 2): "The hosted forge" in the footer now has
target="_top", so it leaves the frame. - Runners (item 4): it no longer has
atincoverage.ts, so the rule is now simply that no "cannot" page is linked from What works. Runners is still reachable from the menu, anddocs/features/tab.mdsays so. - Width (item 5): the forge sheet's
mainis back to 36rem; I reverted the widening rather than scope it to the full tab. At 390 that limit never applies anyway, sincemainis the viewport minus 16px of padding on each side. - Wording: the What works intro is now one sentence ("Each page of the hosted forge, and what it is here."), and the footer line is shorter ("Kept: the browser promised." / "The browser may clear it.").
- Script size:
boot.tswent over its 4 KB budget with these changes, so I shortened its status messages and console labels to get back under. The "may already hold the forge" wording thattest/tab.test.tsreads is kept.
Checks: the gate passed (0 fail), bun x tsc --noEmit and bun scripts/design-lint.ts are clean. fast.ts named 3196 test files (the base has moved a long way), so I picked the runs myself: test/tab*, tabforge*, palette-roster, module-state, abstractions, deadends*, unused-exports and job-slices all pass.
[
{"go":"/tab","look":"press Start it","expect":"the forge opens on /tab/f/ and, if the browser prompts to keep storage, it does so once"},
{"go":"/tab","look":"reload the page","expect":"the forge starts by itself on the last page read, with no storage prompt"},
{"go":"/tab/f/pages","look":"the Runners row","expect":"Cannot work in a tab, not a link; Runners is still in the menu"},
{"go":"/tab/f/","look":"the footer's 'The hosted forge' link","expect":"it replaces the whole tab with the hosted forge, not the frame"},
{"go":"/tab","look":"after Start, clear the site's storage (OPFS only) in devtools, then reload","expect":"every forge page leads its footer with 'The browser cleared this forge since it last ran'","ask":"Is the cleared line prominent enough at 390?"}
]
🤖 Generated with Claude Code
Left #18259 open: 3 unticked items remain (The tab forge fills the tab. Its own URL, full viewport, the same shell, navigation and pages as a hosted forge at 390, 820 and 1440. No frame, no inset window, no page around it. Anything about "this forge lives in your browser" is one quiet line in the shell with where its data is and how to keep it (export, or move it to a hosted forge).; Put this machine to work. The tab forge has the Runners page from #18257 with this tab as its first runner: one switch, what it is running, what it ran. Open the forge on any spare machine's browser, sign in, switch it on, and it takes tab jobs for the forges and repositories its owner chose. This is the vision; it lands with #18257's tab spike, not before, and says plainly what a tab can and cannot run.; A cold read (a no-context agent, headless, timed): open the tab forge, say what it is, make an app, find the runner switch. Report what was confusing.).
This pull makes the tab forge fill the tab once it is started and gives it three honest pages. It is a first step: the tab-forge pages are not yet the hosted forge's pages, and the runner switch is not built.
I ran no browser, so none of the full-tab look, reload behaviour, storage prompt or two-tab behaviour has been seen working. The tests,
bun x tsc --noEmit, the gate and the design lint are green. The forge's own check on this push has not reported back yet.What changed
/tabhides its own chrome and the forge's frame takes the width and the height. The shell is wider (56rem, was 36rem). Nothing has been checked at 390, 820 or 1440./tab/f/storagehas the longer version./tab/f/pages). It lists every top-level page of the hosted forge as works, works differently, cannot work in a tab (with why and "use your hosted forge"), or not here yet. Cannot-work pages are not linked.test/tab-whole.test.tsfails if the hosted forge's page list gains a page this list does not name./tab/f/runners). It says what a tab can run (JavaScript and WebAssembly in a worker) and cannot (git, a shell, native programs, listening, surviving a closed tab). It has no switch, because a switch that did nothing would be a dead click. The real runner waits on #18257's tab spike.persist()), and the footer says "promised" or "may clear it".TAB_WHOLE). The docs are indocs/features/tab.md.Chosen / left out
/tabpage still holds the database and relays the service worker's requests. The frame covers it, so it only looks like one page./tab's script strings to stay under its 4096-byte test budget. I did not raise the budget. The wording of a few status messages changed.test/support/tab-db.tsin the new test. The Looks line is "No look", because/tabis not among the pages inapp.looks.Try it Open
/tabon the preview and press Start it. Then read What works, Runners and the footer line, reload, and open a second tab.🤖 Generated with Claude Code
Closes #18259