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

The terminal's System screen says how the forge is: the version and commit it runs, draining or not, the rollout and its incidents, as MCP `health` does #7304

Merged opened this

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

Merged

The terminal's System screen now opens with the forge's own state, above the machine lines it already showed. It reads `readHealth(session.app, session.user)`, the same answer MCP `health` gives that user.

shipped production is serving it deploy a9b30ef

opened this

The terminal's System screen now opens with the forge's own state, above the machine lines it already showed. It reads readHealth(session.app, session.user), the same answer MCP health gives that user.

  • First line, always: forge <version> · <7-character commit> · serving (or draining). When nothing says which commit is running, it shows no commit.
  • Second line, only when there is something to say: whether the rollout is blocked or held, or the platform's view is stale, plus how many other incidents there are and what each says (key: message). It is cut to the dialog's width with …. stuck and held are already in the rollout's words, so they are not counted again as incidents. When all is well, nothing more is drawn.
  • Who sees it: the same as MCP. The command is still offered only to forge admins who are people. forgeLines (src/tui/screens/system.ts) takes any readHealth answer, and a signed-out caller's answer has no incidents in it, so it never gets the second line.

Tests: test/tui-system.test.ts sets a fake version and commit and seeds incidents in a temporary FORGE_GUARD_DIR. It checks:

  • With no incidents there is exactly one line, both from forgeLines and in the opened screen.
  • One seeded incident adds exactly one line.
  • A blocked rollout and an incident share that one line, and a narrow width cuts it with ….
  • A signed-out caller gets one line even with an incident seeded.

Checks run:

  • Passed: bun x tsc --noEmit, test/mcp-size.test.ts, the design lint, and seven nearby suites (system, telemetry, resilience, tui screens, size, access).
  • Not run: scripts/fast.ts named 160 files, which it estimated at about 13 minutes, so I left the full run to the forge's check on push.

Chosen not to do:

  • No new MCP tool and no change to the health tool.
  • For an admin, readHealth also gathers the forge's vitals when the command opens. I kept that so the screen reads exactly what MCP returns, rather than calling forgeHealth directly to save the work.

To try it: sign in to the terminal as a forge admin and open the System command. To see the second line, point FORGE_GUARD_DIR at a folder whose status.json is {"incidents":{"down":"…"}}.

🤖 Generated with Claude Code

Closes #7296

commented

The terminal's System screen now opens with the forge's own state, above the machine lines it already showed. It reads readHealth(session.app, session.user), the same answer MCP health gives that user.

  • First line, always: forge <version> · <7-character commit> · serving (or draining). When nothing says which commit is running, it shows no commit.
  • Second line, only when there is something to say: whether the rollout is blocked or held, or the platform's view is stale, plus how many other incidents there are and what each says (key: message). It is cut to the dialog's width with …. stuck and held are already in the rollout's words, so they are not counted again as incidents. When all is well, nothing more is drawn.
  • Who sees it: the same as MCP. The command is still offered only to forge admins who are people. forgeLines (src/tui/screens/system.ts) takes any readHealth answer, and a signed-out caller's answer has no incidents in it, so it never gets the second line.

Tests: test/tui-system.test.ts sets a fake version and commit and seeds incidents in a temporary FORGE_GUARD_DIR. It checks:

  • With no incidents there is exactly one line, both from forgeLines and in the opened screen.
  • One seeded incident adds exactly one line.
  • A blocked rollout and an incident share that one line, and a narrow width cuts it with ….
  • A signed-out caller gets one line even with an incident seeded.

Checks run:

  • Passed: bun x tsc --noEmit, test/mcp-size.test.ts, the design lint, and seven nearby suites (system, telemetry, resilience, tui screens, size, access).
  • Not run: scripts/fast.ts named 160 files, which it estimated at about 13 minutes, so I left the full run to the forge's check on push.

Chosen not to do:

  • No new MCP tool and no change to the health tool.
  • For an admin, readHealth also gathers the forge's vitals when the command opens. I kept that so the screen reads exactly what MCP returns, rather than calling forgeHealth directly to save the work.

To try it: sign in to the terminal as a forge admin and open the System command. To see the second line, point FORGE_GUARD_DIR at a folder whose status.json is {"incidents":{"down":"…"}}.

🤖 Generated with Claude Code

Approved

Approved. The System screen opens with the forge line, reads readHealth for the same user as MCP health, stays admin-and-person only, and the tests cover one line, one added line, the shared line with truncation, and the stranger case. Nothing changes in the MCP tool and no dependency is added. I did not exercise the terminal on the preview; the terminal is not reachable by curl.

Two things I would do next:

  1. Drop the h as ForgeHealth cast in forgeLines by narrowing on incidents with a type guard exported next to ForgeHealth, so the type does the work.
  2. When many incidents are listed, the single truncated line hides which ones. Wrap the incident line over two or three rows (wrap is already imported in the module) instead of cutting it with an ellipsis.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs