Public: anyone can read this; the crew can change it.
The /infra first page shows the costliest resources as a sortable table #17955
Merged 18h 35m ago, live in production
With no resource chosen, the /infra pane now shows the costliest resources in one table, in the order src/cloud/tree.ts already gives (costliest first). The other /infra tests I ran (cloud-tree, infra-page, cloud-page-shape), tsc, design-lint and the gate pass.
-
Reviews
Changes requested — before the latest pushThe root table is the right shape, reuses listTable and adds no script. Three things to fix in one round:
- Box 4 asks for a test with priced, billed AND unknown resources. The billed wording is written but never rendered by any test. Add a fixture with a billed cost (or test costWords directly) and assert '$X billed'.
- The terminal still says 'Where it goes' at the root (src/tui/screens/cloudtree.ts:82) while the page now shows a table: the two doors disagree about the first page. Bring the TUI root in line (resources with cost words, same filter) and add or update the docs/features how-to; 'No door' is not enough when the page's first screen changed.
- The test has a tautological assertion:
.map((x, i) => (i === 2 ? web[2]! : x))makes the Where check vacuous. Assert the exact Where text for 'web' and 'box'.
Also check that
largest()is still used only by branch panes; if anything left in it is now dead, remove it. The preview /infra answers 303 without an admin session, so I could not see the rendered rows; judged from source.ApprovedEarlier asks are met: the billed/list price/unknown wording is a pure function with a direct test, the Where text is pinned for three resources, and the terminal draws the same table through shared
FIRST_COLUMNS/firstCell, with the how-to indocs/features/infra.md(not README). The table is real server-rendered rows with header links that sort, no new script, design-lint passes, and the preview answers 200. Next two: (1) Non-blocking: the first-page terminal table shows only when the cursor is at the very top, which is easy to miss; a line saying so in the pane would help. (2) Non-blocking: no fixture has a billed resource row, so the billed branch is only checked throughcostWords; add one when a provider marks a resource billed. -
Checks
shipped production is serving it deploy 5ce50ab
-
History
- Merge main into the /infra first-page branch (#17952) c12229b
- A machine's containers in the cloud tree read as a table: name, state, CPU, memory, started (#17954) ccd2925
- Rewrap comments (#17952) 4b1d54e
- Direction: the terminal's first page is the page's table; billed, Where and the terminal are tested (#17952) 6928748
- Rewrap comments (#17952) 7504c6e
- Direction: the /infra first page lists the costliest resources in one table (#17952) 0bc9c5a
- 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
- Merge pull request #17921 from sold/azure-reads 509de83
- Azure reads serve #17922 570fb17
2 earlier comments
With no resource chosen, the /infra pane now shows the costliest resources in one table, in the order src/cloud/tree.ts already gives (costliest first). The other /infra tests I ran (cloud-tree, infra-page, cloud-page-shape), tsc, design-lint and the gate pass. I did not run the full suite or the other tests that cover the terminal screens and the JSON/MCP doors.
What changed (src/web/pages/cloud_tree.ts)
- Columns: Resource (links to the resource), Kind, Where (cloud ▸ account ▸ region) and Monthly cost.
- Cost wording:
$12.00 list price,$12.00 billed, orunknown. An unknown cost never shows as $0. - Filter line: it narrows the same table. Headers sort through the existing
listTableand sort terms. - Sums and size limits: the page adds no sums of its own. The table is capped at the existing 200 rows (
PANE_ROWS), with the usual "filter to see the rest" note. - No new script or CSS: no client script was added, and the page reuses the existing
listTablestyles. - Reused:
listedOf,listTable,CLOUD_COLUMNS,cloudCellandcloudName. - "Where it goes" removed from the root: the table replaces it at the root. Branch panes (cloud, account, region) still show it.
Test: test/cloud-tree.test.ts has a new test that renders the root and checks the rows. It covers list-priced and unknown resources, the Where text, the order matching costliestOf, no $0.00, and q=cloud:hetzner narrowing to one row.
- Billed not covered: that fixture has no billed resource row, because a bill belongs to a region, not a resource. The billed wording is written but not asserted.
- Changed assertion: I changed one assertion in an existing test. It looked for "Where it goes" and a hint line that came from that block. It now looks for
data-costliest.
Left out
- Terminal: I made no change to the terminal screen, so the commit says
No door:with the reason.src/tui/screens/cloudtree.tsalready lists the resources with costs and the same filter line, but it still says "Where it goes". - Looks: the commit says
No look:because/infrais admin-only and has no sample page among the forge.jsonapp.looks. - Billed: nothing was added to show a billed cost per resource.
Try it: open /infra as an admin on the preview with no resource chosen, then add ?q=cloud:hetzner and click a column header.
[
{"go":"/infra","look":"One table titled 'N resources' with columns Resource, Kind, Where, Monthly cost","expect":"List-priced rows read '$12.00 list price'; resources without a price read 'unknown', never $0; priced rows come first"},
{"go":"/infra?q=cloud:hetzner","look":"The same table, narrowed","expect":"Only Hetzner resources remain; the heading is hidden and the filter line shows the term"},
{"go":"/infra","look":"Click the 'Where' column header","expect":"URL gains q=sort:region and the rows reorder by region","ask":"Does 'AWS ▸ main ▸ us-east-1' read clearly as cloud ▸ account ▸ region?"}
]
🤖 Generated with Claude Code
I pushed the three fixes to the branch. The /infra first page and the terminal now show the same table. The cloud-tree, tui-client-clouds, cloud-doors, infra-page, feature-doors and doorless tests pass, along with tsc, design-lint and the gate. I did not run a "dead code" test (no test file with that name turned up) or the full suite.
- Billed wording tested:
costWords(money)is now a pure function insrc/cloud/tree.ts. A new test checks$40.00 billed,$40.00 list priceandunknown. I tested the function directly rather than adding a billed fixture. In the code today a resource row only gets a billed cost fromcostFrom === "billed", and the provider code I read marks only a region or project total that way. A billed resource row can't be seeded through normal reads. - Where text pinned: the test now asserts exact rows for
web,boxandvol-2:web:DigitalOcean ▸ main ▸ sitebox:Hetzner Cloud ▸ eu ▸ gamesvol-2:AWS ▸ main ▸ us-east-1
These resources have a region or a project, so the "no region" fallback to the project name isn't asserted separately.
- Terminal in line with the page:
whereOf,FIRST_COLUMNSandfirstCellmoved intotree.ts, so the page and the terminal build their cells from the same code. The terminal had no "all clouds" pane. It previewed whichever row the cursor was on, so I made the pane the first-page table when the cursor is at the top and nothing is opened. Moving down previews that row as before, and "Where it goes" is gone from the root. - Terminal tradeoff: the very first row (the first cloud) is no longer previewed by hovering. Enter opens it.
- How-to:
docs/features/infra.mdhas a new "First page" bullet. The "No door" line is replaced by a real terminal change. largest(): it is still used by the branch panes atcloud_tree.ts:290, andlargestCostsby the terminal's branch panes, so nothing in them is dead.costWordshas a caller in the page's cost celltitle, andFIRST_COLUMNSandfirstCellhave callers in both doors.- Preview:
/infraanswers 303 without an admin session, so I only checked the rendered rows through the tests.
[
{"go":"/infra","look":"One table: Resource, Kind, Where, Monthly cost","expect":"Rows read '$12.00 list price' or 'unknown'; Where reads 'DigitalOcean ▸ main ▸ site'"},
{"go":"/infra?q=cloud:hetzner","look":"The same table, narrowed","expect":"Only Hetzner rows"},
{"go":"ssh in, open Cloud resources","look":"Cursor on the first row, nothing opened","expect":"The right pane is the same four columns with the same words; press j and it previews the highlighted branch","ask":"Is a first page that appears only with the cursor at the top clear enough in the terminal?"}
]
🤖 Generated with Claude Code
I merged main into the branch and pushed it. The only conflict was in src/tui/screens/cloudtree.ts.
How I resolved it:
- Main's change kept: its new container table, in the line that returns a resource's pane.
- My change kept: the first-page table for the root, with
FIRST_COLUMNSandfirstCell.
The page, the tree and the how-to merged without conflicts.
After the merge, tsc, design-lint and the gate pass. So do the tests that touch this change (cloud-tree, tui-client-clouds, cloud-doors, infra-page). I did not run the full suite.
The pull description stays as before. The /infra first page shows the costliest resources as a table of resource, kind, where, and a cost worded billed, list price or unknown. The terminal draws the same table at the top of the tree, and the filter line narrows both.
With no resource chosen, the
/infrapane now shows the costliest resources in one table, in the ordersrc/cloud/tree.tsalready gives (costliest first). The other/infratests I ran (cloud-tree,infra-page,cloud-page-shape),tsc,design-lintand the gate pass. I did not run the full suite or the other tests that cover the terminal screens and the JSON/MCP doors.What changed (
src/web/pages/cloud_tree.ts)$12.00 list price,$12.00 billed, orunknown. An unknown cost never shows as $0.listTableand sort terms.PANE_ROWS), with the usual "filter to see the rest" note.listTablestyles.listedOf,listTable,CLOUD_COLUMNS,cloudCellandcloudName.Test:
test/cloud-tree.test.tshas a new test that renders the root and checks the rows. It covers list-priced and unknown resources, the Where text, the order matchingcostliestOf, no$0.00, andq=cloud:hetznernarrowing to one row.data-costliest.Left out
No door:with the reason.src/tui/screens/cloudtree.tsalready lists the resources with costs and the same filter line, but it still says "Where it goes".No look:because/infrais admin-only and has no sample page among the forge.jsonapp.looks.Try it: open
/infraas an admin on the preview with no resource chosen, then add?q=cloud:hetznerand click a column header.🤖 Generated with Claude Code
Closes #17952