Skip to content

fix(ui): restore live updates when retrying chat history - #147865

Merged
steipete merged 1 commit into
mainfrom
codex/pond-subscription-recovery
Sep 14, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/pond-subscription-recovery

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes chat history Retry restoring saved messages while leaving targeted live updates disconnected after the session subscription also timed out.

User Impact

Retry restores the selected conversation's failed subscription, including approval updates, without requiring a new connection. Existing catalog refresh behavior is preserved.

Why This Change Was Made

History and subscription requests can fail independently. The existing refresh action only retried history, so a successful history response could leave the selected session without its targeted observer. The history owner now also asks the existing subscription owner to synchronize when it recorded a subscription error.

Evidence

  • The regression fails before the repair and passes afterward; focused transcript and subscription tests, changed checks, and the production UI build passed. Independent review found no actionable defects.
  • The synthetic browser flow below uses the same subscription/history fault and clicks the actual Retry button. Both versions reload saved messages; only the repaired version restores the targeted observer with approvals enabled and renders the subsequent approval card. Each flow uses one WebSocket and has no page errors.
  • During live node testing, a history and subscription timeout reproduced the incomplete Retry recovery. Ordinary replies could still stream. The cause of that browser stall remains unproven; this PR addresses explicit Retry recovery.

Before and after, respectively:

Before: Retry restores history but leaves the targeted approval subscription disconnected

After: Retry restores the subscription and the node approval card arrives

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 14, 2026
@steipete
steipete marked this pull request as ready for review September 14, 2026 04:14
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 12:22 AM ET / 04:22 UTC.

ClawSweeper review

What this changes

The PR makes chat-history Retry also recover a failed live subscription, including approval updates, and adds regression coverage and recovery documentation.

Merge readiness

✅ Ready for maintainer review

The repair remains necessary on inspected main. It reuses the existing subscription lifecycle, preserves catalog refresh behavior, and introduces no actionable correctness finding. The maintainer-protected PR should remain open.

Priority: P2
Reviewed head: 914b00fc1858c69844fc631faca49652b07309ef

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with useful callback-level regression coverage, supporting visual evidence, and no actionable introduced defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied Repository State identifies a maintainer-authored PR, exempt from the external-contributor proof gate. Inspected synthetic before/after screenshots support approval-card recovery through chat Retry, but do not independently prove transport diagnostics; no material authority change adds a separate proof requirement.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied Repository State identifies a maintainer-authored PR, exempt from the external-contributor proof gate. Inspected synthetic before/after screenshots support approval-card recovery through chat Retry, but do not independently prove transport diagnostics; no material authority change adds a separate proof requirement.
Evidence reviewed 7 items Introduced repair: The new refresh callback retains catalog handling, stream preservation, approval reconciliation, and startup-history options; it additionally requests subscription synchronization only when the subscription owner recorded an error.
Current main still lacks recovery: The inspected main render callback reloads history without synchronizing the failed subscription. No merged replacement was established.
Existing lifecycle and access checks: Subscription synchronization retains connection, epoch, generation, session, and agent checks; approval observation still depends on operator approval access. Stale acquisitions are released through the existing owner. This patch does not create a new authorization contract.
Findings None None.
Security None None.

How this fits together

The Control UI loads saved conversations from the Gateway and separately subscribes to live session updates. Retry now reconnects failed observation alongside reloading history so the conversation can receive subsequent updates.

flowchart TD
  A[Chat history Retry] --> B{Catalog conversation?}
  B -->|Yes| C[Reload catalog history]
  B -->|No| D[Reload saved conversation]
  B -->|No| E{Subscription failed?}
  E -->|Yes| F[Existing subscription owner]
  F --> G[Live messages and approval updates]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +13, Tests +53, Docs +3. Total +69 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 27 14 +13
Tests 1 54 1 +53
Docs 1 3 0 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 84 15 +69

Review metrics

None.

Technical review

Best possible solution:

Keep Retry coordinated through the existing history and subscription owners, preserving their session fencing and approval-access checks.

Do we have a high-confidence way to reproduce the issue?

Yes, source establishes the path: a sent subscription timeout removes observation, while main's Retry reloads only history. The new regression exercises that callback; this review did not execute it.

Is this the best way to solve the issue?

Yes. Calling the existing subscription owner on its recorded failure repairs the missing coordination without adding a parallel retry mechanism or changing stored settings.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 28dd17e8a15e.

Labels

Label changes:

  • add P2: This is a bounded recovery defect after subscription failure; the supplied report notes ordinary replies could still stream.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The supplied Repository State identifies a maintainer-authored PR, exempt from the external-contributor proof gate. Inspected synthetic before/after screenshots support approval-card recovery through chat Retry, but do not independently prove transport diagnostics; no material authority change adds a separate proof requirement.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied Repository State identifies a maintainer-authored PR, exempt from the external-contributor proof gate. Inspected synthetic before/after screenshots support approval-card recovery through chat Retry, but do not independently prove transport diagnostics; no material authority change adds a separate proof requirement.

Label justifications:

  • P2: This is a bounded recovery defect after subscription failure; the supplied report notes ordinary replies could still stream.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied Repository State identifies a maintainer-authored PR, exempt from the external-contributor proof gate. Inspected synthetic before/after screenshots support approval-card recovery through chat Retry, but do not independently prove transport diagnostics; no material authority change adds a separate proof requirement.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The supplied Repository State identifies a maintainer-authored PR, exempt from the external-contributor proof gate. Inspected synthetic before/after screenshots support approval-card recovery through chat Retry, but do not independently prove transport diagnostics; no material authority change adds a separate proof requirement.

Evidence

What I checked:

  • Introduced repair: The new refresh callback retains catalog handling, stream preservation, approval reconciliation, and startup-history options; it additionally requests subscription synchronization only when the subscription owner recorded an error. (ui/src/pages/chat/chat-pane-history.ts:81, 914b00fc1858)
  • Current main still lacks recovery: The inspected main render callback reloads history without synchronizing the failed subscription. No merged replacement was established. (ui/src/pages/chat/chat-pane-render.ts:547, 28dd17e8a15e)
  • Existing lifecycle and access checks: Subscription synchronization retains connection, epoch, generation, session, and agent checks; approval observation still depends on operator approval access. Stale acquisitions are released through the existing owner. This patch does not create a new authorization contract. (ui/src/pages/chat/chat-history-subscription.ts:124, 914b00fc1858)
  • Regression exercises the rendered callback: The added test creates a sent subscription timeout, observes compensation removing observation, invokes the rendered onRefresh callback, and checks restored history and approval-enabled observation. Existing sibling tests cover stale generations, disposal, failed releases, and unrelated error preservation. Tests were inspected, not executed in this read-only review. (ui/src/pages/chat/chat-pane-transcript-loading.test.ts:20, 914b00fc1858)
  • Supplied visual evidence: Both prepared screenshots were inspected locally. The before image shows the saved conversation without an approval card; the after image shows the same conversation with an approval card. The captured PR body describes a synthetic browser Retry flow and separately reports live reproduction of the original failure. The screenshots establish the visible difference, not independently the claimed WebSocket count or absence of browser errors. (914b00fc1858)
  • Area history: Main history identifies Peter Steinberger's subscription-module extraction and subsequent chat-history work, supporting routing to steipete beyond authorship of this proposal. Older follow-history inspection could not retrieve a required Git object, so original feature introduction is not claimed. (ui/src/pages/chat/chat-history-subscription.ts:124, 701da051d6f9)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 9b39972 into main Sep 14, 2026
186 checks passed
@steipete
steipete deleted the codex/pond-subscription-recovery branch September 14, 2026 04:52
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 14, 2026
* commit 'e3d8d0078369b21223c70028c4502c89f1420897': (51 commits)
  fix: background requests delay opening chats (#147845)
  chore(i18n): refresh native locales (#147899)
  feat: start remote sessions without a repository (#147773)
  fix(slack): retire probe sockets after timeout (#147846)
  refactor(agents): share theme ANSI color encoding (#147838)
  improve(memory): bound vector recall decision counts (#147900)
  improve(browser): narrow dashboard lifetime rechecks (#147892)
  test(discord): compact lifecycle matrices (#147855)
  fix(agents): use exact model rows for harness support (#147849)
  test(agents): compact embedded lifecycle matrices (#147856)
  test(agents): compact embedded admission matrices (#147853)
  test(cli): compact node management matrices (#147854)
  feat(artifacts): select assistant-delivered files by run (#147682)
  improve: reduce event-loop work when recording prompts (#147876)
  fix: preserve readable generated image and video filenames (#147833)
  fix(ci): skip SDK rendering for identical revisions (#147572)
  fix: prevent false process failures and stalled background waits (#147871)
  fix(ui): restore live updates when retrying chat history (#147865)
  fix(ui): preserve text and image order in assistant replies (#147731)
  refactor(qa-lab): reuse approval result formatter (#147867)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant