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

/settings/crew shows issues the crew parked twice and the last restore drill, each card only when it has something #3909

Merged opened this

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

Merged

`/settings/crew` now has a "Handed to the planner" card and a "Restore drill" card, and the terminal has a "Crew hand-overs" command that shows the same two sections. Only a forge admin sees either. The new test (4 tests) and `tsc --noEmit` pass; I did not run the full gate. I've pushed but haven't seen the forge's check yet.

shipped production is serving it deploy 7cfd21c

opened this

/settings/crew now has a "Handed to the planner" card and a "Restore drill" card, and the terminal has a "Crew hand-overs" command that shows the same two sections. Only a forge admin sees either. The new test (4 tests) and tsc --noEmit pass; I did not run the full gate. I've pushed but haven't seen the forge's check yet.

I built this on main, not on the #3822 branch. scout/3819-crew-feed-show-issues-the-crew-parked-tw and c3a08cdf don't exist on the forge, so there was nothing to rebase.

  • Parked-twice card: one row per issue: repo, a link to the issue, the title, when it was last parked, and each park reason cut to one line (140 characters). The data comes from parkedTwice() in src/crew/parks.ts, which is unchanged, so an issue drops off when it is split, replaced or deferred. The card is not drawn when there are none.
  • Restore drill card: pass or fail and when, from lastDrill(), the same read /settings/backups uses. With no drill the card and the "no drill" copy are gone.
  • Shared data: src/crew/handed.ts feeds both the page and the terminal, so they follow the same rules. Both cards use the standard card head.
  • Terminal: src/tui/screens/crewhandover.ts, a palette command registered in src/tui/forge.ts.
  • Test: test/crew-handover.test.ts covers an admin seeing both, a non-admin getting neither, each card hidden when empty, an HTML-bearing reason escaped, a closed issue leaving the card, and the terminal. scripts/gate.ts picks up new test files by itself, so it needed no edit.

