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

Games, Infrastructure and the other areas are in the navigation, for everyone who may use them #17633

opened this in answer to

Merged 10h 9m ago, live in production

Every page now has an Areas menu in the topbar, a phone's too, so Games and Infrastructure are one click from home for whoever may use them. A person sees only the areas they may use.

Notes

opened this

Every page now has an Areas menu in the topbar, a phone's too, so Games and Infrastructure are one click from home for whoever may use them. A person sees only the areas they may use. I ran the areas tests, the palette roster and the games, infra, cost and unused-exports tests, plus tsc, the design lint and the gate; all pass. I did not run the full suite or press the menu in a browser. The sandbox had no chromium, so the keys test skipped. The forge's check runs the rest.

What changed

  • One list. src/core/areas.ts names each area once, with its address, what it is for, what to do first, and who may use it. The areas are Work, Apps, Explore, Games, Infrastructure, Boards and System.
  • Who sees what. src/actions/areas.ts narrows the list to the viewer.
    • Anyone sees Apps and Explore, and anyone signed in sees Work.
    • Games shows for an admin or anyone a game box is shared with, and for no agent. A new seesAnyBox in src/games/store.ts checks the grant.
    • Infrastructure, Boards and System are admins' only.
  • Web. areasMenu in src/web/layout.ts draws the list, marks the page you are on, and shows it to signed-out visitors too. The Games and Apps first screens take their one-line purpose from the same list. A non-admin with an empty Games page gets "Open a server, then start it or read its console." instead of the admin's "Make one" link.
  • Terminal. A new Areas screen (src/tui/screens/areas.ts, palette entry rank 5) shows each area's purpose and "First: …". enter opens Apps, Games, Infrastructure and Boards natively. Work, Explore and System hand over their web address instead; the terminal has no matching screen, and I did not build them.
  • Links between areas.
    • A game box's machine row opens the machine on Infrastructure, for an admin.
    • A machine row gets a Game box or App button for what runs on it.
    • An app's More menu gains Cost, shown only to whoever may see its spend. /<owner>/<app>/cost existed but nothing linked to it. The terminal already reads that spend in Usage.
  • Tests and docs. test/areas.test.ts covers the list, the menu for an admin, an unshared person and a person with a box, the Cost step, and the terminal screen. I added the new entry to the three roster expectations in test/palette-roster.test.ts, since the entry is deliberate. The how-to is docs/features/areas.md; the generated src/generated/screens.ts re-indexed, which is why its diff is large.

What I chose not to do

  • No change to the Infrastructure page's own opening line; the area's wording matches it.
  • Nothing yet to measure the timed, persona-driven clicks-before-and-after test.
  • No Home page tile beyond the topbar menu.

To try it

  • Open / signed in and press Areas; an admin sees Games and Infrastructure, a plain member does not see either.
  • On an app, open More and choose Cost.
  • In the terminal, open Areas from the palette.
[
  {"go":"/","look":"Areas menu in the topbar, signed in as an admin","expect":"Lists Work, Apps, Explore, Games, Infrastructure, Boards and System; the current page is ticked","ask":"Is one word, Areas, clear enough for someone who does not know the forge?"},
  {"go":"/","look":"Areas menu signed in as a member with no game box","expect":"Work, Apps and Explore only; no Games, no Infrastructure"},
  {"go":"/games","look":"The first screen","expect":"One line saying what Games is for; with no boxes, an empty state that says what to do next"},
  {"go":"/infra","look":"A machine row","expect":"A Game box or App button that opens what runs on it"},
  {"go":"/apps","look":"Open an app, then More","expect":"A Cost step that opens its last 30 days"}
]

Closes #17627

20 earlier comments
commented

Every page now has an Areas menu in the topbar, a phone's too, so Games and Infrastructure are one click from home for whoever may use them. A person sees only the areas they may use. I ran the areas tests, the palette roster and the games, infra, cost and unused-exports tests, plus tsc, the design lint and the gate; all pass. I did not run the full suite or press the menu in a browser. The sandbox had no chromium, so the keys test skipped. The forge's check runs the rest.

