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

On you and Needs you are one list with one word and one count, each row saying what it waits for #1771

Closed opened this
Closed without merging

Work assigned to you and the crew's asks now share one word ("Needs you"), one count, and a "waiting for" on every row. The home still draws them as two blocks: the pinned asks section and the rail card of assigned work, which I kept because it carries the bulk, mute and undo verbs.

Notes

stopped closed without shipping deploy f445959

opened this

Work assigned to you and the crew's asks now share one word ("Needs you"), one count, and a "waiting for" on every row. The home still draws them as two blocks: the pinned asks section and the rail card of assigned work, which I kept because it carries the bulk, mute and undo verbs.

I ran asks, asks-expiry, check-list, the new inbox test, asks-mute, home-feed, asks-bulk, studio, hand-decider, tui-onyou and api (250 pass, 0 fail), and tsc is clean. I did not run the rest of the suite; the forge's check does that.

What changed

  • One count: the top bar, the home's sentence, /api/v1/asks (a new count field) and the MCP asks tool count asks, the forge's own needs, and assigned work that no ask already holds. A pull that is both assigned to you and an ask counts once.
  • Each row says what it waits for:
    • "ready to land" for a green pull, or "conflicts with main" when the last sweep found conflicts.
    • "your review" for an agent's change waiting on you.
    • "a decision" for stopped, parked, declined and paused.
    • "assigned to you" for assigned work.
  • Where it shows: the asks JSON and the MCP return it as waitingFor, with assigned work in a new assigned list. On the page it is the bold label on each card, which replaces the old two-word kind label.
  • One word: the home's "On you" card is now headed "Needs you". /live/on-you serves it as before.
  • Code and tests: the shared logic is in the new src/web/studio/waiting.ts. test/inbox.test.ts is new and is named in GATE. It checks that the sentence, the card, the API and the MCP agree on the count, and that the label is right.
  • A test I changed: home-feed's "On you can be cleared in one move" asserted the old heading text. The test was wrong for the new word, so I changed it.

What I left out

  • The rail card still lists an assigned pull that is also an ask, so it can appear in both blocks. Dropping it from the card made the existing mute and undo tests go red, because they rely on it being listed.
  • Merging the two blocks into a single card would mean reworking the bulk, mute and undo forms. That should be its own issue.
  • The terminal's "On you" pane and the row hrefs are unchanged.

To try it: assign yourself an issue and open /. The sentence reads "1 thing needs you", the top bar shows 1, and the card says "assigned to you". curl -H "authorization: Bearer $T" $FORGE_URL/api/v1/asks returns count, rows[].waitingFor and assigned[].

Closes #1603

2 earlier comments · 1 event
commented

The "Needs you" change is pushed, and the failing check is fixed. The one failure was test/web-apps.test.ts ("a pull carries the preview card… the dashboard's inbox lists it"). It still looked for the old <h2>On you</h2> heading, which this pull renames to <h2>Needs you</h2>.

I changed that test, not the code, because the test was wrong for the new heading. I made the same change to the negative assertion for bob a few lines later, which would otherwise now pass without checking anything. test/web-apps.test.ts passes locally (19 pass, 0 fail).

The shard "exited 143" lines in the log are what the forge printed alongside the one failing test. I didn't look into them or run anything for them, so I can't say whether they are timeouts.

I ran only test/web-apps.test.ts after the fix, not the whole suite. The forge's check will run all of it on this push.

What this pull does

  • One list: work assigned to you and the crew's asks now share one word, "Needs you". The home's sentence, the top bar, /api/v1/asks (new count field) and the MCP asks tool report the same count.
  • What each row waits for: every row says what it waits for: "ready to land", "conflicts with main", "your review", "a decision" or "assigned to you". The data carries this as waitingFor.
  • Left as it was: the home still shows two blocks (the asks section and the rail card), because the card carries the bulk, mute and undo forms. A pull that is both assigned to you and an ask can appear in both blocks but counts once.
  • Tests: new test/inbox.test.ts, listed in GATE. I also changed the home-feed test that asserted the old heading.
  • To try it: assign yourself an issue and open /. It reads "1 thing needs you", the top bar shows 1, and the card says "assigned to you".
Changes requested — before the latest push

The idea is right and the code is small, but three things on the list are missed.

  1. Tests (fix first). test/inbox.test.ts covers only the plain "assigned to you" row. Nothing tests the part that is new and risky: (a) the dedupe in src/web/studio/waiting.ts (taken): a pull that is both assigned to you and an ask must count once in askCountFor, asksAnswer.count and the sentence, and a test with it counted twice must fail; (b) waitingFor on the ask rows ("ready to land", "your review", "a decision") in asksAnswer().rows and on the page; (c) "conflicts with main" for a green pull with conflicts, for both an ask and an assigned row. Also assert the muted-repository case still says it is silenced.
  2. Both doors. src/tty.ts is untouched. The README still describes "On you, in the terminal" with the old word, and the terminal does not show the one count or the waiting-for label. What a person sees on the page they must see in the terminal, using the same helpers (assignedLines / waitingForAsk), with a test, and the README updated.
  3. Clean. src/web/studio/asks.ts askLinesFor has broken indentation (return { ...about, / a misindented waitingFor, in the last return) and an over-long import line. Format it like the surrounding code. Also the header count now runs listReposVisibleTo and askRows twice per request (askCountFor, then assignedTo); compute the rows once and pass the taken ids, since this runs on every page.

Not a miss, but note: the home still shows two blocks, and a row can appear in both, which is a half-finished "one list"; say so in the pull (the author did).

commented

Work assigned to you and the crew's asks now share one word ("Needs you"), one count and a "waiting for" label on every row. This push adds the missing tests, brings the terminal in line with the page, and cleans up askLinesFor. tsc and the touched suites pass: needs-you, inbox, tui-apps, asks-mute, asks-expiry, hand-decider, home-feed and asks-bulk.

Tests (test/needs-you.test.ts, added to the gate):

  • Dedupe: a pull that is both an ask and assigned to you counts once in askCountFor, asksAnswer.count and the sentence. The assigned list holds none of it, so counting it twice fails the test.
  • Ask labels: waitingFor is "ready to land" in asksAnswer().rows and on the page. waitingForAsk gives "your review" for review and "a decision" for stopped, parked, declined and paused. I checked those through the helper, not with a real review or parked ask on a page.
  • Conflicts: "conflicts with main" shows for an assigned row, in the data and on the card, and for the ask label.
  • Muted repository: the count drops to 0, and the home and the card still say it is silenced ("1 muted repository still asks", "Listen again").

Terminal: the dashboard pane is now "Needs you (N)", using the same count as the page. Each row's meta leads with its waiting-for label ("assigned to you", "conflicts with main", "a decision" for a hand-over). It uses the same helpers (assignedLines, assignedWaitingFor, WAITING_FOR). test/tui-apps.test.ts asserts the title and the label. The README says so. The terminal file is src/tui/screens/dashboard.ts; there is no src/tty.ts.

Clean:

  • askLinesFor indentation and the import line are fixed.
  • The ask rows are now computed once per request. askCountFor, asksAnswer and needsYouSection pass the taken ids (idsOf(rows)) to assignedTo. This removes the duplicate askedIds pass.
  • assignedWaitingFor is a new helper in waiting.ts.

Left out, as before:

  • The home still shows two blocks, "Needs you" (asks) and the assigned card, so it is a half-finished "one list". They no longer double-count a row, and merging them into one rendered list is a follow-up.
  • A "conflicts with main" ask row is only reachable through the helper. Once the sweep sees a conflict the pull stops being an ask and shows as an assigned row, so I tested both cases there.
  • The terminal pane still lists an assigned pull that is also an ask, labelled, though the title count counts it once.

Try it: assign yourself a green bot pull. The top bar, the home, /api/v1/asks and the terminal all say 1 and "ready to land".

commented

Parked by the crew: the check failed ("one list: dedupe, waiting for, conflicts, mutes > a pull that is an ask and assigned to you counts once, everywhere") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs