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
Check · Review · Land · Live done — Landed and live in production.
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
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:
listenAgaincallsremoveMutesfrom 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
recordInteractiondynamically inside the test. Move it to the top-level imports. uandLfire from any focus, but the key bar only showsLanduwhen 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.
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
Land the muted count:silencedwas built only from repositories that have work assigned to you. It is now built frommutedRepos(...), 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 byL.- New test: it mutes a repository with no assignment and checks that the card says "1 repository muted", that
Lremoves the mute, and that the note disappears. - Footer:
onYouFooter()is computed once, with no!. - Test import:
recordInteractionis now a top-level import in the test.
Where I disagree or left things as they are
- Mute removal: the web unmute (
asksListeninsrc/web/studio/asks_page.ts) also callsremoveMutesdirectly, and no action exists for it. The terminal does the same, so the two match. No per-user check is lost, becauseremoveMutesis 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:
uandLfire from any focus, and I kept that. Both are no-ops when there is nothing to do:utoasts "nothing to undo", andLdoes nothing when nothing is muted. The key bar only advertises them when they apply. The row verbsx,m,Sandspacestay 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 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.
The full gate on land was red and named no test; the pull is open again.
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.tswas in neitherGATEnorEXCLUDEDinscripts/gate.ts. The test-shards audit that runs on every push fails on a file in neither list. I added it toGATEand merged current main into the branch.What the branch does
applyAsksBulk. The same admin checks apply, and refusals show inline.latestUndoable) can be undone from the terminal within its day.test/tui-onyou.test.tshas 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