Repository navigation
fix: preserve unread reminder for open sessions - #129386
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
20d3fd8 to
ec51007
Compare
3f79799 to
9ca68a2
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 3:39 AM ET / 07:39 UTC. ClawSweeper reviewWhat this changesAdds marker-bound automatic read acknowledgements across the Gateway, Control UI, Android, iOS, and macOS so a manual unread reminder persists while a session remains open. Merge readinessNo blocking patch defect found. The Gateway-owned conditional acknowledgement fixes the stale active-pane read while preserving legacy explicit-read behavior; the protected PR still needs acceptance of its documented mixed-client boundary and exact-head validation. Priority: P1 Review scores
Verification
How this fits togetherGateway session rows expose derived unread state and a durable manual marker to active clients. Clients acknowledge later activation through a session update, and the Gateway decides whether that acknowledgement still matches operator intent. flowchart LR
A[Session row or event] --> B[Active chat client]
B --> C[Activation read guard]
C --> D[Conditional session update]
D --> E[Gateway session owner]
E --> F[Durable unread marker]
F --> G[Updated session row]
Decision needed
Why: The patch intentionally retains legacy bare-read semantics instead of breaking older clients, so the residual upgrade behavior is a product compatibility choice. Before merge
Agent review detailsSecurityNone. PR surfaceSource +200, Tests +527, Docs +2, Other +326. Total +1055 across 72 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Accept the documented legacy-client transition only after exact-head validation confirms the Gateway and supported clients preserve marker-bound acknowledgements. Do we have a high-confidence way to reproduce the issue? Yes. Current main’s active chat sends a bare unread:false acknowledgement after observing an unread row, while the durable marker is not projected to distinguish a later manual mark; focused regression scenarios cover that path. Is this the best way to solve the issue? Yes. Comparing the acknowledgement at the Gateway’s authoritative session write owner is safer than suppressing client reads, which would not protect multi-client races. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 954a93137968. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (12 earlier review cycles; latest 8 shown)
|
|
Addressed the P1 mixed-version finding on exact head
The deliberate policy tradeoff is documented: an old client cannot distinguish automatic acknowledgement from explicit read, so against a newer Gateway both preserve a manual marker; update that client to explicitly clear the marker.
|
519cfa1 to
5fdaed6
Compare
8d1871b to
872b9a5
Compare
Co-authored-by: Tak Hoffman <[email protected]>
872b9a5 to
0d9e268
Compare
|
Land-ready evidence for exact head
Repo-native review artifacts validate with |
|
Merged via squash.
|
* fix: preserve manual unread markers in open sessions * fix: distinguish explicit session reads * fix(ui): gate unread contract on gateway capability * perf(ui): keep server capabilities out of startup bundle * test(gateway): keep agent fixtures roster-consistent * fix(sessions): preserve legacy read compatibility * test(gateway): type agent fixture configs * fix(ui): remove unread gateway fallback Co-authored-by: Tak Hoffman <[email protected]> * test(infra): avoid fixed SSH tunnel port * fix(ui): acknowledge unread after history commit * docs: clarify unread upgrade boundary * test(ui): drive mobile session menu by tap * fix(ios): remove stale read reconciliation call --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
Closes #129373
What Problem This Solves
Fixes an issue where users choosing Mark as unread on the currently open session would see the unread reminder disappear immediately. The active chat pane treated the resulting unread snapshot as newly viewed activity and sent
unread: false, canceling the user action.Why This Change Was Made
The Gateway now projects its existing durable
markedUnreadAtfact. Clients that advertise support for the unread acknowledgement contract send the marker observed at activation with automaticunread: falseacknowledgements. A newer marker makes that acknowledgement a successful no-op instead of erasing newer user intent.Client activation guards distinguish an already-open pane from a genuine later activation, including retained web panes and native navigation. Running state remains orthogonal: streaming and completion can create activity unread state but do not themselves clear a manual marker.
Mixed-version policy preserves the shipped protocol: a bare legacy
unread: falsestill clears unread state, including an explicit marker. This keeps Mark as read working on older clients. Durable protection across several simultaneously connected clients therefore requires each active client to support the advertised acknowledgement contract.User Impact
On updated clients, Mark as unread remains visible while the current chat stays open, through run updates and completion, and clears on a genuine later activation or Mark as read. Older clients retain their existing read behavior; in a mixed fleet, an older active client can still clear the reminder until it updates.
Evidence
run_d4d597152b25failed because the active row did not retain its unread indicator.run_3be9c9de9f10— inspected 1280×900 before/marked/running/completed/reopened screenshots and a 3.64-second WebM of the complete interaction.run_6bc33fda3fdd— 209 Gateway/protocol/UI/browser tests passed.fc0787b014b:gateway-methodsshard passed 3,686/3,687 tests locally; its sole failure was the linked-worktree environment reporting a synthetic plain workspace as a Git checkout. Clean exact-head CI is authoritative for that environment-only case.+413/-134; tests/support+780/-39; generated protocol+8; docs+3/-3. Positive production growth is the cross-client activation/acknowledgement contract across Gateway, web, Android, iOS, and macOS. The repair removes a duplicate iOS acknowledgement owner and the unshipped explicit-read protocol experiment.Before — active session is read:
Marked — unread indicator remains on the already-open session:
Running and completed — the manual reminder remains through lifecycle updates:
Reopened — a genuine later activation clears the reminder:
Full interaction video:
manual-unread-running.webm
Exact-head CI is running on
fc0787b014b. Local Android and Apple execution remain unavailable on this Linux host; exact-head CI is the authoritative native proof before landing.AI-assisted: yes. The change was traced from the supplied recording through client activation, Gateway persistence, protocol projection, mixed-version behavior, and running-session races; the final diff and proof were reviewed before publication.