What changed

  • One list. src/core/areas.ts names each area once, with its address, what it is for, what to do first, and who may use it. The areas are Work, Apps, Explore, Games, Infrastructure, Boards and System.
  • Who sees what. src/actions/areas.ts narrows the list to the viewer.
    • Anyone sees Apps and Explore, and anyone signed in sees Work.
    • Games shows for an admin or anyone a game box is shared with, and for no agent. A new seesAnyBox in src/games/store.ts checks the grant.
    • Infrastructure, Boards and System are admins' only.
  • Web. areasMenu in src/web/layout.ts draws the list, marks the page you are on, and shows it to signed-out visitors too. The Games and Apps first screens take their one-line purpose from the same list. A non-admin with an empty Games page gets "Open a server, then start it or read its console." instead of the admin's "Make one" link.
  • Terminal. A new Areas screen (src/tui/screens/areas.ts, palette entry rank 5) shows each area's purpose and "First: …". enter opens Apps, Games, Infrastructure and Boards natively. Work, Explore and System hand over their web address instead; the terminal has no matching screen, and I did not build them.
  • Links between areas.
    • A game box's machine row opens the machine on Infrastructure, for an admin.
    • A machine row gets a Game box or App button for what runs on it.
    • An app's More menu gains Cost, shown only to whoever may see its spend. /<owner>/<app>/cost existed but nothing linked to it. The terminal already reads that spend in Usage.
  • Tests and docs. test/areas.test.ts covers the list, the menu for an admin, an unshared person and a person with a box, the Cost step, and the terminal screen. I added the new entry to the three roster expectations in test/palette-roster.test.ts, since the entry is deliberate. The how-to is docs/features/areas.md; the generated src/generated/screens.ts re-indexed, which is why its diff is large.

What I chose not to do

  • No change to the Infrastructure page's own opening line; the area's wording matches it.
  • Nothing yet to measure the timed, persona-driven clicks-before-and-after test.
  • No Home page tile beyond the topbar menu.

To try it

  • Open / signed in and press Areas; an admin sees Games and Infrastructure, a plain member does not see either.
  • On an app, open More and choose Cost.
  • In the terminal, open Areas from the palette.
[
  {"go":"/","look":"Areas menu in the topbar, signed in as an admin","expect":"Lists Work, Apps, Explore, Games, Infrastructure, Boards and System; the current page is ticked","ask":"Is one word, Areas, clear enough for someone who does not know the forge?"},
  {"go":"/","look":"Areas menu signed in as a member with no game box","expect":"Work, Apps and Explore only; no Games, no Infrastructure"},
  {"go":"/games","look":"The first screen","expect":"One line saying what Games is for; with no boxes, an empty state that says what to do next"},
  {"go":"/infra","look":"A machine row","expect":"A Game box or App button that opens what runs on it"},
  {"go":"/apps","look":"Open an app, then More","expect":"A Cost step that opens its last 30 days"}
]
commented

<!-- look-pages fd0a41360173 --> Look pages for fd0a413, from the gate:

  • look pages (named): this pull changes src/web/layout.ts, src/web/pages/apps.ts, src/web/pages/cost.ts; a commit names /apps
commented

I pushed a fix for the failing /docs size test. test/docs-link.test.ts now passes, along with tsc, the areas tests, the account-menu and a11y-landmarks tests, and the page-budget test. I did not run the full suite; the forge's check does.

The Areas menu was adding about 1.2 KB to every guest page, which pushed the /docs index past its size budget. I made two changes in src/web/layout.ts:

  • Signed-in only. The menu is now drawn only for signed-in people. Signed-out visitors no longer get it. The /docs pages are guest pages, so they no longer carry it. Visitors still reach Apps and Explore from the pages themselves.
  • Plainer rows. The menu no longer has per-row icons, purpose tooltips or a menu title. For the signed-in pages that still carry it, that keeps the added bytes small.

I did not change the budget test; its limits are unchanged. I updated docs/features/areas.md to say the menu is for signed-in pages.

commented

<!-- look-pages 68d768b58246 --> Look pages for 68d768b, from the gate:

  • look pages (named): this pull changes src/web/layout.ts, src/web/pages/apps.ts, src/web/pages/cost.ts; a commit names /apps
commented

The Areas topbar menu from this pull made five existing tests fail. I updated them to expect it, and they now pass locally, but the forge's full check hasn't run on this push.

The check log showed nine failures, in four groups:

  • Palette order: areas is now the first entry in the roster, so test/palette-entries.test.ts expects areas, bills, payments, sentinel at the start.
  • Query count: the menu's box-visibility lookup adds one query to the 200 path, so FOUND_QUERIES in test/did-you-mean.test.ts goes from 36 to 37.
  • Topbar menus: the admin's top bar now holds three <details> menus, not two, so test/flow-pipeline.test.ts expects three.
  • Page byte budgets: the pull page is 32,721 bytes against a 32,270 cap, and /talk is 61,492 against 61,000. I raised the caps to 32,900 (test/pull-quiet.test.ts) and 61,700 (test/talk-page.test.ts).

The four talk-phone-360 failures in the log did not reproduce locally and pass now. I made no change for them and don't know why they failed in the check.

tsc is clean, and the gate's --fix run changed nothing. It printed two "one implementation?" similarity hints, on src/tui/screens/areas.ts and test/areas.test.ts. I left both alone.

I changed no app code; every edit is to a test or a budget.

commented

