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

The cockpit: board and map as one screen, driven by four keys, readable from a TV, with nothing that needs you that a rule could answer #16844

Merged opened this in answer to

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

Merged

First step of the cockpit: /cockpit, and /board?kiosk=1 lands on it. It covers the three regions and the four keys, but not device-token sign-in or one-press yes/no on most cards.

Notes

opened this

First step of the cockpit: /cockpit, and /board?kiosk=1 lands on it. It covers the three regions and the four keys, but not device-token sign-in or one-press yes/no on most cards. bun test passes on the cockpit, board, MCP size, route-mark, doorless and hollow suites; I did not run the whole suite, and fast.ts named 3,723 files. tsc and design-lint are clean. The gate still prints similarity notes for cockpitScreen, read and seedPull; I left those functions as they are.

What changed

  • One screen. Top is the Today lines. Middle is what needs you: at most five cards, one plain sentence each, at most three actions, with "N more" counted. Bottom is the waves toward milestones, one row each with "1 of 4 landed, 3 to go" and a meter.
  • Four keys. Up/down (and j/k) move the focus, Enter takes the first action, back (Escape, Backspace or left) goes item → section → front page. The focus stays on the same item when a live region swaps.
  • At 3 m. There is a 6px outline, type up to 2rem, and one colour per meaning (needs you, working, done, blocked).
  • Kiosk. ?kiosk=1 drops the top bar, uses the dark theme, and leaves out cards that want typed words (stopped, handover, declined).
  • No jargon. Sentences say "the crew" and "changes"; a test bans the nerdy words on the page and in every sentence.
  • Muted. A muted repository has no card.
  • MCP. asks with { cockpit: true } returns { today, sentence, cards, more, waves } from the same object the page renders. I added an argument to asks rather than a new tool. The description stays under 120 bytes and no ceiling moved.
  • Terminal door. A palette entry, "Cockpit", for signed-in users, plus docs/features/cockpit.md and docs/design/areas/cockpit.md.
  • Wiring. A route mark and a look entry for /cockpit in forge.json.

Reused. feedDigest (Today lines), askLinesFor (cards and the mute rule), biggestOf with landedWords (waves), /asks/proposal/:id/approve|later and /asks/decide, liveRegionsJs, row-free [data-*] styling, and ListState/drawList in the terminal.

What I chose not to do

  • Folding the pages. I did not fold board.ts and map.ts into one page. /board stays as the wall of the crews at work, and the cockpit sits beside it.
  • Device-token sign-in. The kiosk uses the ordinary session; device-token sign-in is not built.
  • Decider automation. Shelved apps are already excluded by the asks read. Auto-answering hand-overs and stale red checks through the decider (#1151) is not built, so those cards are only hidden in the kiosk, not answered.
  • Yes/no on every card. Only a proposed plan answers Yes or Later in one press, and a stuck hand-over answers "Let the decider". Every other card opens where it is answered; I did not wire per-kind yes/no.
  • client.ts. The four-key script is in src/web/cockpit_keys.ts, since client.ts has its own size ceiling.
  • Forge's own needs. An admin's forge-level needs are not cards yet.
  • Sandbox limit. I could not drive a real browser here. The keys are tested against a stub document, not a DOM.

Try it. Sign in and open /cockpit; press Down, then Enter. Open /board?kiosk=1 for the kiosk. In the terminal, use the palette entry "Cockpit".

[
  {"go": "/cockpit", "look": "Three regions under a sentence like '2 things need you.'; each card is one sentence with a large primary button", "expect": "No words like pull, merge or agent; the focused card has a heavy outline", "ask": "Press Down twice, then Enter: does the first action fire, and does Escape step back out?"},
  {"go": "/board?kiosk=1", "look": "The same screen without the top bar, dark theme", "expect": "Cards that want typed words (stopped, handover, declined) are absent"}
]

Closes #1152

Show 36 earlier items

7 earlier comments
commented

<!-- look-pages f41654c30a3b --> Look pages for f41654c, from the gate:

  • look pages (named): this pull changes src/web/cockpit_keys.ts, src/web/pages/board.ts, src/web/pages/cockpit.ts; a commit names /cockpit
commented

The one failure that was this pull's is fixed and pushed: test/looks-owner.test.ts expected /preview-admin/sample/space in forge.json looks and looksAsOwner. My earlier commit took that page out of both, so the test was out of date. I removed space from its list, and the file now passes locally (22 tests). bun x tsc --noEmit printed nothing, and bun scripts/gate.ts --fix left nothing to commit.

  • limits > every change is kept with who made it and when: this passes when I run test/limits.test.ts as a file. Its 0.59 ms run on a shard suggests it ran alone and lacked the changes made by earlier tests in the file. I did not change it.
  • on production's size > a cold home answers…: the check log says test/observability-budget.test.ts is also red on main at b6ae866, so it is not counted against this pull. I did not run or touch it.
  • Not pushed after a full run: I ran only the looks-owner and limits tests, not the whole suite. The forge's check will run the full suite on this push.
  • Gate output: the gate printed three "one implementation?" similarity notes (src/tui/screens/cockpit.ts#read, test/cockpit.test.ts#seedPull and #mk). Each was a note, not a failure, and I left the code as it was.
commented

I made no changes and pushed nothing. Each item in the feedback is already met on this branch, or isn't something this pull introduces.

  • Look pages: the gate note ("look pages (named)") says a commit names /cockpit, and three commits carry Looks: /cockpit. The gate lists it as a NOTE, not a refusal.
  • Both doors: the terminal side is src/tui/screens/cockpit.ts, with the src/tui/forge.ts hook and docs/features/cockpit.md. The commits that touch neither carry a No door: <why> line.
  • Dead code: test/unused-exports.test.ts passes. It mentions streamLag in src/snapshot/stream.ts, which this pull doesn't touch.
  • as never in tests: none in this pull's test diff.
  • Naming the issue: every commit subject on the branch already ends in (#1152), except my last commit, which I wrote with (#1152) in the subject too. The "Direction:" form applies to direction commits, and this pull has none.

The three duplicate-function notes from the gate (cockpit.ts#read, seedPull, mk) are advisory, and I left them as they were.

commented

I merged main into the branch and pushed it. The one conflict was src/web/cockpit_keys.ts, where both sides had added a file with that name.

  • The conflict: main (#17061) added cockpitKeysJs there, which drives the home's "needs you" cards. My cockpit screen's four-key script had the same file and export name. I kept main's file as it was.
  • My side: the screen's keys now live in src/web/cockpit_screen_keys.ts as cockpitScreenKeysJs. I updated the import in src/web/pages/cockpit.ts and in test/cockpit.test.ts to match.
  • Checks: bun x tsc --noEmit printed nothing. These tests pass (59): test/cockpit.test.ts, test/cockpit_keys.test.ts, test/palette-roster.test.ts, test/looks-owner.test.ts and test/unused-exports.test.ts. I did not run the whole suite.
  • Gate: bun scripts/gate.ts --fix rewrapped one comment in src/web/pages/cockpit.ts, which I committed in a second push. The gate's three duplicate-function notes (cockpit.ts#read, seedPull, mk) are still there and I left them.
commented

I merged main into the branch and pushed it. The merge conflicted in the three files you named.

  • src/tui/forge.ts and test/palette-roster.test.ts: main removed the "Asked" screen and its palette entry. I kept only the Cockpit import, command and three roster rows and dropped the Asked ones. The merge result differs from main only by the Cockpit additions.
  • src/generated/marks.ts: I took main's copy and regenerated it with bun scripts/own-source.ts. It has no conflict markers and includes the cockpit mark.
  • Checks: bun x tsc --noEmit printed nothing. 57 tests pass across test/cockpit.test.ts, test/palette-roster.test.ts, test/own-source.test.ts, test/looks-owner.test.ts and test/unused-exports.test.ts. I did not run the whole suite.
  • Gate: bun scripts/gate.ts --fix changed nothing. It still prints its two advisory notes about the long comment in src/web/pages/board.ts and the look pages for /cockpit.
commented

<!-- look-pages af9b8a963776 --> Look pages for af9b8a9, from the gate:

  • look pages (named): this pull changes src/web/cockpit_screen_keys.ts, src/web/pages/board.ts, src/web/pages/cockpit.ts; a commit names /cockpit
commented

This push changes no code. I added one commit with the line Looks: /cockpit, which names /cockpit as the look page the gate asked for.

The gate's "look pages" line still prints on the pull. It is the notice that names /cockpit, not a failure. /cockpit and /board were already in forge.json looks and looksAsOwner.

The other refusals you listed were already met on this branch:

  • Both doors: src/tui/screens/cockpit.ts is the terminal side. The gate rule passes.
  • Dead code: test/unused-exports.test.ts passes.
  • Name the issue: the gate rule passes, and the new commit carries (#1152).
  • as never in tests: test/cockpit*.test.ts has none.

bun x tsc --noEmit is clean, and test/cockpit.test.ts and test/unused-exports.test.ts pass (17 tests). I didn't run the full suite. bun scripts/fast.ts reported the diff as unbounded because forge.json changed, so the forge's check runs the rest.

bun scripts/gate.ts --fix rewrapped nothing and left the tree clean. The 100-column comment note it reported for src/web/pages/board.ts is non-blocking.

The gate also notes that three functions look like others in the repo, and I left all three as they are:

  • read in src/tui/screens/cockpit.ts against read in decider.ts.
  • seedPull in test/cockpit.test.ts against greenPull in test/ask-filters.test.ts.
  • mk in test/cockpit.test.ts against propose in test/proposal-card.test.ts.

Merging each pair would couple unrelated screens and test files. If a person wants any of them merged, it is a separate small change.

🤖 Generated with Claude Code

commented

<!-- look-pages 8094100418e4 --> Look pages for 8094100, from the gate:

  • look pages (named): this pull changes src/web/cockpit_screen_keys.ts, src/web/pages/board.ts, src/web/pages/cockpit.ts; a commit names /cockpit
Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs