Needs you: a waiting chat's row shows its question, not its last reply

Merged
TE
14d ago
+58-4

Summary

The Needs you popover drew a chat that waits on the person, but whose ask the page cannot read (a chat on another computer, such as a huge-blue session), as "Waiting 5m" over the chat's last reply. acpmux already names what such a chat waits on in its session summary (waitingOn, and waitingPrompt: the waiting question's first prompt, hub/subsession_send.rs waiting_on), and the pane already parses it (sessionList.ts sessionWaiting). This makes that row show the question itself, labelled as a decision (or an approval for a pending permission). Only a chat that names no question text falls back to the last reply.

Changelog

Fixed: the Needs you list shows the question a waiting chat asks instead of the chat's last reply.

Testing

Focused command (run on huge-blue): cd webviews && bun test test/agent-pane-needs-you.test.tsx

  • Base (test commit b97818a2169): fails, a waiting chat's row shows the question it waits on, not its last reply (the row is input with the last reply as its text).
  • Head (1f2c8195da5): passes; with test/agent-pane-needs-you-asks.test.ts, 37 pass, 0 fail.

Capture

Webview-only change. Gallery before/after of agent-pane.needs-you (list): https://cmux-lawrences-mac-mini.tail137216.ts.net:18796/compare/session-panel-needsyou-question/?entry=agent-pane.needs-you . The "Release notes on build box" row reads "Waiting 31m / Drafted the notes from the merged pull requests." before and "Decision 31m / Which tag should the notes start from?" after.
No capture: webview-only (needsYou model and gallery fixture); no native UI changed.

Observed / Not run

  • Observed (huge-blue): the focused test red on the test commit and green on the head; scripts/web-lint.sh and python3 scripts/cmux-next/prepush-gate.py clean; gallery screenshots (headless Chromium, built at the base and the head) show the change above.
  • Not run: the real app. A permission wait has no text in acpmux's summary, so its row keeps the last reply as the fallback (now labelled Approval).

Agent session: cosmic-gray