Repository navigation
fix: background requests delay opening chats - #147845
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: needs maintainer review before merge. Reviewed September 14, 2026, 12:47 AM ET / 04:47 UTC (Revision 2). ClawSweeper reviewWhat this changesPrioritizes opening Control UI chats over automatic sidebar, automation-status, and platform reads, and limits model-catalog invalidation to the affected conversation. Merge readiness✅ Ready for maintainer review No blocking defect found. Current main still exhibits the targeted behavior, and the maintainer has explicitly addressed the prior latency-evidence concern. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI loads conversation history and supporting data through the Gateway. Its startup scheduler and scoped caches determine when background requests run and which conversation data needs refreshing. flowchart TD
A[Open conversation] --> B[Load history]
B --> C[Transcript ready or failed]
C --> D[Background scheduler]
D --> E[Sidebar and automation refreshes]
C --> F[Optional header hydration]
G[Session change events] --> H[Invalidate matching conversation cache]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +40, Tests +253, Docs +3. Total +296 across 17 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep foreground admission and conversation-scoped invalidation with their existing owners while preserving immediate explicit refreshes and saved preferences. Do we have a high-confidence way to reproduce the issue? Yes, source establishes premature restored-filter reads and agent-wide catalog retirement; the supplied browser regression targets these conditions. This review did not execute a reproduction or measure live latency. Is this the best way to solve the issue? Yes. Reusing existing admission, hydration, and identity owners is a focused repair, with explicit refreshes and persisted settings preserved. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fe645cd77de7. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
d09e096 to
a538f6e
Compare
|
Merged via squash.
|
* 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) ...
Main fails its startup check: 362,012 B exceeds 361,938 B. Use the approved 1 KiB cap increase for scoped catalog invalidation (#147845), remote workspaces (#147773), and update-status feedback (#147883). Deferring the new workspace labels saved only 64 B and still failed at 361,952 B. Baseline 362,012 B; the 512 B growth and 64 B variance allowances are unchanged. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01QnwfB1PDNraoifmaDYPBPJ
Main fails its startup check: 362,012 B exceeds 361,938 B. Use the approved 1 KiB cap increase for scoped catalog invalidation (#147845), remote workspaces (#147773), and update-status feedback (#147883). Deferring the new workspace labels saved only 64 B and still failed at 361,952 B. Baseline 362,012 B; the 512 B growth and 64 B variance allowances are unchanged.
AI-assisted. ## What Problem This Solves Main fails its own structural checks, so every open PR is red: `check-lint-core-2` (the sidebar session-ownership test helper is over the 700-line rule since #147610), the chat transcript controller test (over the 1,000-line rule since #147612), and `control-ui-performance` (startup JS gzip 362,012 B exceeds the 361,938 B limit after #147845, #147773 and #147883). ## Why This Change Was Made These repairs belong on main, in one PR. - Lint: the avatar cases move from `session-ownership.ts` into a sibling case file in the directory's existing pattern (610 lines remain). Assertions and registration are unchanged. - Chat lint: the four deferred-message-reveal cases move into a sibling test file. Their assertions, names and shared setup/cleanup remain unchanged, and the canonical test list preserves their isolated runner. - Budget: the smallest whole-KiB cap step, 353 → 354 KiB, with the baseline refreshed to the measured 362,012 B. Deferring the new workspace labels saved only 64 B and still failed at 361,952 B, so a reduction was not available; the immediate Home and diagnostic frames stay intact. Follows #147574 and #146526. ## User Impact None. No product behavior or asset changes. ## Evidence - Lint: the max-lines check fails on main and passes here; 426 sidebar tests pass. - Chat lint: pinned main fails at 1,010 counted lines; the candidate merge passes the same lint rule. All 146 affected chat tests pass, including the four moved cases in the isolated runner. The local preflight and test-root partition checks pass. - Budget: same-toolchain comparison, last passing source 361,718 B, main 362,016 B (+298 B), fresh main and this candidate both 362,012 B (0 B asset delta). `pnpm ui:check-performance:base <main>` fails before the policy refresh and passes afterward. 552 focused tests pass. ## Compatibility Cap 353 → 354 KiB; baseline 362,012 B; the 512 B growth and 64 B variance allowances are unchanged. ## Consumers The performance check and the build size report read the same policy; the sidebar test suite registers the moved cases from the new file, and both UI test runners retain isolated chat-test registration. Co-authored-by: Ayaan Zaidi <[email protected]>
* fix(ui): prioritize opening chats over background reads * perf(ui): keep metadata refresh policy lazy
AI-assisted. ## What Problem This Solves Main fails its own structural checks, so every open PR is red: `check-lint-core-2` (the sidebar session-ownership test helper is over the 700-line rule since openclaw#147610), the chat transcript controller test (over the 1,000-line rule since openclaw#147612), and `control-ui-performance` (startup JS gzip 362,012 B exceeds the 361,938 B limit after openclaw#147845, openclaw#147773 and openclaw#147883). ## Why This Change Was Made These repairs belong on main, in one PR. - Lint: the avatar cases move from `session-ownership.ts` into a sibling case file in the directory's existing pattern (610 lines remain). Assertions and registration are unchanged. - Chat lint: the four deferred-message-reveal cases move into a sibling test file. Their assertions, names and shared setup/cleanup remain unchanged, and the canonical test list preserves their isolated runner. - Budget: the smallest whole-KiB cap step, 353 → 354 KiB, with the baseline refreshed to the measured 362,012 B. Deferring the new workspace labels saved only 64 B and still failed at 361,952 B, so a reduction was not available; the immediate Home and diagnostic frames stay intact. Follows openclaw#147574 and openclaw#146526. ## User Impact None. No product behavior or asset changes. ## Evidence - Lint: the max-lines check fails on main and passes here; 426 sidebar tests pass. - Chat lint: pinned main fails at 1,010 counted lines; the candidate merge passes the same lint rule. All 146 affected chat tests pass, including the four moved cases in the isolated runner. The local preflight and test-root partition checks pass. - Budget: same-toolchain comparison, last passing source 361,718 B, main 362,016 B (+298 B), fresh main and this candidate both 362,012 B (0 B asset delta). `pnpm ui:check-performance:base <main>` fails before the policy refresh and passes afterward. 552 focused tests pass. ## Compatibility Cap 353 → 354 KiB; baseline 362,012 B; the 512 B growth and 64 B variance allowances are unchanged. ## Consumers The performance check and the build size report read the same policy; the sidebar test suite registers the moved cases from the new file, and both UI test runners retain isolated chat-test registration. Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #145679
What Problem This Solves
Fixes unnecessary startup work when opening a chat with saved sidebar filters or while other conversations are active.
User Impact
The conversation gets priority over automatic sidebar and automation-status refreshes. Explicit filter changes stay immediate, and messages can still queue while history loads without losing the next draft. No configuration or migration is required.
Why This Change Was Made
Use the existing connection bootstrap and after-paint hydration owners for restored filters, cron inventory, and optional platform information. Model catalogs now invalidate for the affected canonical conversation, including agent-qualified aliases. Same-conversation changes, global updates, and ambiguous scopes retain their freshness safeguards. Metadata-only refresh rules stay with the lazy metadata owner so they do not add eager startup code.
Evidence
The review concern about unmeasured live latency is acknowledged. The reproduced request-ordering defect and preserved interaction tests justify landing this bounded repair. Production latency remains a post-deployment acceptance check; no measured latency improvement is claimed for this candidate.
The screenshots show the same held-history flow, with a queued message still available. Request ordering is checked by the executable regression.