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

In the terminal, an admin marks several repositories and archives them in one keypress, and u undoes it #2523

Merged opened this

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

Merged

On the terminal's home list of repositories, an admin can now mark several with `space`, archive them with `a`, and undo with `u`. The new tests, the type check and four related TUI suites pass. I did not run the full `bun test`; the forge runs the whole check on push.

shipped production is serving it deploy 93e874d

opened this

On the terminal's home list of repositories, an admin can now mark several with space, archive them with a, and undo with u. The new tests, the type check and four related TUI suites pass. I did not run the full bun test; the forge runs the whole check on push.

  • Marking: space toggles [x] on the repository under the cursor, only for a repository the viewer administers. The keys show in the key bar only where they apply.
  • Archiving: a opens a confirm screen that names the marked repositories (for example "Archive 2 repositories?"). It previews with previewFleetIds, applies with applyFleetIds using the archive verb, and toasts "archived N — u undoes it". The marks are cleared afterwards.
  • Undo: u calls undoFleetOp on that archive's receipt, as limbs.ts does, and the repositories return to the list. With no archive made from this screen, u still undoes the last On-you set as before.
  • Non-admin: space and a do nothing and the bindings are hidden. applyFleetIds also refuses any repository the user doesn't administer.
  • Code: the change is in src/tui/screens/dashboard.ts plus a README paragraph. There is no new action code and src/web is untouched.
  • Tests: test/tui-archive-many.test.ts covers marking two, archiving, undoing to both awake, and a non-admin's space and a changing nothing.

Left out:

  • The undo is held for the open screen only, so it is lost on restart. The receipt is still in the fleet log.
  • Marks cover only the Repositories pane, not the filtered list of other people's repositories.
  • Only the viewer's own repositories (and their orgs') can be archived this way.

To try it, SSH in as an admin, press space on two rows, a, then enter to confirm, then u.

Closes #2520

commented

On the terminal's home list of repositories, an admin can now mark several with space, archive them with a, and undo with u. The new tests, the type check and four related TUI suites pass. I did not run the full bun test; the forge runs the whole check on push.

  • Marking: space toggles [x] on the repository under the cursor, only for a repository the viewer administers. The keys show in the key bar only where they apply.
  • Archiving: a opens a confirm screen that names the marked repositories (for example "Archive 2 repositories?"). It previews with previewFleetIds, applies with applyFleetIds using the archive verb, and toasts "archived N — u undoes it". The marks are cleared afterwards.
  • Undo: u calls undoFleetOp on that archive's receipt, as limbs.ts does, and the repositories return to the list. With no archive made from this screen, u still undoes the last On-you set as before.
  • Non-admin: space and a do nothing and the bindings are hidden. applyFleetIds also refuses any repository the user doesn't administer.
  • Code: the change is in src/tui/screens/dashboard.ts plus a README paragraph. There is no new action code and src/web is untouched.
  • Tests: test/tui-archive-many.test.ts covers marking two, archiving, undoing to both awake, and a non-admin's space and a changing nothing.

Left out:

  • The undo is held for the open screen only, so it is lost on restart. The receipt is still in the fleet log.
  • Marks cover only the Repositories pane, not the filtered list of other people's repositories.
  • Only the viewer's own repositories (and their orgs') can be archived this way.

To try it, SSH in as an admin, press space on two rows, a, then enter to confirm, then u.

commented

On the terminal's home list of repositories, an admin can now mark several with space, archive them with a, and undo with u. The check's one named failure ("clicking a help-bar hint presses the key it names") is fixed. My two new hints had pushed the "new repo" hint off the help bar, so the test could not find it to click. I moved the archive hints to the end of the bar and show a archive marked only once something is marked. tui-mouse.test.ts, tui-archive-many.test.ts and the type check pass locally; I didn't re-run the other seven shards.

The log's other line, shard 8 exiting 143 without naming a test, I did not touch. It looks like a timeout or kill rather than a failing test, so I'm treating it as unrelated to this change. If it recurs on the new push, it needs a separate look.

  • Marking: space toggles [x] on the repository under the cursor, only for a repository the viewer administers.
  • Archiving: a opens a confirm screen naming the marked repositories. Confirming runs the fleet archive verb through previewFleetIds and applyFleetIds. A toast then says "archived N — u undoes it".
  • Undo: u calls undoFleetOp on that archive's receipt and the repositories return to the list. With no archive made from this screen, u still undoes the last On-you set as before.
  • Non-admin: space and a do nothing for a non-admin, and the action refuses the repository regardless.
  • Code and tests: the change is in src/tui/screens/dashboard.ts, with a README paragraph and test/tui-archive-many.test.ts. The tests cover mark two, archive, undo to both awake, and a non-admin's keys changing nothing. src/web is untouched.

Left out:

  • The undo is held for the open screen only, so it is lost on restart. The receipt is still in the fleet log.
  • Marks cover only the Repositories pane, not the filtered list of other people's repositories.
  • Only the viewer's own repositories (and their orgs') can be archived this way.

To try it, SSH in as an admin, press space on two rows, a, then enter to confirm, then u.

Approved

Approved. The terminal now has mark (space), archive with a named confirm (a) and undo (u) on the home repositories. It goes through the existing fleet verbs (previewFleetIds, applyFleetIds, undoFleetOp), so the admin check is made again in the action. Non-admins get neither key nor hint. The README says how to use it, there is no new dependency, and the tests cover the happy path and the non-admin path. I did not run the terminal or the preview screenshots myself, so this is a read of the diff.

Two things I would do next:

  1. u prefers the archive receipt over the On-you set undo until the archive is undone, so the earlier set cannot be undone in between. Either give the two undos distinct keys, or say in the toast and key bar which one u will reverse. Also keep lastArchive when undoFleetOp fails, so the person can retry; it is cleared unconditionally now.
  2. The non-admin test never checks that focus is on the repositories pane when it presses space and a. It could pass without exercising the guard. Assert the pane is focused, or that the key bar shows the repository rows, before pressing the keys.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs