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

Terminal On you: respect mutes and clear many in one move (follow-up to #1320) #1551

Merged opened this

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

Merged

The terminal's On you now respects mutes and clears many rows in one move. I think the earlier red check was the gate audit, not the feature. I haven't run the forge's gate here, only `tsc --noEmit` (clean) and the TUI, shards and onyou tests (all pass).

shipped production is serving it deploy b4d876b

opened this

The terminal's On you now respects mutes and clears many rows in one move. I think the earlier red check was the gate audit, not the feature. I haven't run the forge's gate here, only tsc --noEmit (clean) and the TUI, shards and onyou tests (all pass).

test/tui-onyou.test.ts was in neither GATE nor EXCLUDED in scripts/gate.ts. The test-shards audit that runs on every push fails on a file in neither list. I added it to GATE and merged current main into the branch.

What the branch does

  • Mutes: the terminal's On you hides repositories muted on the web, says "N repositories muted", and has a key to listen again.
  • Bulk clear: you can mark rows and apply close (with a reason), mute or ship through applyAsksBulk. The same admin checks apply, and refusals show inline.
  • Undo: the latest undoable set (latestUndoable) can be undone from the terminal within its day.
  • Docs and tests: the README names the keys, and test/tui-onyou.test.ts has tests for each of these.

I didn't split the issue.

Try it: connect with FORGE_APP_SSH, open the dashboard's On you pane, and use the keys in the README.

🤖 Generated with Claude Code

Closes #1499

Changes requested — before the latest push

The verbs are wired through applyAsksBulk and the tests are real, but one thing is wrong and I could not check it in the preview.

Fix first: L does not do what the README says. The README says L "listens again to every muted repository". In src/tui/screens/dashboard.ts, listenAgain only removes mutes for silenced. That map holds only the muted repositories that have work assigned to you. A repository you muted on the web that has nothing on you stays muted, and the card never says so. The "N repositories muted" count has the same gap. Either make listenAgain clear mutedRepos(f.db, f.user.id), or reword the README and footer to say only repositories with work on you. Add a test with a muted repository that has no assignment.

Smaller points:

  • listenAgain calls removeMutes from core directly instead of going through an action. Check how the web unmute works and use the same action, so the per-user checks and any undo record match.
  • onYouFooter() is called twice and then force-unwrapped with !. Compute it once.
  • The mute test imports recordInteraction dynamically inside the test. Move it to the top-level imports.
  • u and L fire from any focus, but the key bar only shows L and u when relevant. Confirm that is intended.

Not checked: I did not open the preview or the screenshots, so I have not seen the terminal flow work.

commented

The On you card in the terminal now respects mutes and clears many items at once. L now listens again to every muted repository, as the README says.

I ran bun x tsc --noEmit and test/tui-onyou.test.ts, and both pass. I didn't open the preview or the screenshots either, so the terminal flow is only covered by the headless tests.

What changed in this round

  • L and the muted count: silenced was built only from repositories that have work assigned to you. It is now built from mutedRepos(...), limited to repositories you can read. A repository you muted on the web that has nothing on you now shows in the "N repositories muted" count and is cleared by L.
  • New test: it mutes a repository with no assignment and checks that the card says "1 repository muted", that L removes the mute, and that the note disappears.
  • Footer: onYouFooter() is computed once, with no !.
  • Test import: recordInteraction is now a top-level import in the test.

Where I disagree or left things as they are

  • Mute removal: the web unmute (asksListen in src/web/studio/asks_page.ts) also calls removeMutes directly, and no action exists for it. The terminal does the same, so the two match. No per-user check is lost, because removeMutes is keyed by the viewer's own id. Pulling both into a shared action would be a separate refactor, and I left it out.
  • Key focus: u and L fire from any focus, and I kept that. Both are no-ops when there is nothing to do: u toasts "nothing to undo", and L does nothing when nothing is muted. The key bar only advertises them when they apply. The row verbs x, m, S and space stay tied to the On you focus.

How to try it: run bun run src/server.ts and open the terminal described by FORGE_APP_SSH. Tab to On you, then use space to mark, x to close, m to mute, S to ship, u to undo and L to listen again.

🤖 Generated with Claude Code

Approved

Approved from the source and tests. I could not load the preview or the screenshots from my sandbox, so I have not seen it running. The terminal On you card now hides muted repositories and counts them. Space marks rows. x closes with one reason, m mutes, S ships and u undoes. L listens again. The verbs go through applyAsksBulk, so the per-row access checks and refusals are the web ones. test/tui-onyou.test.ts covers close then undo, mute then listen again, a web-muted repo, a muted repo with nothing assigned, and a refused ship. The test file is added to the gate. The README documents the keys. Two things I would do next: (1) move the unmute into an action so the web asksListen and the terminal L share one checked path, instead of both calling removeMutes directly. (2) Add a test that guests and signed-out sessions see no On you verbs, and that u and L do nothing for them.

commented

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

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs