Skip to content

feat(web): surface blocked sessions in the session list (#1717) - #2520

Open
heavygee wants to merge 122 commits into
tiann:mainfrom
heavygee:feat/blocked-session-affordance-1717
Open

heavygee wants to merge 122 commits into
tiann:mainfrom
heavygee:feat/blocked-session-affordance-1717

Conversation

@heavygee

@heavygee heavygee commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Session attention after 832c5922f — flagship PR

This is the flagship PR for the session-attention umbrella. Coordinating issue: #2356. Longer three-way rationale: Discussion #2355.

832c5922f reworked the session row: the residency fade was removed and liveness moved to a
dot on the agent icon. I run HAPI with a fleet of over 1,000 sessions, of which at least ~30 are
active at any one time, and have been dogfooding an attention model against that load for several
months. This PR lands the blocked affordance (umbrella item 2 / #1717). Sibling PRs under
#2356 cover producers, filters, residency fade, settings, and FUE.

Three things a session row has to answer, at a glance:

  1. What is it doing? — working, background work, idle.
  2. Is it resident? — is a runner holding this session in memory.
  3. What does it need from me, and why? — and this is the one that matters at scale.

I understand the change on (1) — green for working, blue for background. Fine.

(2) is handled in a sibling PR (restore row-level fade). (3) is this PR.

A session should be able to say what it is blocked on, in its own words, and the list should
surface that: blocked section, per-row rail, off-viewport jump counter, and mark-unblocked with
a recorded reason. Producer PRs under the same umbrella (#1725, #987, #2354) exist so the signal
fires correctly.

Session-attached job meters in the list

Blocked section and per-row blocked chip

This PR

Fixes #1717

Related: #2356 · Discussion #2355 · Discussion #2083 (dogfooded practice)

Review rounds before submission

Six rounds of automated review ran against this branch and found eleven real
defects
, all fixed here rather than waved through. Listing them because
several are the kind a reviewer would reasonably want to have caught:

  1. A live prompt lost to thinking. A remote Claude agent keeps thinking
    true for the whole time it waits on a permission — the SDK only clears it on
    the turn's result — so the commonest blocker there is was missing from the
    section, the count and the alert for the entire wait.

  2. Acknowledgement applied after kind-priority, so a new permission was
    discarded behind an older dismissed question.

  3. pendingRequests is capped at five, so a prompt arriving after an
    acknowledgement could be invisible. Fixed with an uncapped
    pendingRequestsNewestAt, derived from agentState — no column, no migration.

  4. The blocked lens toggle unmounted at zero while still active, leaving the
    list filtered with no control to escape.

  5. Blocked rows lost content-search navigation, and the blocked lens never
    narrowed the search candidate set — searchMessageContent keeps the 100
    most-recent matches, so unblocked candidates could spend the budget.

  6. Startup backfill ordered footers by insertion seq, not message time, so
    a replayed older footer could outrank a newer done.

  7. Rewinds did not reconcile the notify columns — on either the Claude path
    or (separately) the OpenCode one, which truncates through its own function.

  8. Session merges dropped both the acknowledgement and the footer, so a
    merged-away blocked session kept the footer in its transcript yet vanished
    from the Blocked section.

  9. Subagent footers were read as the session's status, so a background
    subagent's done could erase the main agent's unanswered blocker, and its
    blocked could flag a parent that had finished. Sidechain output is now
    excluded before the session-level signal is derived.

  10. A cleared signal had no timestamp boundary. Clearing nulls
    last_notify_at, which disarms the store's monotonic check — and Claude
    replays keep original timestamps, so a footer delayed past the operator's
    reply walked back in. Now bounded by the turn that cleared it.

  11. A merge could resurrect an answered footer, because a null
    last_notify_at on the destination means both "never had one" and
    "cleared because the operator replied".

Also fixed: an archived session held its prompt as a permanent, unanswerable
blocker; the toolbar shedder did not reserve width for the blocked controls;
and a future-scheduled reply cleared the footer on both the live and backfill
paths despite never reaching the agent.

One interaction worth your attention (#1424)

Rebasing onto current main surfaced a genuine behavioural overlap with the session-jobs
progress bar (#1424), and I want to flag it rather than bury it in the diff.

Upstream's test puts pending operator action ahead of Jobs when both apply asserts that a
session holding both a pending permission and a running attached job lands in the In-progress
pending bucket. Under this PR, a pending operator prompt is by definition a blocker, so that
row floats to the Blocked section instead. The precedence the test guards — a waiting prompt
outranks the Jobs meter — is preserved; only the destination section changed. I updated that
test accordingly and left a comment at the call site explaining why.

If you would rather pending keep its own In-progress bucket and have Blocked defer when a job
is attached, say so and I will restructure — it is a small change, but it is your call, not mine.

Schema note: this adds two migrations (last_notify_*, then blocked_ack_*), renumbered to
v36→v37 and v37→v38 on top of current main.

Another interaction worth your attention (#2518)

Merging current upstream/main into this branch today surfaced a second genuine behavioural
overlap, this time with "list the most recently stopped session first among stopped ones"
(#2518).

That PR added a tiebreak to the shared list comparator: when two inactive sessions are compared,
the one that disconnected more recently sorts first, overriding the chosen sort — unless they
stopped within the same 60-second window. That is the right behaviour for the main list; it is
what keeps a mass hub restart from scattering recently-stopped sessions through older ones.

Blocked and Pinned pull sessions out of that normal active/stopped flow for an operator-attention
reason, and they used the same shared comparator. Disconnecting bumps updatedAt, which feeds
that tiebreak — so a blocked session whose agent merely went quiet could jump ahead of one the
operator spoke to more recently, in a feature whose entire point is surfacing what the operator
is waiting on. That inverts the ordering guarantee this PR exists to provide, and it broke an
existing test here (orders the Blocked section by the configured list order) reliably once I
checked across repeated runs rather than accepting the first pass as coincidence.

Fix: createSessionComparator takes an opt-out, groupStoppedByRecency, defaulting true —
#2518's own main-list behaviour is unchanged. Pinned and Blocked now use a separate comparator
with it set false, since connection timing should not override the operator's chosen sort in
sections that exist specifically to surface attention, not connection state.

If you would rather these two sections share the exact grouping #2518 added, say so and I will
remove the opt-out — it is a one-line revert, but it changes what these sections promise, so
that is your call, not mine.

Test plan

  • Blocked section appears when sessions have blocked status summaries
  • Per-row blocked chip / rail visible in viewport
  • Off-viewport jump pill counts blocked above/below
  • Mark unblocked records a reason
  • web suite: 4842 passed, 1 expected fail
  • shared suite: 574 passed
  • hub suite: 2339 passed (1 failure — TitleSuggestionService > reports unavailable configuration …, which reproduces on a clean upstream/main checkout here. The
    pending delivery ownership reconnect test also fails intermittently: 4 of 6 runs on an
    unmodified tree, now tracked as fix(hub): expireInactive leaves dispatching delivery pending (flaky steerDeliveryLifecycle) #2531. Neither comes from this branch)
  • Typecheck clean: web, hub, cli, relay
  • Full suite on a self-hosted runner against this tip. The cli failures it reports
    (run.recoveredStop.test.ts ×4, runner.integration.test.ts) are identical on a clean
    upstream/main run on the same machine, which additionally fails test:e2e that this
    branch passes.

CI note, stated plainly

My fork's GitHub Actions have been disabled by GitHub since 2026-10-08 (workflow_dispatch
returns 422 while repo settings still report Actions enabled), so this branch is verified by a
full suite run on a self-hosted Linux runner instead.

That runner reports run.recoveredStop.test.ts (4 tests) and runner.integration.test.ts as
failing — they expect stopped / still_alive / already_gone and get unknown, i.e. process
inspection misbehaving on that box. The same five fail identically on a clean upstream/main
checkout on the same machine
, and neither file is touched by this diff. That control run
additionally fails test:e2e, which this branch passes.

Convergence note, added after submission: a peer working #2147 independently hit the
same four run.recoveredStop.test.ts tests, in the same file, days before this comment, with
the same unknown vs expected stopped/still_alive/already_gone mismatch — and reached
the same "pre-existing, unrelated to our diff" conclusion via the same provenance check
(byte-identical file, diff never touches cli/). Neither of us established why it fails on our
sandboxes but not on this PR’s own CI (a sandbox process-probe restriction was checked and ruled
out; ambient-env dependence, the pattern behind #2531, was inconclusive rather than ruled out).
Recording the convergence — two independent sandboxes, same four tests, same conclusion, cause
still open — so a third person does not spend an hour re-deriving what we already have.

I would rather say this up front than have it look like a green run. Everything else above —
typecheck across web/hub/cli/relay, and the web / hub / shared suites — is genuinely
green on this tip.

Since submission this PR's own checks here have run and are green (core, integration,
browser, unit-web, unit-cli, windows-codex-mcp, drift-gate, pr-review), so the
constraint above applies only to how I verified it before opening — it is no longer the
evidence this PR rests on.

Known follow-ups, deliberately not in this diff

Recorded here rather than left in review threads, so they are visible to whoever merges.

  • message-received payloads are hand-assembled in four places (sessionHandlers,
    messageService, codexExtras, importLocalTranscript) instead of being projected from the
    StoredMessage. A new field is therefore lost by default rather than carried — which is
    exactly how receivedAt went missing on the live path and silently disabled a boundary that
    was otherwise correct. Worth one construction site; too broad to change here.
  • Blocked staleness compares a browser clock against the agent runner's. The stale flag
    and a pending prompt's displayed age use pendingRequests[].since, which is Date.now() on
    the runner. It is the same cross-clock class this PR spent several rounds removing from the
    ordering logic, but the threshold is 24h, so it takes a 24-hour skew to misrender rather than
    the seconds that flipped the ordering cases. Fixing it properly needs a hub-stamped arrival
    per request, i.e. a protocol field, which I did not think a cosmetic muting decision justified.
  • A delayed OpenCode steer acknowledgement can let a blocked footer clear early
    (tracked separately, Blocked footer can be cleared early by a delayed OpenCode steer acknowledgement #2700). When a steer repeats text already in the native
    transcript, OpenCode skips early receipt matching and only acknowledges once the whole prompt
    completes (cli/src/opencode/opencodeRemoteLauncher.ts:2053, :2087). If the native
    transcript emits a settled blocked footer before that completion, the hub's delivery boundary —
    stamped from Date.now() at socket-receive time, because emitMessagesConsumed carries no
    position or turn identity — lands after the footer and reads it as answered. upstream/main
    has no blocked-footer feature at all, so this narrows nothing main already does correctly; it
    is a gap in this PR's new behaviour. Fixing it needs a wire-protocol extension (the CLI
    reporting a position or turn identity the hub can order against instead of arrival time), which
    Blocked footer can be cleared early by a delayed OpenCode steer acknowledgement #2700 scopes in full.
  • A buffered SSE patch from a retired hub generation can still be accepted (tracked
    separately, SSE: a buffered patch from a retired hub generation can still be accepted #2703). hubGeneration is a randomUUID() per hub process, not a
    monotonic counter, so a generation mismatch cannot be told apart from "newer" vs "older" by
    comparing the values — the merge logic assumes any mismatch means newer, which breaks if the
    session has already adopted a new generation and a buffered OLD-generation patch arrives late.
    A correct fix needs new global state tracking generation order across both SSE merge paths and
    REST list responses; SSE: a buffered patch from a retired hub generation can still be accepted #2703 scopes it. The hubGeneration field and the comparisons built on it
    were added within this PR, so there is no pre-existing main behaviour this narrows.
  • The startup backfill's chunked fallback scan retries a bounded number of times, not
    forever, on an epoch change mid-scan
    (round 36 — see NOTIFY_BACKFILL_CHUNKED_SCAN_RETRIES).
    Not every epoch bump is a rewind or a merge that reconciles notify state on its own —
    cancelling a queued prompt bumps it too — so discarding unconditionally left a session with a
    genuinely unanswered footer sitting out of Blocked until the next restart. A session under
    genuinely constant mutation can still exhaust the retries and fall back to discarding; main
    has no blocked-footer feature at all, so there is no prior behaviour this narrows.
  • Three viewport-dependent behaviours have no end-to-end test, all because jsdom reports
    every rect as zero. The jump pill choosing its target from measured off-screen rows; the same
    measurement including blockers inside collapsed sections at their section header; and the
    remeasure below. In each case the decision function is pure and unit-tested, and the
    measurement feeding it is not — they want one Playwright pass between them.
  • The jump arrow's remeasure-on-collapse has no automated test. Collapsing a section
    with the viewport stationary fires neither scroll nor resize, so a ResizeObserver on the
    scroll container drives the remeasure. jsdom has neither layout nor ResizeObserver — every
    rect reads zero — so a test there would assert nothing while looking like coverage. It needs a
    Playwright case: collapse Blocked (and Pinned) without scrolling, wait for the transition,
    assert the arrow direction.
  • SessionCache.setSessionBlockedAck rebuilds its live-key set from every entry in
    agentState.requests on each call
    (round 21), so dismissing N keys one at a time through it
    costs O(N²) — the dismissal cap now explicitly supports up to ACK_KEYS_RETENTION_LIMIT
    simultaneous live dismissals (round 25), and at that scale the per-call rebuild is a real
    latent cost, not a hypothetical one. My round-25 regression test originally paid this cost in
    its own setup and timed out on CI as a result (round 26 caught it); the test now calls the
    store directly instead of looping through the cache. The production cost itself is untouched
    and pre-existing — not this diff's job, but worth not rediscovering through a timeout a second
    time.
  • Engine test doubles are partial objects cast to SyncEngine. Adding one engine method the
    importer calls broke twelve of them across the import routes. They pass again, but the next
    such method will break them all again.
  • Two hub tests are flaky independently of this branch, both verified against an unmodified
    tree. steerDeliveryLifecycle > … pending delivery ownership (~4 in 6 here) is now tracked
    separately as fix(hub): expireInactive leaves dispatching delivery pending (flaky steerDeliveryLifecycle) #2531 — it installs a global Date.now spy in a process-shared runner, so other
    tests' async work races it. TitleSuggestionService > reports unavailable configuration …
    fails consistently and is likewise untouched by this diff.
  • mergeDuplicateCodexSessionGroups's per-source loop is not atomic across a 3+-session
    group
    (tracked separately, Duplicate-group merge loop in codexExtras.ts loses partial progress on a refused deletion #2706). It copies and deletes each duplicate source one
    at a time with no transaction spanning the whole group; if a later source refuses deletion
    (e.g. codexResumePending), the exception skips this PR's final applyReconciledNotifyState
    call, but earlier sources in the same loop already had their messages copied and rows deleted,
    non-reversibly. Confirmed directly against upstream/main (codexExtras.ts:854-883) that this
    is pre-existing, not introduced here — this PR's reconciliation call is a new consumer of the
    gap, not its cause. Duplicate-group merge loop in codexExtras.ts loses partial progress on a refused deletion #2706 writes out both candidate fixes (incremental per-source commit vs. a
    whole-group transaction).
  • The startup backfill's chunked fallback accumulates the full decoded transcript before its
    two-pass derivation runs
    (tracked separately, Startup notify backfill's unbounded fallback retains full decoded transcript in memory #2707). Rare in practice — it only
    fires when a session's most recent 200 messages contain neither a footer nor a delivered
    reply — but for a long, tool-heavy session that does hit it, peak heap scales with the entire
    transcript and the final synchronous reduction can delay hub requests. The correct fix splits
    the derivation function's per-page extraction from its boundary-dependent second pass (which
    can only run after the whole transcript is seen), which is real surgery on the function this
    PR's whole notify feature depends on — Startup notify backfill's unbounded fallback retains full decoded transcript in memory #2707 scopes it rather than rushing it into an
    unrelated push.
  • A reason-only blocked-ack request silently kept a stale key set, dismissing success without
    dismissing anything new — fixed in this PR (27dfe01).
    PUT /sessions/:id/blocked-ack makes
    the observed key optional; once a session already had a keyed dismissal, a later keyless
    request reused the old key set instead of clearing it, so the endpoint returned 200 and wrote a
    fresh blockedAckAt while the classifier kept checking only the stale keys — a genuinely new
    blocker stayed visible despite the apparently successful dismissal. Fixed by rejecting (400)
    rather than guessing: BlockedAckMissingKeyError now throws when no key is supplied and a keyed
    dismissal already exists, propagated from SessionCache.setSessionBlockedAck to the route.
    Unreachable from the web dialog today (it always supplies a key), live via direct API access.
  • A merge can still transfer a legacy, keyless dismissal watermark onto an unrelated
    destination prompt
    (tracked separately, A merge can transfer a legacy keyless dismissal watermark onto an unrelated destination prompt #2711 — a deeper layer of the finding just
    above). transferBlockedAck's keyless-transfer path carries a pre-identity watermark across a
    merge unconditionally; if the destination has its own unrelated pending prompt that happens to
    predate the transferred timestamp, that prompt reads as dismissed by coincidence, not review.
    Different code path from the direct-write fix above (transfer logic, not write validation), so
    tracked separately rather than folded in.
  • The session-detail SSE cache applies a full footer snapshot without the list's
    thinking-revision staleness guard
    (tracked separately, Session-detail cache applies a full footer snapshot without the list's thinking-revision guard #2710). The list cache write
    (upsertSessionSummary) checks thinkingRevision/hubGeneration before accepting a snapshot;
    the detail-cache write right above it in the same handler does not, so a stale footer snapshot
    can make the chat view show a finished turn as still running while the list, for the same
    session, correctly shows idle.
  • A stopped, requeued OpenCode prompt clears the stored blocker it never actually answered
    (tracked separately, A stopped, requeued OpenCode prompt clears the stored blocker it never actually answered #2715). The hub clears the blocker on the thinking rising edge
    (an established feat(web): loud session-list blocked affordance + off-viewport scroll cues #1717 mechanism: a new turn starting invalidates the agent's prior self-report).
    OpenCode reports that edge optimistically, before a native-history-count await that Stop can
    abort — if it is, the prompt is requeued without ever reaching dispatch, but the blocker is
    already gone. A narrow race between two independently reasonable designs; fixing it needs either
    side's contract to change, which A stopped, requeued OpenCode prompt clears the stored blocker it never actually answered #2715 scopes rather than improvising here.
  • A blocked session's group membership wasn't reconciled with the Blocked section — fixed in
    this PR (c5a663e, A blocked session's group membership isn't reconciled with the Blocked section #2730).
    Upstream's session-grouping feature (feat: group spawned sessions under their leader in the session list #2727/fix: keep session groups together when a session row is replaced #2728) landed
    on web/src/components/SessionList.tsx while this PR was waiting to merge, and the two
    features' render-location logic didn't compose. Two distinct failure modes, both verified by
    reading the three renderGroupMembers call sites and the unfiltered member list directly, not
    inferred: a blocked group leader orphaned its members — a grouped member never appears in
    topLevelSessions and only ever renders via renderGroupMembers(leader), which the Blocked
    section's render loop didn't call, so the members didn't just lose their fold control, they
    vanished from the list entirely. And a blocked group member double-rendered — the member
    list upstream's own code builds had no blocked-exclusion filter, so a blocked member kept
    rendering nested under its (non-blocked) leader at the same time it independently appeared in
    Blocked. Fixed by giving each session exactly one render location, matching the Pinned exception
    docs/guide/session-list.md already documents: the Blocked section's render loop now calls
    renderGroupMembers(s) too, so a blocked leader's remaining members stay reachable underneath
    it; renderGroupMembers now excludes any member already floated into Blocked from its own
    nested list. Two pre-existing tests asserted the superseded behavior (a member with a pending
    permission request is itself blocked, so it now floats to Blocked instead of staying nested
    behind a "waiting" badge) and were updated to match. Not a regression — main has no Blocked
    section for a grouped leader to float out of — but this was the one item in the whole deferred
    list that made sessions disappear rather than merely failing to show or showing something stale,
    so it was fixed rather than left tracked.
  • Routine keepalives reprocess the full session list — a known, deliberate tradeoff, not a
    defect.
    isRenderIrrelevantPatch treats a bare thinkingRevision/hubGeneration move as
    render-relevant on purpose (cold-review rounds 22/28/30, documented at the comparison itself):
    skipping it would leave the cache holding a stale revision a later out-of-order patch could win
    against and drag thinking back to a stale value. The reprocessing cost this trades away
    correctness for is real but accepted; a future optimization (splitting ordering-relevant
    revision bumps from purely informational ones) is out of scope here.

Content-search staleness, enumerated (#2708, #2709)

Three review waves each found one more way an open content search could render stale state — a
dismissal, a transcript growing, a new operator prompt — and each turned out to be one slice of
the same family rather than an unrelated bug. Rather than let a fourth slice surface piecemeal,
here is the full enumeration: everything the search effect and its candidate list read (rows),
against everything that can change a session's live state (columns). Every cell is marked
handled (already correct), fixed (this diff), or tracked (needs new plumbing, issue
linked) — no blanks.

agent output prompt queued prompt delivered dismissal rewind/delete session end generation change keepalive
candidate membership handled handled handled handled n/a handled handled handled
refetch trigger fixed fixed tracked, #2709 handled by design tracked, #2708 handled tracked elsewhere, #2703 handled
live session fields handled handled n/a handled n/a handled handled handled
match content (snippet/target) handled handled tracked, #2709 n/a tracked, #2708 n/a n/a handled

"Prompt queued" and "prompt delivered" are two separate columns, not one. The first pass
treated "a new operator prompt" as a single event and verified only the queue-time half; a
later review wave caught that delivery is a second, separate event the fix didn't cover. A
compound event has to be decomposed into its actual sub-events before it can be enumerated as
one column — worth asking of any future column added here, not just this one.

Both tracked gaps are the same underlying shape — a signal the family needs doesn't reach the
web layer yet — but need different mechanisms, so they are filed separately rather than bundled
into one issue:

Everything else in the matrix is already handled by mechanisms already in this PR. Notably,
dismissal only ever rides a full-session-snapshot SSE path that bypasses the
keepalive-suppression gate entirely — confirmed by checking SessionPatchSchema directly rather
than assuming, since lastNotify/blockedAck are not fields that schema carries at all. The one
column outside this PR's own feature area (generation change) is a pre-existing, orthogonal
ordering bug already tracked as #2703.

I am moving ahead with the dogfooding process on this PR (dogfooded label, 48h UTC). If that
should not happen, remove the label, per Discussion #2083.

heavygee and others added 12 commits November 19, 2026 13:13
…iann#1717)

Operators running hundreds of sessions cannot spot agents that finished
blocked by scanning the list. Today a blocked-but-still-connected agent
lands silently in the quiet grey "Active" bucket among dozens of peers.

Source of truth: the hub already parses AGENT_NOTIFY_SUMMARY footers for
the work-graph ledger, so stamp the same parse onto the session row
(schema v26, `last_notify_*`) and surface it on SessionSummary. O(1) to
read; no client-side message parsing at fleet scale. Lights up on
`blocked` + `stalled`, reusing the hub's existing stalled->blocked fold.

Three surfaces, each doing something the others cannot:

- In-row: amber left rail + "Blocked" text chip. Not a sixth dot — five
  dot colours already compete, and a different visual channel lets a row
  be blocked *and* awaiting a permission with no precedence rule. No
  animation: motion is the list's grammar for live state, and blocked is
  terminal. Demotes to muted past 24h so abandoned rows stop alarming.
- A pinned "Blocked" section above Running/Active, so the default state
  is already in view.
- An always-visible header counter with jump-to-next. Edge chevrons
  cannot do this job: the list collapses directory groups and caps each
  group's preview, so a blocked row is often absent from the DOM, not
  merely scrolled past. The jump clears filters and expands the section
  before travelling. A sibling toggle provides a blocked-only lens.

Clearing is self-maintaining, no ack UI: opening a session does *not*
clear (at 600 sessions you open things to triage), but sending a message
or the agent's next turn does. Covers all three turn-start paths —
markMessageQueued sets thinking before any CLI keep-alive, so a rising
edge in handleSessionAlive alone would never fire for the reply path.

Bounded startup backfill (24h window, deferred off the startup path) so
an upgraded hub shows blocked work immediately rather than after every
agent next speaks.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
The zero-blocked branch set a fresh `{above:0,below:0}` on every effect
run, and the effect's deps churn each render (the `machineLabelsById={}`
prop default cascades through the filter memos), so the list re-rendered
forever. Surfaced as a hang in the soup web suite.

Also corrects the blocked-lens copy: the lens is a real toggle button
now, not a long-press gesture, so "Hold to show blocked only" was
describing an interaction that no longer exists.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Operator's rule: a session sitting on a pending permission or input
request cannot proceed without them, which is the same problem as an
agent that self-reported `blocked`. It gets the same count, the same
section and the same row rail — only the chip's reason label differs
(Blocked / Stalled / Permission / Input).

This revises the first cut, which treated permission as an orthogonal
axis and left those rows in the quiet pending bucket. The dot language
is unchanged, so a row still shows its live permission pulse; blocked
chrome rides the separate rail/chip channel as before.

A live prompt outranks a stored footer when both are present — it is the
one a single click clears. Pending needs no hub persistence or clearing
logic: it is live state, so answering the prompt drops the chrome on the
next render. Staleness still applies, measured from the oldest pending
request, so a prompt ignored for a day demotes like a stale footer.

Also drops the duplicated "pending N" text on blocked rows — the chip
already names the reason, and repeating it truncated the session title.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
…selves (tiann#1717)

Operator asks 2 and 3: flag ALL kinds of blocker, and make them
unmissable.

Coverage, driven by what the fleet actually emits rather than the
documented contract:

- `CursorCreatePlan` was unclassified. It is Cursor's plan-approval
  prompt — the direct analogue of Claude's ExitPlanMode and the second
  most common request tool in the wild (16 uses on a 683-session fleet)
  — so every Cursor plan review read as "approve a tool" rather than
  "answer me". Now an input request, and input outranks permission.
- Notify status `pending` occurs 92 times and `completed` twice, neither
  in the contract vocabulary. `pending` now blocks; `completed` clears.
- Added needs_decision / needs_review / failed / error / waiting, so
  "blocked by a question" and "blocked by an error" are blockers rather
  than only "blocked by the summary line".
- Unrecognised statuses stay quiet. Crying wolf costs more than a missed
  synonym, so the non-blocking set is explicit rather than a default.

Chips name the reason (Blocked / Stalled / Decision / Review / Failed /
Permission / Question) and errors get the red badge; amber keeps meaning
"you are the blocker", red means "it broke".

Alerting, because a static number is easy to walk past:

- The counter pulses when a session *becomes* blocked, keyed on ids not
  the count — a resolve-plus-arrive swap nets to zero and would
  otherwise stay silent on the new blocker.
- Optional short two-tone WebAudio buzzer, throttled so a wave of
  blockers is one tone. Synthesised rather than shipped: no bundle
  bytes, no fetch, works offline.
- Settings → Display → Blocker alerts: count only / pulse / pulse+sound.
  The counter itself is never suppressed; only the transition alert is.
- Pulse decays after 8s and respects prefers-reduced-motion. Nothing
  pulses continuously — permanent motion at fleet scale is wallpaper
  within a day.

Review fixes in the same pass: the pulse could stick forever when the
blocked list churned inside the alert window; a cold page load read its
whole backlog as new arrivals and buzzed; the startup backfill could
resurrect a blocker the operator had already answered; and the notify
cache write reverted an in-memory updatedAt bump via refreshSession.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
…#1717)

Dogfood gap: replying was the only way out of blocked. Now right-click a
blocked row → "Mark unblocked…".

The reason prompt is the point, not friction. Replying to an agent leaves
the rationale in the transcript where anyone — including the overseer —
can read it later; dismissing silently would leave the event log with a
state change and no "why". So the reason is mandatory, with four one-tap
presets so it stays fast at fleet scale and still writes something
machine-comparable rather than "x".

Recorded as a work-graph `operator_unblock` event with a `human`
principal. The payload carries the agent's prior claim (status / note /
timestamp) next to the operator's rationale, so a reader can tell
"operator disagreed with the agent" from "operator resolved it
elsewhere" — those say very different things about whether that agent's
judgement should be trusted next time. Note the overseer and
system_events are soup-only layers; the work graph is the substrate that
exists upstream, and it is what the overseer reads.

Stored as a WATERMARK (`blocked_ack_at` + reason, schema v27), not a
flag: anything reported at or before the ack is dismissed, anything
newer blocks again. One mechanism covers both blocker sources, and
"mark unblocked" can never mute a session permanently.

Review fixes folded in: an acknowledged prompt used to return early and
silently mute a NEWER footer on the same session; the watermark was
compared only against the oldest pending request, so a prompt raised
after the ack stayed suppressed; the confirm button never disabled, so a
double click wrote two ledger rows; a closed AudioContext (backgrounded
iOS PWA) permanently killed the alert tone; collapsing the Pinned
section left a stale off-screen glyph; and the blocked count was taken
after the active-only filter, which hid exactly the disconnected blocked
agents it was supposed to surface.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
)

Seven findings from the fork-stage review, all reproduced before fixing.

P1 — a live prompt no longer loses to `thinking`. A remote Claude agent keeps
`thinking` true for the whole time it waits on a permission or a question:
`claudeRemote` only clears it on the turn's result, and the permission handler
never touches it. `getSessionBlockedState` returned early on `thinking`, so the
single commonest blocker there is — an agent parked on a prompt — was missing
from the section, the count and the arrival alert for as long as it waited. The
comment justifying that guard claimed `classifySessionAttention` suppresses
attention while thinking; it does not, and never did. Prompts are now read
first and the guard applies only to the stored notify footer, which really is
superseded once a new turn starts.

Acknowledgement handling, two ways it could silently mute a session:

- Kind priority ran before the ack filter, so an older dismissed question still
  won the contest and the matching pool held only that question — a genuinely
  unanswered permission raised afterwards was discarded. Acks are now applied
  first and the contest runs over what still needs answering.
- `pendingRequests` is capped at five and keeps the OLDEST, so once the cap is
  full the carried slice cannot show a prompt that arrived after the ack. Adds
  `pendingRequestsNewestAt`, computed uncapped from `agentState` beside
  `pendingRequestsCount` — no column, no migration, optional so an older hub
  may omit it.

Also:

- Keep the blocked lens toggle mounted while the lens is on. When the last
  blocker resolved, `blockedCount > 0` unmounted it without clearing the lens,
  leaving every row hidden and no control to turn it off.
- Pass the content-search props to blocked rows. They float out of their
  directory group during a search like any other floated row, but were the one
  path not given `contentSnippet` / `targetMessageId`, so a blocked hit lost
  its match preview and opened the conversation instead of the message.
- Order the startup backfill by message time. `getMessages` sorts by insertion
  `seq` while replayed transcripts keep their original timestamps, so a delayed
  older footer could outrank a newer `done` and restore the wrong status. The
  operator-reply boundary moves with it.
- Reconcile the notify signal after a rewind truncates history. Nothing else
  repaired it: a Codex rollback starts no new turn, so clear-on-new-turn never
  fires and the next refresh re-read the stale columns.

Two preview-cap tests drove "required" rows with a pending request and leaned
on `thinking` to keep them out of the Blocked section — a workaround for the P1
bug above. They now use the other `requiredIds` trigger, unread, which keeps a
row in its group without depending on state this feature relocates.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
…n#1717)

Second cold-review round.

An archived session kept its prompt as a blocker. `handleSessionEnd` drops
activity and thinking but leaves `agentState.requests` in place, and archived
conversations stay sidebar-visible, so a session archived while holding a
permission sat in the Blocked section and count permanently — on a prompt that
can no longer be answered. `classifySessionAttention` has always excluded
inactive requests for this reason; the blocked classifier now does too. A
notify footer still applies on its own: an agent that said it was stuck before
the session ended still was.

The blocked pill and lens also needed to be reserved for. They render in the
actions row but are not shed-able slots, and the shed budget subtracted only
the machine menu — so the shedder kept icons inline that no longer fit and the
row overflowed its allocation instead of moving the excess into More. They are
now one measured box whose width feeds `blockedPx` into `toolbarChrome` and
comes off the budget, mirroring the existing machine-menu handling.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Four findings, all reproduced before fixing.

A session merge dropped the acknowledgement. `mergeSessionData` moves the
source's pending requests onto the destination with their original
timestamps, but left `blocked_ack_at` behind — so a prompt the operator had
already dismissed read as newer-than-nothing and blocked again the moment the
rows consolidated. The ack now travels with the requests it silences, keeping
the later of the two so a genuinely newer prompt on either side still blocks.

Scheduling a reply for later erased the blocker. `MessageService.sendMessage`
deliberately withholds a future-scheduled message from the CLI, but
`SyncEngine.sendMessage` called `markMessageQueued` regardless — starting a
thinking turn nothing ends and clearing a footer the agent never received an
answer for. Cancelling the schedule then left it erased with no way back.
Future-scheduled sends skip the marker; the matured path still sets it.

The uncapped request watermark went stale on SSE patches. `pendingRequests`
is capped at five, which is why `pendingRequestsNewestAt` exists — but
`patchSessionSummary` recomputed the three neighbouring pending fields and not
that one, so a prompt arriving after an acknowledgement stayed suppressed
until the next full refresh. It is now recomputed with the set it belongs to.

The jump pill could not reach rows the new lenses hid. Active, Working,
Scratchlist (tiann#2376) and the date range all narrow `sessionFilteredSessions`,
so the header count included rows that never mounted and the pending-scroll
effect had nothing to travel to. The jump clears those alongside the search,
machine and persisted-view filters it already cleared.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
… search (tiann#1717)

Third cold-review round; both findings sit next to the previous round's fixes.

The merge carried the acknowledgement but not the footer. `mergeSessionMessages`
moves the blocked turn onto the surviving row and replays no `message-added`,
so nothing re-derives the signal there: the conversation kept an unanswered
AGENT_NOTIFY_SUMMARY in its transcript while dropping out of the Blocked
section and count entirely. The signal now travels with its messages, newest
winning, matching the monotonic rule the live writes already use.

The blocked lens did not reach content search. `searchMessageContent` keeps
only the 100 most recently updated matching sessions, and `showBlockedOnly`
was the one lens missing from `contentSearchCandidateSessions` — so unblocked
matches could consume the whole budget and exclude an older blocked
conversation the lens was specifically asking for.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
…d replies (tiann#1717)

Fourth cold-review round. Both findings are the previous round's fixes not
carried into their sibling path.

OpenCode rewinds do not go through `truncateHubTranscriptFrom`. They use
`reportOpenCodeRewind` -> `truncateOpenCodeRewind`, which rebuilds todos and
refreshes the session — restoring the signal of the very footer the rewind
deleted. A rollback starts no new turn, so the clear-on-new-turn transition
never fires either. That path now reconciles the notify columns the same way.

The startup backfill treated a future-scheduled reply as an answer.
`isOperatorReplyMessage` reads content only, so the scan stopped at a message
`MessageService.sendMessage` deliberately withholds from the agent, burying an
unanswered footer on restart. This is the same blind spot the live path had at
`markMessageQueued`, fixed there last round and missed here.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
…iann#1717)

Fifth cold-review round, and a blind spot in the merge fix from the third.

Carrying the source's notify signal onto the destination keyed on the
destination's `lastNotifyAt` being null. That null is ambiguous: it means
"never had a footer", but it equally means "the operator already replied and
`markMessageQueued` cleared it". In the second case the merge handed an
answered blocker straight back, and the row reappeared as blocked once the
thinking grace expired.

The merge now applies the same operator-reply boundary the startup backfill
uses: scan the (already merged) transcript for a delivered reply newer than
the footer, and leave the destination alone when one exists. Future-scheduled
replies do not count, for the reason they do not count anywhere else — the
agent was never given them.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
…tiann#1717)

Sixth cold-review round.

A subagent's footer was being read as the session's status. Both the local
transcript scanner and the remote SDK converter forward sidechain assistant
output, and `extractAssistantPlainText` does not filter it — so a background
subagent's `done` erased the main agent's unanswered blocker, and its
`blocked` flagged a parent that had finished. Sidechain output is now rejected
before the session-level signal is derived, which covers the backfill scan too
since both go through `extractSessionNotifySignal`.

A cleared signal had no boundary. `clearSessionLastNotify` nulls
`last_notify_at`, which disarms the store's timestamp-monotonic check, and
Claude transcript messages keep their original timestamps — so a footer
delayed past the operator's reply was accepted and the row reappeared as
blocked once thinking ended. Incoming signals older than the turn that did the
clearing are now rejected, which is the same operator-reply boundary the
startup restore and the merge already apply through the transcript.

That null is the third place this branch has had to distinguish "no footer"
from "footer deliberately cleared"; the other two were the merge path and the
backfill scan.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
@heavygee heavygee added the dogfooded Live dogfood by write collaborator; 48h UTC opt-out then merge intent. label Nov 19, 2026
@heavygee

Copy link
Copy Markdown
Collaborator Author

dogfooded since 2026-11-19T16:50:18Z

@heavygee

Copy link
Copy Markdown
Collaborator Author

Part of the session-attention umbrella: #2356. Rationale and the three-way discussion: #2355.

Sibling PRs under the same umbrella cover the producers, filters, residency fade, settings and FUE; this one is the blocked affordance (umbrella item 2 / #1717).

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Needs changes (3 Major, 3 Minor)

Review mode: initial

Requirement — Pass

Operators managing many sessions need to spot agents that require intervention, see what they need, and reach them when their rows are off-screen. HAPI already displays blocked summaries inside chat, but the base session list has no equivalent signal.

Evidence

  • Issue #1717 specifies in-row and off-viewport cues for fleets of 600 or more sessions. #1717
  • The base chat recognizes blocked summaries at web/src/components/AssistantChat/messages/NotifySummaryText.tsx:19. The base list projection at shared/src/sessionSummary.ts:116 carries pending requests and activity but has no agent-reported blocker.

Approach — Pass

Projecting the latest agent status and acknowledgement through the hub's session summary lets the list show blockers without loading transcripts. Using the same list controls for live prompts and agent-reported blockers supports fleet triage while retaining distinct reason labels and the existing attention indicator.

Evidence

  • hub/src/sync/syncEngine.ts:943 extracts the existing footer signal, and shared/src/sessionSummary.ts:370 projects it into the list response.
  • web/src/lib/sessionAttention.ts:197 prioritizes live prompts. web/src/components/SessionList.tsx:2712 builds the Blocked section and preserves globally pinned rows in their existing section.

Code — Reviewed

The fixed-head diff has correctness issues in acknowledgement, state ordering, transcript recovery, and list navigation.

  • [Major] Confirming a dismissal can hide a blocker the operator never saw — hub/src/sync/syncEngine.ts:439
  • [Major] A delayed SSE snapshot can restore cleared blocker state — hub/src/sync/sessionCache.ts:605
  • [Major] Delayed Claude output can revive a blocker after the reply turn ends — hub/src/sync/sessionCache.ts:534
  • [Minor] Transcript recovery treats an overdue queued reply as delivered — hub/src/sync/syncEngine.ts:518
  • [Minor] Jumping to a blocker overwrites saved list filters — web/src/components/SessionList.tsx:3599
  • [Minor] Collapsed Blocked rows remain in the keyboard tab order — web/src/components/SessionList.tsx:4149

Testing

Not run (automation; PR code execution is prohibited).

  • The latest GitHub Actions attempt for c5cd784 passed the aggregate Test check and fixture drift gate. An earlier core attempt on the same head failed with one unnamed hub test. https://github.com/tiann/hapi/actions/runs/44570572113
  • The browser job's explicit spec list does not include e2e/session-list-blocked.spec.ts, so its success does not verify the new blocked-list scenarios. No PR code or tests were run during this review.

HAPI Bot

Comment thread hub/src/sync/syncEngine.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread hub/src/sync/syncEngine.ts Resolved
Comment thread web/src/components/SessionList.tsx Resolved
Comment thread web/src/components/SessionList.tsx Resolved
@github-actions github-actions Bot added the codex-review:changes HAPI Bot: review requests changes label Nov 19, 2026
Three Major and three Minor findings from the upstream bot review on tiann#2520.

Major — a dismissal could silence a blocker the operator never saw. The hub
stamped its own receive time as the watermark, so a permission request or
footer arriving between the dialog opening and the confirmation landing was
covered by a reason written for an earlier blocker. The client now sends the
timestamp of the blocker it was displaying; the hub clamps it to now so a
skewed clock cannot dismiss the future. Optional, so an older client keeps the
previous behaviour.

Major — a delayed SSE snapshot could restore cleared blocker state. `lastNotify`
and `blockedAck` ride full-session snapshots on both the global and
session-scoped streams with no ordering between them, so an older snapshot
arriving after a newer clear revived the blocker until the next refresh. Adds a
`notifyUpdatedAt` watermark, bumped on every write including clears, and the
web keeps whichever side is newer — the same shape `attachedJobUpdatedAt`
already uses.

Major — the replay boundary did not outlive the turn. It read
`activeTurnStartedAt`, which resets when the agent goes idle: once the reply
turn ended, that and `last_notify_at` were both null and a delayed pre-reply
footer was accepted. Replaced with a persisted `last_notify_cleared_at`
(schema v39), enforced in SQL and in the cache, so the boundary survives the
turn ending and a restart. The review was right that the previous test only
covered arrival during the reply turn.

Minor — due time is not delivery. A scheduled reply can pass its due time while
the agent is offline and still never be invoked. Recovery and merge now share
one `isDeliveredOperatorReply` predicate that requires invocation for scheduled
messages and orders them by invocation time.

Minor — jumping to a blocker no longer discards saved list filters
speculatively. The target is chosen first, and the status/unread/lens
preferences are only cleared when that specific row is hidden.

Minor — collapsed Blocked rows left focusable buttons mounted, so a keyboard
user tabbing out of the collapsed header landed on invisible rows, one dead tab
stop per blocker. The section now uses `CollapsiblePanel`, which unmounts its
children once the close transition settles.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
@github-actions github-actions Bot removed the codex-review:changes HAPI Bot: review requests changes label Nov 19, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Needs changes (4 Major, 4 Minor)

Review mode: follow-up after new commits

Requirement — Pass

Operators managing hundreds of sessions need to see which agents are blocked, what they need, and how to reach rows outside the viewport. The base session list has pending-request hints but no signal for an agent that ended its turn blocked.

Evidence

  • Issue #1717 asks for an in-row signal and an off-viewport cue that work with existing grouping and filters. #1717
  • The base chat renders blocked summaries in web/src/components/AssistantChat/messages/NotifySummaryText.tsx:19. The base list projection in shared/src/sessionSummary.ts:116 carries pending requests and has no agent-reported blocker field.

Approach — Pass

Persisting the latest agent report in the hub and projecting it into session summaries lets the list surface blockers without loading transcripts. A shared section and jump control let operators triage live prompts and agent reports, with distinct labels for each reason.

Evidence

  • hub/src/sync/syncEngine.ts:954 extracts the existing footer signal on message arrival, and shared/src/sessionSummary.ts:372 projects it into the list response.
  • web/src/lib/sessionAttention.ts:197 gives live prompts priority, and web/src/components/SessionList.tsx:2718 preserves globally pinned rows in their own section.

Suggestions

  • Document how Blocked interacts with pending approvals, attached jobs, and manual dismissal so operators can predict where a row will appear.

Code — Reviewed

The fixed-head diff can lose valid blockers after rewind or merge, revive cleared blockers after a refresh or delayed delivery, and change saved filters during navigation.

  • [Major] Refreshing a session drops its blocker update version — hub/src/sync/sessionCache.ts:474
  • [Major] Rewind rejects the blocker it should restore — hub/src/sync/syncEngine.ts:551
  • [Major] A delayed first footer can revive an answered blocker — hub/src/sync/sessionCache.ts:587
  • [Major] A merge can dismiss a blocker from the destination session — hub/src/sync/sessionCache.ts:2468
  • [Minor] Transcript recovery orders replies by creation time — hub/src/sync/syncEngine.ts:517
  • [Minor] The unblock dialog can show and record different blockers — web/src/components/SessionList.tsx:2081
  • [Minor] Jumping to a hidden blocker still overwrites saved filters — web/src/components/SessionList.tsx:3612
  • [Minor] Keyboard focus can leave the unblock dialog — web/src/components/UnblockReasonDialog.tsx:68

Testing

Not run (automation; PR code execution is prohibited).

  • At d347f2f, GitHub Actions passed typecheck, unit-web, unit-cli, integration, browser, and fixture drift. The core job failed at test:hub with one unnamed failure, then skipped shared and relay. The log does not establish whether the hub failure is related to this PR. https://github.com/tiann/hapi/actions/runs/44613058604
  • The browser job's explicit spec list omits e2e/session-list-blocked.spec.ts. That spec also stops before a successful acknowledgement, so it does not verify persistence or the ledger entry.
  • Local verification consisted of static inspection and a passing git diff --check.

HAPI Bot

Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread hub/src/sync/syncEngine.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread hub/src/sync/syncEngine.ts Resolved
Comment thread web/src/components/SessionList.tsx Resolved
Comment thread web/src/components/SessionList.tsx Resolved
tiann#1717)

Four Major and four Minor findings, plus the CI failure they sat behind.

The CI failure was real, not a flake. `withSettingsLock` takes the
cross-process lock by creating `settings.json.hapi.lock` beside the settings
file, but the parent directory was only created inside `writeSettingsUnlocked`
— which runs inside the lock. On a data dir that does not exist yet the lock's
own mkdir fails with ENOENT and retries its whole budget, 50 x 100ms, which is
the unnamed ~5s failure. The directory is now created before the lock is taken.
Latent in upstream; new hub tests that build a SyncEngine on a fresh data dir
made it deterministic. Regression test asserts both the success and the
timing, since the symptom is a retry storm.

Major — refreshSession dropped the blocker revision. The watermark was
in-memory only, so any ordinary refresh reset it to zero and a delayed snapshot
could pass the ordering check. Now persisted alongside the blocker fields.

Major — rewind rejected the footer it should restore. Clearing stamped the
boundary at now, and the retained footer predates that, so the restore failed
the guard the clear had just created and a session whose retained history still
ends blocked dropped out of the section. The signal and its boundary are now
derived first and written together; after a truncation the transcript is the
truth, not arrival order.

Major — the boundary did not advance when no footer was cached. A turn that
starts before the previous footer reaches the hub skipped the write entirely,
so that footer could arrive after the reply turn ended and be accepted. The
write now moves the watermark even with nothing stored, which changes the
store contract an existing test pinned as a no-op.

Major — a merge applied the source acknowledgement to every older blocker on
the destination, hiding ones the operator never saw. It now refuses the
transfer when the destination holds an unacknowledged older blocker.

Minor — delivery evidence is required for every queued reply, not just
scheduled ones, and recovery orders replies by invocation time: a reply
composed before a footer can be invoked after it.

Minor — the unblock dialog froze only the timestamp while still rendering the
live label and note, so it could show one blocker and acknowledge another.
Identity and copy are now captured together.

Minor — jumping to a hidden blocker rewrote saved list and machine filters.
The target row is now exempted from those filters transiently instead.

Minor — the dialog declared `aria-modal` without enforcing it. Adds a focus
trap, an Escape handler, and focus restoration on dismissal.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
@github-actions github-actions Bot removed the codex-review:changes HAPI Bot: review requests changes label Nov 19, 2026
@heavygee

Copy link
Copy Markdown
Collaborator Author

Round 2 pushed as bdc18fc5f — all 8 findings fixed (4 Major, 4 Minor), threads resolved.

The red core check was a real bug, not a flake, and it is fixed here.

withSettingsLock takes the cross-process lock by creating settings.json.hapi.lock beside the settings file — but the parent directory was only created inside writeSettingsUnlocked, which runs inside that lock. On a data dir that does not exist yet, the lock's own mkdir fails with ENOENT and retries its full budget (50 × 100ms), which is the unnamed ~5s failure in test:hub.

It is latent in main; new hub tests in this PR that construct a SyncEngine on a fresh data dir made it deterministic. I reproduced it standalone (failing at 5015ms against CI's 5026ms), moved the directory creation before the lock is taken, and added a regression test asserting both success and timing — a retry storm is the symptom, so the elapsed-time bound is part of the guard.

Local on this tip: typecheck clean (web/hub/cli/relay), hub 2289 pass / 1 pre-existing (TitleSuggestionService), web 4807 pass, shared 574 pass.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Needs changes (4 Major, 2 Minor)

Review mode: follow-up after new commits

Requirement — Pass

Operators managing large session lists need to see which agents finished blocked, understand what they need, and reach their rows from outside the viewport. The existing chat status and pending-request hints leave that list-level gap.

Evidence

  • Issue #1717 asks for a distinct row signal and an off-screen cue that works with existing filters and groups. #1717
  • The base chat renders blocked summaries in web/src/components/AssistantChat/messages/NotifySummaryText.tsx:19. The base list projection carries pending requests in shared/src/sessionSummary.ts:116.

Approach — Pass

Persisting the latest agent footer in the hub lets the list surface blockers without loading transcripts. The Blocked section and jump control give operators one place to find blockers, while separate labels distinguish live prompts from agent reports.

Evidence

  • hub/src/sync/syncEngine.ts:976 extracts the existing footer at ingestion, and shared/src/sessionSummary.ts:372 projects it into the session summary.
  • web/src/lib/sessionAttention.ts:197 gives live prompts priority. web/src/components/SessionList.tsx:2743 keeps globally pinned rows in their own section.

Suggestions

  • Document how Blocked interacts with pending approvals, attached jobs, manual dismissal, and the status-summary emission setting.

Code — Reviewed

The fixed-head diff can hide valid blockers after a prompt retry or session merge, restore stale blocker state during cache updates, and leave counted blockers unreachable through the jump control.

  • [Major] Retrying an already-consumed prompt erases its resulting blocker — hub/src/sync/sessionCache.ts:987
  • [Major] A stale list response can restore a cleared blocker — web/src/hooks/useSSE.ts:497
  • [Major] The jump control cannot reach blockers hidden by the saved status filter — web/src/components/SessionList.tsx:3641
  • [Major] A destination acknowledgement can hide an incoming blocker — hub/src/sync/sessionCache.ts:2559
  • [Minor] The unblock event can record a footer the operator never saw — hub/src/sync/syncEngine.ts:442
  • [Minor] Closing the unblock dialog loses keyboard focus — web/src/components/UnblockReasonDialog.tsx:39

Testing

Not run (automation; PR code execution is prohibited).

  • At bdc18fc, GitHub Actions reported passing typecheck, hub, shared, relay, web, CLI, integration, Windows Codex MCP, browser, and fixture drift checks. https://github.com/tiann/hapi/actions/runs/44616210733 https://github.com/tiann/hapi/actions/runs/44616210566
  • The browser job's explicit spec list omits e2e/session-list-blocked.spec.ts. That spec stops after choosing a reason, leaving successful acknowledgement, persistence, and the event log entry unverified.
  • Local verification was limited to static inspection and a passing git diff --check. PR code and tests were not executed.

HAPI Bot

Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/hooks/useSSE.ts Resolved
Comment thread web/src/components/SessionList.tsx Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread hub/src/sync/syncEngine.ts Resolved
@github-actions github-actions Bot added the codex-review:changes HAPI Bot: review requests changes label Nov 19, 2026
Third upstream review round. Four Major, two Minor.

The acknowledgement now records WHICH blocker it covered. It was a bare
timestamp, which cannot tell two blockers apart, so it suppressed everything
older than itself: a blocker that arrived while the dialog was open, a
destination prompt during a merge, an incoming source footer during the
reverse merge. Three rounds of findings were all that one shape. `notify:<at>`
for a self-reported footer, `request:<id>` for a prompt, threaded from the
dialog through the API to the store. Acks written before the identity existed
keep the old watermark semantics so an upgrade does not resurrect dismissed
work — and the one-directional merge guard added last round is deleted,
because identity covers both directions properly.

The blocker clears on confirmed delivery, not on optimistic queueing.
Queueing starts no turn: an idempotent retry of an already-consumed message
reuses its row, and a prompt can be cancelled before the agent ever sees it.
Both erased a live blocker. Queueing still advances the clear boundary, so a
footer delayed past the reply cannot slip in behind it.

A stale list response could restore a cleared blocker. The GET can be captured
before a clear and land after SSE applied it; the revision reconciliation now
covers the REST path too, not only SSE summary writes.

The jump could not reach a blocker hidden by the saved status filter. The
target exemption now applies above status and date filtering rather than below
it, and the revealed row stays mounted until the flash ends — releasing it as
the smooth scroll began unmounted the row mid-travel.

The unblock dialog took its focus-return target from `document.activeElement`,
which races the action menu closing and the textarea's own autoFocus, so
cleanup tried to focus the textarea as it unmounted. The caller now names the
row button explicitly.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Needs changes (1 Major, 5 Minor)

Review mode: follow-up after context changes

Requirement — Pass

Operators scanning large session lists need to see which agents are blocked, understand what they need, and reach blockers outside the viewport. Recording a dismissal reason preserves the operator’s decision when no reply is sent.

Evidence

  • Issue #1717 calls for visible row indicators and directional navigation that work with existing filters and groups. #1717
  • Issue #2356 specifies a Blocked section, row indicators, a jump counter, and dismissal with a recorded reason. #2356
  • The base list classifies permissions, input, background work, and unread activity in web/src/lib/sessionAttention.ts:26. Agent-reported blockers are rendered in chat at web/src/components/AssistantChat/messages/NotifySummaryText.tsx:19.

Approach — Pass

Persisting blocker reports and dismissals in the hub gives REST and SSE a shared source of state. The web list combines those reports with live prompts, preserves their distinct labels, and measures rows and collapsed sections for directional navigation.

Evidence

  • hub/src/sync/syncEngine.ts:1793 captures settled status footers. shared/src/sessionSummary.ts:536 projects blocker state into session summaries. hub/src/web/routes/sessions.ts:1769 checks session access and validates dismissals.
  • web/src/lib/sessionAttention.ts:276 prioritizes live prompts. web/src/components/SessionList.tsx:3245 keeps globally pinned blockers in Pinned, and web/src/components/SessionList.tsx:4279 measures off-screen blockers.

Suggestions

  • Document how to enable agent status summaries and how Blocked interacts with pending prompts, pins, filters, and attached jobs in docs/guide/session-list.md.

Code — Reviewed

Static review of the full merge-base diff at 0d8c5f8 found six issues. The most consequential can hide an unanswered blocker after OpenCode accepts a steer. The revised PR description documents several remaining gaps.

  • [Major] Preserve blockers reported before a delayed steer acknowledgement — hub/src/socket/handlers/cli/sessionHandlers.ts:578
  • [Minor] Refresh open searches when indexed messages change — web/src/components/SessionList.tsx:3089
  • [Minor] Reject patches from retired hub generations — web/src/hooks/useSSE.ts:705
  • [Minor] Preserve dismissals across a partially completed duplicate merge — hub/src/web/routes/codexExtras.ts:934
  • [Minor] Bound memory during startup transcript backfill — hub/src/sync/syncEngine.ts:832
  • [Minor] Require a blocker identity for a dismissal — hub/src/sync/sessionCache.ts:641

Testing

Not run (automation; PR code execution is prohibited).

  • The fixed merge-base diff passed git diff --check. Local verification was static.
  • At 0d8c5f8, GitHub reported success for test, core, integration, browser, unit-web, unit-cli, wrapper-parity, windows-codex-mcp, and fixture drift. The current advisory review check was in progress. https://github.com/tiann/hapi/actions/runs/46478091318 https://github.com/tiann/hapi/actions/runs/46478091305
  • The browser fixture covers off-screen navigation, collapsed sections, and dismissal reason entry. It does not submit a valid dismissal or verify event-log persistence. e2e/session-list-blocked.spec.ts:127.

HAPI Bot

Comment thread web/src/components/SessionList.tsx Resolved
Comment thread web/src/hooks/useSSE.ts Resolved
Comment thread hub/src/web/routes/codexExtras.ts Resolved
Comment thread hub/src/sync/syncEngine.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Needs changes (1 Major, 6 Minor)

Review mode: follow-up after context changes

Requirement — Pass

Operators scanning large session lists need to see why an agent is blocked and reach it when its row is off-screen. Recording a dismissal reason preserves the operator’s decision when they resolve a blocker outside the conversation.

Evidence

  • Issue #1717 specifies row indicators and directional navigation that work with existing filters and groups. #1717
  • Issue #2356 specifies a Blocked section, row indicators, a jump counter, and dismissal with a recorded reason. #2356
  • The base list classifies pending permissions, input, background work, and unread activity. Agent-reported blockers appear in chat. See web/src/lib/sessionAttention.ts:26 and web/src/components/AssistantChat/messages/NotifySummaryText.tsx:19.

Approach — Pass

Persisting agent reports and dismissals in the hub gives REST and SSE a shared source of blocker state. The web list combines those reports with live prompts, gives each source a distinct label, and measures rendered rows and collapsed sections for navigation.

Evidence

  • hub/src/sync/syncEngine.ts:1793 captures settled status footers and shared/src/sessionSummary.ts:547 projects the persisted state into list summaries.
  • hub/src/web/routes/sessions.ts:1769 checks session access before accepting a dismissal.
  • web/src/lib/sessionAttention.ts:276 prioritizes live prompts. web/src/components/SessionList.tsx:3245 keeps globally pinned blockers in Pinned, and web/src/components/SessionList.tsx:4279 measures off-screen blockers.

Suggestions

  • Document how to enable agent status summaries and how Blocked interacts with pending prompts, Pinned, filters, and attached jobs in docs/guide/session-list.md.

Code — Reviewed

Static review of the full merge-base diff at 0d8c5f8 confirmed that a delayed OpenCode acknowledgement can erase an unanswered blocker. The review also found stale client state, dismissal persistence gaps, and an unbounded startup scan.

  • [Major] Preserve blockers reported before a delayed steer acknowledgement — hub/src/socket/handlers/cli/sessionHandlers.ts:578
  • [Minor] Reject updates from retired hub generations — web/src/hooks/useSSE.ts:705
  • [Minor] Protect session detail from delayed footer snapshots — hub/src/sync/sessionCache.ts:797
  • [Minor] Refresh open searches when the message index changes — web/src/components/SessionList.tsx:3089
  • [Minor] Preserve dismissals across a partially completed duplicate merge — hub/src/web/routes/codexExtras.ts:934
  • [Minor] Bound memory during startup transcript backfill — hub/src/sync/syncEngine.ts:832
  • [Minor] Require a blocker identity when recording a dismissal — shared/src/apiTypes.ts:556

Testing

Not run (automation; PR code execution is prohibited).

  • The fixed merge-base diff passed git diff --check. Local verification was static.
  • At 0d8c5f8, GitHub reported success for test, core, integration, browser, unit-web, unit-cli, wrapper-parity, windows-codex-mcp, and fixture drift. The current advisory review check was in progress. https://github.com/tiann/hapi/actions/runs/46478091318 https://github.com/tiann/hapi/actions/runs/46478091305
  • The browser fixture covers off-screen navigation, collapsed sections, and reason entry. It stops before submitting a valid dismissal, leaving the end-to-end row update and event-log write unverified. See e2e/session-list-blocked.spec.ts:127.

HAPI Bot

Comment thread web/src/hooks/useSSE.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/components/SessionList.tsx Resolved
Comment thread hub/src/web/routes/codexExtras.ts Resolved
Comment thread hub/src/sync/syncEngine.ts Resolved
Comment thread shared/src/apiTypes.ts Resolved
…sts (tiann#1717)

PUT /sessions/:id/blocked-ack makes the observed key optional. A
reason-only request arriving after an existing keyed dismissal reused
the stale key set instead of clearing it, silently keeping the ack
scoped to blockers that no longer exist. The endpoint returned 200 and
wrote a fresh blockedAckAt, but a genuinely new blocker (whose key
isn't in that stale set) stayed undismissed — a dismissal that
reported success while dismissing nothing new.

Reject rather than guess: there's no honest way to resolve a keyless
request against an existing keyed dismissal, since the caller's
actual intent (dismiss broadly vs. just didn't supply a key) can't be
inferred from a reason string. BlockedAckMissingKeyError propagates
from SessionCache.setSessionBlockedAck through SyncEngine to the
route, which maps it to 400. Unreachable from the web dialog today
(it always supplies a key) but live via direct API access.

Cold-review round 37.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Needs changes (1 Major, 7 Minor)

Review mode: follow-up after new commits

Requirement — Pass

Operators managing large session lists need to see why an agent stopped and reach it when its row is off-screen. The base list surfaces live prompts and unread activity, while agent-reported blockers require opening the chat. Recording a dismissal reason supports work resolved outside the conversation.

Evidence

  • Issue #1717 specifies in-row visibility and directional navigation that work with existing filters and groups. #1717
  • Issue #2356 specifies a Blocked section, a row indicator, a jump counter, and dismissal with a recorded reason. #2356
  • The base list classifies pending prompts, background work, and unread activity in web/src/lib/sessionAttention.ts:26. Chat already renders the blocked footer in web/src/components/AssistantChat/messages/NotifySummaryText.tsx:19.

Approach — Pass

Persisting settled agent reports and dismissals in the hub gives REST and SSE a shared source of blocker state. The web list combines that state with live prompts, keeps globally pinned sessions in Pinned, and uses rendered positions to guide jumps.

Evidence

  • The hub captures settled footers in hub/src/sync/syncEngine.ts:1794 and projects them into list summaries in shared/src/sessionSummary.ts:547.
  • The dismissal route checks session access in hub/src/web/routes/sessions.ts:1774.
  • The list prioritizes actionable prompts in web/src/lib/sessionAttention.ts:276, preserves globally pinned placement in web/src/components/SessionList.tsx:3245, and measures off-screen rows in web/src/components/SessionList.tsx:4279.

Suggestions

  • Document how to enable agent status summaries and how Blocked interacts with pending prompts, Pinned, filters, and attached jobs in docs/guide/session-list.md.

Code — Reviewed

Static review of head 27dfe01 confirmed that delayed OpenCode acknowledgements can hide unanswered blockers. The latest commit rejects reason-only dismissals after a keyed dismissal exists, while a first reason-only dismissal can still suppress an unrelated blocker during a merge.

  • [Major] Preserve blockers emitted before a delayed steer acknowledgement — hub/src/socket/handlers/cli/sessionHandlers.ts:578
  • [Minor] Keep reason-only dismissals scoped to the source session — hub/src/sync/sessionCache.ts:880
  • [Minor] Reject updates from retired hub generations — web/src/hooks/useSSE.ts:705
  • [Minor] Apply revision checks to footer snapshots in session detail — hub/src/sync/sessionCache.ts:825
  • [Minor] Refresh open searches when indexed messages change — web/src/components/SessionList.tsx:3089
  • [Minor] Preserve dismissals when a duplicate merge stops partway — hub/src/web/routes/codexExtras.ts:934
  • [Minor] Bound memory during startup transcript backfill — hub/src/sync/syncEngine.ts:833
  • [Minor] Keep routine heartbeats from reprocessing the full session list — web/src/hooks/useSSE.ts:148

Testing

Not run (automation; PR code execution is prohibited).

  • The fixed merge-base diff passed git diff --check. Local verification was static, and PR code was not executed.
  • GitHub reported success at 27dfe01 for test, core, integration, browser, unit-web, unit-cli, wrapper-parity, windows-codex-mcp, and fixture drift. The advisory review check was in progress. https://github.com/tiann/hapi/actions/runs/46485185144 https://github.com/tiann/hapi/actions/runs/46485184865
  • The browser fixture covers directional jumps, collapsed sections, and reason entry. It stops before submitting a valid dismissal, so it does not verify the resulting row update or ledger write. See e2e/session-list-blocked.spec.ts:127.

HAPI Bot

Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/hooks/useSSE.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/components/SessionList.tsx Resolved
Comment thread hub/src/web/routes/codexExtras.ts Resolved
Comment thread hub/src/sync/syncEngine.ts Resolved
Comment thread web/src/hooks/useSSE.ts Resolved

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Needs changes (1 Major, 7 Minor)

Review mode: follow-up after context changes

Requirement — Pass

Operators managing large session lists need to see why an agent stopped, reach its row from outside the viewport, and record when they resolve a blocker elsewhere. The base list surfaces live prompts and unread activity. Agent-reported blockers are visible in chat.

Evidence

  • Issue #1717 specifies in-row visibility and directional navigation that work with existing filters and groups. #1717
  • Issue #2356 describes the Blocked section, row indicator, jump counter, and dismissal with a recorded reason. #2356
  • Base web/src/lib/sessionAttention.ts:26 classifies existing list attention. Base web/src/components/AssistantChat/messages/NotifySummaryText.tsx:19 renders the blocked status in chat.

Approach — Pass

Persisting settled agent reports and dismissals in the hub gives REST and SSE a shared source of blocker state. The list can combine that state with live prompts, preserve globally pinned placement, and use rendered row positions for navigation.

Evidence

  • hub/src/sync/syncEngine.ts:1794 captures settled footer signals, and shared/src/sessionSummary.ts:547 projects them into session summaries.
  • hub/src/web/routes/sessions.ts:1774 checks session access before writing a dismissal.
  • web/src/lib/sessionAttention.ts:276 prioritizes live prompts, while web/src/components/SessionList.tsx:3245 and :4279 handle placement and viewport measurement.

Suggestions

  • Update docs/guide/session-list.md to explain how to enable agent status summaries and how Blocked interacts with live prompts, Pinned, filters, and attached jobs.

Code — Reviewed

Static review of head 27dfe01 confirmed that a delayed OpenCode acknowledgement can hide a blocker emitted by the same turn. The current head also leaves defects in dismissal transfer, session update ordering, search freshness, and fleet-scale processing.

  • [Major] Preserve blockers emitted before a delayed steer acknowledgement — hub/src/socket/handlers/cli/sessionHandlers.ts:578
  • [Minor] Keep reason-only dismissals scoped to the source session — hub/src/sync/sessionCache.ts:880
  • [Minor] Reject updates from retired hub generations — web/src/hooks/useSSE.ts:705
  • [Minor] Apply revision checks to footer snapshots in session detail — hub/src/sync/sessionCache.ts:825
  • [Minor] Refresh open searches when indexed messages change — web/src/components/SessionList.tsx:3089
  • [Minor] Preserve dismissals when a duplicate merge stops partway — hub/src/web/routes/codexExtras.ts:934
  • [Minor] Bound memory during startup transcript backfill — hub/src/sync/syncEngine.ts:833
  • [Minor] Keep routine heartbeats from reprocessing the session list — web/src/hooks/useSSE.ts:148

Testing

Not run (automation; PR code execution is prohibited).

  • The fixed merge-base diff passed git diff --check. Local review was static and did not execute PR code.
  • GitHub reported success at 27dfe01 for test, core, integration, browser, unit-web, unit-cli, wrapper-parity, windows-codex-mcp, and fixture drift. https://github.com/tiann/hapi/actions/runs/46485185144 https://github.com/tiann/hapi/actions/runs/46485184865
  • The browser fixture checks directional jumps and reason entry. It stops before submitting a valid dismissal, so it leaves the resulting row update and ledger write unverified end to end. See e2e/session-list-blocked.spec.ts:127.

HAPI Bot

Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/hooks/useSSE.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/components/SessionList.tsx Resolved
Comment thread hub/src/web/routes/codexExtras.ts Resolved
Comment thread hub/src/sync/syncEngine.ts Resolved
Comment thread web/src/hooks/useSSE.ts Resolved
One real conflict: hub/src/store/sessions.test.ts. Both sides appended
a new top-level describe block at the same position (end of file) —
this branch's setSessionLastNotify/setSessionBlockedAck/
clearSessionBlockedAck (tiann#1717) tests, upstream's DSH metadata
carry-forward test (new on main since this branch's last rebase).
Not a conflicting edit to the same assertions: reconciled structurally
by closing this branch's trailing describe block before upstream's
begins, keeping every assertion from both sides. All 78 tests in the
merged file pass.

Everything else merged automatically.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Needs changes (1 Major, 7 Minor)

Review mode: follow-up after new commits

Requirement — Pass

Operators managing large session lists need to see why an agent is blocked, reach its row from outside the viewport, and record a reason when they resolve the blocker elsewhere. The base list surfaces pending prompts and unread activity. Agent-reported blockers are visible in chat.

Evidence

  • Issue #1717 specifies in-row visibility and directional navigation that work with existing filters and groups. #1717
  • Issue #2356 describes the Blocked section, row indicator, jump counter, and dismissal with a recorded reason. #2356
  • Base web/src/lib/sessionAttention.ts:26 classifies list attention. Base web/src/components/AssistantChat/messages/NotifySummaryText.tsx:19 renders blocked status in chat.

Approach — Pass

Persisting settled agent reports and dismissals in the hub gives REST and SSE a shared source of blocker state. The list combines it with live prompts, preserves globally pinned placement, and uses rendered row positions for directional navigation.

Evidence

  • hub/src/sync/syncEngine.ts:1794 captures settled reports, and shared/src/sessionSummary.ts:547 projects them into session summaries.
  • hub/src/web/routes/sessions.ts:1774 checks session access before writing a dismissal.
  • web/src/lib/sessionAttention.ts:276 prioritizes live prompts. web/src/components/SessionList.tsx:3245 and :4279 handle placement and viewport measurement.

Suggestions

  • Document how to enable agent status summaries and how Blocked interacts with pending prompts, Pinned, attached jobs, and filters in docs/guide/session-list.md.

Code — Reviewed

Static review of head 464c0bb found that a delayed OpenCode acknowledgement can hide a blocker emitted by the same turn. Other findings affect dismissal transfer, update ordering, search freshness, and fleet-scale processing.

  • [Major] Preserve blockers emitted before a delayed steer acknowledgement — hub/src/socket/handlers/cli/sessionHandlers.ts:578
  • [Minor] Keep reason-only dismissals scoped to the source session — hub/src/sync/sessionCache.ts:911
  • [Minor] Reject updates from retired hub generations — web/src/hooks/useSSE.ts:705
  • [Minor] Apply revision checks to footer snapshots in session detail — hub/src/sync/sessionCache.ts:838
  • [Minor] Refresh open searches when indexed messages change — web/src/components/SessionList.tsx:3089
  • [Minor] Preserve dismissals when a duplicate merge stops partway — hub/src/web/routes/codexExtras.ts:934
  • [Minor] Bound memory during startup transcript backfill — hub/src/sync/syncEngine.ts:833
  • [Minor] Keep routine heartbeats from reprocessing the session list — web/src/hooks/useSSE.ts:148

Testing

Not run (automation; PR code execution is prohibited).

  • The fixed merge-base diff passed git diff --check. No PR code or tests were executed locally.
  • GitHub reported success at 464c0bb for test, core, integration, browser, unit-web, unit-cli, wrapper-parity, windows-codex-mcp, and fixture drift. The PR review check was still running when observed. https://github.com/tiann/hapi/actions/runs/46574837513 https://github.com/tiann/hapi/actions/runs/46574837560
  • The browser fixture exercises directional jumps and reason entry. It stops before submitting a valid dismissal, so the resulting row update and ledger write remain unverified end to end. See e2e/session-list-blocked.spec.ts:127.

HAPI Bot

Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/hooks/useSSE.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/components/SessionList.tsx Resolved
Comment thread hub/src/web/routes/codexExtras.ts Resolved
Comment thread hub/src/sync/syncEngine.ts Resolved
Comment thread web/src/hooks/useSSE.ts Resolved
One conflict: hub/src/sync/syncEngine.ts's @hapi/protocol import line.
Both branches added different symbols to the same import statement —
this branch's own BLOCKED_NOTIFY_STALE_MS/notifyBlockerKey/
isBlockedNotifyStatus (tiann#1717), upstream's hasActiveSteeringTurn
(tiann#2623, Hub-wide Queue or Steer preference, new on main). Not a
competing edit, just two additions to one line: unioned both sets.
hasActiveSteeringTurn is used at line 3128 from upstream's merged
changes; this branch's three symbols are used elsewhere as before.

Everything else merged automatically.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Needs changes (1 Major, 8 Minor)

Review mode: follow-up after new commits

Requirement — Pass

Operators managing long session lists need to see why an agent is blocked, reach rows outside the viewport, and record why they dismissed a blocker handled elsewhere. The base list shows pending prompts and unread activity. Agent-reported blockers are visible in chat.

Evidence

  • Issue #1717 specifies in-row visibility, directional navigation, and operation with existing filters and groups. #1717
  • Issue #2356 describes the Blocked section, row indicator, jump counter, and dismissal with a recorded reason. #2356
  • Base web/src/lib/sessionAttention.ts:26 classifies list attention. Base web/src/components/AssistantChat/messages/NotifySummaryText.tsx:19 renders blocked status in chat.

Approach — Pass

Persisting settled agent reports and dismissals in the hub gives REST and SSE a shared source of blocker state. The list combines it with live prompts, preserves global pins, and measures rendered row positions for directional navigation.

Evidence

  • hub/src/sync/syncEngine.ts:1795 extracts settled reports and shared/src/sessionSummary.ts:547 projects them into session summaries.
  • hub/src/web/routes/sessions.ts:1775 checks session access before writing a dismissal.
  • web/src/lib/sessionAttention.ts:276 prioritizes live prompts. web/src/components/SessionList.tsx:3245 and web/src/components/SessionList.tsx:4279 handle placement and viewport measurement.

Suggestions

  • Document how to enable status summaries and how Blocked interacts with pending prompts, Pinned, attached jobs, and filters in docs/guide/session-list.md.

Code — Reviewed

Static review of the full merge-base diff at 05d78d0 confirmed unresolved blocker lifecycle, update ordering, search freshness, and fleet-scale processing issues.

  • [Major] Preserve blockers emitted before a delayed steer acknowledgement — hub/src/socket/handlers/cli/sessionHandlers.ts:578
  • [Minor] Keep the blocker when a matured prompt stops before dispatch — hub/src/sync/sessionCache.ts:1334
  • [Minor] Keep reason-only dismissals scoped to their source — hub/src/sync/sessionCache.ts:911
  • [Minor] Reject updates from retired hub generations — web/src/hooks/useSSE.ts:705
  • [Minor] Apply revision checks to footer snapshots in session detail — hub/src/sync/sessionCache.ts:856
  • [Minor] Refresh open searches when the message index changes — web/src/components/SessionList.tsx:3089
  • [Minor] Preserve dismissals when a duplicate merge stops partway — hub/src/web/routes/codexExtras.ts:934
  • [Minor] Bound memory during startup transcript backfill — hub/src/sync/syncEngine.ts:834
  • [Minor] Keep routine keepalives from reprocessing the session list — web/src/hooks/useSSE.ts:148

Testing

Not run (automation; PR code execution is prohibited).

  • The fixed merge-base diff passed git diff --check. No PR code or tests were executed locally.
  • GitHub reported success for test, core, integration, browser, unit-web, unit-cli, wrapper-parity, windows-codex-mcp, and drift-gate at 05d78d0. The pr-review check was still running when observed.
  • The browser fixture covers directional jumps and reason entry. It stops before submitting a valid dismissal, leaving the resulting row update and ledger write unverified end to end. See e2e/session-list-blocked.spec.ts:127.

HAPI Bot

Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/hooks/useSSE.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/components/SessionList.tsx Resolved
Comment thread hub/src/web/routes/codexExtras.ts Resolved
Comment thread hub/src/sync/syncEngine.ts Resolved
Comment thread web/src/hooks/useSSE.ts Resolved
No conflicts — upstream's web/src/api/client.ts change auto-merged
cleanly alongside this branch's own changes to the same file.

Everything else merged automatically.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Needs changes (1 Major, 8 Minor)

Review mode: follow-up after new commits

Requirement — Pass

Operators managing long session lists need to see which agents are blocked, understand why, and reach blockers outside the viewport. The base list shows pending prompts and unread activity. Agent-reported blockers are visible in chat, so finding them currently requires opening a session.

Evidence

  • Issue #1717 specifies row visibility, directional navigation, and operation with existing filters and groups. #1717
  • Issue #2356 specifies the Blocked section, row indicator, jump counter, and dismissal with a recorded reason. #2356
  • Base web/src/lib/sessionAttention.ts:26 classifies list attention. Base web/src/components/AssistantChat/messages/NotifySummaryText.tsx:19 renders blocked reports in chat.

Approach — Pass

Persisting settled agent reports and operator dismissals in the hub gives REST and SSE a shared source of blocker state. The list combines that state with live blocking prompts, keeps globally pinned rows in Pinned, and measures row positions for directional navigation.

Evidence

  • hub/src/sync/syncEngine.ts:1795 extracts the report. shared/src/sessionSummary.ts:547 projects the stored attention state into list summaries.
  • hub/src/web/routes/sessions.ts:1775 checks session access before accepting a dismissal.
  • web/src/lib/sessionAttention.ts:276 checks live prompts before the thinking guard. web/src/components/SessionList.tsx:3245 and web/src/components/SessionList.tsx:4279 handle placement and viewport measurement.

Suggestions

  • Document how to enable agent status summaries and how Blocked interacts with pending prompts, pins, attached jobs, and saved filters in docs/guide/session-list.md.

Code — Reviewed

Static review of the fixed merge-base diff at b8ee9c0 confirmed that some delivery and merge paths can hide unanswered blockers. Cache ordering, search freshness, and fleet-scale processing also remain affected.

  • [Major] Preserve blockers emitted before a delayed steer acknowledgement — hub/src/socket/handlers/cli/sessionHandlers.ts:578
  • [Minor] Keep the blocker when a scheduled prompt stops before dispatch — hub/src/sync/sessionCache.ts:1334
  • [Minor] Keep reason-only dismissals scoped to their source session — hub/src/sync/sessionCache.ts:911
  • [Minor] Reject updates from retired hub generations — web/src/hooks/useSSE.ts:705
  • [Minor] Apply revision checks to footer snapshots in session detail — hub/src/sync/sessionCache.ts:856
  • [Minor] Refresh open content searches when indexed messages change — web/src/components/SessionList.tsx:3089
  • [Minor] Preserve dismissals when a Codex duplicate merge stops partway — hub/src/web/routes/codexExtras.ts:933
  • [Minor] Bound memory during startup transcript backfill — hub/src/sync/syncEngine.ts:834
  • [Minor] Keep steady-state keepalives from reprocessing the session list — web/src/hooks/useSSE.ts:148

Testing

Not run (automation; PR code execution is prohibited).

  • The fixed merge-base diff passed git diff --check. Review was read-only. No PR code, tests, or builds were executed locally.
  • GitHub reported success at b8ee9c0 for test, core, integration, browser, unit-web, unit-cli, wrapper-parity, windows-codex-mcp, and drift-gate. The pr-review check was still running when observed.
  • The browser fixture covers directional jumps and reason entry. It stops before submitting a valid dismissal, leaving the resulting row update and ledger entry unverified end to end. See e2e/session-list-blocked.spec.ts:127.

HAPI Bot

Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/hooks/useSSE.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/components/SessionList.tsx Resolved
Comment thread hub/src/web/routes/codexExtras.ts Resolved
Comment thread hub/src/sync/syncEngine.ts Resolved
Comment thread web/src/hooks/useSSE.ts Resolved
Upstream's tiann#2727 (group spawned sessions under their leader) lands
squarely on web/src/components/SessionList.tsx, the file this PR
touches most. Two marked conflicts:

- SessionList.quick-unpin.test.tsx: both branches extended the SAME
  shared test ("keyboard-unpinning preserves focus") for their own
  feature — this branch's Blocked-section collapse/expand assertions,
  upstream's new Members-fold-list assertions. Not competing edits to
  one test; split into two complete, independent tests so every
  assertion from both sides survives.
- SessionList.tsx: three regions where this branch's blocked-section
  exclusion logic (`blockedSectionIds`) and upstream's grouping
  primitives (`topLevelSessions`, `groupMembersByLeader`,
  `bucketRunningGroups`) both needed to apply to the same
  computations (globalPinnedSessions, runningSessions, groups).
  Combined both: blocked sessions stay excluded from the running/
  grouped catch-all buckets (so a blocked, still-connected agent never
  renders twice), now filtering upstream's topLevelSessions basis
  instead of this branch's machineFilteredSessions, since group
  members no longer live at the top level.

A fourth, unmarked defect found only by typechecking after the marked
conflicts resolved clean: git's auto-merge silently misattributed
upstream's `{renderGroupMembers(s)}` + `</Fragment>` addition to this
branch's near-identical-looking Blocked-section SessionItem block
instead of the Pinned-section block it actually belonged to — no
conflict markers, just wrong code that would have shipped if
typecheck hadn't caught the resulting unbalanced JSX. Confirmed by
diffing against this branch's pre-merge tip (b8ee9c0) that the
Blocked section never had this content, and against upstream/main
that the Pinned section's own block always did. Moved it to the
correct location.

Full verification: hub/web typecheck clean, hub suite 2516/0 fail,
web suite 429 files/5208 pass/1 expected fail, shared 649/0 fail.
No marked conflicts — upstream's tiann#2728 (keep session groups together
when a row is replaced) auto-merged cleanly into both
hub/src/sync/sessionCache.ts and web/src/components/SessionList.tsx.

Given the previous merge's silent misattribution in this exact file,
verified by hand rather than trusting "went well": diffed tiann#2728's
actual upstream change directly and confirmed both pieces
(transferGroupMembership/setGroupLeader in sessionCache.ts, the
pinned-members-first sort in the member-list render) landed intact
and in context, and re-checked the specific Pinned/Blocked
SessionItem blocks that broke last time — correctly undisturbed this
round, no duplicate function declarations.

Full verification: hub+web typecheck clean, hub suite 2520/0 fail,
web suite 429 files/5209 pass/1 expected fail, shared 649/0 fail.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Needs changes (2 Major, 8 Minor)

Review mode: follow-up after new commits

Requirement — Pass

Operators managing long session lists need to see which agents are blocked, understand why, and reach blockers outside the viewport. The base list surfaces pending prompts and unread activity, while agent-reported blockers are visible only after opening the chat.

Evidence

  • Issue #1717 specifies in-row indicators, directional navigation, and support for existing filters and groups. #1717
  • Issue #2356 describes a Blocked section and manual dismissal with a recorded reason. #2356
  • Base web/src/lib/sessionAttention.ts:26 classifies list attention. Base web/src/components/AssistantChat/messages/NotifySummaryText.tsx:19 renders agent-reported blockers in chat.

Approach — Pass

Persisting settled agent reports and operator acknowledgements in the hub gives REST and SSE a shared source for blocker state. Combining it with live blocking prompts and measuring rendered rows supports the list section, row indicators, and directional jumps.

Evidence

  • hub/src/sync/syncEngine.ts:1795 extracts the settled report, and shared/src/sessionSummary.ts:547 projects the persisted state into list summaries.
  • hub/src/web/routes/sessions.ts:1775 checks session access before accepting a dismissal. web/src/lib/sessionAttention.ts:276 checks live prompts before the thinking guard.
  • web/src/components/SessionList.tsx:3320 builds the Blocked section. web/src/components/SessionList.tsx:4509 measures blockers for directional navigation.

Suggestions

  • Document how to enable agent status summaries and how Blocked interacts with pending prompts, pins, groups, attached jobs, and filters in docs/guide/session-list.md.

Code — Reviewed

Static review of the full merge-base diff at 6a4e7f7 found that the group integration can hide ordinary member rows or duplicate blocked members. Delayed delivery acknowledgements can also erase an unanswered blocker. Additional findings affect merge recovery, cache ordering, search freshness, and fleet-scale processing.

  • [Major] Keep session group members reachable when their leader is blocked — web/src/components/SessionList.tsx:5112
  • [Major] Preserve blockers emitted before a delayed steer acknowledgement — hub/src/socket/handlers/cli/sessionHandlers.ts:579
  • [Minor] Preserve the blocker when a scheduled prompt stops before dispatch — hub/src/sync/sessionCache.ts:1334
  • [Minor] Keep reason-only dismissals scoped to the session where they were made — hub/src/sync/sessionCache.ts:911
  • [Minor] Reject updates from retired hub generations — web/src/hooks/useSSE.ts:705
  • [Minor] Apply thinking revisions to footer snapshots in session detail — hub/src/sync/sessionCache.ts:856
  • [Minor] Refresh open content searches when indexed messages change — web/src/components/SessionList.tsx:3128
  • [Minor] Preserve dismissals when a Codex duplicate merge stops partway — hub/src/web/routes/codexExtras.ts:933
  • [Minor] Bound memory during startup transcript backfill — hub/src/sync/syncEngine.ts:834
  • [Minor] Avoid reprocessing the session list on revision-only keepalives — web/src/hooks/useSSE.ts:148

Testing

Not run (automation; PR code execution is prohibited).

  • The fixed merge-base diff passed git diff --check. No PR code, tests, or builds were executed locally.
  • At 6a4e7f7, GitHub reported success for test, core, integration, browser, unit-web, unit-cli, wrapper-parity, windows-codex-mcp, and drift-gate. The pr-review check was in progress when observed.
  • The browser fixture covers directional jumps and reason entry. It stops before submitting a valid dismissal, leaving the resulting row update and ledger entry unverified end to end. See e2e/session-list-blocked.spec.ts:127.

HAPI Bot

Comment thread web/src/components/SessionList.tsx Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/hooks/useSSE.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/components/SessionList.tsx Resolved
Comment thread hub/src/web/routes/codexExtras.ts Resolved
Comment thread hub/src/sync/syncEngine.ts Resolved
Comment thread web/src/hooks/useSSE.ts Resolved

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Needs changes

Review mode: follow-up after context changes

Requirement — Pass

Operators managing long session lists need to see why an agent is blocked, reach blockers outside the viewport, and dismiss a blocker with a recorded reason. The base list surfaces pending prompts and unread activity, while agent-reported blockers appear only in chat.

Evidence

  • Issue #1717 calls for visible row indicators and directional navigation that work with existing filters and groups. #1717
  • Issue #2356 describes the Blocked section and dismissal with a recorded reason. #2356
  • The base list classifier covers pending prompts, background work, and unread activity in web/src/lib/sessionAttention.ts:26. The chat renders agent-reported blocked status in web/src/components/AssistantChat/messages/NotifySummaryText.tsx:19.

Approach — Needs changes

Persisting blocker reports and dismissals in the hub gives the list a durable source of truth. The proposed layout assigns rows to Blocked independently of session grouping. A blocked leader can make otherwise visible members unreachable, and a blocked member can appear twice. The revised proposal defers group integration even though #1717 requires it.

Evidence

  • The base session-list guide specifies that members stay under their leader, including when they match a filter that excludes the leader. A globally pinned member is the documented exception. docs/guide/session-list.md:66
  • Blocked selects individual sessions before applying group placement. Leaders moved there leave the ordinary sections, and the Blocked renderer mounts only their rows. The nested renderer still includes members that already have a Blocked row. web/src/components/SessionList.tsx:3320, web/src/components/SessionList.tsx:3360, web/src/components/SessionList.tsx:3790, web/src/components/SessionList.tsx:5112
  • The snapshot description confirms that deciding where grouped blockers render is deferred to #2730. #2730

Suggestions

  • Use a single group-aware layout for rendering, blocker counts, and jumps. Keep members under their leader when a group moves to Blocked, preserve global pins, and have a jump expand the target member's group. Cover a blocked leader with an ordinary member and a blocked member under an expanded leader.

Code — Not reviewed

Line-by-line review stopped at the approach stage because the proposed layout does not satisfy the grouping requirement.

Testing

Not run (automation; PR code execution is prohibited).

  • The fixed merge-base diff passed git diff --check. No PR code, tests, or builds were run locally.
  • At 6a4e7f7, GitHub reported success for test, core, integration, browser, unit-web, unit-cli, wrapper-parity, windows-codex-mcp, and drift-gate. The current pr-review run was in progress.
  • The blocked-list unit and browser suites do not cover row placement when a session-group leader or member becomes blocked.

HAPI Bot

…cked (tiann#2730)

Session grouping (upstream tiann#2727/tiann#2728) and the Blocked section
(tiann#1717) each independently decided where a session renders, and
neither accounted for the other. Two failure modes:

A blocked group leader orphaned its members entirely. A grouped
member never appears in topLevelSessions; it only ever renders via
renderGroupMembers(leader), called from the Pinned-section loop, the
member-list's own recursion, and the directory-group loop. The
Blocked section's render loop wasn't one of them, so a leader
floating to Blocked took its members out of the tree completely, not
just out of a fold control.

A blocked group member double-rendered. renderGroupMembers' own
member list had no blocked-exclusion filter, so a blocked member kept
rendering nested under its non-blocked leader at the same time it
independently appeared in Blocked.

Fixed by giving each session exactly one render location, matching
the design `docs/guide/session-list.md` already specifies for the
Pinned exception: the Blocked section's render loop now calls
renderGroupMembers(s), same shape as Pinned, so a blocked leader's
remaining members stay reachable underneath it; renderGroupMembers
excludes any member already in blockedSectionIds from its own nested
list, so a blocked member renders once, in Blocked, not twice.

Two pre-existing tests asserted the old, now-superseded behavior — a
member with a pending permission request is itself blocked, so it now
floats to Blocked instead of staying nested behind a "waiting" badge
on the leader. Updated both to assert the member's new direct
visibility in Blocked instead.

Red-green verified: reverted, ran the full groups.test.tsx file,
confirmed exactly the 4 touched tests failed (the 2 new ones and the
2 updated ones) with the predicted wrong behavior, restored
byte-identical, confirmed all 11 green again.

Full verification: web typecheck clean, web suite 429 files/5211
pass/1 expected fail, hub typecheck clean, hub suite 2520/0 fail
(one unrelated migration-timing flake reproduced and cleared on
re-run), shared 649/0 fail.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Needs changes (2 Major, 2 Minor)

Review mode: follow-up after new commits

Requirement — Pass

Operators managing long session lists need to see what blocked an agent, reach blockers outside the viewport, and dismiss them with a recorded reason. The base sidebar surfaces live prompts and unread activity, while agent-reported blockers are visible inside chat.

Evidence

  • Issue #1717 calls for visible row indicators and directional navigation that work with existing filters and groups. #1717
  • Issue #2356 describes the Blocked section and dismissal with a recorded reason. #2356
  • The base attention classifier handles pending prompts, unread activity, and background work in web/src/lib/sessionAttention.ts:26. Chat renders the blocked footer in web/src/components/AssistantChat/messages/NotifySummaryText.tsx:19.

Approach — Pass

Persisting settled footer reports and dismissals in the hub gives the list a durable source of blocker state. The fixed head renders ordinary members beneath a blocked leader and gives members that independently enter Blocked a single row.

Evidence

  • The hub derives blocker state from settled output, and the shared session summary carries it to clients. hub/src/sync/syncEngine.ts:1795, shared/src/sessionSummary.ts:550
  • The dismissal route uses the session access guard and records the operator's reason and observed blocker key. hub/src/web/routes/sessions.ts:1775, hub/src/sync/syncEngine.ts:602
  • The Blocked renderer mounts the leader's remaining members, and the nested renderer excludes members already placed in Blocked. web/src/components/SessionList.tsx:3795, web/src/components/SessionList.tsx:5147

Suggestions

  • Update the session-list guide to explain how Blocked relates to pending prompts, group membership, global pins, and dismissal. Issue #1717 explicitly asks for the relationship to existing attention indicators to be documented.

Code — Reviewed

Static review of c5a663e found unbounded startup transcript processing, stale chat state from footer snapshots, and two group-placement regressions.

  • [Major] Startup backfill loads entire transcripts even when the newest row is a footer — hub/src/sync/syncEngine.ts:834
  • [Major] A delayed footer snapshot can restore the chat's running state — hub/src/sync/sessionCache.ts:856
  • [Minor] Blocked-only view can show an unblocked leader with no members — web/src/components/SessionList.tsx:3796
  • [Minor] Keyboard unpin can leave a blocked group member hidden — web/src/components/SessionList.tsx:4053

Testing

Not run (automation; PR code execution is prohibited).

  • The fixed merge-base diff passed git diff --check. No PR code, tests, or builds were executed locally.
  • For c5a663e, GitHub showed one pr-review run in progress and one cancelled. No completed core, browser, or unit results were visible for that SHA.
  • The added browser tests cover offscreen jumps, collapsed Blocked navigation, and the basic blocked-only lens. The group tests cover ordinary members under a blocked leader and a blocked member rendering once. The combined filter and keyboard cases above are absent.

HAPI Bot

Comment thread hub/src/sync/syncEngine.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/components/SessionList.tsx Resolved
Comment thread web/src/components/SessionList.tsx Resolved
One conflict, same known-bad region: upstream added a group-dissolve
feature (DissolveGroupButton, allGroupMembersByLeader) to
renderGroupMembers's empty-members branch, in the exact function
tiann#2730's blocked-exclusion filter lives in.

Not competing edits to the same behavior — combined both: kept the
tiann#2730 filter (!blockedSectionIds.has(member.id)) on the visible
member list, adopted upstream's allMembers/dissolveButton so a leader
whose members are all pinned elsewhere, filtered out, OR floated to
Blocked still keeps its dissolve action reachable instead of losing
the group entirely.

Ran the standing hazard check on this exact area regardless of the
marked conflict's scope: all four renderGroupMembers(s) call sites
(Pinned, directory-group, running-bucket, Blocked) verified
individually, no duplication, each correctly closed. Everything past
the conflict markers (the non-empty member-list render, already
carrying upstream's dissolveButton wrapper) auto-merged correctly.

Full verification: web typecheck clean, web suite 429 files/5222
pass/1 expected fail, hub typecheck clean, hub suite 2520/0 fail,
shared 649/0 fail.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Needs changes (3 Major, 3 Minor)

Review mode: follow-up after new commits

Requirement — Pass

Operators managing long session lists need to see why an agent is blocked, reach blockers outside the viewport, and dismiss them with a recorded reason. The base sidebar surfaces live prompts and unread activity. An agent’s own blocked report is visible in chat.

Evidence

  • Issue #1717 asks for a visible row indicator and offscreen navigation that work with existing groups and filters. #1717
  • Issue #2356 describes the Blocked section and dismissal with a recorded reason. #2356
  • The base sidebar classifies live attention in web/src/lib/sessionAttention.ts:26. Chat renders blocked footers in web/src/components/AssistantChat/messages/NotifySummaryText.tsx:19.

Approach — Pass

Persisting settled footer reports and dismissals in the hub gives the sidebar durable state through reloads. The list can use that state for row indicators, section placement, and offscreen navigation. The dismissal route uses the existing session access guard.

Evidence

  • The hub derives the signal from agent output and includes it in the shared session summary. hub/src/sync/syncEngine.ts:1795 and shared/src/sessionSummary.ts:550.
  • The dismissal route validates session access and accepts the identity of the blocker the operator saw. The hub records the reason in the work graph. hub/src/web/routes/sessions.ts:1775 and hub/src/sync/syncEngine.ts:602.
  • The Blocked section renders a leader’s remaining members and excludes members that already have their own row in Blocked. web/src/components/SessionList.tsx:3799 and web/src/components/SessionList.tsx:5175.

Suggestions

  • Document how Blocked interacts with pending prompts, unread indicators, pins, groups, and dismissal in docs/guide/session-list.md. Issue #1717 asks for that relationship to be documented.

Code — Reviewed

Static review of the merge-base diff for 094c151 confirmed all four prior findings and two OpenCode delivery paths that can clear an unanswered blocker.

  • [Major] Startup backfill retains every decoded transcript page — hub/src/sync/syncEngine.ts:834
  • [Major] A delayed footer snapshot can restore the chat’s running state — hub/src/sync/sessionCache.ts:856
  • [Major] A delayed steer acknowledgement can erase the footer from that turn — hub/src/socket/handlers/cli/sessionHandlers.ts:579
  • [Minor] Stopping OpenCode before dispatch can erase an unanswered blocker — hub/src/sync/sessionCache.ts:1334
  • [Minor] Blocked-only filtering can show an unblocked group leader — web/src/components/SessionList.tsx:3799
  • [Minor] Keyboard unpin can leave a blocked member hidden — web/src/components/SessionList.tsx:4081

Testing

Not run (automation; PR code execution is prohibited).

  • The fixed merge-base diff passed git diff --check. Review was read-only and no PR code, tests, or builds were executed locally.
  • GitHub reported success for test, core, integration, browser, unit-web, unit-cli, wrapper-parity, windows-codex-mcp, and drift-gate on 094c151. The pr-review check was in progress at the last read.
  • The added browser tests cover offscreen jumps, collapsed Blocked navigation, and the basic blocked-only lens. The group and keyboard tests do not cover the combined cases above. The SSE tests cover stale list snapshots without asserting the open chat’s detail state.

HAPI Bot

Comment thread hub/src/sync/syncEngine.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread hub/src/sync/sessionCache.ts Resolved
Comment thread web/src/components/SessionList.tsx Resolved
Comment thread web/src/components/SessionList.tsx Resolved
Upstream restructured session groups significantly: the "Members (N)"
summary and toggle moved off a separate nested block and onto the
leader's own row (new SessionItemProps.groupSummary/groupMembers/
onToggleGroup, GroupSummaryLine, getGroupRowProps), and the dissolve
action moved from a standalone button into the row's action menu
(DissolveGroupDialog replacing DissolveGroupButton). This is the same
function area tiann#2730's blocked-exclusion filter lives in, again.

Three marked conflicts (destructured props, overlayOpen, and
renderGroupMembers's body) reconciled by combining both sides rather
than picking one. renderGroupMembers adopted upstream's simpler
shape (no more standalone dissolve-button/empty-state branch, since
that moved to getGroupRowProps) while keeping the tiann#2730 filter on its
member list.

getGroupRowProps itself — entirely new from upstream, so it carried
no mark — needed the SAME tiann#2730 filter added by hand: without it, a
blocked member would inflate the leader's own row summary (count,
waiting/working status) instead of being excluded, reintroducing the
double-counting tiann#2730 fixed in a new location.

The standing hazard check caught a second silent misattribution in
this exact area, unmarked by git: the new `{...getGroupRowProps(s)}`
spread landed on the Blocked section's SessionItem (which does need
it) but never made it onto the near-identical Pinned section's
(which also needs it) — confirmed by direct comparison, not assumed.
Added it to Pinned, with a new dedicated test (no prior coverage
exercised a pinned leader with a blocked member) since the gap could
have shipped silently otherwise.

Two existing tiann#2730 tests needed updating for the toggle's new text
("N members"/"1 member" rendered on the leader's own row, replacing
"Members (N)"); two more already-correct tests had the same stale
selector sitting unexercised by the conflict and were fixed too.

Red-green verified both non-marked fixes (the getGroupRowProps filter
and the Pinned-section spread) independently: reverted each, ran the
group test file, confirmed the predicted exact failures (double-
counted summary / missing toggle), restored byte-identical, confirmed
green again.

Full verification: web typecheck clean, web suite 429 files/5223
pass/1 expected fail, hub typecheck clean, hub 2520/0 fail, shared
649/0 fail.
…n-affordance-1717

# Conflicts:
#	web/src/components/SessionList.tsx
…n-affordance-1717

# Conflicts:
#	hub/src/store/index.ts
#	hub/src/store/migration-v13.test.ts
#	hub/src/store/migration-v15.test.ts
#	hub/src/store/migration-v18.test.ts
#	hub/src/store/migration-v19.test.ts
#	hub/src/store/migration-v20.test.ts
#	hub/src/store/migration-v23.test.ts
#	hub/src/store/migration-v24.test.ts
#	hub/src/store/migration-v25.test.ts
#	hub/src/store/migration-v26.test.ts
#	hub/src/store/migration-v28.test.ts
#	hub/src/store/migration-v30.test.ts
#	hub/src/store/migration-v36.test.ts
#	hub/src/store/migration-v37.test.ts
…n-affordance-1717

# Conflicts:
#	hub/src/web/routes/codexDesktop.test.ts
#	hub/src/web/routes/codexExtras.ts

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex-review:changes HAPI Bot: review requests changes dogfooded Live dogfood by write collaborator; 48h UTC opt-out then merge intent.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(web): loud session-list blocked affordance + off-viewport scroll cues

1 participant