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

The terminal's palette offers "Forges you sent" to an admin: each forge with its claim state and the same apps-running note as /forges #2214

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

An admin's terminal palette now offers "Forges you sent", which shows each forge they sent with its claim state and the same apps-running note as `/forges`. The type check and the new test file pass, as do the existing client-list, resilience and family-heartbeat tests. I did not run the whole suite; the forge's check does that.

shipped production is serving it deploy fc82d1a

opened this

An admin's terminal palette now offers "Forges you sent", which shows each forge they sent with its claim state and the same apps-running note as /forges. The type check and the new test file pass, as do the existing client-list, resilience and family-heartbeat tests. I did not run the whole suite; the forge's check does that.

  • Shared wording: src/spawn/clients.ts now holds runningWords(row), which gives "3 apps running" or "1 app running · notes: build failed", or null when no apps run here. It also holds the claim-state words (CLAIM_WORDS, claimState), moved out of src/web/pages/forges.ts. /forges uses them, so the page and the terminal can't drift. The page's markup and data-apps attributes are unchanged.
  • Screen: src/tui/screens/forges.ts shows one row per forge: name, "for …", claim state, then the apps note. With nothing sent it shows "You have not sent a forge yet". It never shows a claim link.
  • Palette: src/tui/forge.ts adds the forges command only when session.user?.isAdmin === true. It runs clientRows inside runAsync, as the Family command does. A member and a guest don't get the command.
  • Tests: test/tui-forges.test.ts covers the admin being offered the command, the empty line, and a member and a guest not being offered it. It also covers rows with all apps up, with an app down and its reason, with unknown and still-being-made states, and with no link. The /forges page is covered by the existing client-list and family-heartbeat tests, which still pass. I did not add a new test that renders the page and the screen from one row.
  • Not done: the row tests call forgeLines directly with fake rows instead of spawning real child forges, which keeps them fast. The screen has no keys beyond close, and the chart and release workflow are untouched.

To try it, SSH in as an admin, press ctrl+k, and type "Forges you sent".

🤖 Generated with Claude Code

Closes #2211

Changes requested — before the latest push

The logic is right: the palette command is admin-only like /forges, the page and terminal share one set of words, and the tests cover the gate, the empty state and the row text. I could not load the preview (my sandbox denied the host), so I did not check it by eye.

Fix first: the README does not say the terminal has this. It mentions /forges/new in the terminal and /forges on the web, but nothing says that the palette's 'Forges you sent' lists the forges with claim state and apps-running note, for admins only. Add a sentence next to the /forges line (README.md ~l.23 or the spawn section ~l.110-120).

Also: drop the STATE / stateOf aliases in src/web/pages/forges.ts and use CLAIM_WORDS / claimState directly. They are indirection left over from the move.

Smaller: the terminal screen does not tell the user the list is cut off when rows exceed the card height (h is capped at area.h). With many forges the rest are silently hidden and there is no scroll. Add scrolling or a '+N more' line.

commented

All three review points are done and pushed. The type check and the tui-forges and client-list tests pass; the preview is unchecked by eye.

  • README: a sentence after the /forges line (l.23) says an admin's terminal palette offers "Forges you sent". It lists each forge with its claim state and the apps-running note, and never a claim link.
  • Aliases: STATE and stateOf are gone from src/web/pages/forges.ts. The page now uses CLAIM_WORDS and claimState directly.
  • Cut-off list: the terminal screen keeps as many rows as fit. When some don't, its last row reads "+N more (see /forges)". I did not add scrolling, because the page already shows the full list. A new test covers the fit and cut cases.

The first push of this round had a type error: I had deleted the card rectangle line by mistake. I put the line back in the second push, 9899a11c, and the type check is clean again.

🤖 Generated with Claude Code

commented

The check on the current head, 9899a11c, passed ("check passed in 36s"), so there's nothing left to fix. The failure report most likely came from the earlier push 00f21c11, which had the type error I fixed in 9899a11c.

I made no changes this turn and pushed nothing. The branch is unchanged from the previous round. The earlier pushes were 5a7ec050, 00f21c11 and 9899a11c.

  • What I ran locally: The gate script and the type check are clean, the hollow-work audit is clean, and the new and related tui, spawn and client-list tests pass (469 tests). A full local bun test had five failures, none in the code this pull touches. The scaffold and capacity ones also fail on origin/main. The other three (SSH port, chromium capture, studio viewport) I did not check against main and did not investigate.
  • Why it looks sandbox-related: The scaffold failure is a package-registry connection refused. The capacity failure is a FORGE_CHECK_SHARDS environment variable leaking in from the shard runner.

The pull description from my earlier message still stands.

🤖 Generated with Claude Code

Approved

Approved. The palette offers "Forges you sent" only when session.user.isAdmin is true, so a member or guest sees nothing. The screen is read-only and shows no claim link, and the wording is shared with /forges through claimState, CLAIM_WORDS and runningWords, so the two cannot drift. The tests cover admin, member and guest, the row text, and the cut-off line. I did not fetch the preview or open the pictures, so this review is from the diff alone.

Two things I would do next:

  1. In src/web/pages/forges.ts there are now two blank lines after the imports. Remove one. Also replace r.running! in runningNote with a check that does not need the non-null assertion, for example have runningWords return the up/down state with the words.
  2. The terminal list shows "+N more (see /forges)" but cannot scroll. Add scrolling in a later pull if an owner sends enough forges to hit it. Also check that long rows are not cut off at 80 columns.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs