Public: anyone can read this; the crew can change it.
A container in the cloud tree has a Logs tab with its recent lines #17958
Merged 18h 24m ago, live in production
A container in the cloud tree now has a third tab, Logs, at /infra/-/…?tab=logs. The container tests and test/mcp-size.test.ts pass, tsc is clean, and design-lint is clean. I did not run the full suite or load the page on a preview.
-
Reviews
ApprovedClean. The Logs tab reads only the rows the last sync stored (logsOf), is built only when ?tab=logs is asked for, and sits behind the tree's existing admin gate. Lines are stripped of control characters and escaped by the html template; the test proves markup and ESC bytes do not reach the page. The terminal (
[/]) and the infra tool (logs) return the same lines, and docs/features/infra.md carries the how-to, not the README. Tests cover lines, none, a non-admin refused, the tool and the tab order. No new dependency, no secrets, no TODOs. The page uses existing tabs, a muted line and a pre with one data-attribute rule: no new accent, box or card. -
Checks
shipped production is serving it deploy 5ce50ab
-
History
- Direction: the tabs test expects a container's Logs tab, which the issue asks for (#17953) cd8dfc6
- No look: /infra is not an app.looks page and the Logs tab needs a game box with synced lines; the test renders it (#17953) c3b746a
- Merge main into mason/17953-a-container-in-the-cloud-tree-has-a-logs 962c1a3
- 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
- Try: open /infra, a game box's machine, one of its containers, then its Logs tab (?tab=logs) Looks: /infra (#17953) 4102479
- Direction: a container in the cloud tree has a Logs tab with its recent lines (#17953) 0f2b851
- 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
- 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
- A crew run's page says how its model was fed, so a packed SubQ run compares with its explored run and with Claude (#17925) 52b26cd
- Infrastructure reads Azure: subscriptions, resources and costs (#17924) 4ceb81b
3 earlier comments
A container in the cloud tree now has a third tab, Logs, at /infra/-/…?tab=logs. The container tests and test/mcp-size.test.ts pass, tsc is clean, and design-lint is clean. I did not run the full suite or load the page on a preview.
What changed
- Where the lines come from: the tab shows the newest 200 lines from the rows the box's sync already stored (
logsOf), through a newlogsOfContainerinsrc/cloud/containers.ts. Nothing is fetched from the box when the page is read, and the lines are read only when the tab is asked for. - Escaping: the page escapes each line as text. The lines are the container's own output, so I also strip control characters, including terminal escapes.
ESC[31mbecomes the plain text[31m. - No lines: the tab says "No lines were synced for <name>. Its box last synced <ago>."
- Doors:
src/cloud/tree.tsadds thelogstab to container nodes only. A machine keeps Facts and File.- The web pane renders it in
src/web/pages/cloud_tree.ts. - The terminal tab cycles through it with
[and]. - The
infraMCP tool (action: cloud) returns the same lines aslogsfor a container id. That is a new field on an existing action, not a new tool.
- Docs:
docs/features/infra.mdsays what the tab shows. - Admin only: the cloud tree was already admin-only. The test covers a container with logs, one without, and a non-admin; the non-admin gets a 403 on
?tab=logsand sees no lines.
I added one Try: line to a commit message so the pre-push check would pass.
What I chose not to do
- No live tailing or refresh.
- No per-line timestamps.
- The lines are not part of every request's tree build.
How to try it: open /infra, then a game box's machine, then one of its containers, then the Logs tab. In the terminal, open the same node and press ] to reach Logs.
[
{"go": "/infra/-/hetzner/eu/games/machine:77/container:hub?tab=logs", "look": "Tabs read Facts, File, Logs with Logs current, then the container's recent lines in a scrollable block", "expect": "Each line is plain text; markup in a line is shown, not run", "ask": "Does the block read like a log, and is 60vh the right height?"},
{"go": "/infra/-/hetzner/eu/games/machine:77/container:survival?tab=logs", "look": "A container with no synced lines", "expect": "No lines were synced for survival. Its box last synced <ago>."},
{"go": "/infra/-/hetzner/eu/games/machine:77?tab=logs", "look": "A machine has no Logs tab", "expect": "Its first tab, Facts, opens instead"}
]<!-- look-pages 41024792aec6 --> Look pages for 4102479, from the gate:
look pages (none): "Looks: /infra" is not a page of app.looks in forge.json; this pull changes src/web/pages/cloud_tree.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 in the cloud tree now has a Logs tab at /infra/-/…?tab=logs, and the branch is merged with current main and pushed. The container tests, the cloud-tree tests and test/mcp-size.test.ts pass after the merge, and bun x tsc --noEmit is clean. I did not run the full suite or load the page on the preview; the forge runs the full check on push.
The merge conflict was one hunk in the CSS in src/web/pages/cloud_tree.ts. main had renamed [data-largest] to [data-costliest], and my branch had added a [data-logs] rule. I kept the rename and kept the logs rule.
The gate rejected Looks: /infra, because /infra is not in app.looks in forge.json. The Logs tab needs a game box with synced lines, which a look can't set up. The latest commit now says No look: with that reason, and the test renders the tab instead.
What changed
- Logs tab: a container node gets a third tab, Logs, showing its newest 200 lines as its box last synced them. Nothing is fetched from the box when the page is read, and the lines are read only when the tab is asked for.
- Escaping: the page escapes each line as text. The lines are the container's own output, so I also strip control characters, including terminal escapes.
- No lines: the tab says "No lines were synced for <name>. Its box last synced <ago>."
- Other doors: the terminal tab cycles through Logs with
[and]. TheinfraMCP tool (action: cloud) returns the same lines aslogsfor a container id. That is a new field on an existing action, not a new tool. - Admin only: the cloud tree was already admin-only. A non-admin gets a 403 on
?tab=logsand sees no lines. - Tests and docs:
test/cloud-containers.test.tscovers a container with logs, one without, and a non-admin.docs/features/infra.mddescribes the tab.
What I chose not to do
- No live tailing or refresh.
- No per-line timestamps.
- The lines are not part of every request's tree build.
How to try it: open /infra, then a game box's machine, then one of its containers, then the Logs tab. In the terminal, open the same node and press ] to reach Logs.
[
{"go": "/infra/-/hetzner/eu/games/machine:77/container:hub?tab=logs", "look": "Tabs read Facts, File, Logs with Logs current, then the container's recent lines in a scrollable block", "expect": "Each line is plain text; markup in a line is shown, not run", "ask": "Does the block read like a log, and is 60vh the right height?"},
{"go": "/infra/-/hetzner/eu/games/machine:77/container:survival?tab=logs", "look": "A container with no synced lines", "expect": "No lines were synced for survival. Its box last synced <ago>."},
{"go": "/infra/-/hetzner/eu/games/machine:77?tab=logs", "look": "A machine has no Logs tab", "expect": "Its first tab, Facts, opens instead"}
]The check failed because test/cloud-files.test.ts still expected two tabs for a container. This pull adds a third, so I changed the test's expectation. It now expects a machine to have facts and file, and a container to have facts, file and logs. I also renamed the test and referenced #17953 in it. No source code changed in this push.
bun test test/cloud-files.test.ts passes. It is the only test file I re-ran after the fix; the forge runs the full check on this push.
Nothing else changed: a container's Logs tab shows its newest 200 synced lines, or says none were synced and when the box last synced. Only an admin sees it, the infra MCP tool returns the same lines as logs, and nothing is fetched from the box.
What I chose not to do
- No live tailing or refresh.
- No per-line timestamps.
How to try it: open /infra, then a game box's machine, then one of its containers, then the Logs tab (?tab=logs).
[
{"go": "/infra/-/hetzner/eu/games/machine:77/container:hub?tab=logs", "look": "Tabs read Facts, File, Logs with Logs current, then the container's recent lines in a scrollable block", "expect": "Each line is plain text; markup in a line is shown, not run"},
{"go": "/infra/-/hetzner/eu/games/machine:77/container:survival?tab=logs", "look": "A container with no synced lines", "expect": "No lines were synced for survival. Its box last synced <ago>."},
{"go": "/infra/-/hetzner/eu/games/machine:77?tab=logs", "look": "A machine has no Logs tab", "expect": "Its first tab, Facts, opens instead"}
]
A container in the cloud tree now has a third tab, Logs, at
/infra/-/…?tab=logs. The container tests andtest/mcp-size.test.tspass,tscis clean, anddesign-lintis clean. I did not run the full suite or load the page on a preview.What changed
logsOf), through a newlogsOfContainerinsrc/cloud/containers.ts. Nothing is fetched from the box when the page is read, and the lines are read only when the tab is asked for.ESC[31mbecomes the plain text[31m.src/cloud/tree.tsadds thelogstab to container nodes only. A machine keeps Facts and File.src/web/pages/cloud_tree.ts.[and].infraMCP tool (action: cloud) returns the same lines aslogsfor a container id. That is a new field on an existing action, not a new tool.docs/features/infra.mdsays what the tab shows.?tab=logsand sees no lines.I added one
Try:line to a commit message so the pre-push check would pass.What I chose not to do
How to try it: open
/infra, then a game box's machine, then one of its containers, then the Logs tab. In the terminal, open the same node and press]to reach Logs.Closes #17953