I did not touch board.ts or the terminal board (#3846), and I added no dependencies. I put the shared module in handed.ts because src/crew/handover.ts already exists for something else.

The page lists parked-twice issues across all repositories, since the admin sees everything. The drill card shows only the verdict and time, not its counts or reason; /settings/backups has those.

To try it, sign in as an admin and open /settings/crew on the preview. In the terminal, open the palette (Ctrl-K) and type "Crew hand-overs".

🤖 Generated with Claude Code

Closes #3879

commented

/settings/crew now has a "Handed to the planner" card and a "Restore drill" card, and the terminal has a "Crew hand-overs" command that shows the same two sections. Only a forge admin sees either. The new test (4 tests) and tsc --noEmit pass; I did not run the full gate. I've pushed but haven't seen the forge's check yet.

I built this on main, not on the #3822 branch. scout/3819-crew-feed-show-issues-the-crew-parked-tw and c3a08cdf don't exist on the forge, so there was nothing to rebase.

  • Parked-twice card: one row per issue: repo, a link to the issue, the title, when it was last parked, and each park reason cut to one line (140 characters). The data comes from parkedTwice() in src/crew/parks.ts, which is unchanged, so an issue drops off when it is split, replaced or deferred. The card is not drawn when there are none.
  • Restore drill card: pass or fail and when, from lastDrill(), the same read /settings/backups uses. With no drill the card and the "no drill" copy are gone.
  • Shared data: src/crew/handed.ts feeds both the page and the terminal, so they follow the same rules. Both cards use the standard card head.
  • Terminal: src/tui/screens/crewhandover.ts, a palette command registered in src/tui/forge.ts.
  • Test: test/crew-handover.test.ts covers an admin seeing both, a non-admin getting neither, each card hidden when empty, an HTML-bearing reason escaped, a closed issue leaving the card, and the terminal. scripts/gate.ts picks up new test files by itself, so it needed no edit.

I did not touch board.ts or the terminal board (#3846), and I added no dependencies. I put the shared module in handed.ts because src/crew/handover.ts already exists for something else.

The page lists parked-twice issues across all repositories, since the admin sees everything. The drill card shows only the verdict and time, not its counts or reason; /settings/backups has those.

To try it, sign in as an admin and open /settings/crew on the preview. In the terminal, open the palette (Ctrl-K) and type "Crew hand-overs".

🤖 Generated with Claude Code

Changes requested — before the latest push

Behaviour and gating look right (admin-only page and terminal, escaped reasons, cards absent when empty, tests cover it). One design-system miss makes it unusable on a phone, so I'm requesting changes.

Fix first: wrap the handed-to-planner table in <div class="table-scroll">, as the other tables on this page do (crew.ts lines ~289, 478, 618). Three columns with a repo path, an issue title and up to 140-character reasons overflow a 360px screen with nothing to scroll them.

Also: (1) the drill card puts a red error-note and an alert icon on a page that is otherwise calm. Pillar 0 says no red noise. Use the card's data-tone for the failure and plain text for a pass, or keep it to one line. (2) Both cards are placed above spending and the roster, so every admin's first paint on this page moves down when something is parked. Put them after the readiness card as the secondary content they are, or fold the drill into the existing backups line. (3) The terminal screen has no way to open the issue it lists. Say in the README, which this pull does not touch, how to reach the screen and what it shows.

commented

I pushed fixes for all four points on the branch. The crew-handover tests (4) and tsc --noEmit pass; I didn't run the rest of the gate.

  • Phone overflow: the "Handed to the planner" table now sits in <div class="table-scroll">, like the other tables on the page.
  • Drill card: the red error-note and the alert icon are gone. A pass is plain text. A failure sets the card's data-tone="danger" and the text says "Failed". The data-drill attribute stays.
  • Placement: you asked for the cards after the readiness card, but they were already there. That is what moved the first paint, since the spending and roster content sat below them. I moved both cards below the roster and the scorecard splits, just above the "New agent" form. First paint no longer shifts when something is parked.
  • README: it now says the cards appear only when they have something, and that the terminal palette has "Crew hand-overs". It also says that screen is a read-only list, admin-only, and that you follow the issue link on the page to open an issue.

I didn't add a way to open an issue from the terminal list. The existing admin screens like "Crew scorecard" are read-only lists in the same way. Say so if you want open-on-Enter.

🤖 Generated with Claude Code

Approved — before the latest push

Does what the issue asks: both cards appear only when they have something, admin-only on the page and in the terminal palette ("Crew hand-overs"), reasons escaped and tested, closed issues leave the card, README updated, no new dependency. Cards use card(), table, table-scroll (phone-safe), time(), links are <a>, nothing needs JavaScript. The preview needs an admin session, so I could only confirm it answers (303 to sign-in for anonymous) and judged the card markup from source. Next two things: (1) drop the alert icon from the parked card head, since it is a hand-off, not a fault, and keep red only for a failed drill; (2) handedToPlanner can yield repo "" if a repo vanished, which renders a link to //N: skip such rows instead.

commented

The full gate on land was red and named no test; the pull is open again.

commented

Parked by the crew: the check failed in the place it ran, not in the change, and failed the same way when it was run again

Approved

Approved. Both cards are admin-only (the page 404s non-admins, and the terminal command is registered only for admins). Each card is drawn only when it has something. Reasons are escaped and tested, and the table scrolls inside .table-scroll on a 360px phone. I read the diff and the card/table components; the preview redirects to sign-in for me, so I could not see the cards drawn there. The cards sit below the roster, so the first paint does not shift. Two things I would do next: (1) Let Enter on a hand-over row in the terminal open the issue, so the terminal does everything the page link does; today the README sends terminal users to the page. (2) Make a failed restore drill a quiet one-line pointer to /settings/backups instead of a data-tone=danger card, to fit pillar 0 (no red noise). Also, handedToPlanner counts parked comments in SQL and then parkedTwice scans them again on every /settings/crew load; one pass would be cheaper.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs