Repository navigation
fix(chat): restore active turns after cursor reconnects - #126549
NianJiuZst wants to merge 1 commit into
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 real behavior proof before merge. Reviewed September 28, 2026, 8:19 PM ET / September 29, 2026, 00:19 UTC. ClawSweeper reviewWhat this changesThe branch adds active-run snapshots to Gateway cursor responses and reconciles them in the Control UI so an active reply remains visible after reconnecting. Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open. PR close coverage proof kept this PR open against #129640: model PR close coverage proof was incomplete: The source report identifies the same Gateway omission and UI recovery path in merged PR B and current main. PR A has no distinct remaining behavior requiring separate review. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway turns chat history and active-run state into full or cursor-delta responses. The Control UI consumes those responses to restore visible assistant text, tool activity, and the Stop control. flowchart LR
A[Active chat run] --> B[Gateway history request]
C[Saved history cursor] --> B
B --> D{Full page or delta?}
D --> E[Bounded active-run snapshot]
E --> F[Control UI reconciliation]
F --> G[Visible reply and controls]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +39, Tests +90, Docs 0. Total +129 across 8 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep this PR open until a linked canonical PR proves it covers this PR's unique work, or a maintainer confirms closure. Do we have a high-confidence way to reproduce the issue? No current-main failure is reproducible from the reported path: the Gateway now sends the snapshot on cursor deltas, and current browser coverage checks visible recovery. Tests were inspected, not executed in this read-only review. Is this the best way to solve the issue? No. The merged repair supplies the same recovery through shared UI hydration and also budgets the snapshot against delta contents. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 27de2f87db28; fix evidence: release v2026.9.6, commit 2dbaeef693ae. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…ft (#1715) * fix(apply): stop own acknowledgement edits from requeueing source drift Exact PR review marks ClawSweeper's acknowledgement comment (clawsweeper-pr-ack) complete after the review snapshot and before direct publication. GitHub moves the PR updated_at for that edit, so close proposals failed apply freshness with skipped_changed_since_review ("updated_at changed", sourceDriftVerified) and requeued another source_drift_requeue review, which repeated the same edit forever (openclaw/openclaw#126549 reached revision 25 on one head; #158447 revision 160 escaped only through a stale item read). Apply freshness now accepts that edit as automation-only when a ClawSweeper-authored acknowledgement for this item carries the item's latest updated_at and the review's complete source, timeline, PR head, and review-activity receipt still matches. Human comments, title/body and non-managed label edits, PR reviews, new heads, other bots' comment edits, and tuple-less legacy reviews still block apply and requeue as before. * test(e2e): add real-transport source-drift final-effect proof Drive the compiled non-dry-run apply-decisions CLI (exact-event publication arguments) and ClawSweeper's own update-review-status acknowledgement edits through native gh over http_unix_socket to a stateful synthetic GitHub API seeded from a captured PR and rewound to its exact-review snapshot. The API models updated_at and timeline effects of comment, label, title, push and close writes and traces every request, so each scenario records the final GitHub effects (close request, durable comment sync, label edits, lease writes) for a baseline and a candidate build without mutating GitHub.
|
This pull request has been automatically marked as stale due to inactivity. |
) Document the optional bounded inFlightRun snapshot returned with cursor delta history. Replay the missed messages, then reconcile the snapshot as for a normal history tail. Salvages the remaining documentation contribution from #126549; the runtime fix is already covered separately. Co-authored-by: NianJiuZst <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
|
Thanks @NianJiuZst. The active-run cursor catch-up behavior is covered by #129640, and your remaining protocol documentation has now landed with co-author credit in #171183. Closing this PR as superseded. If you still see an uncovered cursor catch-up issue on current main, please share a reproduction. |
…claw#171183) Document the optional bounded inFlightRun snapshot returned with cursor delta history. Replay the missed messages, then reconcile the snapshot as for a normal history tail. Salvages the remaining documentation contribution from openclaw#126549; the runtime fix is already covered separately. Co-authored-by: NianJiuZst <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Fixes an issue where the Control UI could lose the visible active assistant/tool state after reconnecting with a valid chat-history cursor. A full history response carried the bounded in-flight snapshot, but a successful cursor delta omitted it and the UI returned before running active-turn recovery.
Why This Change Was Made
The Gateway already computes and bounds
inFlightRunbefore choosing full versus delta output. This change adds that optional field to the closed delta protocol, sends the same snapshot on delta catch-up, and makes full and delta responses share one in-flight reconciliation owner in the UI.The existing startup cursor optimization remains intact: the client still requests a delta rather than forcing a full tail fetch.
User Impact
After reconnect, an active response can immediately restore its text, tool activity, and Stop control even when the Gateway only needs to return a cursor delta. Operators avoid both a blank active turn and an unnecessary 100-message tail reload.
Evidence
4b55192f818c0bfd00cd2bb2d9447fd38dca7e39; commit:f96bfcced92e5ec857a13fb537921f1d60e6337a.null.inFlightRun, then observes restored assistant text, tool activity, and Stop.+106/-67(net+39); tests:+94/-4; docs:+1/-1. The UI diff moves the existing 67-line full-response reconciliation into one shared owner, then calls it from both response paths; the remaining growth is the additive protocol/data flow and delta coverage.git diff --checkpassed. No compatibility fallback or forced full fetch was added. The browser proof uses a mocked Gateway; no live provider/channel run was performed.AI-assisted: yes