Skip to content

fix(ui): keep restored titles through reconnect roster updates - #178478

Closed
shannon0430 wants to merge 2 commits into
openclaw:mainfrom
shannon0430:codex/fix-cached-chat-title
Closed

shannon0430 wants to merge 2 commits into
openclaw:mainfrom
shannon0430:codex/fix-cached-chat-title

Conversation

@shannon0430

@shannon0430 shannon0430 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Resolved upstream

The scoped-observation title fallback is now on official main through #178510 (58c3f35e0e1894bc837871e5ca58b47be78031f2). #178474 (fe739f62fcfa1f91dfaa25f7a710292da190822c) also handles pending cached-title hydration.

On pinned official main 79262d0571694dbf083b7d1bf5a206cc8fb93936, the original synthetic cached-tail Chromium case passes with en-US and CPU rate 4 (6.831 s case, 21.85 s wrapper). The official added pending-cache/first-title assertions and the retained title/scroll checks were kept; the local diagnostic locale/throttle adjustment was restored after the run. There is no private UI correction.

The product fix is already adopted upstream, so #178478 is superseded. No additional ci:full run is requested for that duplicate PR. This records source adoption, not a claim that an official package has been released.


Closes #178470

What Problem This Solves

Fixes: a restored conversation briefly changes its header to New session when reconnect accepts its live descriptor before the pane roster catches up.

User Impact

User impact: the conversation keeps its accepted title through that reconnect transition. Clearing a title and changing conversations retain their existing behavior; no settings, authority, or migration changes are required.

Why This Change Was Made

The existing pane-scoped observation can already hold the accepted descriptor while the retained sidebar page and the pane-selected row do not contain it. That same observation retires the cached transcript fallback, leaving a temporary gap in header title resolution. The header now consumes its current scoped observation before consulting the cached fallback. Retained presentation and an explicit selected row keep their existing precedence. No new cache, request, config, or state owner is added.

Evidence

Pinned base: d85fcb29bec40d33dc6055fe4144cbf468b8848c. Synthetic data only.

  • The unchanged existing cached-tail browser assertions reproduce the official-main failure with browser locale en-US and Chromium CDP CPU rate 4 before navigation: base FAIL (New session vs Synthetic cold-load conversation, 9.058 s); candidate PASS (8.642 s, runner wall 27.67 s). No assertion, timeout, RPC reply, or retry changed. The locale/throttle/console capture are local diagnostic adjustments, not committed runtime/test controls.
  • Main's bounded title diagnostic showed correct cached metadata, then correct live metadata, then a generic-title DOM write while the accepted live row still held its label. With the correction there is no lost-title write. The before image below is a raw frame at 7.55 s from that failing browser recording; the after image is the same synthetic scenario after live reconciliation. Other transient metadata has not settled in the before frame; these are title evidence, not a claim of pixel-identical rendering.
  • The committed owner regression deterministically fails on base (New session vs Observed conversation) without CPU throttling. It passes with the fix and covers a different session/agent key plus an actual sessions.patch({ label: null }) acknowledgement whose JSON-compatible entry omits label.
  • Focused menu, session-event and presentation suites: 67 passed, wall 6.73 s. After tightening the clear-title wire fixture, the complete changed menu suite: 29 passed, wall 3.89 s.
  • Production UI types, UI-component test types, targeted lint, format and diff checks pass. Fresh isolated P0–P2 review and independent final review found no actionable findings. PR CI supplies the broader UI lanes.
base owner regression: expected 'New session' to be 'Observed conversation'
base browser case: expected 'New session' to be 'Synthetic cold-load conversation'
candidate browser case: 1 passed, 2 unrelated cases skipped; no lost-title write
candidate owner suites: 3 files passed, 67 tests passed
final changed suite: 1 file passed, 29 tests passed

Production delta: +4 / -1 lines; test delta: +73 / -0 lines. The growth is one deterministic reconnect regression using the existing mounted-pane and session owners. No new test-only production seam.

Related #173266 already preserves cached title fields; this fixes the later live-reconciliation gap. #173344 addresses a different bootstrap route-key problem that prevents session listing. The retained-pane batch in #153034 is not expanded here. The known cached-title CI failures on #163267 and #75225 can track this primary product correction without copying it into both feature branches.

Synthetic title transition

Before: the sidebar retains the conversation title while the header transiently reads New session.

Before: title lost during live reconciliation

After: the same scoped live session row retains the title through reconciliation.

After: title retained through live reconciliation

Final-head validation and maintainer CI action

Current head: a787b693c3. The first CI run exposed a contributor-side test fixture type error (ApplicationContext.publishGatewaySnapshot, TS2339), not an inherited failure. The test now uses the existing public pane fixture operation. The canonical test/tsconfig/tsconfig.core.test.ui-chat.json graph, the complete 29-case changed suite, targeted lint and format pass. The earlier UI-component type graph did not include this file; no coverage is claimed from that graph for this test. Production code and browser proof are unchanged. The final regression still fails on the original production code.

Current-head selected CI: 39450848192 completed SUCCESS on a787b693c3337bfb0cba958b33011e833e9e4037: 35 successful jobs, 27 skipped, zero failures; all 62 jobs terminal. The repaired check-test-types-core-3 and final openclaw/ci-gate passed. This change-selected success does not replace the required full UI run below.

@clawsweeper

clawsweeper Bot commented Oct 20, 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

The chat header uses the current scoped session observation when its selected roster row is absent.

Example: Reconnect accepts “Synthetic cold-load conversation” before the pane roster catches up.

  • Before: The header briefly displays “New session.”
  • After: The header retains “Synthetic cold-load conversation.”

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused, source-consistent repair with direct browser evidence and a meaningful owner regression; required full CI remains an execution gate.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected synthetic before/after browser screenshots and the supplied unchanged cached-tail browser red/green results exercise the header's live-reconciliation transition; the final commit changes only fixture publication calls.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An already named conversation briefly appears as “New session” during reconnect.
Reason: Restores the established title-continuity contract using existing owners without changing settings, permissions, or persisted data.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this PR narrowly repairs a current title-resolution gap, and the earlier fixture type error is repaired; no actionable introduced defect was found.

Priority: P3
Reviewed head: a787b693c3337bfb0cba958b33011e833e9e4037

Before merge

  • Complete next step - A maintainer should add ci:full and start a run for a787b69, then use its required results before landing.

Findings

None.

Agent review details

How this fits together

The Control UI combines retained roster rows, scoped live session observations, and cached transcript metadata to display conversation titles.

flowchart TD
  A[Gateway descriptors] --> B[Scoped session observation]
  C[Retained session roster] --> E[Title resolver]
  D[Cached transcript metadata] --> E
  B --> E
  E --> F[Chat header]
Loading

Technical review

Best possible solution:

Land the existing scoped-observation fallback after the required full chat CI run succeeds.

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

The source exposes the missing live-observation fallback, and the supplied browser trace and base/head results exercise that exact transition; this read-only review executed no target code.

Is this the best way to solve the issue?

The patch is the smallest complete repair: consume the existing scoped observation at the shared title resolver while retaining roster precedence and existing invalidation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7538c9e4cbaf.

Provenance checked

  • Conversation title fallback keeps the original intent (ffcb0a8: Keep cached conversation names visible on warm reload while live metadata arrives.)
  • Retained roster title precedence keeps the original intent (a0905df: Preserve each split pane's accepted conversation title through agent switches.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit ffcb0a8 adds ui/src/pages/chat/chat-pane-session-menu.ts:57 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ffcb0a8cfa75; files: ui/src/pages/chat/chat-pane-session-menu.ts)

PR surface

Source +3, Tests +73. Total +76 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 4 1 +3
Tests 1 73 0 +73
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 77 1 +76

Review metrics

Metric Value Why it matters
Production versus test LOC Production +4/-1; tests +73/-0 The focused mounted-owner regression covers the roster gap, conversation scope, and acknowledged title clearing without adding production test seams.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #178470
Summary: The linked issue traces the same accepted-live-row versus absent-roster title gap.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: A brief, self-recovering title flicker does not lose conversation content or block chat.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-20T14:50:51.431Z sha a7f0dfb :: needs changes before merge. :: none

Reviewed October 20, 2026, 12:12 PM ET / 16:12 UTC (Revision 2).

@shannon0430

shannon0430 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Resolved upstream

The scoped-observation title fallback is now on official main through #178510 (58c3f35e0e1894bc837871e5ca58b47be78031f2). #178474 (fe739f62fcfa1f91dfaa25f7a710292da190822c) also handles pending cached-title hydration.

On pinned official main 79262d0571694dbf083b7d1bf5a206cc8fb93936, the original synthetic cached-tail Chromium case passes with en-US and CPU rate 4 (6.831 s case, 21.85 s wrapper). The official added pending-cache/first-title assertions and the retained title/scroll checks were kept; the local diagnostic locale/throttle adjustment was restored after the run. There is no private UI correction.

The product fix is already adopted upstream, so #178478 is superseded. No additional ci:full run is requested for that duplicate PR. This records source adoption, not a claim that an official package has been released.

The contribution head a787b693c3337bfb0cba958b33011e833e9e4037 completed its selected CI: 35 successful jobs, 27 skipped, zero failures, including repaired check-test-types-core-3 and openclaw/ci-gate. That evidence is preserved; the accepted official repairs now own the fix.

@shannon0430

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Current head: a787b693c3337bfb0cba958b33011e833e9e4037.

The prior check-test-types-core-3 failure was diff-caused and is repaired using the existing public TestChatPane fixture wrapper. The canonical ui-chat type graph and all 29 session-menu tests pass; the final owner regression still fails against the original production code. Production bytes and the supplied browser/screenshot evidence are unchanged. The detailed author response is above.

Current-head CI: https://github.com/openclaw/openclaw/actions/runs/39450848192 . Preflight and security-fast have passed; execution of the selected test jobs remains queued. This is not an overall-CI-success claim. The separate maintainer-owned ci:full label and current-head full run request remains in the PR body.

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper clawsweeper Bot removed the clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. label Oct 20, 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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Control UI briefly resets an already restored title during warm reconnect

1 participant