Repository navigation
fix: show the first message when session naming fails - #205607
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: blocked before merge. What this changesThis PR shows first-message excerpts when dashboard session naming fails and preserves loading placeholders until initial naming settles. Example: A dashboard conversation starts with “Compare the release checklist” and automatic naming fails.
Review scores
ProductKind: Preference · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this maintainer-authored PR open: the earlier native-client finding is fixed, but the new fallback cache misses a generation-renewal invalidation path. Reviewed head: Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Gateway names sessions and projects transcript-derived display facts; Control UI presents those facts while worktree allocation independently chooses branch names. flowchart TD
A[Opening message] --> B[Gateway title owner]
B --> C[Saved name or fallback readiness]
A --> D[Transcript reader]
C --> E[Session row projection]
D --> E
E --> F[Header and sidebar]
B --> G[Worktree allocation]
Technical reviewBest possible solution: Keep the existing title and branch owners, clear fallbackTitle whenever their resident row generation is renewed, and establish upgrade compatibility. Do we have a high-confidence way to reproduce the issue? Current main source establishes the saved-nickname and checkout-precedence behavior; the PR reports a controlled real Gateway reproduction, and no target code was executed during this review. Is this the best way to solve the issue? The existing naming and projection owners fit the requested behavior, and native compatibility is restored, but the added excerpt cache must follow every existing generation-invalidation path. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 664bb5f1253d. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +108, Tests +193, Docs +5. Total +306 across 34 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 25, 2026, 9:50 PM ET / November 26, 2026, 02:50 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
885f797 to
35fc3c4
Compare
OpenClaw-Publication: 349261ff-64b4-4a28-8f86-98a0ce759bfb
35fc3c4 to
32127f5
Compare
Session titles: visual comparisonControl UI in Chromium, 1280 × 680, with the same synthetic Gateway fixture. These matching crops show the header, sidebar, and first message. Before was captured on Clean comparisonWhile the title is being generated If title generation fails Annotated comparisonWhile the title is being generated If title generation fails After a successful retry |
## Problem Five Control UI e2e tests fail on every run on `main`. Main-push CI does not select the `checks-ui-e2e` shards, so the failures only show on PRs that touch a file the suite imports (shards 2/10, 3/10 and 7/10). - `sidebar-outbox.e2e.test.ts:80` and both reload cases of `new-session-page.cloud-startup-failure.e2e.test.ts` time out. The page throws `Cannot read properties of undefined (reading 'includes')` in `chatSessionPresentationTitle`, so the chat pane never renders. - `chat-history-loading.e2e.test.ts:141` and `chat-error-details.e2e.test.ts:143` time out while they wait for an older `chat.history` request that never comes. ## Cause (bisected, 3 runs per side) - **#205607** (`9316f053`): `chatSessionPresentationTitle` now reads `source.key` from the session row. The three tests mock `chat.history` `sessionInfo` (and `sessions.describe`) without `key`. The Gateway always sends a full `GatewaySessionRow` with `key`, and #205607 fixed the same keyless fixture in `placement-error-unicode.e2e.test.ts`. The fixtures are out of date; the product is correct. - **#207173** (`ebe5fc10`): every cold chat now opens with the latest 24 messages and loads older ones only on reader intent ("Scroll up or choose **Show earlier** … even if the transcript fits on screen", `docs/web/control-ui.md`). The two tests expected the old automatic older-page fill after an opening with visible rows. ## Fix Tests only, no product change. - The keyless fixtures now send a valid session row: the outbox test drops its `chat.history` override and uses the row the mock derives from `sessions`; the cloud startup test returns the same row that `sessions.list` returns. - The two history tests click **Show earlier** before they wait for the older page. The rest of each test (inline retry, archived-child error placement, paging past tool activity) is unchanged. ## Evidence - Red on `main` (`45fc9339`): 5 failed / 16 passed, 3 of 3 runs. - Green on this branch: 21 / 21 passed, 3 of 3 runs. - Bisect: `08a545d2` 11/11 ×3 → `9316f053` 3 failed ×3; `563eef98` 10/10 ×3 → `ebe5fc10` 2 failed ×3. Co-authored-by: Ayaan Zaidi <[email protected]>
## Problem Six Control UI e2e fixtures declare a `sessionInfo` row without `key`. The Gateway never sends one: `chat.history` and `chat.startup` build the row with `key: canonicalKey`, the `GatewaySessionRow.key` shape. The tests pass only because the session roster row supplies the key. #205607 made `chatSessionPresentationTitle` read `source.key`, and #207513 fixed three fixtures that crashed on the same keyless shape. These six are the remaining keyless rows. They are green today, but they test a row the product never receives. Affected sites (base `24b7801f`): - `chat-flow.queue-edit.e2e.test.ts:129` and `chat-outbox-recovery.e2e.test.ts:143`: a static `chat.history` response with a keyless row. - `chat-async-questions.e2e.test.ts:174` and `:251`, `chat-widget-retention.e2e.test.ts:87`, `chat-worked-for-visualization.e2e.test.ts:144`: keyless `sessionInfo` rows. - `board-fixture.e2e.test.ts:354`: the `chat.startup` expectation matched a keyless row. ## Fix Tests only, no product change. This is the same approach as #207513. - queue-edit and outbox-recovery drop their static `chat.history` response and use the keyed row that the mock derives from `sessions`. The static response described the same empty, idle session. - The three async-question, widget-retention and worked-for fixtures declare `key: sessionKey` on their rows. - board-fixture now also asserts `key: "agent:main:main"` on the preview Gateway's `chat.startup` row. Net diff: +12 / −26 across 6 test files. ## User impact None. Only test fixtures change. ## Evidence - The 6 touched files pass 3 of 3 runs: 37 / 37 tests each run (`test/vitest/vitest.ui-e2e.config.ts`). - `oxfmt --check` and `oxlint` are clean on the touched files. Co-authored-by: Ayaan Zaidi <[email protected]>
* fix: show the first message when session naming fails * fix: show the first message when session naming fails OpenClaw-Publication: 349261ff-64b4-4a28-8f86-98a0ce759bfb * fix: keep session titles stable until naming settles * fix: reserve the title from creation through fallback and retry * fix: reserve session titles during navigation handoff * fix: preserve saved fallback names for native chats * fix(ui): keep session title fallback within startup budget * fix(gateway): retire fallback titles with session generations * test(ui): use valid session rows in placement recovery
…07513) ## Problem Five Control UI e2e tests fail on every run on `main`. Main-push CI does not select the `checks-ui-e2e` shards, so the failures only show on PRs that touch a file the suite imports (shards 2/10, 3/10 and 7/10). - `sidebar-outbox.e2e.test.ts:80` and both reload cases of `new-session-page.cloud-startup-failure.e2e.test.ts` time out. The page throws `Cannot read properties of undefined (reading 'includes')` in `chatSessionPresentationTitle`, so the chat pane never renders. - `chat-history-loading.e2e.test.ts:141` and `chat-error-details.e2e.test.ts:143` time out while they wait for an older `chat.history` request that never comes. ## Cause (bisected, 3 runs per side) - **openclaw#205607** (`fbc31d21`): `chatSessionPresentationTitle` now reads `source.key` from the session row. The three tests mock `chat.history` `sessionInfo` (and `sessions.describe`) without `key`. The Gateway always sends a full `GatewaySessionRow` with `key`, and openclaw#205607 fixed the same keyless fixture in `placement-error-unicode.e2e.test.ts`. The fixtures are out of date; the product is correct. - **openclaw#207173** (`9017a5bf`): every cold chat now opens with the latest 24 messages and loads older ones only on reader intent ("Scroll up or choose **Show earlier** … even if the transcript fits on screen", `docs/web/control-ui.md`). The two tests expected the old automatic older-page fill after an opening with visible rows. ## Fix Tests only, no product change. - The keyless fixtures now send a valid session row: the outbox test drops its `chat.history` override and uses the row the mock derives from `sessions`; the cloud startup test returns the same row that `sessions.list` returns. - The two history tests click **Show earlier** before they wait for the older page. The rest of each test (inline retry, archived-child error placement, paging past tool activity) is unchanged. ## Evidence - Red on `main` (`1c59a157`): 5 failed / 16 passed, 3 of 3 runs. - Green on this branch: 21 / 21 passed, 3 of 3 runs. - Bisect: `67dd7ed5` 11/11 ×3 → `fbc31d21` 3 failed ×3; `cf90329d` 10/10 ×3 → `9017a5bf` 2 failed ×3. Co-authored-by: Ayaan Zaidi <[email protected]>
## Problem Six Control UI e2e fixtures declare a `sessionInfo` row without `key`. The Gateway never sends one: `chat.history` and `chat.startup` build the row with `key: canonicalKey`, the `GatewaySessionRow.key` shape. The tests pass only because the session roster row supplies the key. openclaw#205607 made `chatSessionPresentationTitle` read `source.key`, and openclaw#207513 fixed three fixtures that crashed on the same keyless shape. These six are the remaining keyless rows. They are green today, but they test a row the product never receives. Affected sites (base `e32a4225`): - `chat-flow.queue-edit.e2e.test.ts:129` and `chat-outbox-recovery.e2e.test.ts:143`: a static `chat.history` response with a keyless row. - `chat-async-questions.e2e.test.ts:174` and `:251`, `chat-widget-retention.e2e.test.ts:87`, `chat-worked-for-visualization.e2e.test.ts:144`: keyless `sessionInfo` rows. - `board-fixture.e2e.test.ts:354`: the `chat.startup` expectation matched a keyless row. ## Fix Tests only, no product change. This is the same approach as openclaw#207513. - queue-edit and outbox-recovery drop their static `chat.history` response and use the keyed row that the mock derives from `sessions`. The static response described the same empty, idle session. - The three async-question, widget-retention and worked-for fixtures declare `key: sessionKey` on their rows. - board-fixture now also asserts `key: "agent:main:main"` on the preview Gateway's `chat.startup` row. Net diff: +12 / −26 across 6 test files. ## User impact None. Only test fixtures change. ## Evidence - The 6 touched files pass 3 of 3 runs: 37 / 37 tests each run (`test/vitest/vitest.ui-e2e.config.ts`). - `oxfmt --check` and `oxlint` are clean on the touched files. Co-authored-by: Ayaan Zaidi <[email protected]>
* fix: preserve completed Claude tool calls in chat history * fix: preserve completed Claude tool calls in chat history OpenClaw-Publication: d3a267f1-3ba5-4fc9-a4dd-3968148f8eb1 (cherry picked from commit a27b4e6) Follow-ups: 49492d7 fix: align Control UI tooling and docs with task card removal (#207747) [not selected for this narrow backport]; cebbb78 fix: keep tagged silent replies out of chat (#207738) [not selected for this narrow backport]; d4e1305 fix: hide desktop Details when there is nothing to show (#205093) [not selected for this narrow backport]; 11b2cf0 fix: keep the selected Review file compact when the tree is open (#203825) [not selected for this narrow backport]; 4be636b feat(ui): offer Add to Home agent when Home sidebar is open (#207773) [not selected for this narrow backport]; f766de4 fix: surface favorites and recommended models in picker search (#201450) [not selected for this narrow backport]; 61a7661 improve(ui): remove suggested-task cards from Control UI (#199167) [not selected for this narrow backport]; 48cc039 fix: keep long process names compact above mobile output (#203767) [not selected for this narrow backport]; 9316f05 fix: show the first message when session naming fails (#205607) [not selected for this narrow backport]; aa4a68f fix(ui): show chat completions as activity rows (#201891) [not selected for this narrow backport]; ec209d0 fix(ui): link selection sessions to their source session (#206509) [not selected for this narrow backport]; 3f475cc fix(ui): keep pre-final assistant text visible after a completed turn (#140835) [not selected for this narrow backport]; 05ec989 fix: keep chat photo previews sharp within their byte limits (#206461) [not selected for this narrow backport]; b3bdfb5 feat(ui): preview CSV chat attachments as tables (#206148) [not selected for this narrow backport]; 6b3ccab fix: show Waiting and Resumed for Claude CLI subagent handoffs (#206158) [not selected for this narrow backport]; 762aa00 fix: keep dictation recording when switching tabs or applications [not selected for this narrow backport]; d3f9fca fix: keep similar subagent names distinct in compact rows (#203777) [not selected for this narrow backport]; 864efbb improve: keep composer error cards on one line (#204337) [not selected for this narrow backport]; d7ed2dd fix: stop replaying Claude progress updates in active chats (#203970) [not selected for this narrow backport]; 269f884 fix: show Claude CLI document uploads only once in chat (#203866) [not selected for this narrow backport]; 4708bac fix(ui): show Linear artwork in chat tool activity (#204414) [not selected for this narrow backport] Co-authored-by: RomneyDa <[email protected]>
## Problem Six Control UI e2e fixtures declare a `sessionInfo` row without `key`. The Gateway never sends one: `chat.history` and `chat.startup` build the row with `key: canonicalKey`, the `GatewaySessionRow.key` shape. The tests pass only because the session roster row supplies the key. #205607 made `chatSessionPresentationTitle` read `source.key`, and #207513 fixed three fixtures that crashed on the same keyless shape. These six are the remaining keyless rows. They are green today, but they test a row the product never receives. Affected sites (base `24b7801f`): - `chat-flow.queue-edit.e2e.test.ts:129` and `chat-outbox-recovery.e2e.test.ts:143`: a static `chat.history` response with a keyless row. - `chat-async-questions.e2e.test.ts:174` and `:251`, `chat-widget-retention.e2e.test.ts:87`, `chat-worked-for-visualization.e2e.test.ts:144`: keyless `sessionInfo` rows. - `board-fixture.e2e.test.ts:354`: the `chat.startup` expectation matched a keyless row. ## Fix Tests only, no product change. This is the same approach as #207513. - queue-edit and outbox-recovery drop their static `chat.history` response and use the keyed row that the mock derives from `sessions`. The static response described the same empty, idle session. - The three async-question, widget-retention and worked-for fixtures declare `key: sessionKey` on their rows. - board-fixture now also asserts `key: "agent:main:main"` on the preview Gateway's `chat.startup` row. Net diff: +12 / −26 across 6 test files. ## User impact None. Only test fixtures change. ## Evidence - The 6 touched files pass 3 of 3 runs: 37 / 37 tests each run (`test/vitest/vitest.ui-e2e.config.ts`). - `oxfmt --check` and `oxlint` are clean on the touched files. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit e48d979) Release adaptation: None; source applies intact to current stable owner. Companion audit: PR #207521 is the selected test-fixture alignment. Preserve existing asserts; keyed session rows model the shipped browser events. Co-authored-by: RomneyDa <[email protected]>
Release adaptation: Keep current recap lease and profile checks, return deliberate role refusals without retry, and snapshot only the admitted model restriction for each observer run. Adapt role regression fixtures to the stable admission API. Companion audit: #206962 already committed as the ordered companion. #207774 plugin generation handling is already in stable. #207262 cancellation, #205607 title fallback, and #208460 provider routing are separate existing behaviors; #207247 is follow-up documentation. (cherry picked from commit 6d8d1f5) Co-authored-by: RomneyDa <[email protected]>









What Problem This Solves
When automatic naming fails, a session can end up with a random nickname or show its checkout instead of the conversation. If the first message is already available, it can also briefly replace the loading state before the generated name arrives.
User Impact
During initial naming the header keeps its loading bar and the sidebar reserves the title line. A generated name appears directly; if naming fails, a short excerpt of the first message appears instead. Later attempts keep the excerpt visible until a generated title is available. Naming does not change activity order. A textless session keeps its checkout or “New session”; neither the excerpt nor an eventual rename changes its branch.
Why This Change Was Made
For dashboard sessions, the naming owner records that a fallback is available, not the message or a made-up name. The roster reads the excerpt from the transcript for failed sessions; the existing branch-naming path still uses a real title or its own two-word fallback. The header menu first appears next to the settled title rather than moving from a provisional position. Replacing or resetting a session clears the previous conversation’s excerpt. Existing explicit and saved names are unchanged. Native iOS and Android session keys retain their saved two-word fallback because the shipped apps do not display derived titles.
Evidence
Clean and annotated before/after captures show the pending title, the first-message fallback, and recovery. Chromium at 1280 × 680 with the same synthetic Gateway fixture. Focused browser checks exercise success, failure, retry, manual rename, and stable sidebar bounds.
Chromium against the built Control UI and an isolated real Gateway (
d5c987d2a96c), with a controlled title provider: sampled every animation frame from Start session through navigation. No frame showed “New session” or the message excerpt while initial naming was held. After the provider failed, both the header and sidebar showed the first message; they kept it during retry and then displayed “Release checklist”. This exercised the real transport and session store, not a failure at an external model service.The native transport regression failed with no saved fallback before the compatibility fix and passed for both iOS and Android session keys. The local P0–P2 autoreview against
bad21b1eba43flagged the old title cache in the index and verified the correction that is now in087d6502d3ca. No additional actionable findings were identified. Againstbad21b1eba43with Node 24.22.1, Chat boot grew by 62 B gzip and New Session by 55 B, with no new requests; total CSS decreased by 28 B to 348,653 B, under the 348,683 B limit.A Gateway regression test showed that an identity-only invalidation retained the previous transcript excerpt. With the fix, it clears the cached title and uses the replacement transcript. The focused backfill, topology, and archived-session suites passed (55 tests). This change does not alter the UI assets shown in the captures.
The placement recovery replay failed after reload when the test Gateway returned a session without its key. With the same valid session row in the roster, description, and history responses, all nine Unicode and first-turn recovery cases passed in bundled Chromium. Only the test fixture changed; the original assertions and shipped UI are unchanged.
🦞 Made with OpenClaw