Repository navigation
fix: keep empty chats free of message-loading placeholders - #201495
Conversation
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: b4bdcb2a-54d1-4b38-935a-008bd0848940
|
🦞👀 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 maintainer review before merge. What this changesShow chat message placeholders only when transcript metadata confirms saved messages exist. Example: Open an empty chat at 1280 × 900 while its initial history response is pending.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR addresses a verified UI bug that remains on main, and no definite introduced defect was found; current-head browser CI still needs attribution. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherTranscript writers and bounded backfill supply history-presence facts through Gateway session rows, which the Control UI uses to choose loading presentation. flowchart LR
A[Transcript storage] --> B[Writer and backfill]
B --> C[Session row projection]
C --> D[Gateway session responses]
D --> E[Chat pane observation]
E --> F[Transcript presentation]
Technical reviewBest possible solution: Keep history presence with the existing transcript owner and use its optional fact solely to control placeholder presentation. Do we have a high-confidence way to reproduce the issue? Current-main source shows the faulty loading condition, and the linked report supplies held-history reproduction plus inspected before/after captures; this review ran no target code. Is this the best way to solve the issue? The implementation fixes the missing history-presence distinction through existing owners, preserves loading and announcement lifecycle, and introduces no separate cache or Template-specific policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 826a79b4de07. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +116, Tests +341, Generated 0. Total +457 across 50 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. LabelsLabel 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 (3 earlier review cycles)
Reviewed November 18, 2026, 9:19 PM ET / November 19, 2026, 02:19 UTC (Revision 4). |
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 02c4a33d-a944-438a-801f-796e7f93da9c
Live Gateway proof for 7793163Tested published head Results
ScopeThis used a loopback OpenAI Responses model stand-in, not external model inference. The Gateway, state migration, agent execution, transcript writes, public RPCs, authentication and Chromium UI were real. There were exactly two provider calls (one per conversation). No transcript or Local build commit Gateway log on candidate start: Empty-chat assertions: {
"before": { "totalMessages": 0, "hasMessages": false },
"emptyFrames": { "frames": 12, "placeholderFrames": 0, "maxPlaceholders": 0 },
"after": { "totalMessages": 2, "hasMessages": true },
"sameSession": true
}Placeholders counted: visible Environment: Node v24.20.0, Chromium, Linux sandbox. Commandsnpm view openclaw dist-tags.latest
git fetch --no-tags --filter=blob:none --depth=1 https://github.com/openclaw/openclaw.git 7793163470c25ff7dd7b5c4ea7dbe74b24be080a
git rev-parse HEAD^{tree} 7793163470c25ff7dd7b5c4ea7dbe74b24be080a^{tree}
pnpm build
npm pack [email protected] --json --min-release-age=0 --pack-destination <runtime>/stable
npm install --no-audit --no-fund --min-release-age-exclude='@openclaw/*' ./openclaw-2026.11.5.tgz
openclaw gateway run --port 43195 --bind loopback # stable, then candidate on the same state
openclaw gateway call chat.history --json --params '{"sessionKey":"agent:main:main","limit":20}'
openclaw gateway call sessions.create --json --params '{"agentId":"main","label":"Empty history proof"}'
openclaw gateway call sessions.describe --json --params '{"key":"<returned key>"}'The browser and model stand-in ran from task-local helpers that are not part of this PR. Not checkedExternal model inference, a full CI rerun, load or performance qualification. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 279e5bca-e2a3-4791-b3f4-66df012053c2
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 391adf29-289d-4d96-b87a-dd9f552e1997
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: cc1bc785-00a4-49fa-98d7-b0ec77584f32
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 7f342502-44c9-4384-b03a-fed447cbe042
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 485de1cd-61b6-40a8-81d5-1225898152b2
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 5571a277-b4b5-480a-b58e-f9075beba162
…201495) * fix: keep empty chats free of message-loading placeholders Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: b4bdcb2a-54d1-4b38-935a-008bd0848940 * Publish openclaw/kind-langoustine-3 Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 02c4a33d-a944-438a-801f-796e7f93da9c * Publish openclaw/kind-langoustine-3 Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 279e5bca-e2a3-4791-b3f4-66df012053c2 * Publish openclaw/kind-langoustine-3 Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 391adf29-289d-4d96-b87a-dd9f552e1997 * Publish openclaw/kind-langoustine-3 Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: cc1bc785-00a4-49fa-98d7-b0ec77584f32 * Publish openclaw/kind-langoustine-3 Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 7f342502-44c9-4384-b03a-fed447cbe042 * Publish openclaw/kind-langoustine-3 Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 485de1cd-61b6-40a8-81d5-1225898152b2 * Publish openclaw/kind-langoustine-3 Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 5571a277-b4b5-480a-b58e-f9075beba162 --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: daniel-lxs <[email protected]>
Fixes #201479
What Problem This Solves
Opening a new empty chat can show message-loading bubbles even though no saved messages exist. This also affects chats opened during Template setup and makes an empty conversation look as though it is waiting for old messages.
User Impact
Empty chats stay clear. Existing chats with confirmed saved messages keep their loading skeleton until those messages arrive. When history presence is unknown, the conversation stays neutral; history requests, drafts, and composer readiness are unchanged. No configuration change or migration is required.
Why This Change Was Made
The loading flag describes several startup operations, not whether saved messages exist. The existing transcript writer and bounded metadata backfill expose an optional
hasMessagesfact. Empty sessions get that fact during ordinary row preparation, before publication; legacy preview enrichment remains optional. Data-free boot and route shells remain neutral.Pending-history lifecycle remains separate from bubble presentation, so loading saved history does not announce it as a new reply. A presented pane without any observed row can discover metadata for a concrete, non-global chat, including on mobile without a sidebar roster. This optional lookup accepts only a present row and cannot clear or replace facts already accepted through history or another reader. Unresolved and global targets retain their existing history-admission ordering. Queued Stop refreshes and authoritative row retirement retain their original behavior.
There is no Template-specific flag, new cache, schema migration, or separate transcript count request. The startup repair’s
pr-simplifypass removed the broad missing-hasMessagesrefresh and its compensating retirement exception. The existing two-caller refresh helper moved unchanged into the existing pane-state module to keep the observation module within its line limit. That startup repair changed two production files (+85/-65, including the helper relocation), with no test or fixture edits and no new retry machinery.Evidence
Full shard comparison and main merge
Published head:
8a46c874e528ea00396ff4778d9297e316f6ebaa. It retains the normal merge of main1c1f00b3into1d8fe06, without rewriting branch history.The reported cached-reader anchor failure did not reproduce in two complete runs per revision. PR
1d8fe06and pinned main1bdaaeb3used identical 107-file selections and cold launch order, Node 24.22.1, and four workers. CI's displayed job 6/10 is native Vitest shard 6/9 because the tenth matrix slot belongs to the browser extension.Runs were detached and alternated, with separate logs. Selection came from the repository's ordinary-PR UI planner and was checked unchanged before each run. The runner used
--config test/vitest/vitest.ui-e2e.config.ts --configLoader runner --maxWorkers 4 --shard 6/9, with the CI include file and real-Gateway/production-artifact exclusions. This was a Debian 12 sandbox, not the hosted Ubuntu image. Rootless browser libraries were supplied in the workspace; Playwright's system-ldconfig-only host check was skipped after actual library-loading and Chromium/WebKit launch checks. No test assertions or runtime browser sandbox flags were relaxed.With no reproduced product defect, current main was merged as requested. The merge exposed the template suite's 1,000-line lint limit. The
pr-simplifypass moved the two generic empty/saved-history cases into the existingchat-loading-deadlines.e2e.test.tssuite, retaining their Gateway setup, boot/history holds, captures, and assertions. Template-specific checks stayed in the catalog suite. No production behavior was changed; placeholders still requirehasMessages === true.After merging and reorganizing tests: 172 unit/component tests and 77 browser tests passed, including the unchanged six-case snapshot-fidelity file. Targeted typecheck, lint, format, generated validators, protocol checks, and diff checks passed. The published tree matches the tested tree. This is local proof, not a claim that new-head CI has finished.
Quota and archived-row follow-up
Follow-up proof covers local source commit
c734b7cdb1f9d4f0432ce19a99f8888996c35d77, tree40da254c52c284fedac8acf5c2e4a977dedd8874. The publish request was interrupted by a Gateway restart; this evidence does not by itself confirm publication.46b2047c. Reintroducing only the old broad startup lookup reproduces both failures; restoring the repair passes the complete six-case quota suite unchanged. The expected 30% context usage remains correct; the missing 24% value is the selected provider’s quota, not context usage.pr-simplifykept the repair to one existing test fixture loop and two existing helper imports: +16/-6 test lines, no production changes. It also removed duplicate projection disposal because the existing fixture owner already disposes it. No assertions, waits, or timeout limits were changed. The excluded plugin Install-disabled timeout and Android Maven failure were not modified.Startup repair evidence
Startup repair head:
46b2047c760ba6e24cb92b17a15e9e45e582cd97.The seven failures reported on
481ea8breproduced locally, then passed with their original assertions unchanged. The final focused run passed 93 tests across five files, including all four reported suites and the pane-state suite. The final browser run passed 15 selected cases across four files, covering desktop/mobile saved-history loading, request priority, expired Incognito replacement, plain empty chats, and Template setup. The other 24 browser cases were deliberately unselected, not failures.UI typecheck, scoped lint, formatting, and
git diff --checkpass. The moved refresh helper's body and signature were checked against the previous source and are unchanged. Existing Solid reactivity warnings remain. The browser checks exercise the production Control UI with synthetic Gateway responses, not external model inference.Auto Review attempts for the startup repair and the archive fixture follow-up timed out without returning validated reports. No clean independent-review verdict or full new-head CI result is claimed.
Earlier repair evidence
The preceding
481ea8brepair verified 99 backend tests, 164 UI/fixture tests, and 75 additional ownership tests. Its broad browser run passed 133/134; after repairing the remaining Incognito replacement issue, its 15-case recovery/mobile rerun and eight original empty-chat, Template, saved-history, and geometry checks passed. Those counts are previous-head evidence, not a claim that the complete matrix was rerun for this follow-up.Backend row preparation prevents optional empty-history backfill from republishing unrelated rows. Fixture metadata derives from configured saved history while preserving explicit unknown overrides and empty pages with older history. Only genuinely empty-history expectations changed in the earlier repair; loaded-history and duplicate-text assertions remain intact. Node shards 8 and 23 and Android Wear's Maven 429 remain outside the requested repair.
Clean comparison
Before: an empty chat shows message-loading placeholders.
After: the same empty chat stays clear while history is pending.
Annotated comparison
Before: the arrow points to placeholder bubbles despite empty history.
After: the corresponding conversation area stays neutral.
Plain empty chat, 1280 × 900, light theme, real Control UI with synthetic Gateway history held. Before:
0a399569bwith the regression test. After: local source commit18191ed60; annotations use copies of those captures.Latest focused test commands
Native test pools were bounded with
GOMAXPROCS=4 RAYON_NUM_THREADS=4 TOKIO_WORKER_THREADS=4 ROLLDOWN_WORKER_THREADS=4. Browser checks used the existing task-local Chromium, libraries, font configuration, and Playwright browser cache.Contributor credit
Reported and co-authored by @daniel-lxs.
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by