Repository navigation
fix(ui): main-session queued follow-ups use the wrong recovery history - #133067
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
3428766 to
1e4ebfd
Compare
Give mocked Gateway sessions one per-key identity and metadata owner while preserving explicit stale-response fault injection. Separate selected routes from configured main and maintain canonical pin/archive timestamps. Repair the main/global outbox alias collapse exposed by truthful fixtures. Preserve browser queues, drafts, attachments and original send attempts during migration; retain ambiguous legacy destinations unsent for explicit recovery. Keep captured identity, generation, connection and newer-input CAS fences. Fix async committed-state browser probes and remove redundant identity and routing adapters. Full mocked-browser proof passes 322 files / 1305 tests, complete changed checks and the normal Linux UI build before integration.
Honor advertised main-session identity and carry canonical per-agent metadata into the composer. Preserve immutable queued-edit ownership across routing and recovery changes without discarding unsaved corrections or weakening replacement CAS. Migrate affected fixture and storage assertions, with real history/reconnect boundary regressions.
Keep Work quota list and startup facts in one fixture, route split tool-title scenarios explicitly, and emit typing events for their actual owning agent. Preserve generation, freshness, pruning and sender-provenance assertions.
1e4ebfd to
275cfb1
Compare
|
Land-ready verification for d35363d. The canonical fixture/admission repair and approved conservative recovery are complete, including the landed Blob-storage contract. Captured destinations, original IDs/attempts, delivery uncertainty, byte custody and generation/CAS checks remain protected. The final CI-discovered import cycle was removed by relocating the shared attachment type; all five affected files emit identical JavaScript before/after that correction. No schema, storage-limit, configuration, dependency or test-timeout increase. Exact-head CI: 33309378076, attempt 1, green. All thirteen Control UI shard logs were audited and independently rechecked against the full discovered inventory: 330 files exactly once, 1,337 passed tests, zero failures/skips/todos. Every log checked out merge Clean-Linux proof: 33309439352, Blacksmith Testbox Commands executed for the final focused/static proof: node scripts/run-vitest.mjs run --config test/vitest/vitest.ui.config.ts --configLoader runner --maxWorkers 2 ui/src/pages/chat/outbox-blob-recovery.test.ts ui/src/pages/chat/composer-persistence.test.tsnode scripts/run-vitest.mjs run --config test/vitest/vitest.ui-isolated.config.ts --configLoader runner --maxWorkers 2 ui/src/pages/new-session/draft-persistence.test.tsnode scripts/check-changed.mjs --base origin/main --head HEAD --timedcorepack pnpm check:architecturenode scripts/ui.js buildThe canonical browser command was: node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner --shard "$SHARD_INDEX/$VITEST_SHARD_COUNT"It ran with shard indices 1–13, count 13, and Fresh complete-candidate and final type-only independent reviews returned no accepted P0 findings. Native review artifacts validate with READY FOR /prepare-pr. Latest ClawSweeper comment is its acknowledgement, with no actionable Rank-up list. Effective main rules require the CI gate and linear history; no admin bypass is being used. Proof gaps and retries: the earlier manual three-shard browser sweep was interrupted by worker EPIPE and remote exit 255 after the lease reported idle shutdown; it is not counted green. The final canonical 330-file run supplies complete browser proof. Current synthetic recovery/Blob before-and-after-state captures were personally inspected, but normal Final LOC: production +1,547/-1,214 (net +333); tests/support +4,581/-1,394 (net +3,187); docs +28/-2. The approved data-preserving recovery capability accounts for the production growth; duplicate identity/routing paths were removed. Proceeding through native preparation and squash merge. |
|
Merged via squash.
|
Visual proof for the landed recovery repairThese are the previously recorded, personally inspected captures from the actual Control UI with synthetic fixtures. They contain no live operator data and are not edited mockups. They were captured on integration The updated upload client now permits the normal protected attachment path, closing the earlier media-publication gap. Full land-ready proof includes all 330 mocked-browser files / 1,337 passing tests with zero skips. Before destination confirmationExplicit confirmationAfter confirmation and reloadLanded-v3 attachment retainedConfirmation does not send. Uncertain messages remain paused until explicit Retry; browser assertions separately verify original IDs/attempts and complete attachment bytes through transport and eventual retirement. |
openclaw#133067) * fix(ui): keep queued messages bound to their conversation Give mocked Gateway sessions one per-key identity and metadata owner while preserving explicit stale-response fault injection. Separate selected routes from configured main and maintain canonical pin/archive timestamps. Repair the main/global outbox alias collapse exposed by truthful fixtures. Preserve browser queues, drafts, attachments and original send attempts during migration; retain ambiguous legacy destinations unsent for explicit recovery. Keep captured identity, generation, connection and newer-input CAS fences. Fix async committed-state browser probes and remove redundant identity and routing adapters. Full mocked-browser proof passes 322 files / 1305 tests, complete changed checks and the normal Linux UI build before integration. * fix(ui): preserve scoped metadata and queued-edit custody Honor advertised main-session identity and carry canonical per-agent metadata into the composer. Preserve immutable queued-edit ownership across routing and recovery changes without discarding unsaved corrections or weakening replacement CAS. Migrate affected fixture and storage assertions, with real history/reconnect boundary regressions. * fix(ui): type queued-edit recovery through the client contract * test(ui): align session fixtures with typed gateway contracts * test(ui): keep incoming session fixtures coherent Keep Work quota list and startup facts in one fixture, route split tool-title scenarios explicitly, and emit typing events for their actual owning agent. Preserve generation, freshness, pruning and sender-provenance assertions. * fix(ui): keep attachment types outside storage runtimes




Closes #133059
Related: #132233 (generation-safe deletion/fixture follow-up), #133052 (landed large-attachment Blob storage), and #133085/#133149 (selected-session presentation ownership).
Merged to main as d708507a498b6cc2654ac5aa422f67cab6011a2f through native squash preparation/merge, from exact reviewed head
d35363d5eff30f2200cd5c01df17deb5c5fcee81. Exact-head CI is green, with independently audited complete mocked-browser coverage (330 files / 1,337 tests, zero skips) and passing clean-Linux static/build/architecture proof. Native merge receipt. The earlier interrupted manual sweep is recorded below and is not counted green. This is a merge, not a release announcement.What Problem This Solves
A follow-up queued in an agent's main conversation could remain parked after the current run finished, or remain unconfirmed after delivery, because browser outbox recovery read the separate global conversation. The mock Gateway concealed that mistake by returning one history/startup session ID for different keys. Its selected route also implicitly became configured main, and pin/archive patches did not maintain canonical timestamps.
Why This Change Was Made
Give fixture identity/metadata one per-key owner and resolve new browser outbox admissions through the configured canonical conversation identity. Captured persisted destinations stay immutable. Ordinary list/describe/history/startup responses agree; deliberate stale/case/sequence/deferred wire responses remain fault injection. Successful mutations commit at their response boundary; failed or unresolved operations do not.
The explicitly approved conservative migration writes a distinct v4 metadata namespace, importing v1/v2/landed-v3 while preserving messages, drafts, attachments, ordering, revisions, original attempt/run IDs and delivery uncertainty. Independently identifiable destinations migrate automatically. Ambiguous input remains unsent until an operator confirms an empty non-Incognito destination. Failed/no-op transfers retain sources, receipts fence replay, whole-source overflow is deferred without truncation, and newer-input CAS plus connection/incarnation checks remain intact. The independent durable-draft identity namespace remains unchanged.
The integration reuses the landed IndexedDB v2 opener/stores and scope-free queued Blob references. Retention accounts for raw active and recovery records across credentials: moving an entry into recovery is not retirement. Mixed-principal recovery is partitioned by existing payload ownership without exposing foreign rows. Exact queue/reference/Gateway/recovery/source-tab ownership, complete-batch validation, copied-tab uncertainty and held-lock-only deletion remain intact. Verified metadata commit/removal precedes byte cleanup. Pending recovery readiness cannot settle an awaited payload operation.
Canonical targets are captured before async Blob work and carried into admission. Admission success comes from the verified storage write, not a later credential-filtered projection after synchronous notifications. Related repairs respect advertised main identity, retain unsaved queued-edit custody, bind edit actions to immutable conversation/Gateway/recovery ownership, and preserve newer same-agent metadata when delayed history arrives. Main's selected-session implementation is reused; task detail compares the complete conversation identity rather than only
global. The browser committed-state helper awaits async predicates and exact IndexedDB transaction completion. No timeout or generation check is weakened.User Impact
Queued input stays with its captured conversation and agent across reloads, split panes and default/agent changes. Older ambiguous input gets a visible Saved messages need a destination recovery flow. Recovered entries remain paused for review/Retry; attempted messages keep delivery uncertainty, and drafts return without sending. Stale confirmation cannot overwrite newer input or silently discard an unsaved correction.
Large attachments retain their existing 25 MiB per-input / 250 MiB origin bounds, credential filtering and Blob lifetime guarantees. No claim is made to fix the distinct restored-idle queue wakeup repair.
Documentation change:
docs/web/control-ui.md; public page https://docs.openclaw.ai/web/control-ui#chat-behavior (the PR's new wording is not yet deployed).Evidence
ui/src/pages/. All logs ran mergedeae51f3604503869ce6e5198bf90afa45d354a7, whose parents are main4306140e0b8824fc8e41f19bdf1ef119e37247d9and the exact PR head. Matrix row 14 is a separate browser-extension job; it and the real-Gateway UI lane also passed and are excluded from the 330/1,337 totals.chat.history({sessionKey:"global",agentId:"main"})and remain queued. Real Gateway main/list/history/patch contracts were inspected. Raw-parent history identifies fix(ui): queue chat input while reconnecting #102781 (reconnect queue admission); feat(ui): surface queued-outbox counts in composer hint, session rows, and offline footer #112649 (outbox split) carried it forward.d05c8a3b1d7d66f752c89cacb2530b783708d85f, passed package UI 835 files / 12,791 tests (one existing skip), root shared 784 files / 12,142 tests (20 existing file exclusions / 86 skipped tests), isolated 31 files / 563 tests (one existing skip), complete changed gates and normal build 345,769 B / 346,761 B. These lanes overlap. Source fingerprints matched. Its separate manual three-shard browser sweep stopped incomplete with two Vitest workerEPIPEerrors, then remote command exit 255; the wrapper failure is authoritative despite the lease's underlying Actions job reporting success. The lease was stopped and independently verified completed. No complete browser result is claimed from that run.chat-types.ts, with all consumers migrated and no compatibility re-export. All five changed files emit byte-identical JavaScript versus the integration head. Full local architecture gate, both compiler programs, 70 tests in three whole owner files, lint/format and normal build 345,617 B / 346,761 B pass. The final exact-head Linux and hosted browser proof above both pass.Visual proof: Four inspected synthetic recovery and Blob captures are published here, showing the paused legacy entry, explicit destination confirmation, retained uncertainty after reload, and preserved Blob attachment. The published image bytes match the inspected local captures. The earlier upload-tooling gap was resolved using the normal protected client after its 0.5.16 update; no policy, authentication, PATH or guard bypass was used.
Size relative to integrated main
8b7d685b2a9228a7aa98b5338b0ad8534777cace: production +1,547/-1,214 (net +333) across 43 files; tests/support +4,581/-1,394 (net +3,187) across 124 files; docs +28/-2 (net +26). Positive production growth funds the approved data-preserving recovery capability and ownership boundaries. Core store, extracted retirement and composer persistence are net -27, -25 and -63 respectively; duplicate identity/routing paths were removed.No new dependency, product configuration, Gateway protocol, SQLite or IndexedDB schema change. No release/changelog work, operator Gateway/state changes, or agent transcripts.