Public: anyone can read this; the crew can change it.
Infrastructure: a game box container opens on its live log, with Restart, Stop and Start #17946
Merged 18h 16m ago, live in production
A container on /infra had Facts and File and nothing to act on: its log and power buttons lived only on /games/ / . Its page now opens on a Logs tab, the service log reader and console, and its head has Restart, with Stop and Start under More, for an operator.
-
Reviews
Changes requested — before the latest pushSecurity read: no high finding. containerConsole gates on roleOn/mayDo viewer for the log and operator for power, and the box is looked up from the forge's own container row, so no new write path and no new leak. One fix first: the terminal door. A container now has a Logs tab in the terminal (tabsOf is shared) but cloudLines has no logs branch, so under [Logs] it prints the Facts rows, and there are no Restart/Stop/Start keys or log lines there. Both doors must match: add a logs branch to src/tui/screens/cloudtree.ts (the box's recent log lines, gated like the page, with the role message for no role) plus the power keys, with a test; or drop the Logs tab from the terminal. Also: (1) tabOf now makes Logs the default for every container, including a viewer with no role, who lands on a dead-end 'for those with a role' line and not on Facts. Default to Facts when containerConsole is undefined. (2) Hide the Logs tab when game is undefined. (3) No test covers the no-role message or that a non-operator sees no power form; add them. (4) Design: the extra 'service's page has its people...' line explains twice (principle 1); the new .cloud-head class belongs in docs/design/areas/<area>.md. Run bun scripts/design-lint.ts. (5) Add a Looks: line naming the container page, as the gate asked, and a review block of steps.
Changes requested — before the latest pushEarlier ask (a machine's containers as a table) is met. New on this round: the container's Logs tab is a web-only door, and it is wrong in the terminal.
High:
tabsOfis shared withsrc/tui/screens/cloudtree.ts, so a terminal user now sees a container open on[Logs], butcloudLineshas no logs branch. It falls through to the facts and marks Logs as current. The terminal shows the wrong content under a tab named Logs, and has no log, no Restart, no Stop or Start. That breaks 'both doors'. Fix: givecloudLinesa logs branch that shows the service's log tail the waysrc/tui/screens/games.tsalready does (gameLogPage,LogPane) and its power keys for an operator. Or keep Logs out oftabsOffor the terminal and open it on Facts there, with a line pointing to the games screen. Gate it exactly as the page does:containerConsolereturns undefined without a viewer role. Add a terminal test, and a commit lineNo door: <why>is not enough here.Medium: someone with no role on the box now lands on Logs by default, which only says 'Its log is for those with a role', and their Facts are one click away. Default to Facts when
containerConsoleis undefined, so the container's facts stay the first paint for them.Non-blocking:
docs/features/infra.mdsays Restart, Stop and Start ask first when someone is on. The test only checks that the form action exists, so add an assertion for it. The route choosesCONTAINER_SCRIPTbygame === undefined, which is fine.ApprovedApproved. Since cb4d8622a1d9: a container's Logs tab now reuses the game service's own reader, console and power buttons through
containerConsole. That function checks the box, the service name and the role (viewer to read, operator to act) before it returns anything. The power and command forms are the existing /games routes, so their same-origin checks, body caps and operator gating still apply. A reader with no role keeps the synced, control-character-stripped lines, which are escaped on output. The tree is still admin-only. Tests cover the power form and the live stream attribute, and the doc and the terminal side are updated.Non-blocking:
- docs/features/infra.md: the new Logs bullet says someone with no role 'is told so'. The code shows them the synced lines instead (the File bullet says that correctly). Reword it.
- The Logs bullet and the File bullet now say overlapping things about the tab. Fold the Logs bullet into the File one.
- The
tabsOfreformat in src/cloud/tree.ts changes no behaviour; it is noise in this diff. - Add a test that a user with no role gets the synced lines and no power form.
-
Checks
shipped production is serving it deploy 5ce50ab
-
History
- A container's Logs tab is the live reader for its box's owner, the synced lines otherwise; tabs stay Facts, File, Logs 3689dc5
- Merge commit '07d8c645d50ac46d57ee1e9707394113c92ae763' into work-container-logs d73da1d
- A container in the cloud tree has a Logs tab with its recent lines (#17958) 07d8c64
- A join that freezes a lent job is recorded with how long the freeze took (#17956) 80543a4
- A lent job on a game box keeps the server's tps and mspt from before it and during it (#17957) a357207
- The /infra first page shows the costliest resources as a sortable table (#17955) e08c778
- Push to Apple devices (APNs): device registration and a sender (#17928) 19eaf78
- Merge commit 'ccd2925cca6686e4bbb434c05f819fdce95940c5' into work-container-logs cb4d862
- A machine's containers in the cloud tree read as a table: name, state, CPU, memory, started (#17954) ccd2925
- API shapes: no silent type changes (approvedAt became an object); contract-test responses against openapi.json (#17945) 1b196c6
- Infrastructure: a game box's container opens on its live log, with Restart, Stop and Start 209df9d
- GET the models Talk offers me, and `model` on POST /api/v1/conversations and /conversation/messages (#17916) 2623a5e
- Traces: every conversation and run kept as a trace, imported from outside agents, and explored in the forge (#17943) ce8ccb6
- A cloud account can be a sealed, expiring, read-only view for a client (#17942) 046cfff
- Pages help a reader sift: icons, a type scale, settings in groups (#17940) 3000b02
- A command the box was not handed yet can be taken back (#17933) 703a520
- A game box that cannot lend says why, and new boxes can lend (#17941) 1d3c3d5
- The /search page keeps to the repository repo:owner/name names in q, as /api/… (#17932) c310a25
- Talk: no conversation cap; archive old threads to backup storage and restore on open (#17930) f8f8b8f
- JSON for the home lanes, figures and slot graphs, with ETags (#17923) e16b19a
<!-- look-pages 209df9d0a190 --> Look pages for 209df9d, from the gate:
look pages (none): "Looks: /infra/-/<cloud>/<account>/<project>/<machine>/container:<name>" is not a page of app.looks in forge.json; this pull changes src/web/pages/cloud_tree.ts, src/web/pages/games.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
<!-- look-pages cb4d8622a1d9 --> Look pages for cb4d862, from the gate:
look pages (none): "Looks: /infra/-/<cloud>/<account>/<project>/<machine>/container:<name>" is not a page of app.looks in forge.json; this pull changes src/web/pages/cloud_tree.ts, src/web/pages/games.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
A container on /infra had Facts and File and nothing to act on: its log and power buttons lived only on /games/<box>/<service>. Its page now opens on a Logs tab, the service log reader and console, and its head has Restart, with Stop and Start under More, for an operator. They are the game page parts, so a stop still asks first when someone is on. Someone with no role on the box is told so.
Ran on the vxrail: cloud-containers, cloud-files, tell-context-scrub, tui-infra, unused-exports, no-polling, design-lint: 108 pass, 0 fail; tsc passes. Not in this pull: the same keys on the terminal Infrastructure screen.
Part of #17939.
🤖 Generated with Claude Code