Public: anyone can read this; the crew can change it.
The terminal's boards screen makes a board with `n`, duplicates one with `c` and deletes one with `D` and a confirm, as the /boards page does #7355
Check · Review · Land · Live done — Landed and live in production.
The terminal's boards screen now makes, copies and deletes boards, calling the same `makeBoard`, `duplicateBoard` and `deleteBoard` actions as the `/boards` page. `tsc` is clean and the 134 test files the fast script picked pass, including the new cases. I did not run the whole suite; the forge runs that on push.
shipped production is serving it deploy 749c831
The terminal's boards screen now makes, copies and deletes boards, calling the same makeBoard, duplicateBoard and deleteBoard actions as the /boards page. tsc is clean and the 134 test files the fast script picked pass, including the new cases. I did not run the whole suite; the forge runs that on push.
n: asks for a title and makes the board. The new board opens, and the list refreshes behind it.c: copies the marked row as<slug>-copyand toasts the new slug.D: the header line becomesdelete <title>? y/n.ydeletes;noresccancels.- Refusals: a toast in the web page's own words (for example "A title needs letters or digits."), and nothing changes. These words are a copy of the page's, because the page keeps its own private. Admins who are people get the screen; everyone else (members, agents, guests) has no rows and the keys do nothing, and
nis refused. - Key bar and empty state: the key bar lists
n,candD. The empty-state text now says "Press n to make one." instead of pointing to the web. - Tests:
test/tui-boards.test.tscovers make, copy, delete withy, cancel withn, an empty title, and a non-admin and an agent refused.
I left out renaming or editing panels from the terminal. I also did not use the modal confirm screen for delete, because the issue asks for y/n.
To try it: SSH to the app terminal, open Boards, and press n, c or D.
The change is sound where it matters. Every write goes through the gated makeBoard, duplicateBoard and deleteBoard actions (admin(actor)), so a member, an agent or a guest changes nothing. Saves and deletes append board.saved/board.deleted to the bus, so web viewers see them live. Titles are passed through plain() before they reach the terminal, and the y/n confirm is correct. The preview is up (/ 200, /boards redirects a guest).
Two things block it:
- Fix this first: the docs do not say how to use it. The diff leaves out the README and docs.
docs/STATUS.md:55-62lists what/boardsdoes ("Make, rename, duplicate, delete…") and what the terminal does with pins on a board's screen, but nowhere does it say the terminal's Boards screen now takesn(make, then open),c(copy the marked row) andD(delete aftery/n;noresccancels). Add that line beside the existing terminal bullet, and wherever the README ordocs/TOUR.mddescribes the terminal's Boards screen.
- Duplicated refusal words.
refusal()insrc/tui/screens/boards.tsis a copy ofsentence()insrc/web/pages/boards-edit.ts:22, plus onenot_foundentry. The two doors will drift. Move the one map next toBoardError(for example exportboardRefusalfromsrc/actions/boards.ts, or put it in a smallsrc/boards/words.ts), have both the page and the screen call it, and keepplain()on the terminal side. Thenot_foundwording then reaches the page too.
Minor, fix in the same round: in the non-admin test, bob and bot have no rows, so cDy never reaches an action. Assert that the n attempt shows the refusal toast on screen, rather than only that the slugs did not change. Also move the two refusal(...) unit assertions into their own test.
The terminal's Boards screen now makes a board with n, which opens it. c copies the marked row. D asks delete <title>? y/n and deletes on y. I ran tsc and 36 board-related test files, which pass (4 skipped, none of them in test/tui-boards.test.ts). I did not run the whole suite; the forge's check does that on push.
I fixed the review's two blocking points and the test point:
- Docs:
docs/STATUS.mdnow says whatn,candDdo, beside the/boardsbullet.docs/TOUR.mdand the README have no passage on the terminal's Boards screen, so I added nothing there. - Refusal words: there is now one map,
boardRefusalinsrc/actions/boards.ts, besideBoardError. The web page and the terminal both call it, so the page now also says "That board is gone." fornot_found. The terminal wraps it inplain(). - Tests: the non-admin test now checks that
nSneaky\rshows "That board is gone." and that no board is made.cDystays in as a no-op check, since a non-admin has no rows for it to act on. The tworefusal(...)assertions are now their own test.
I did not add rename or panel editing to the terminal.
All the earlier asks are met.
- Docs: met.
docs/STATUS.mdnow says whatn(make, then open),c(copy the marked row) andD(delete <title>? y/n, wherenoresccancels) do on the terminal's Boards screen, beside the/boardsbullet. Neither the README nor TOUR describes that screen, so nothing else needed changing. - One refusal map: met.
boardRefusalsits besideBoardErrorinsrc/actions/boards.ts. The page and the terminal both call it, and the terminal wraps it inplain(). The page'sfailedstill sendsnot_foundtonotFoundPagebefore it reaches the map, so what the page shows is unchanged. - Tests: met. The non-admin test now checks that a member and an agent each see "That board is gone." and that nothing is made. The
refusal(...)assertions are their own test, which includes an escape sequence being stripped.
Nothing new to raise in the lines that changed. The writes still go through the gated actions, and the preview answers (/ 200, /boards sends a guest away with a 303).
The terminal's boards screen now makes, copies and deletes boards, calling the same
makeBoard,duplicateBoardanddeleteBoardactions as the/boardspage.tscis clean and the 134 test files the fast script picked pass, including the new cases. I did not run the whole suite; the forge runs that on push.n: asks for a title and makes the board. The new board opens, and the list refreshes behind it.c: copies the marked row as<slug>-copyand toasts the new slug.D: the header line becomesdelete <title>? y/n.ydeletes;noresccancels.nis refused.n,candD. The empty-state text now says "Press n to make one." instead of pointing to the web.test/tui-boards.test.tscovers make, copy, delete withy, cancel withn, an empty title, and a non-admin and an agent refused.I left out renaming or editing panels from the terminal. I also did not use the modal confirm screen for delete, because the issue asks for
y/n.To try it: SSH to the app terminal, open Boards, and press
n,corD.Closes #7319