Repository navigation
fix(ui): keep chat and drafts usable when connections fail - #162428
roboclaw-bot merged 19 commits into
Conversation
Keep account-scoped chat, drafts, queues, and loaded visualizations usable during interrupted connections. Reconcile uncertain delivery without replay and show recovery in the existing connection status. Prepare a bounded offline app shell while retaining native HTTP authentication. Co-authored-by: steipete <[email protected]>
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 460948d0-663a-40d6-a1b3-187bfe9fa4ee
|
🦞👀 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. Reviewed October 1, 2026, 6:25 PM ET / 22:25 UTC (Revision 12). ClawSweeper reviewWhat this changesThe PR preserves chat, drafts, queued messages, and loaded widgets during connection failures and adds account-scoped offline reload with browser-data migration. Merge readiness⛔ Blocked before merge - 4 items remain Keep open: this remains useful work absent from current main and the latest release. No concrete introduced correctness defect was found; the remaining human question is verification of the reported owner acceptance. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI connects browser chat and widgets to the Gateway. Its local recovery stores preserve presentation and unsent input, while live Gateway admission controls server actions. flowchart TD
A[Gateway sign-in] --> B[Retained account identity]
B --> C[Account-scoped browser storage]
D[Connection failure] --> E[Cached chat and editable drafts]
C --> E
E --> F[Live account revalidation]
F --> G[Reconcile or send queued input]
Decision needed
Why: The contributor reports acceptance, but the available review surface could not independently inspect that decision; code and runtime proof cannot establish maintainer intent. Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Preserve account-owned local recovery and live revalidation before server actions under an explicitly accepted browser-profile visibility contract. Do we have a high-confidence way to reproduce the issue? Yes, from source and supplied before/after evidence: current main and v2026.9.7 reject proxy/password/Tailscale warm admission, while the PR demonstrates offline retained chat and drafts. This review did not execute target code. Is this the best way to solve the issue? Yes for the recovery architecture: it extends existing storage and presentation owners while keeping server actions dependent on live admission. Acceptance of the expanded offline visibility contract remains a human question. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2f4808320cf8. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
Resolve actual boot and composer-presence conflicts. Preserve live-only agent discovery while projecting account-bound routing defaults; retain manual history retry after deadlines and keep unrelated cold sign-ins alive during peer cache retirement. Co-authored-by: steipete <[email protected]>
|
@clawsweeper re-review Please review exact head c4a9bb7 after the actual main-conflict integration. Local independent review findings were repaired, with scoped regressions and production offline/account-isolation plus HTTP-auth proxy proof. The existing PR body records the integration and retains its visual evidence. |
|
🦞👀 Re-review progress:
|
Account for the unscoped recovery source before retiring Blob bytes. Break the outbox type-import cycle at its leaf owners. Validate mutually exclusive route preload variants independently while retaining startup reference, path, and integrity limits. Co-authored-by: steipete <[email protected]>
|
@clawsweeper re-review Exact head 61a03e7 fixes the retained-unscoped-Blob finding, with four red/green partial-transfer regressions (20 tests passed), the CI type-import cycle, and production route-asset admission (40 tests passed, unchanged per-page limits). Scoped native autoreview is clean. Maintainer acceptance has been reverified against the owner-authenticated originating work session linked in the body; it is not awaiting a new product decision. Existing visual evidence and credit are preserved. |
|
🦞👀 Re-review progress:
|
Generate Kysely declarations through the existing owner before direct typed lint and before striped children skip preparation. Keep core lint independent of plugin declaration builds and preserve metadata, focused syntax-only, and caller-owned preparation paths. Co-authored-by: steipete <[email protected]> (cherry picked from commit 74354d5)
Resolve the current main preload-owner conflict by sharing facade and grouped-module entry discovery with offline assets. Preserve native route preload optimization and the offline sign-in gate without duplicate dependency traversal. Co-authored-by: steipete <[email protected]>
Keep copied lint-status and changed-lint fixtures complete after typed runners gained their Kysely prerequisite. Preserve all process-lifetime, signal, timeout, and semantic-lint assertions. Co-authored-by: steipete <[email protected]>
…-5 bundle A) (#172989) * refactor(ui): remove unused page plumbing and duplicate presentation work Fold sole-caller Config and Cron adapters into their existing owners, reuse canonical controller types, and remove unused request arguments and login selection options. Adopt the complete background mutation receipt instead of rereading the write; keep authoritative preflight and live ownership checks. Best-effort tradeoffs accepted: a later background edit in another browser is reflected by normal preference events or refresh, not an unconditional read of our own successful write. The introducing feature PR #168301 does not identify a human incident requiring that reread. Settled rendering and public contracts are unchanged; both shipping renderer paths remain intact. * refactor(ui): consolidate presentation helpers and cached preview inputs Share point-menu trigger attributes and deletion-first LCS traversal. Remove an obsolete empty-badge predicate, a one-caller loading facade, and redundant whole-map translation fallback. Preserve both active Lit and Solid paths, positioning formulas, diff work budgets, visible text, and rendering. Best-effort tradeoffs accepted: - Trust successful synchronous Web Storage writes instead of reading them back. Introducing PR #162428 supplied synthetic storage failures, not a human incident where successful setItem silently failed. Nonconforming Storage replacements may miss a cache publication until the next refresh. - Trust immutable message/tool-card identities for cached source previews. PR #148431's in-place mutation assertions were synthetic; production owners publish replacement snapshots. Unsupported in-place mutation may leave a decoration stale until replacement. Run/frame/origin and external source validation remain unchanged. Net production reduction: 76 lines; tests: 20 lines removed, only synthetic same-object mutation assertions. Kept config coercion tied to human Safari report #13348, along with security, durability, ordinary navigation ownership, and all active migration paths. Focused proof: 73 boot/cache/diff tests, 82 menu tests, 46 badge/assistant tests, 20 i18n tests, 8 browser details tests, 3 lint-suppression tests; UI typecheck, formatting, stylesheet lint and CSS declaration parity passed. Known inherited local check failure: environment-variable count is 455 against budget 454, independently reproduced against clean HEAD/index. Its counted source roots exclude UI. No budget or unrelated source changes made. * refactor(ui): remove obsolete presentation compatibility and styling Use the native Popover capability required by the Control UI bootstrap instead of retaining old-engine in-flow fallbacks. Keep native overlay occlusion and all real connection/navigation ownership. Remove retired sidebar style hooks and share identical question-panel declarations. Supported browsers render identically; no user-visible copy, feature, renderer selection, config, protocol, or storage change. Best-effort tradeoffs accepted - Old engines without Popover support, or invalid direct popover mounts, no longer receive an in-flow menu fallback. The fallback came from #105598 as generic compatibility, not a human incident; #168595 made native Popover support a required bootstrap capability. Invalid direct mounts now fail clearly rather than silently changing layering. Deeper coverage and retained candidates are recorded in the requested task-local y03 ledger for coordinator bundling. Branch total: 123 net production LOC removed (+114/-237), excluding tests, fixtures, generated files and declarations. Below the 500-line campaign floor after the deeper components/app/lib/styles and lead-owned owner pass; push branch-only for bundling. * refactor(gateway): reuse server method owners Consolidate duplicate catalog response handling, optional catalog reads, pairing resolution, requester assertions and system agent transcript persistence. Carry prepared pairing and actor facts instead of probing or re-reading them. Remove redundant cache-generation and internal receipt checks; retain security, durability, pagination and resource bounds. Best-effort tradeoffs accepted: - Pairing captures its selected adapter once. Repeated internal checks added by #112401 guarded hypothetical in-place plugin mutation, not a reported incident. Such a mutation now leaves this request on its selected adapter; later requests discover the current registration. - Channel identity RPCs trust the canonical mutation result instead of repeating the action/kind assertion introduced in #161284. No human incident justified the redundant adapter assertion; live mutation authority remains with the state owner. No user-facing feature, protocol/config/persistence shape, schema, dependency, test coverage or standalone session memory backend changes. Net production reduction: 100 lines (179 added / 279 deleted). Type-aware lint, targeted production types, formatting, runtime cycles (zero), SDK surface, suppression audit and independent P2 review pass. Gateway focused suites and the full static import graph remain incomplete on the loaded host; retain these proof gaps for the coordinator bundle rather than claiming green. * refactor(gateway): trust prepared server method inputs Remove a test-only config cache-reset wrapper, duplicate internal selection and channel-support checks, an unused session-file metadata fallback, and duplicate usage target shapes. Carry transcript delivery facts from their first parsing pass. Keep all network validation, effect authority, transcript durability, current update policy and standalone session memory machinery. Best-effort tradeoffs accepted: - Internal agent updates trust the selection-shape check at their sole production caller, agents.update. The duplicate originated in the Models agent-selection feature #150224; the same boundary check still rejects invalid user input. Live runtime choice validation stays at the effect. - Channel start support is checked once at the synchronous request boundary. The inner check from #67815 / #167159 cannot observe a different plugin without unsupported synchronous mutation; the boundary guard remains. - Workspace-root readers require caller-prepared metadata: both production consumers already provide it. The unused fallback from #161747 is deleted, not the Phase E backend or any factory. A future invalid internal caller gets a clear error instead of starting another metadata read. - Update handlers trust the required getRuntimeConfig contract instead of falling back to a global schedule for an invalid context. Keep #158301's real scheduler-policy incident fix and its post-await current-config read. - Usage summaries trust the canonical required target identity from #169660; the first-instance fallback served no production caller. The integration fixture now supplies that identity with all original assertions retained. No public schema/config/SDK/protocol or persisted shape changes. The config tests call the same canonical invalidators directly; no coverage is removed. Follow-up removes 54 net production lines; branch total removes 154. Targeted types (including MCP consumers), retained-file type-aware lint, formatting, zero runtime import cycles, suppression audit and independent P2 review pass. Gateway behavioral suites remain incomplete after a loaded-host startup run was stopped at about ten minutes (exit 143). The prior full static-graph gap remains pending for the coordinator bundle; no new production edge is added. * refactor(ui): consolidate page lifecycle and config plumbing Reuse the existing controller host, subscription and plugin-icon owners; share cloud-worker config edit wiring and Usage query comparisons. Remove the unused Usage detail predicate and duplicate model loading flag. Retire the Web Awesome-era picker hiding fence now that native Popover owns generation-bound close completion. Keep both rendering paths, draft recovery, user-intent checks and dispatch-time write authority. Settled rendering is unchanged. Net production reduction: 210 lines. Best-effort tradeoffs accepted: - Failed channel artwork retries on the next channel refresh rather than a queued trailing ensure. #131511 was a synthetic ordering regression; the human-reported owning-plugin bug #144152 remains covered. - Picker triggers may reopen during closing. #126032's fence came from CI/synthetic overlap, not a human incident; #171441 transferred lifecycle ownership to native Popover, which ignores superseded completions. Focused proof: 281 tests passed, including Chromium/WebKit overlay lifecycle and responsive placement controls. Independent P0-P2 review: scoped-clean. Final UI production and UI-pages test typechecks passed; suppression tests 3/3. Scoped lint passed after a mechanical no-lonely-if fix. Runtime and static import cycles: zero. No visual or locale changes. The global environment-name budget is inherited at 455/454 on both the untouched base and origin/main; none of its counted source roots changed. * refactor(ui): remove unused new-session hiding selector * refactor(gateway): retain legacy catalog and update handler contracts Withdraw two wave-5 cleanups after focused CI failures and bounded isolated replay. Preserve the existing scalar-read concurrency and update-status handler contract. Tighten task-suggestions assertion allowance to match the cleaned source.
## What Problem This Solves An aborted IndexedDB transaction could report that an account-scoped chat snapshot clear succeeded, even though its cached records remained. ## User Impact Explicit scope clearing now reports transaction errors. Ordinary single-session cache eviction remains best effort. No schema, rendered UI, config, or protocol changes. ## Why This Change Was Made Use the existing transaction completion owner instead of treating complete, error, and abort as equivalent success events. The narrow regression uses a real IndexedDB transaction abort and verifies the record was not deleted. ## Best-effort tradeoffs accepted - Single-session eviction remains intentionally best effort; explicit scope clearing rejects on failure. No new best-effort concession is introduced. The swallowed transaction outcomes originated in #162428 and survived #167780/#168206; the regression demonstrates the bug without claiming a human incident. Net production LOC: **2 removed**. This is a silent-failure bug fix, exempt from the cleanup batch floor. ## Evidence - Before repair: the scope-clear regression failed because its promise resolved instead of rejecting; the single-session control passed. - After repair: 23 tests passed across the new invalidation regression and the existing snapshot store suite. New regression bodies: 6 ms; loaded-host wrapper: 167.37 s (Vitest 112.44 s). - Formatting and `git diff --check` pass. - Independent P0-P2 review found no issue in this packet. The complete multi-packet review found one unrelated MCP diagnostic issue, corrected separately. - Targeted production and regression graph typecheck passes, including after the fixture lint repair. Runtime import cycles: zero. Production import edges are unchanged, so this cut cannot add a static import component. The full madge scan was stopped after30minutes without a result; no full static scan pass is claimed. - Changed-file check: conflict-marker and line-cap gates pass. Max-lines itself passed but its combined command failed on inherited environment-count ratchet drift (452 variables, budget453). The subsequent broad assertion scan was deliberately stopped after the aggregate command exceeded20minutes; no passing aggregate check is claimed. - Lint-suppression test:2/3 pass, existing inventory mismatch96vs94 in untouched `ui/src/test-helpers/control-ui-streaming-reply.ts` (no-unnecessary-type-conversion and unbound-method, two each). No baseline/suppression changes. Exact-head hosted CI remains the broad gate. - Targeted source-backed lint found one unbound-method reference in the regression. The fixture now binds the native method to its test database; no suppressions were added. The fixed graph typecheck and affected two-case regression pass (120.26s wrapper /71.77s Vitest; bodies435ms). No fixed-head lint pass is claimed; exact-head hosted lint is required before merge. The change does not modify rendering; behavior is proved at the IndexedDB boundary. Exact-head hosted CI run38824831588 completed with the ci-gate successful; no failed jobs, CI reruns, dispatches or green-only pushes. Hosted lint supplies the fixed-fixture lint gate. Earlier draft-only skipped CI is not counted as proof.
…-5 bundle A) (openclaw#172989) * refactor(ui): remove unused page plumbing and duplicate presentation work Fold sole-caller Config and Cron adapters into their existing owners, reuse canonical controller types, and remove unused request arguments and login selection options. Adopt the complete background mutation receipt instead of rereading the write; keep authoritative preflight and live ownership checks. Best-effort tradeoffs accepted: a later background edit in another browser is reflected by normal preference events or refresh, not an unconditional read of our own successful write. The introducing feature PR openclaw#168301 does not identify a human incident requiring that reread. Settled rendering and public contracts are unchanged; both shipping renderer paths remain intact. * refactor(ui): consolidate presentation helpers and cached preview inputs Share point-menu trigger attributes and deletion-first LCS traversal. Remove an obsolete empty-badge predicate, a one-caller loading facade, and redundant whole-map translation fallback. Preserve both active Lit and Solid paths, positioning formulas, diff work budgets, visible text, and rendering. Best-effort tradeoffs accepted: - Trust successful synchronous Web Storage writes instead of reading them back. Introducing PR openclaw#162428 supplied synthetic storage failures, not a human incident where successful setItem silently failed. Nonconforming Storage replacements may miss a cache publication until the next refresh. - Trust immutable message/tool-card identities for cached source previews. PR openclaw#148431's in-place mutation assertions were synthetic; production owners publish replacement snapshots. Unsupported in-place mutation may leave a decoration stale until replacement. Run/frame/origin and external source validation remain unchanged. Net production reduction: 76 lines; tests: 20 lines removed, only synthetic same-object mutation assertions. Kept config coercion tied to human Safari report openclaw#13348, along with security, durability, ordinary navigation ownership, and all active migration paths. Focused proof: 73 boot/cache/diff tests, 82 menu tests, 46 badge/assistant tests, 20 i18n tests, 8 browser details tests, 3 lint-suppression tests; UI typecheck, formatting, stylesheet lint and CSS declaration parity passed. Known inherited local check failure: environment-variable count is 455 against budget 454, independently reproduced against clean HEAD/index. Its counted source roots exclude UI. No budget or unrelated source changes made. * refactor(ui): remove obsolete presentation compatibility and styling Use the native Popover capability required by the Control UI bootstrap instead of retaining old-engine in-flow fallbacks. Keep native overlay occlusion and all real connection/navigation ownership. Remove retired sidebar style hooks and share identical question-panel declarations. Supported browsers render identically; no user-visible copy, feature, renderer selection, config, protocol, or storage change. Best-effort tradeoffs accepted - Old engines without Popover support, or invalid direct popover mounts, no longer receive an in-flow menu fallback. The fallback came from openclaw#105598 as generic compatibility, not a human incident; openclaw#168595 made native Popover support a required bootstrap capability. Invalid direct mounts now fail clearly rather than silently changing layering. Deeper coverage and retained candidates are recorded in the requested task-local y03 ledger for coordinator bundling. Branch total: 123 net production LOC removed (+114/-237), excluding tests, fixtures, generated files and declarations. Below the 500-line campaign floor after the deeper components/app/lib/styles and lead-owned owner pass; push branch-only for bundling. * refactor(gateway): reuse server method owners Consolidate duplicate catalog response handling, optional catalog reads, pairing resolution, requester assertions and system agent transcript persistence. Carry prepared pairing and actor facts instead of probing or re-reading them. Remove redundant cache-generation and internal receipt checks; retain security, durability, pagination and resource bounds. Best-effort tradeoffs accepted: - Pairing captures its selected adapter once. Repeated internal checks added by openclaw#112401 guarded hypothetical in-place plugin mutation, not a reported incident. Such a mutation now leaves this request on its selected adapter; later requests discover the current registration. - Channel identity RPCs trust the canonical mutation result instead of repeating the action/kind assertion introduced in openclaw#161284. No human incident justified the redundant adapter assertion; live mutation authority remains with the state owner. No user-facing feature, protocol/config/persistence shape, schema, dependency, test coverage or standalone session memory backend changes. Net production reduction: 100 lines (179 added / 279 deleted). Type-aware lint, targeted production types, formatting, runtime cycles (zero), SDK surface, suppression audit and independent P2 review pass. Gateway focused suites and the full static import graph remain incomplete on the loaded host; retain these proof gaps for the coordinator bundle rather than claiming green. * refactor(gateway): trust prepared server method inputs Remove a test-only config cache-reset wrapper, duplicate internal selection and channel-support checks, an unused session-file metadata fallback, and duplicate usage target shapes. Carry transcript delivery facts from their first parsing pass. Keep all network validation, effect authority, transcript durability, current update policy and standalone session memory machinery. Best-effort tradeoffs accepted: - Internal agent updates trust the selection-shape check at their sole production caller, agents.update. The duplicate originated in the Models agent-selection feature openclaw#150224; the same boundary check still rejects invalid user input. Live runtime choice validation stays at the effect. - Channel start support is checked once at the synchronous request boundary. The inner check from openclaw#67815 / openclaw#167159 cannot observe a different plugin without unsupported synchronous mutation; the boundary guard remains. - Workspace-root readers require caller-prepared metadata: both production consumers already provide it. The unused fallback from openclaw#161747 is deleted, not the Phase E backend or any factory. A future invalid internal caller gets a clear error instead of starting another metadata read. - Update handlers trust the required getRuntimeConfig contract instead of falling back to a global schedule for an invalid context. Keep openclaw#158301's real scheduler-policy incident fix and its post-await current-config read. - Usage summaries trust the canonical required target identity from openclaw#169660; the first-instance fallback served no production caller. The integration fixture now supplies that identity with all original assertions retained. No public schema/config/SDK/protocol or persisted shape changes. The config tests call the same canonical invalidators directly; no coverage is removed. Follow-up removes 54 net production lines; branch total removes 154. Targeted types (including MCP consumers), retained-file type-aware lint, formatting, zero runtime import cycles, suppression audit and independent P2 review pass. Gateway behavioral suites remain incomplete after a loaded-host startup run was stopped at about ten minutes (exit 143). The prior full static-graph gap remains pending for the coordinator bundle; no new production edge is added. * refactor(ui): consolidate page lifecycle and config plumbing Reuse the existing controller host, subscription and plugin-icon owners; share cloud-worker config edit wiring and Usage query comparisons. Remove the unused Usage detail predicate and duplicate model loading flag. Retire the Web Awesome-era picker hiding fence now that native Popover owns generation-bound close completion. Keep both rendering paths, draft recovery, user-intent checks and dispatch-time write authority. Settled rendering is unchanged. Net production reduction: 210 lines. Best-effort tradeoffs accepted: - Failed channel artwork retries on the next channel refresh rather than a queued trailing ensure. openclaw#131511 was a synthetic ordering regression; the human-reported owning-plugin bug openclaw#144152 remains covered. - Picker triggers may reopen during closing. openclaw#126032's fence came from CI/synthetic overlap, not a human incident; openclaw#171441 transferred lifecycle ownership to native Popover, which ignores superseded completions. Focused proof: 281 tests passed, including Chromium/WebKit overlay lifecycle and responsive placement controls. Independent P0-P2 review: scoped-clean. Final UI production and UI-pages test typechecks passed; suppression tests 3/3. Scoped lint passed after a mechanical no-lonely-if fix. Runtime and static import cycles: zero. No visual or locale changes. The global environment-name budget is inherited at 455/454 on both the untouched base and origin/main; none of its counted source roots changed. * refactor(ui): remove unused new-session hiding selector * refactor(gateway): retain legacy catalog and update handler contracts Withdraw two wave-5 cleanups after focused CI failures and bounded isolated replay. Preserve the existing scalar-read concurrency and update-status handler contract. Tighten task-suggestions assertion allowance to match the cleaned source.
## What Problem This Solves An aborted IndexedDB transaction could report that an account-scoped chat snapshot clear succeeded, even though its cached records remained. ## User Impact Explicit scope clearing now reports transaction errors. Ordinary single-session cache eviction remains best effort. No schema, rendered UI, config, or protocol changes. ## Why This Change Was Made Use the existing transaction completion owner instead of treating complete, error, and abort as equivalent success events. The narrow regression uses a real IndexedDB transaction abort and verifies the record was not deleted. ## Best-effort tradeoffs accepted - Single-session eviction remains intentionally best effort; explicit scope clearing rejects on failure. No new best-effort concession is introduced. The swallowed transaction outcomes originated in openclaw#162428 and survived openclaw#167780/openclaw#168206; the regression demonstrates the bug without claiming a human incident. Net production LOC: **2 removed**. This is a silent-failure bug fix, exempt from the cleanup batch floor. ## Evidence - Before repair: the scope-clear regression failed because its promise resolved instead of rejecting; the single-session control passed. - After repair: 23 tests passed across the new invalidation regression and the existing snapshot store suite. New regression bodies: 6 ms; loaded-host wrapper: 167.37 s (Vitest 112.44 s). - Formatting and `git diff --check` pass. - Independent P0-P2 review found no issue in this packet. The complete multi-packet review found one unrelated MCP diagnostic issue, corrected separately. - Targeted production and regression graph typecheck passes, including after the fixture lint repair. Runtime import cycles: zero. Production import edges are unchanged, so this cut cannot add a static import component. The full madge scan was stopped after30minutes without a result; no full static scan pass is claimed. - Changed-file check: conflict-marker and line-cap gates pass. Max-lines itself passed but its combined command failed on inherited environment-count ratchet drift (452 variables, budget453). The subsequent broad assertion scan was deliberately stopped after the aggregate command exceeded20minutes; no passing aggregate check is claimed. - Lint-suppression test:2/3 pass, existing inventory mismatch96vs94 in untouched `ui/src/test-helpers/control-ui-streaming-reply.ts` (no-unnecessary-type-conversion and unbound-method, two each). No baseline/suppression changes. Exact-head hosted CI remains the broad gate. - Targeted source-backed lint found one unbound-method reference in the regression. The fixture now binds the native method to its test database; no suppressions were added. The fixed graph typecheck and affected two-case regression pass (120.26s wrapper /71.77s Vitest; bodies435ms). No fixed-head lint pass is claimed; exact-head hosted lint is required before merge. The change does not modify rendering; behavior is proved at the IndexedDB boundary. Exact-head hosted CI run38824831588 completed with the ci-gate successful; no failed jobs, CI reruns, dispatches or green-only pushes. Hosted lint supplies the fixed-fixture lint gate. Earlier draft-only skipped CI is not counted as proof.
What Problem This Solves
Fixes: slow or interrupted connections replace usable chat and visualizations with errors, strand message delivery, and prevent previously signed-in users from reopening their work offline.
User Impact
Users can keep reading cached conversations, editing text and attachment drafts, and queuing messages after a connection loss or an offline reload. Recovery appears in the existing bottom-left connection indicator, not a second chat banner. Loaded widgets retain their local interaction state.
Offline reload requires a prepared browser cache and an explicit browser-offline signal. Server actions and uncached external resources still require a connection. Previously signed-in proxy, Tailscale, and password users gain local access without storing their password or new bearer credentials; sending waits for account revalidation. People with access to the browser profile can read retained local data.
Migration: the derived transcript cache moves from IndexedDB version 3 to 4; unscoped old history is discarded and refilled online rather than assigned to another account. Unsent legacy drafts and queues remain available for explicit recovery, never automatic reassignment or sending. Retention limits remain unchanged; rollback does not turn account-qualified input back into an unowned queue.
Why This Change Was Made
Keep presentation alive independently of connection authority. Retry transient reads within their existing recovery windows, reconcile uncertain writes using the original message ID, and scope local work to its Gateway/account. Same-client account replacement, stale handoffs, cross-tab retirement, and explicit credential-forget cannot transfer another account’s input. The service worker prepares only integrity-bound build assets and a generic shell, retains native online HTTP-auth navigation, and resumes interrupted preparation without holding updates indefinitely.
The offline-access and account-isolation contract was explicitly accepted by @steipete in the linked work session.
Evidence
Full UI inventory exercised: 1,605/1,605 files, once each, on the checksum-pinned CI Bun runtime. The run recorded 23,795 passing tests, five stale retention assertions in one fixture, and one existing opt-in skip. The five assertions were corrected without changing production code; the corrected fixture and boot-owner siblings then passed 63/63 tests with zero lint warnings/errors. The original full run is retained as-is, not relabeled green.
Final isolated browser suite: 133/133 tests across all 17 files passed, with no skips. This includes real-Gateway Inspector pairing, offline/recovery fences, account-scoped drafts and attachments, queued delivery, loading deadlines, navigation, widgets, and reconnect reconciliation. Official Playwright 1.63 image; one worker; owned container positively removed.
Fresh production build and unchanged performance budgets passed. Latest rebuilt startup JS: 372,295 B gzip, 52 B below the enforcement limit. Startup CSS: 50,705 B, 495 B below its hard ceiling; the existing advisory warning remains. Chat/New boot use 32/27 requests, below 35. No budget or baseline relaxed.
Production Chromium/SW proof passed all eight account/offline stages and four native HTTP Basic proxy stages, with zero page errors. Offline navigation came from the service worker while a network probe failed. Original-account retention, different account/Gateway fencing, return to the original account, and “Forget this browser” were exercised. Proxy proof observed 17 native challenges and 113 authenticated asset requests.
Production UI types and all five canonical UI test type graphs passed, with scoped typed lint, formatting, line-count and assertion-safety ratchets. All tracked source, dependency and runtime fingerprints stayed unchanged during final browser/build proof. The account/proxy proof used build 2026.9.7-64b426373e23-2026-10-01T21-06-21.168Z; build/performance checks also passed after the private-export cleanup at 53ed9b1.
Independent review findings were reproduced and repaired. The final automated routing warning was rejected after inspecting the sole production getter and router call chain: offline defaults are null while connected, scoped to the current account/Gateway, and refreshed by live discovery; focused runtime-owner tests passed. No unresolved actionable P0–P2 finding remains. Hosted exact-head CI/review gates are still separate requirements; local proof is not a hosted-CI or merge claim.
Hosted dependency failure repaired: the obsolete global roster-generation export is now private, its test observes the existing account-scoped getter, and an unused legacy test helper was removed. Both complete Knip scans, 44 focused tests, affected production/test type graphs and typed lint pass. No dead-code suppression or production behavior change.
All eight cases in four additional browser files pass in scoped runs. Speech hydration now inspects the authenticated snapshot key; elapsed-time proof advances heartbeat callbacks chronologically and verifies one connection/send; catalog readiness keeps the same enabled-control assertion. Worker-update tests use the exact staged build-plus-digest cache, real install gate and generic shell. Instrumented reproduction established that network-isolated Chromium reported offline despite reachable loopback; a native online-state precondition preserves network isolation. The final diagnostic-free worker suite passed 4/4 in 38.96 seconds, with all draft, activation, asset-SHA and exact-one terminal-attach checks intact. No timing budgets or skips changed; WebKit was not run.
Integration and recovery repairs
Actual conflicts with main were resolved while retaining live-only agent discovery, warm pre-hello routing, history supersession, and Mermaid 12 worker handling. Existing landed CI prerequisites remain integrated unchanged. No main refresh was performed merely to chase branch movement.
Offline reload
Before
After
Connection recovery and visualization state
Before
After
Before
After
Requested by @steipete; implementation and verification by @roboclaw-bot.
Work sessions
Discussion, implementation and verification
Conflict integration, implementation and verification
CI prerequisite implementation and verification
Worked on by
View the OpenClaw team session