Skip to content

fix(ui): keep cached titles stable during cold reload - #178474

Merged
steipete merged 2 commits into
mainfrom
fix/cold-load-title-cache-pending
Oct 20, 2026
Merged

steipete merged 2 commits into
mainfrom
fix/cold-load-title-cache-pending

Conversation

@steipete

@steipete steipete commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes the premature “New session” title during a cached conversation reload and keeps the completed-work duration visible when reconnect reconciliation temporarily omits the conversation from the retained list.

User Impact

Only the title shows a loading placeholder while its cached metadata is unknown. The cached transcript tail, reply attribution and progress still render before the Gateway hello. Completed-work duration remains visible after reconciliation. Cache misses and read errors still settle normally; identity changes and confirmed deletion still retire metadata.

Why This Change Was Made

The original trace showed a generated title before the cache read completed. The title now observes a pending flag on that existing read, without making the shared history-request pointer reactive or changing its wait, timeout or cleanup behavior.

PR CI then caught a separate metadata omission: reply attribution and progress remained present, but “Worked for 3 minutes” became “Worked” after hello. A deterministic mounted-transcript test reproduces this when the current observed session row has runtime facts but the retained list omits it. The transcript now consumes that current scoped observation, while the canonical-list and deletion rules remain in force.

Rebased onto main, preserving its cached-board hydration changes and #178510’s reconnect-title fix. The duplicate title regression was removed in favor of that landed owner test.

Evidence

  • The original delayed-cache browser regression failed before the title fix. Cache hit, miss and error cases are covered through the mounted header.
  • The new completed-work regression failed with “Worked” before the transcript fix and passes with the exact “Worked for 3 minutes” assertion.
  • All three cold-load E2E cases passed in five independent native-runner invocations (15 cases), preserving every title, duration, reply, progress, scroll and layout assertion. An additional full native pass after the lint-only local-alias cleanup passed all 3 cases too.
  • 47 owner tests and 223 sibling header, sidebar, session-menu, snapshot, transcript-duration and browser tests passed. The two unrelated failing browser files also passed all 4 cases on the rebased branch.
  • CI’s navigation-refresh failure is addressed on main by test(ui): await refresh-card imports before checking navigation layout #178535. The command-palette input layout failure does not exercise the changed chat owners and did not reproduce locally; no unrelated production or assertion change is included.
  • Production UI, UI-chat and E2E-chat typechecks, focused oxlint, formatting and diff checks passed. The native runner built the production Control UI. Independent final P2 review was scoped-clean with no actionable findings.
  • The five native passes took 33.55, 24.35, 27.64, 40.75 and 24.01 seconds in Vitest; the final source pass took 50.48 seconds. The changed owner files passed together in 15.79 seconds wrapper wall time.

No timeouts, retry settings, assertions, budgets, baselines or allowlists were relaxed. No CI job was dispatched or rerun.

The synthetic captures were inspected at the same 1200×900 viewport. The existing before capture remains representative; the after captures were refreshed on the rebased repair.

Before the title fix, while the cache read is pending:

Before: premature New session title

After, while the same read is pending:

After: only the title is pending

After the cache read, before hello, with cached title, tail and completed-work duration:

After: cached title and transcript metadata

@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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T17:28:23.293792Z f3e3088 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug 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: 🐚 platinum hermit Good normal PR readiness with ordinary 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-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

This PR delays the generic title while cached metadata loads and uses the current scoped session observation when the retained roster omits the conversation.

Example: Reload “Synthetic cold-load conversation” outside the saved sidebar page.

  • Before: The header briefly displays “New session” before cache hydration or during reconnect.
  • After: The header shows a loading placeholder, then retains the cached or observed conversation title.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused ownership-preserving repair with direct visual evidence; the failed browser duration assertion still needs attribution.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots exercise the production Control UI in Chromium with synthetic Gateway data: a held snapshot read shows the loading placeholder, followed by the cached conversation title and transcript; the mounted-owner regression covers the distinct omitted-roster path.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An existing conversation temporarily appears to be a new session during reload or reconnect.
Reason: The change restores documented title continuity, preserves the existing loading presentation, and has maintainer-authored direction.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR open: it addresses two concrete title-continuity defects with a focused change, and no introduced correctness or security defect was found.

Priority: P3
Reviewed head: 78428c4942642cb2387a968a0d4e6f1ec1a3efd8

Before merge

  • Complete next step - Determine whether the cached-tail duration failure in the required browser check is caused by this diff or inherited; repair it on this branch only if diff-caused.

Findings

None.

Agent review details

How this fits together

The Control UI chat header combines retained roster presentation, pane-scoped session observations, and cached transcript metadata into a displayed conversation title.

flowchart LR
  A[Browser snapshot read] --> D[Pane title resolution]
  B[Retained session roster] --> D
  C[Scoped session observation] --> D
  D --> E[Header title or placeholder]
Loading

Technical review

Best possible solution:

Keep title resolution with the existing session and hydration owners, preserving retained-roster precedence and scoped metadata retirement.

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

Current source exposes both fallback paths, and the supplied browser reproduction and inspected screenshots demonstrate the pending-read defect; this read-only review executed no tests.

Is this the best way to solve the issue?

The patch is a small, coherent repair: it publishes existing hydration state and consumes the existing scoped observation without adding another cache, request, or authority owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Cached-title fallback keeps the original intent (ffcb0a8: Preserve cached conversation names until live metadata arrives, including conversations outside the saved sidebar page.)
  • Retained roster precedence keeps the original intent (fix(ui): keep chat rename and reactions usable while reconnecting #178176: Retain same-identity presentation until canonical-list reconciliation rather than allowing provisional publications to clear it.)
  • Hydration field publication keeps the original intent (f16de80: Publish owner fields directly while preserving synchronous reads and installed presentation accessors.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

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

PR surface

Source +11, Tests +125. Total +136 across 9 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 5 23 12 +11
Tests 4 126 1 +125
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 149 13 +136

Review metrics

Metric Value Why it matters
Production versus test changes Production +23/-12 lines; tests and test support +126/-1 lines. The production growth reuses existing owners; added coverage exercises pending reads, hit/miss/error settlement, and omitted-roster reconciliation.

Labels

Label changes:

  • add P3: The title briefly becomes generic and recovers without blocking conversation use or losing data.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: The title briefly becomes generic and recovers without blocking conversation use or losing data.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • 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.

Reviewed October 20, 2026, 10:38 AM ET / 14:38 UTC.

@steipete
steipete force-pushed the fix/cold-load-title-cache-pending branch from 78428c4 to f3e3088 Compare October 20, 2026 17:20
@steipete
steipete merged commit fe739f6 into main Oct 20, 2026
91 of 94 checks passed
@steipete
steipete deleted the fix/cold-load-title-cache-pending branch October 20, 2026 17:36
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
* fix(ui): keep cached conversation titles through cold reload

* fix(ui): retain transcript metadata through reload reconciliation
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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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.

1 participant