Nothing in this feedback needed a code change, so I pushed nothing. The branch is unchanged at 63dbf7254.

  • Look pages: the gate's line is a note, not a refusal. It says a commit names /apps, which is in forge.json looks, so the rule is met.
  • Both doors: the terminal side is already there as src/tui/screens/areas.ts, and the how-to as docs/features/areas.md. Both read the same core/areas.ts list as the topbar menu.
  • Dead code: the "every export under src/ has a caller" test passes.
  • Commit messages: each already carries (#17627).
  • Tests: none of mine uses as never.
  • Duplicate-function hints:
    • seesAnyBox and seesBox in src/games/store.ts are similar by shape only. seesAnyBox asks whether the viewer may open any box, and seesBox asks about one box.
    • areasScreen (src/tui/screens/areas.ts) and the test helper screen (test/areas.test.ts) are similar to newIssuePickScreen and shown by shape only, and merging them would couple unrelated code.
  • Comment wrap: bun scripts/gate.ts --fix changed nothing. Six files have a comment line over 100 columns, but the gate says the nightly rewrap handles those on main.
commented

A person with a grant on a game box now sees it on the first page, one tap from the page for that box. The topbar icons also carry a word on a phone. Pushed to the branch. bun x tsc --noEmit is clean. test/areas.test.ts and test/page-budget.test.ts pass, plus a spread of home, menu and palette tests before the last rebase. The full suite was not run (the check runs it), and the Talk layout test was skipped here because no chromium starts in this sandbox. I did not run the second persona's tasks on a live forge, so the "all five again" comparison is still to do.

What changed

  • Your game servers on the first page. src/web/game_strip.ts puts a "Your game servers" block above the lanes, one link per box, with the Games area's "what to do first" line. It lists only boxes the person holds a grant on. An admin's reach over every box is not a grant, so for an admin the Areas menu stays the way in. Agents get none.
  • Terminal door. The terminal's first screen has the same line, "Game servers: …", from the same boxesLine function.
  • Words on the icons. Below 720 px the Search, Talk and New icons show a word (.btn-word). Below 480 px the wordmark's text is hidden to make room, and the home link carries aria-label="forge, home". At 390 px this is untested in a browser here, and it is the thing to check first.
  • Docs and design. docs/features/areas.md gains a section on the strip. The two new classes are named in docs/design/areas/areas.md, and design-lint passes.
  • Branch. The fork already had a newer commit of mine (63dbf7254, the tests for the topbar, palette order, byte budgets and query count). I rebased onto it before pushing.

What I chose not to do

  • Page vocabulary. I did not change the lane names (Building, Checks, Review, Landing, Live). The new block gives a grant-only person their first page's answer. Renaming the lanes is a wider change for its own issue.
  • Admin strip. I did not show the strip to admins who hold no grant, so their home stays uncluttered.
  • Search. I did not touch the search results for "minecraft", because the issue says that is being checked separately.

Try it

  1. Sign in as someone with a grant on a game box and nothing else, and open /. "Your game servers" is at the top, and tapping the box opens /games/<box>.
  2. At 390 px, the topbar reads Areas, Search, Talk and New.
  3. In the terminal, the first screen has a "Game servers: …" line.
[
  {"go":"/","look":"As a person whose only grant is a game box, the top of the page","expect":"'Your game servers' lists the box; tapping it opens /games/<box>"},
  {"go":"/","look":"At 390 px, the topbar","expect":"Areas, Search, Talk and New each have a word and nothing is clipped","ask":"Does the topbar fit without sideways scroll?"},
  {"go":"/","look":"As an admin with no grant","expect":"No 'Your game servers' block; Areas lists Games and Infrastructure"}
]
commented

The failing check was the /docs index size budget. It is fixed and pushed (c8218baef).

What changed: the budget test, test/docs-link.test.ts:141, now allows 15.9 KB instead of 15.7 KB. The anonymous /docs page measured 16,158 B against a 16,076 B limit. The earlier commits (49ef9346f, "a phone's topbar icons carry a word") gave the topbar icons a word, and the wordmark got a wrapper <span>. Together those added about 0.2 KB to every page.

What I chose not to do: I did not trim the page itself. The added words are the point of that earlier commit, and the page is only about 80 B over, so I raised the budget and named the cause in the test comment. If you would rather shrink the page, say so.

Checks:

  • test/docs-link.test.ts passes, 16 of 16.
  • bun scripts/gate.ts --explain reads 32 rules with 0 failing. It noted two similar-code remarks, on boxesLine and on a test helper screen, which I left as they are.
  • bun x tsc --noEmit printed nothing.
  • I did not run the rest of the suite; the forge's check does that on this push.

The commit line says No door: because only a test changed, with no page, action, route or tool touched. It also carries the (#17627) issue number. The failure text you pasted did not include the dead-code check or the "as never" check, and I did not look into those.

commented

An admin can now go from an app's page to a machine of its own, search finds Infrastructure and Build, and the three labels from the persona round say what they are.

I ran 142 tests across the touched areas, the dead-code test, tsc, design-lint and the gate, and all pass. I did not run the full suite, which the forge's check does on this push, and I did not run the app in a browser.

What changed

  • Run it on its own machine.
    • Page: an "Its own machine" card on an app's page (admin only) has a "Run it on its own machine" button to /infra/build?app=owner/name. The card says what it costs before anything is built: the cheapest orderable place a month, or "No cloud account can make a machine yet". The compose opens with that app selected and "Running the app itself" chosen. The card appears only on an app that has shipped a change and can run on a machine.
    • Terminal: a repo verb "Run an app on its own machine" opens the same compose at the Where step, each place showing its price.
  • Search: "machine", "server", "cloud", "infra" and "deploy" find Infrastructure and a "Build a machine" page, for admins only. They show under "Pages" on the search page and in the terminal's search. The data is in src/core/area_pages.ts.
  • Settings > Machines is titled "The crew's machines", with a line pointing to Infrastructure for the app itself. The terminal screen has the new title too.
  • "100% on the forge's own server · 0% on cloud" now has a sentence beside it, on the page and in the terminal's Money. It says the forge's own server adds no cloud charge and cloud time is billed by the hour.
  • Stop buttons read "Stop production" or "Stop preview". The terminal's confirm already named the environment.

The commit message carries Direction: … (#17627). The new test/own-machine.test.ts has 5 tests, and docs/features/areas.md has a section on all of this. The gate noted two similar-function remarks (boxesLine and a test helper screen), both from earlier commits, and I left them.

Not done

  • The hanging clicks on the stop confirmation and in Settings. I did not try them by hand; the sandbox has no browser, so a person should check whether they hang.
  • Rewording the "Machines" sidebar label. Only the page title and heading changed.
  • A cost figure on the app page for an app that has no cloud account yet, which says to connect one first.

How to try it

  1. As an admin, open a working app's page and press "Run it on its own machine"; the app and the running purpose are already filled in.
  2. Search "machine" and open Infrastructure and Build.
  3. Open the app's Settings > Machines and read the title.
  4. Read the awake line in "This month" on the app's page.
  5. Read the Stop buttons on production and on a preview.
[
  {"go": "/<owner>/<app> (admin, an app with a shipped change)", "look": "the Its own machine card in the side column", "expect": "a price line and a Run it on its own machine button"},
  {"go": "press Run it on its own machine", "look": "the compose on /infra/build", "expect": "the app selected and Running the app itself chosen, the plan tray below"},
  {"go": "/search?q=machine", "look": "the Pages section", "expect": "Infrastructure and Build a machine, also for server, cloud, infra, deploy"},
  {"go": "/<owner>/<app>/settings/machines", "look": "the heading", "expect": "The crew's machines"},
  {"go": "/<owner>/<app>", "look": "This month, under Awake", "expect": "a sentence saying what the own-server and cloud split means for the cost; the Stop buttons read Stop production and Stop preview"}
]

🤖 Generated with Claude Code

commented

I merged main into the branch and pushed it. The only conflict was in src/web/pages/games.ts, in two places.

  • Imports: I kept our areaOf import. I dropped stateWords from the sleep.ts import, since main no longer exports it and nothing here used it.
  • Machine row: I kept our admin link to /infra#machine-<name> and main's joinBlock right after it.

tsc --noEmit and the design lint are clean, and test/games.test.ts, test/tui-games.test.ts and test/infra-page.test.ts pass (36 tests). The tests that scripts/fast.ts picked cover about 3,500 files and would not finish in the sandbox's time limit, so I did not run them. The forge's check runs the full suite on this push.

commented

Overlap before this lands: #17646 (open, same issue #17627) also puts the areas in the top bar, from its own list (GO_PAGES in src/web/go_pages.ts, drawn in src/web/chrome.ts, with g-keys and a phone strip). This pull adds a second list (src/core/areas.ts) and a second top-bar control (the Areas <details> menu in src/web/layout.ts). Landing both gives two navigations for the same areas from two lists. Please keep one list: rebase onto whichever of the two lands first and drop this pull's menu if it is #17646, keeping what #17646 does not do (the game strip on home, the machine/app/Cost cross-links, the search pages, the own-machine card).

Separately, three budgets were raised to make this green: pull page 32,270 -> 32,900 (test/pull-quiet.test.ts), /talk 61,000 -> 61,700 (test/talk-page.test.ts), /docs 15.7 -> 15.9 KB (test/docs-link.test.ts). With one nav menu instead of two, these should fit their old caps; please put them back rather than carry the raise.

commented

This pull no longer has its own areas list or top-bar menu. #17646's GO_PAGES is the only navigation list, and it hasn't landed yet. The three raised budgets are back at their old caps.

Removed, per the review

  • The Areas <details> menu in layout.ts, src/core/areas.ts, src/actions/areas.ts and the terminal's Areas screen. The "Areas" palette entry went with them.
  • The phone icon words (.btn-word) and the wordmark change. The /docs/design/areas/areas.md note for those classes is gone too.
  • seesAnyBox, which only the menu used.
  • The raised caps in pull-quiet, talk-page and docs-link are reverted to 32,270, 61,000 and 15.7 KB. Those tests pass unchanged. The palette tests and flow-pipeline are back to main's versions, apart from the own-machine roster line below. The did-you-mean count is back to 36, because the menu's extra query is gone.

Kept (none of this is in #17646)

  • The "Your game servers" strip on home, and the same line on the terminal's first screen.
  • The cross-links: Cost from an app's More menu, the machine-to-app and machine-to-game-box buttons, and "Stop production" and "Stop preview".
  • "Run it on its own machine" on an app's page, opening Build with the app already chosen. It has a palette entry (added to the roster tests) and a terminal path.
  • The search pages for Infrastructure and Build.
  • The Games and Apps one-line purposes now sit as plain strings in pages/games.ts and pages/apps.ts.

docs/features/areas.md is cut down to those links. The links test is renamed test/area-links.test.ts and no longer covers the menu. The commits name #17627. The gate has 0 failures, tsc is clean, and the dead-code test and the budget tests pass.

Not run

  • scripts/fast.ts named 3,402 files, so I ran only the tests this change touches. The forge's check runs the full suite.
  • The gate notes one similarity between boxesLine and hot_files.wideSays. I left it, since the two do different jobs.
  • I did not rebase onto #17646, because it is still open. When it lands, nothing here should overlap it.

Try it

[
  {"go":"/","look":"as a person who was given a game box but is not an admin","expect":"a 'Your game servers' section with one row per box, each linking to /games/<name>"},
  {"go":"/<owner>/<app>","look":"More menu, as the app's owner","expect":"Cost opens the app's last 30 days"},
  {"go":"/<owner>/<app>","look":"as an admin","expect":"'Run it on its own machine' opens /infra/build with the app chosen and a price shown"},
  {"go":"/search?q=machine","look":"as an admin","expect":"Infrastructure and Build under Pages"}
]
commented

I merged main into the branch and pushed it (8304481c7). The only conflict was src/web/pages/games.ts, and I resolved it in that file. I did not run bun test on the whole suite.

The conflict: the branch linked the "Its machine" row to /infra#machine-<name> for admins. main had changed joinBlock to take the compose text as a fourth argument. I kept both: the admin link stays, and the call is now joinBlock(ctx, box, visible, compose?.text).

Checks:

  • Tests: I ran the game and palette test files that touch this page, plus the infra ones. 253 passed, 5 skipped (palette tell browser tests; no chromium here) and 0 failed.
  • Skipped: bun scripts/fast.ts named 3,406 test files, an estimated 280 minutes, so I did not run that list. The forge's full check runs on the push.
  • Type check: bun x tsc --noEmit printed no errors, but its output sat in the same command whose tests I stopped for being too broad, so I'm not fully sure it ran to the end.
  • Gate: bun scripts/gate.ts --fix changed nothing. It noted that 11 files have comment lines over 100 columns, which it leaves to the nightly rewrap on main. It also asked whether boxesLine in src/web/game_strip.ts and wideSays in src/crew/hot_files.ts are one implementation; I did not look into that.
commented

I merged main into the branch again and pushed it (c7d846395). main had moved a second time since the last merge.

The conflict: src/web/pages/games.ts, in the empty-state block of /games. main now shows admins a "Start a game box" button, which asks Talk for the plan. My branch had replaced that with a "Make one" link to /infra/build. I kept main's button for admins and kept my hint line for everyone else: "Open a server, then start it or read its console." The "Make one" link is gone, because the button already does that job.

Checks:

  • Type check: bun x tsc --noEmit was clean.
  • Tests: I ran the game, infra, palette and empty-state test files. 344 passed, 5 skipped (the palette tell browser tests, which need chromium) and 0 failed. I did not run the full suite; the forge's check runs it on the push.
  • Gate: bun scripts/gate.ts --fix changed nothing. It repeats its question from last time about boxesLine in src/web/game_strip.ts and wideSays in src/crew/hot_files.ts possibly being one implementation. I didn't look into it.
commented

I merged main into the branch and pushed it. It now merges cleanly, and the tests that cover the three conflicted files pass. I did not run the full suite: scripts/fast.ts named 3414 test files and estimated 281 minutes. I ran test/own-machine.test.ts and test/infra-page.test.ts before the commit. After it I ran tui-machines, crew-machines-wiring, tui-games, tui-deploys and machines-disks, and those pass too. tsc --noEmit is clean, and gate.ts --fix changed nothing. The forge's own check will run the whole suite on this push.

Conflicts. main had built the "Run it on its own machine" flow for an app on its own machine (?app= on /infra/build, and runOnItsOwnMachine in the terminal Infrastructure screen). My branch had a parallel version of the same thing. I kept main's version of all three conflicted files: src/http/infra_routes.ts, src/tui/screens/infra.ts and src/web/pages/machines.ts. Two things from my side are gone as a result:

  • The preset argument to infraScreen. Nothing else used it once the terminal entry was switched.
  • The "an admin opens Infrastructure" note on the machines page. main had dropped it from that page in the same area.

What I changed outside the conflicts. The "Run an app on its own machine" entry in src/tui/forge_parts.ts called infraScreen with the removed argument. It now calls runOnItsOwnMachine and returns nothing. Non-admins are still sent to the app's page on the web, as before.

Gate note. gate.ts reports that src/web/game_strip.ts boxesLine is similar to src/crew/hot_files.ts wideSays. It is advisory, and I left it.

commented

I merged main into the branch and pushed it. It now merges cleanly, and tsc --noEmit is clean. I ran test/games.test.ts, test/tui-games.test.ts, test/game-box.test.ts, test/game-lend-box.test.ts, test/game-desk.test.ts and test/game-second-box.test.ts, and they pass. I did not run the full suite or scripts/gate.ts this time. The forge's check runs the full suite on this push.

The only conflict was src/web/pages/games.ts, in gameBoxPage around the "Its machine" row. I kept both sides:

  • My side: for an admin the row links to /infra#machine-<name>, where the machine's cost and end are.
  • main's side: the heldNotice line that follows the row.
commented

I merged main into the branch again and pushed it, so it merges cleanly now. tsc --noEmit is clean. test/games.test.ts, test/game-box.test.ts and test/tui-games.test.ts pass. I did not run the full suite or scripts/gate.ts; the forge's check runs the full suite on this push.

The conflict was in src/web/pages/games.ts, in gameBoxPage around the "Its machine" row. main now loads the held notice once into a held variable at the top of the page, so the page now places ${held} below the row. The "Its machine" row keeps the link for admins, which goes to /infra#machine-<name>.

commented

The red on 64e15d7 is one test, and it is this pull's own change, not a flake: run 01m8wp55rcaq6wpqcwp0yx8d85 fails test/tui-money.test.ts:113 ("an app's rows: its month, where it was awake, its share of the server"). The pull's new terminal sentence beside the Awake split (your 21:03 comment: "on the page and in the terminal's Money") adds a row to appMoneyRows, and the test still expects three rows. The received output matches the intended change exactly, so update the expectation, nothing else:

--- a/test/tui-money.test.ts
+++ b/test/tui-money.test.ts
@@ -113,5 +113,6 @@
     expect(appMoneyRows(m.value)).toEqual([
       { title: "This month (2026-11)", meta: "cost $95.00 · revenue $1.00 · gap -$94.00" },
       { title: "Awake", meta: "10.0 h · 100% on the forge's own server · 0% on cloud" },
+      { title: "What that split means", meta: "Time on the forge's own server adds no cloud charge: its monthly cost is shared by use. Time on cloud is billed by the hour." },
       { title: "Share of the forge's own server", meta: "100%" },
     ]);

Run bun test test/tui-money.test.ts and push; that should be the whole fix for this check. 24,009 of 24,010 passed otherwise.

commented

The failing check is fixed and pushed. test/tui-money.test.ts now expects the "What that split means" row, and the file passes (5 tests). I put the row after "Awake", not before it as in your diff. That is the order appMoneyRows returns, and the first run with the row before "Awake" failed on the order.

I also ran these checks, and all are clean:

  • Types and gate: tsc --noEmit is clean, and gate.ts shows only the same two notes as before.
  • Dead exports: test/unused-exports.test.ts passes. It lists four exports that are no longer dead (pinCrawlLag, setCrawlClock, useWatchProbeByDefault, useReachByDefault). Those are not in this pull's files, so I left them.

I didn't need to touch the other four items you listed. The one test change adds no as never and no new export. The terminal side of the page change is the sentence this test now covers, and the commit message names the issue (#17627).

commented

This round addresses all four review points on #17633. The area-link, own-machine, confirm-app-stop and home tests pass, tsc --noEmit is clean, design-lint is clean, and unused-exports passes. I did not run the full suite. The home phone-fit tests were skipped because there is no Chromium in the sandbox.

What changed

  • One sentence, once. "Open a server, then start it or read its console." now appears only on the home strip. I dropped the literal interpolation from /games, so a non-admin with no boxes there sees just the empty line.
  • Its own machine is a row. It is now a row in a rowList in the aside. The title is "Run it on its own machine", the price sentence is its meta, and the href goes to the compose page. The card is gone. The duplicate "Run it on its own machine" link in the app page's "more" paragraph is gone too, so there is one entry point. No new component, so nothing is added to docs/design/areas/.
  • Neutral module. boxesLine, givenBoxes and SHOWN now live in src/games/boxes_line.ts. Both src/web/game_strip.ts and src/tui/screens/dashboard.ts import from there.
  • Tests.
    • confirm-app-stop.test.ts asserts both button labels, "Stop production" and "Stop preview".
    • The Settings > Machines test in own-machine.test.ts asserts the plain string, and its money record is now a typed AppMoney.
    • area-links.test.ts creates the shared box in beforeAll.
    • A new area-links.test.ts test covers the "All 6 game servers" link at SHOWN = 5. It checks that the strip has exactly five box links.

Not done

  • The gate still prints "boxesLine is 0.63 like wideSays" (see the second bullet under "Where to look"). The two functions share only the shape "empty gives empty, else a prefix plus a list", and their data is unrelated. Merging them would add an abstraction with no benefit, so I did not.
  • The gate also notes nine files with comment lines over 100 columns, which it says the nightly rewrap handles. I committed the one file --fix rewrapped and left the rest.

Where to look

  • unused-exports.test.ts passes. It lists four exports that are no longer dead (pinCrawlLag, setCrawlClock, useWatchProbeByDefault, useReachByDefault). None of them are in files this branch touches.
  • The gate prints the boxesLine similarity note at src/games/boxes_line.ts:14.

Try it Sign in as an admin and open an app's page. The aside has a "Run it on its own machine" row with the price. As a non-admin given a game box, home shows "Your game servers" once, and /games does not repeat the sentence.

[
  {"go": "/alice/notes", "look": "the aside, below This month", "expect": "one row, 'Run it on its own machine', with the price sentence beside it; no card"},
  {"go": "/", "look": "Your game servers strip, signed in as someone given a box", "expect": "'Open a server, then start it or read its console.' appears once"},
  {"go": "/games", "look": "the page head and list", "expect": "the sentence is not repeated"}
]
commented

The fix is pushed. I could not reproduce the second failing test locally. bun x tsc --noEmit and bun scripts/gate.ts --fix showed no errors, and I did not run the page review or bun scripts/design-lint.ts.

What was wrong

  • App page: the own-machine row ("Run it on its own machine") was only drawn in the full app-page layout, not in the fresh-app layout, so some app pages never showed it. It now appears in both, just above "Operator detail" in the fresh layout. This is the change in src/web/studio/app.ts.
  • Stale test: infra-page.test.ts matched the old link markup (…">Run it on its own machine</a>). The earlier review turned the offer into a row, which changed that markup. The test now checks the href="/infra/build?app=ada%2Fshop" link and the text separately. The test was wrong here, not the code.
  • Template test: "choosing a template for a new forge > plan carries the template only when it is not blank" passes locally, with or without my change. Nothing in this pull touches that code. I made no change for it and suspect a shard flake, so it is the one to watch on the next check.

Checks run: test/infra-page.test.ts, test/own-machine.test.ts and test/spawn-template-api.test.ts all pass locally. The gate flags boxesLine (src/games/boxes_line.ts) as possibly the same as wideSays (src/crew/hot_files.ts), plus long comment lines in 10 files that the nightly rewrap will fix. Neither is acted on here.

[{"go":"/<owner>/<app> as an admin, for an app that has not started yet","look":"the 'Run it on its own machine' row above Operator detail","expect":"it links to /infra/build?app=<owner>%2F<app> and states the monthly price"}]
Sign in to join this conversation.

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

Keyboard shortcuts

Docs