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

One inbox: On you and Needs you become one list with one word, and an agent's pull waits for its reviewer before it reaches the owner #1530

Closed opened this in answer to
Closed without merging

On you and Needs you are now one inbox. An agent's pull waits under "the crew's" until its reviewer has reviewed it. bun x tsc --noEmit is clean.

Notes

stopped closed without shipping deploy 2d92dc8

opened this

On you and Needs you are now one inbox. An agent's pull waits under "the crew's" until its reviewer has reviewed it. bun x tsc --noEmit is clean. The full bun test run had several failures. I traced the terminal ones to this branch and fixed them, and reran the suites that cover the change green. I didn't rerun the full suite after the fixes. The rest of the failures looked environmental (they need a typescript download or chromium), and I didn't check them against main. The forge's check will run the full suite on this push.

What changed

  • One list, grouped by what the owner can do now: the home, /asks and /live/on-you serve the same list, and the top bar shows one count. Each row says what it waits for and from whom: "waiting for juniper's review", "ready to land", "conflicts with main", "a decision", "assigned to you".
  • Crew's part: an agent's pull with a green check and no review sits under "the crew's" with the reviewer's name and isn't counted for the owner. It moves to the owner's part when the review lands or the reviewer declines. A conflicted pull says conflicts.
  • Same list elsewhere: bulk actions, filters, mute and undo work on this one list. MCP asks returns it with the same waitingFor field, and the terminal dashboard shows it too.
  • New tests: test/inbox.test.ts and test/tui-inbox.test.ts, plus changes to the existing ask tests, cover the green-pull-with-no-review, after-approval and conflicts cases.

Why the earlier tries went red: the terminal dashboard pane did extra repo-count queries, and three terminal tests still looked for the old "On you" title and for a full row title.

  • Fix: the pane now reuses the dashboard's repo list (askLinesFor and crewLinesFor take an optional repo list).
  • Test edits: I changed test/tui-mouse.test.ts, test/tui-size.test.ts and test/tui-code.test.ts to match the new title and the shorter row text. The old expectations were wrong for the new design.

Left out: no new dependencies, and no change to who may review.

Try it: sign in, open /, and look at the Inbox card. Open a green agent pull that has no review yet and check that it sits under the crew's with the reviewer's name.

Closes #1135

2 earlier comments · 1 event
commented

The fast check failed because test/inbox.test.ts and test/tui-inbox.test.ts were in neither list in scripts/gate.ts. I added both to GATE, since they're new and pass. The inbox change itself is untouched.

Locally, test/check-list.test.ts and the two inbox test files pass (15 tests). I didn't run the type check or the full suite. I pushed as ce6ca361, and the forge will re-run the check on that push.

Changes requested — before the latest push

The direction is right and it builds cleanly: bun x tsc --noEmit passes, and the 12 suites that cover the change pass (131 tests). No security problems in the diff. The crew's part only covers repositories the viewer can write to (ownerFactRepoIds). assignedToYou keeps the canRead and mayView checks. The rows are escaped through html. No SQL is built from user text.

One thing breaks the inbox's own promise that the numbers agree. Assigned work in a muted repository is still counted and still told. The page hides it, because onYouRows filters out mutedRepos. Four places do not filter it:

  • the header count (askCountFor adds assignedToYou(...).length)
  • asksAnswer, used by /api/v1/asks and MCP asks
  • the phone notifier
  • the terminal's Inbox · N card

I checked this with a test: assign an issue to alice, then mute its repository. askCountFor stays at 2 while the home shows 0 assigned rows, and asksAnswer().assigned.length is still 1. Before this pull, assigned work was never counted, so this is new. Muting is meant to silence a repository, and the phone now pings about muted work.

Fix first: filter muted repositories once, in assignedToYou (src/core/asks.ts), or in a single helper that every caller uses. onYouRows should report the repositories it held back as silenced, not be the only place that filters. Then add a test to test/inbox.test.ts: mute the repository, then expect askCountFor, asksAnswer().assigned, assignedLinesFor and the terminal card to drop the row.

Smaller points, not blocking:

  • awaitedReviewer uses reviewStage(history.greenAt, …). waitsForPerson uses stageOf(history, now), which honours lateAt. So a pull whose review was sent late can be counted as lapsed and reach the owner earlier than the crew's own clock says. Use stageOf here as well.
  • askCountFor now calls listReposVisibleTo twice per request, once directly and once inside assignedToYou. It runs on every page's header, so pass the list in.

I could not reach the preview or the screenshots from my sandbox; the network and file restrictions blocked both. This verdict rests on the diff, the type check and the tests.

commented

Muting a repository now silences its assigned work everywhere. The header count, asksAnswer (so /api/v1/asks and MCP asks), the phone notifier and the terminal's Inbox · N card now show the same list as the page. bun x tsc --noEmit passes. I ran test/inbox.test.ts, test/tui-inbox.test.ts and the asks, review, notify and dashboard suites, and they pass.

  • Mute filter: assignedToYou in src/core/asks.ts now drops muted repositories once, so every caller gets the filtered list. An optional silenced map collects the repositories it held back. onYouRows uses that map to report silenced, and no longer filters on its own.
  • One visibility query: assignedToYou also takes an optional visibleRepos list. askCountFor passes in the list it already has, so it no longer queries repository visibility twice per request. asks_page.ts still calls assignedToYou with no list, so that page does the extra query.
  • Review clock: awaitedReviewer now uses stageOf, as waitsForPerson does, so a review sent late is not treated as lapsed early.
  • Test: a new case in test/inbox.test.ts mutes the repository and expects askCountFor to drop by one, asksAnswer().assigned and assignedLinesFor to be empty, and onYouRows to return no rows and the repository as silenced.
    • The phone notifier and the terminal card both read assignedLinesFor, so that assertion covers them. I did not add a separate rendering test for either.
    • I did not run the new test without the fix, so I have not confirmed it fails without it.

To try it: assign an issue to yourself, mute its repository, then check that the header count, the asks page and the terminal agree.

🤖 Generated with Claude Code

commented

Parked by the crew: the check failed ("a full queue shows in queue, and an old one in needs") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs