Repository navigation
fix(ui): acknowledge newer activity after pending reads settle - #148262
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesReconsider newer unread activity after a pending read succeeds, waiting until the conversation is visible and its history is ready. Example: Activity revision 40 arrives while a read acknowledgement returning revision 30 is pending.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR addresses a current unread-acknowledgement bug with a focused change, and I found no introduced correctness or security defect; exact-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI chat pane consumes session-row publications, admits automatic reads through its visibility/history owner, and sends sessions.patch requests through the shared session capability. flowchart LR
A[Session activity] --> B[Session capability]
B --> C[Selected chat row]
C --> D[Visibility and history admission]
D --> E[Unread patch guard]
E --> F[Gateway read acknowledgement]
F --> B
Technical reviewBest possible solution: Preserve request-scoped read observations and reconsider the selected row through the existing visibility/history admission owner after current successful settlement. Do we have a high-confidence way to reproduce the issue? The base source exposes the missed follow-up path, and the PR supplies matching baseline failures and before/after browser captures; this review ran no target code. Is this the best way to solve the issue? The diff is a small complete repair for the demonstrated scenario: it reuses the existing guard, admission owner, mutation capability, and visibility listener without adding another scheduler or state owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b9ea0a58716f. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +17, Tests +270, Docs +2. Total +289 across 9 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (9 earlier review cycles; latest 8 shown)
Reviewed October 21, 2026, 4:15 AM ET / 08:15 UTC (Revision 10). |
Reconsider the selected session after a successful read acknowledgement, using existing visibility and transcript readiness. Preserve request ownership, rejection backoff, manual unread markers and hidden-run policy. Verify newer activity, hidden tabs and reconnect history through the production session capability and bundled UI.
4cecfe0 to
68323cd
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…law#148262) Reconsider the selected session after a successful read acknowledgement, using existing visibility and transcript readiness. Preserve request ownership, rejection backoff, manual unread markers and hidden-run policy. Verify newer activity, hidden tabs and reconnect history through the production session capability and bundled UI.
What Problem This Solves
Fixes: an open chat can keep a stuck unread badge when newer activity arrives during an automatic read acknowledgement.
User Impact
User impact: newer activity is acknowledged once the pending read succeeds and the chat is visible with its history ready. Returning to a hidden tab or reconnecting resumes the deferred read. Manual unread reminders, access restrictions, and failure backoff keep their existing behavior.
Why This Change Was Made
On main,
ui/src/pages/chat/chat-pane-session.ts:388only settles the request. The guard also overwrites its observed read atui/src/lib/sessions/unread.ts:48, so newer activity can remain suppressed after success. Preserve the observation for that pending request and reconsider the selected row after current successful settlement, through the existingsecondarySessionReadsReadyadmission owner. Visibility return uses that same path.This revision keeps main's request ownership, retry policy, hidden-run handling, and receipt reconciliation. It discards the old PR's already-landed guard and attention-receipt rewrites. Production +21/-4 (net +17); tests +271/-1 (net +270); docs +2. The added production code connects successful settlement to the existing read owner without another state machine.
Evidence
a6b339e1c4d6bc238ed20620204f55311dcfdb0b. Base: 4 owner failures / 10 passes; visible and hidden settlement miss the follow-up, reconnect acknowledges before replacement history, and the guard stays latched. The rejection control already passes.Before: newer activity leaves the active chat unread after the older acknowledgement succeeds.
After: one deferred acknowledgement clears the badge.
Exact-head CI 39566907178 passed on
68323cd5bcc6bdb8b3dfbf75901d357ad8153076, including the UI, browser, core lint, and type checks. The final cross-workflow inspection also shows successful security and CI gates; no failure rerun was needed. Fresh ClawSweeper review on this head found zero issues and inspected the replacement screenshots. The review notes overlapping PR #174795 for the maintainer's landing decision.