Repository navigation
fix(planning): show Live on the interview page only while a watcher waits #8169
Description
This was generated by AI during attend-queue.
Refs: #7967
Refs: #6053
Agent Brief
Type: Bug
Summary: The interview page header reads Live only while a watcher is waiting, and shows a distinct working state while Claude holds the lease with no watcher waiting.
Current behavior:
The header's state function returns Live whenever the not-listening predicate (deaf()) is false, and that predicate returns false whenever the listener reports waiters > 0 or a held lease. After a watcher picks up an event and exits, the header keeps reading Live for up to the lease timeout (default 600 s). There is no header state for Claude working on a delivered event.
Desired behavior:
Liveshows only while the listener reports at least one waiter.- Lease held and no waiter: the header shows a working state naming the question Claude is on (for example
Claude is working on Q3), distinct from bothLiveand everyNot listeningtext, for as long as the bridge reports the session reading (its reading window) or the lease is held. - No waiter and no lease: today's not-listening, first-wake and Idle texts apply unchanged (the fresh-load grace is a sibling item).
- Finished, closed and offline states keep their current text.
- Per-question chips and the receipt line keep today's behavior: while a watcher holds the lease, a delivered event still reads
Sent to Claude.
Key interfaces:
- The page's header state function: the
[class, text]pair it returns gains a working state (an existingworkingpill class may be reused);Liverequireslistener.waiters > 0. - The header's notion of listening: a held lease alone no longer yields
Live. Ifdeaf()also feeds the chips and receipt line, the header gets its own check so those keep their behavior. /api/statelistener fields (waiters,lease,idleFor): read only, unchanged.
Acceptance criteria:
- In the diff, the header returns
Liveonly on a branch that requireswaiters > 0. - In the diff, a held lease or a reported reading window, with zero waiters, yields a header text that is neither
Livenor aNot listeningmessage. - A UI test in the surface's playwright suites covers: lease held with no waiter (working state), bridge reporting the session reading with no lease and no waiter (working state), and waiter present (Live). Add the assertions to an existing suite phase where its server state fits, rather than a new server, to keep the suite's runtime down.
- Existing chip and receipt-line assertions in the surface suites pass unchanged.
- The PR's CI runs
plugins/planning/surface/surface.test.shwith its browser suites (the surface job) and it passes, including the cases above. - A planning fragment exists (
scripts/new-changelog-fragment.sh planning patch), andscripts/check-changelog-fragments.sh --checkpasses.
Code anchor: conn() at plugins/planning/surface/index.html:917-924 and deaf() at :903-908. The header needs its own waiter check, because deaf() also feeds unheard() (:913), which the chips use. This issue unblocks #8170.
Out of scope:
- The 30 s fresh-load grace and showing the delivery problem in the header (sibling item).
- The session bridge (
lib/session-bridge/and its generated copies underplugins/planning/surface/): no transport change; registered inscripts/shared-copies.txt. - Per-question chip and receipt-line texts.
- Wake batching, auto-handling of accepts, layout and accessibility papercuts Q6-Q9, Q11 (sibling items).
skills/interview/SKILL.mdtext.
This was generated by AI during backlog shaping. Split from #7967, whose lane run timed out at 25 minutes on the combined scope.
This was generated by AI during backlog shaping. Split from #7967, whose run used the whole 25-minute budget on the work itself.
Activity
fix(planning): show the working state for the whole reading window