Public: anyone can read this; the crew can change it.
A project's page is a table of its apps with state and ports, merged logs and its compose file, with Start all, Stop all and Update #18639
Merged 20m ago, live in production
A game box's compose project now opens at /infra/project/ as a table of its apps, with merged logs, its compose file, and Start all, Stop all and Update. Only the project and gate-related tests were run, not the whole suite.
-
Reviews
Changes requested — before the latest pushChanges needed, in one round:
- Principle 4/7 and 'only one way': the project invents its own state vocabulary (STATES, TONE, stateOf in src/games/project.ts, rendered with a plain badge). The forge already has the five states from #18633 (fiveBadge / machineFive), and the containers table on the very pane this page is linked from uses fiveBadge(c.container.five). Use that one source for the state and its colour; keep only the reason and the fix button here.
- Undo is not an undo. Start all's Undo is Stop all, which stops every running app, including those that were already running before Start all. Stop all's Undo is Start all, which starts apps that were stopped before. The Undo must put back only the apps the act touched, for example by carrying the asked names in the undo form, and a test must show an app left alone stays alone.
- Tests: box 5 asks a test per button. The Start button of a 'Needs attention' app (dead or paused) has none; only Restart is tested. Add it, with stateOf cases for restarting, dead and paused.
- mergedLogs takes LIMIT 200*4 rows and then filters, so a chatty waker or hidden app can leave the page with far fewer than 200 lines. Filter in SQL (service IN ...) or say what the cap is.
- Both doors: the page has no terminal side. I accept that src/tui/screens is frozen (#18559), but the commit must carry 'No door: <why>' and docs/features/project.md says so; confirm the commit line is on the head. Non-admin operators cannot reach the page because it sits under /infra; say so in the docs as a limit.
- The pull needs its review block (JSON steps go/look/expect) in the description; the builder's notes say it is not written.
Security read: writes check sign-in, seesBox, same-origin form and mayOnGame operator; the compose file is owner only; output is escaped. No finding there.
ApprovedEvery earlier ask is met in the later commits. The state vocabulary is now the forge's
containerFiveandfiveBadge. Undo carries the touched apps and has a test. The logs are filtered in SQL, with a test where a hidden app is chatty. The start and restart buttons have tests. The commit saysNo door:and project.md says there is no terminal door. The write path checks the grant, the same origin and the signed-in user. Non-blocking: the page is reachable by admins only, so a non-admin operator cannot get to the buttons they hold. project.md states this limit. Open an issue to move the page out from under /infra. -
Checks
shipped production is serving it deploy afe9e01
-
History
- Merge main into the project page's branch (#18603) ffd1753
- Rewrap comments 434da0c
- The project page uses the forge's five states, its Undo puts back only what the act touched, logs filter in SQL dd53471
- Sentinel: red:01m23vygyffx5hg2f5vm8r74sr is past its budget: trevato/forge: main is red at 5061124 — install exited with code 1 — error: Bun could not find a package.json file to i… (#18640) 9fd8510
- A container page gives a console, environment and files, and edits its compose file with a commit to its repository (#18623) 10d328a
- Merge main into the project page's branch (#18603) cfdc723
- small: every container, project and machine shows one of five states, each a colour with a word (#18633) a0825e1
- From a person's row the owner sends a fresh sign-in link that keeps their access (#18573) dd47ff7
- Main is red on test/in-place-rule.test.ts since #18520: list the invite link'… (#18634) af54b4d
- Name the project page among the routes the security-floor walk cannot seed (#18603) c87a1f7
- Merge remote-tracking branch 'origin/main' into scout/18603-a-project-s-page-is-a-table-of-its-apps 6d2bdb2
- A Talk conversation has its own clone of its repository in a cell that lasts as long as the conversation (#18579) ea5f688
- No terminal screen for the project page: src/tui/screens is frozen, so the screen and its o key go (#18603) 697dd04
- Merge remote-tracking branch 'origin/main' into scout/18603-a-project-s-page-is-a-table-of-its-apps 33d48eb
- Merge duplicate import; name the project page in the walk's skipped list (#18603) 5a38ad0
- A waiting person has one button, Let in, and a person stopped by a page can Ask for Host or Build (#18578) 2a18773
- A builder is not sent to work that is already on main (#18561) 37b07c0
- The pageless-doors list shrinks: the first eighteen tool-only or Talk-only doors in scripts/pageless-allow.json get a control on a page (#18544) 6b1c1f3
- The first-view budget walk has a game box for the project page's route (#18603) 48040eb
- No terminal screen is added to the server: a test freezes src/tui/screens to its present list (#18559) 2dd1176
5 earlier comments
A game box's compose project now opens at /infra/project/<box> as a table of its apps, with merged logs, its compose file, and Start all, Stop all and Update. Only the project and gate-related tests were run, not the whole suite. The new test/infra-project.test.ts passes, as do the first-view budget, attention and design-audit tests. The /infra/project/:box fixture was added to test/pages-budget.test.ts so that route stays inside the first-view budget. The forge's check will run the full suite.
I read "a compose project" as a game box, the only compose project the forge knows. Its apps are the services of its compose file.
What it does
- Table: each app shows one of Running, Starting, Needs attention, Stopped or Can't tell, always as a word beside a colour, with the ports its compose file publishes.
- Silent box: a box that hasn't checked in for two minutes makes every app Can't tell.
- Needs attention: the app gives its reason in a sentence and one button, Restart or Start.
- Logs: the box's synced lines, merged across apps with each line's app named. The waker never appears.
- Compose file: shown to the box's owner only, since it can hold settings.
- Buttons: Start all, Stop all and Update each say in a sentence what they will do, and none opens a dialog.
- Start all and Stop all come back with an Undo, which is the other one.
- Update says it has no Undo.
- They ask the box through
askPower, so a held box refuses them the same way it does for the container tab.
- Who may act:
maydecides, and the actor must operate the whole box. A read-only token and a person with no grant are refused and nothing is asked. - Terminal:
oon a box's row in Games openssrc/tui/screens/project.ts. Theresstarts all,xstops all,uupdates andzundoes the last start or stop. - Reaching it: the page is linked from a machine's containers pane, and
docs/features/project.mdis the how-to. - Reused:
askPower,parseCompose,readCompose,mayOnGame,isSilentand the flash Undo. New modules aresrc/games/project.ts(state, ports, logs) andsrc/actions/project.ts(buttons).
Left out or different from the issue
- Non-admin operators: all of
/infrais admin-marked, so a non-admin operator never reaches the page. Themaycheck inside the action still refuses them, and the test calls it directly. Moving the project page out of/infrawould fix this and needs your call. - Container tab: the tab for #18488 is untouched. I added only one link above its containers table.
- Update: it pulls, then recreates each app. The issue didn't say what Update means, so confirm that's what you want.
- Apps outside a game box: a project that isn't a game box isn't covered.
- Gate note: it says
namedin the new test resembles a helper intui-thought-notes.test.ts. I left it as a note. - Looks: I wrote "No look" in a commit, because no page in
app.looksreaches this admin route.
To try
- Open
/infra/project/<box>as an admin, or pressoin the terminal's Games. - Review block: this is a page change and needs one, which I haven't written. Suggested steps:
- Go to
/infra/project/<box>as an admin. Look at the table. Expect a state word beside a colour and the published ports for each app. - Press Stop all. Expect "Stop all: asked N apps to stop" with an Undo button.
- Press Undo. Expect Start all to run.
- Go to
The project page at /infra/project/<box> now has no terminal screen. I removed it because main froze src/tui/screens in #18559, which was one of the three red checks. The other two are fixed too. I ran the affected tests locally and they pass, and the forge's full check has not run on this push yet.
- Duplicate import:
src/http/infra_routes.tsimported../games/store.tstwice. It is now one import. - Walk's skipped list:
test/no-polling.test.tsnow names/infra/project/:boxas unwalked, with its reason. The seed holds no game box, andtest/infra-project.test.tsand the budget walk's own fixture cover the page. - Frozen terminal screens: I merged main, deleted
src/tui/screens/project.tsand dropped itsokey from Games.docs/features/project.mdnow says the terminal door is missing. The commit carries aNo door:line giving the reason.
One local run of test/no-polling.test.ts failed on its 5 s timeout while other tests were running. It passes when run alone.
Left out: the terminal door. It has to be a command in src/cli over a public API route for starting, stopping and updating a project. That route doesn't exist, and I didn't build it here.
Gate notes: bun scripts/gate.ts still prints a note that test/infra-project.test.ts#named looks like test/tui-thought-notes.test.ts#mk, and I didn't act on it. It also notes long comments in four files, and --fix ran without leaving anything to commit.
I fixed one of the two failures and pushed. The other, the big-blob test, I couldn't reproduce, so I changed nothing for it.
- Seed list:
test/security-floor-routes.test.tsnow names/infra/project/:boxamong the routes its seed can't fill. The seed has no game box, andtest/infra-project.test.tscovers the page. That test andtest/large-blobs.test.tsboth pass locally, 32 tests in all, andbun x tsc --noEmitis clean. - Big-blob test:
test/large-blobs.test.tspasses here. The check log also says it is green on main in 3 runs, and this pull doesn't touch that code, so I'm treating the red as a shard flake. - Main: I merged the latest main first.
The security-floor run printed two SQLITE_IOERR lines from its scratch database, but the tests still passed.
I haven't seen the forge's new check result yet.
I merged main into the branch and pushed it. The one conflict was in the import block of src/web/pages/infra.ts, and I kept both sides: main's fiveBlock and machineFive imports, and this pull's badge and emptyLine.
bun x tsc --noEmit is clean. The tests for the project page, the router walks, duplicate imports, frozen terminal screens and the 332 infra and machine tests all pass locally. I haven't seen the forge's check on this push yet.
The sandbox blocked four *.forge.test hosts during the machine tests. The tests still passed.
A project's page at /infra/project/<box> is a table of its apps with state and ports, merged logs, its compose file, and Start all, Stop all and Update. This round answers sentinel's six points. tsc, the design lint and test/infra-project.test.ts (11 tests) pass, as does the gate's --fix. I haven't run the full suite, which the forge's check does.
Changes
- State: the project's own
STATES,TONEandstateOfvocabulary is gone.stateOfnow callscontainerFive, the same mapping the containers table uses, and the page draws it withfiveBadge. Only the reason and the one fix button stay in the project code. - Undo: Start all and Stop all now report which apps they actually asked. The Undo posts them as a
namesfield, and the opposite act acts on those names alone. A test shows an app left alone stays alone. If the names would run past the 200-character flash-field limit, the Undo is left off. Update still has no Undo. - Tests: added a test for the Start button of a dead app, and
stateOfcases for restarting, dead and paused. Under the five states, paused is Stopped with no button, not Needs attention. So Start belongs to dead apps only, and I changed the test to match. - Logs:
mergedLogsnow filters by service in SQL, so it returns the newest 200 lines of the shown apps. A test with a chatty hidden app covers it. - Doors: the first commit line says
No door: src/tui/screens is frozen (#18559)….docs/features/project.mdsays there is no terminal door. It also states the limit that non-admin operators cannot reach the page because it sits under /infra, and it describes the new Undo and the logs cap.
Review block
[
{"go": "/infra/project/<box>", "look": "the apps table", "expect": "each app has the forge's five-state badge (a word beside its colour) and its ports; a failing app gives its reason and one button"},
{"go": "Press Start all", "look": "the flash message", "expect": "it names how many apps were asked, and the Undo stops only those apps"},
{"go": "Press Stop all", "look": "the flash message", "expect": "its Undo starts only the apps that were running and got stopped"},
{"go": "/infra/project/<box>", "look": "the Logs section", "expect": "merged lines from the shown apps only, each with its app named, never the waker"}
]
I did not add a terminal screen or an API route for the page, and I did not move it out from under /infra.
I merged main into the branch and pushed it. tsc is clean, test/infra-project.test.ts passes (11 tests), and the gate's --fix changed nothing. I haven't run the full suite, which the forge's check does.
The only conflict was in the import block of src/http/infra_routes.ts. Both sides edited the games/store.ts import, so I kept the page's names (mayDo, roleOn, seesBox) together with main's type GameBox.
The page's behaviour is unchanged from the last round, and the review block in the earlier description still applies.
A game box's compose project now opens at
/infra/project/<box>as a table of its apps, with merged logs, its compose file, and Start all, Stop all and Update. Only the project and gate-related tests were run, not the whole suite. The newtest/infra-project.test.tspasses, as do the first-view budget, attention and design-audit tests. The/infra/project/:boxfixture was added totest/pages-budget.test.tsso that route stays inside the first-view budget. The forge's check will run the full suite.I read "a compose project" as a game box, the only compose project the forge knows. Its apps are the services of its compose file.
What it does
askPower, so a held box refuses them the same way it does for the container tab.maydecides, and the actor must operate the whole box. A read-only token and a person with no grant are refused and nothing is asked.oon a box's row in Games openssrc/tui/screens/project.ts. Theresstarts all,xstops all,uupdates andzundoes the last start or stop.docs/features/project.mdis the how-to.askPower,parseCompose,readCompose,mayOnGame,isSilentand the flash Undo. New modules aresrc/games/project.ts(state, ports, logs) andsrc/actions/project.ts(buttons).Left out or different from the issue
/infrais admin-marked, so a non-admin operator never reaches the page. Themaycheck inside the action still refuses them, and the test calls it directly. Moving the project page out of/infrawould fix this and needs your call.namedin the new test resembles a helper intui-thought-notes.test.ts. I left it as a note.app.looksreaches this admin route.To try
/infra/project/<box>as an admin, or pressoin the terminal's Games./infra/project/<box>as an admin. Look at the table. Expect a state word beside a colour and the published ports for each app.Closes #18603