Repository navigation
fix(update): avoid slow preparation and clarify progress - #156227
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. |
|
@clawsweeper re-review Please review current head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed September 23, 2026, 7:51 AM ET / 11:51 UTC (Revision 11). ClawSweeper reviewWhat this changesThe PR improves updater scratch placement and progress displays, and prevents normalized file-editor text from creating phantom unsaved drafts. Merge readiness✅ Ready for maintainer review This remains useful work that current main does not fully provide. No blocking introduced defect was found, and the supplied evidence supports normal merge review. Priority: P2 Review scores
Verification
How this fits togetherThe updater preserves its running code while replacing an installation and publishes progress to the CLI and Control UI. The file editor separately tracks unsaved changes so interface reloads cannot discard edits. flowchart TD
A[CLI or Settings update] --> B[Inspect installation owner]
B --> C[Retain running updater outside replacement]
C --> D[Validate and replace installation]
C --> E[Recorded progress]
D --> E
E --> F[CLI and Control UI details]
G[File editor changes] --> H[Draft and reload protection]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +259, Tests +593. Total +852 across 28 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep retention outside every replacement boundary, preserve fallback and integrity checks, and derive progress and dirty state from their existing owners. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the cross-filesystem retention fallback and stale progress selection, with focused regressions supplied for both. This read-only review did not execute a current-main reproduction. Is this the best way to solve the issue? Yes. Sharing the installation-owner calculation and using editor-owned equality repair the existing boundaries without adding competing state or configuration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bab3136d3c60. 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 (10 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review Please review current head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Please review exact head 070a0a9. The only change since the completed 57c5e4a review synchronizes a lifecycle test with its real persistence promise; the PR body records the original-order red/green proof and the separate unresolved main-side chat fixture failure. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Please review exact head 8ff77e0. Native main integration retains main commit 897b8e9 unchanged for the sole lifecycle-test conflict, removing our redundant test delta. The updater/UI patch has identical stable patch ID to reviewed 57c5e4a. The body credits main-owned proof and labels the superseded intermediate test measurements explicitly. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Please review exact head |
|
@clawsweeper re-review Please review exact head c9e6d0c. The sole change since the reviewed fcf head replaces a gateway test wall-clock race with authoritative admission completion and existing same-socket response barriers. Exact terminal and replay assertions remain; no production or timeout changes. The PR body records injected-latency red/green proof, final-byte focused/type/format results, and independent review. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Please review exact head 344281e. Since completed c9e review, the sole change declares separately installed SwiftLint in the existing root Knip external-binary list. Canonical deadcode:full passes both standalone source and the exact failed hosted merge, with scoped and independent reviews clean. The body also records the remaining predecessor session CI failures without claiming their root cause or final-head outcome. |
|
@clawsweeper re-review Please review exact head bcdbc18. Signed integration resolves the concrete editor-owner conflict against frozen main 5ebe0d4: retain main's captureFileEditorDraft/read-only guard, pass canonical editor semantic dirty state, preserve both regression sets. Main's identical SwiftLint declaration removes our redundant config delta. Updater changes are unchanged. Fresh original-order Chromium35/35 and formatting pass; independent and scoped reviews are clean. The body explicitly discloses main-identical transcript type errors and local701-line policy result; final CI remains authoritative. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Please review exact head d9f9fcb. The only change after bcdb is signed integration of already-landed canonical main91ee6aa3de1072401b2ff6eb2dd724c276061dbc, required after the exact hosted merge reproduced its missing pane-id callback. All29 PR-delta files are byte-identical to the reviewed and browser-tested bcdb candidate. Main's session-fixture revert is also inherited. No new repair code, timeout, or weakened assertion. The PR body distinguishes main-owned proof, retained updater/editor proof and pending final-head CI. The preceding Claw worker is terminal. |
|
🦞👀 Re-review progress:
|
Compare content through CodeMirror's configured line separator for view synchronization and dirty tracking. Unchanged mixed-line-ending previews no longer block document reload, while serialized saves and actual edits remain protected. Reuse the reviewed editor repair from #156227, limited to the file viewer and its existing regression coverage. Co-authored-by: Vincent Koc <[email protected]>
* perf(ui): reduce redundant layout and shell updates Reuse unchanged sidebar inputs and lazily owned outbox projections. Avoid textarea resets at proven size bounds while retaining classic-scrollbar shrink, native editing, and scroll anchoring. Remove unused floating-card update bindings and approval forwarders. * fix(ui): avoid phantom drafts from file preview synchronization Compare content through CodeMirror's configured line separator for view synchronization and dirty tracking. Unchanged mixed-line-ending previews no longer block document reload, while serialized saves and actual edits remain protected. Reuse the reviewed editor repair from #156227, limited to the file viewer and its existing regression coverage. Co-authored-by: Vincent Koc <[email protected]> * fix(ui): invalidate draft indicators after Incognito retirement --------- Co-authored-by: Vincent Koc <[email protected]>
|
Merged via squash.
|
* perf(ui): reduce redundant layout and shell updates Reuse unchanged sidebar inputs and lazily owned outbox projections. Avoid textarea resets at proven size bounds while retaining classic-scrollbar shrink, native editing, and scroll anchoring. Remove unused floating-card update bindings and approval forwarders. * fix(ui): avoid phantom drafts from file preview synchronization Compare content through CodeMirror's configured line separator for view synchronization and dirty tracking. Unchanged mixed-line-ending previews no longer block document reload, while serialized saves and actual edits remain protected. Reuse the reviewed editor repair from openclaw#156227, limited to the file viewer and its existing regression coverage. Co-authored-by: Vincent Koc <[email protected]> * fix(ui): invalidate draft indicators after Incognito retirement --------- Co-authored-by: Vincent Koc <[email protected]>
…6227) * fix(update): avoid slow preparation and clarify progress * fix(update): keep native owner types independent * test(ui): scope update assertions to active details * test(gateway): await complete lifecycle persistence * fix(ui): retain typed chat route ownership predicates * fix(ui): compare file drafts using editor line endings * refactor(ui): simplify saved editor content comparison * perf(ui): keep update detail copy behind its lazy view * test(gateway): await dispatch error admission completion * fix(ci): declare the external SwiftLint binary
What Problem This Solves
Updates can spend many minutes copying their running updater when the temporary directory is on another filesystem. Settings meanwhile appears stuck on an opaque, already-completed diagnostic. Details are awkward to navigate, and the final report can overwhelm the page.
User Impact
This complements #155977: placing retention on another filesystem defeats that earlier hardlink optimization. The installed updater still controls the first hop that installs this fix. No live deployment or measured production speedup is claimed.
Why This Change Was Made
The retained updater owns scratch placement outside every installation boundary activation replaces, preferably on the source filesystem. npm, pnpm, Bun, Git, and package-to-Git conversion paths carry the actual installation owner through preparation. The native package-owner resolver is shared with activation; unwritable source siblings retain the existing temporary-directory fallback. Mixed hardlink/copy trees use canonical entry validation with the expected hardlink-induced inode change, preserving identity, mode, size and modification-time safeguards.
The UI renders the real retention step after diagnostics complete, groups diagnostic details, and presents readable labels. Display-only labels and retention help stay behind the existing lazy update-view boundary. Its English registrar runs synchronously for Settings-first and dialog-first entry.
One ancillary editor correction remains in the final diff:
captureFileEditorDraftremains the sole draft/hash writer, with its read-only guard; its caller passes the prepared semantic dirty fact. Serialized LF/CRLF/CR saves and real newer edits remain protected.Main independently adopted admission-owner completion and a same-socket history barrier for the dispatch-error test in test: finish Gateway cleanup and repair CI fixtures #156136. This integration retains that exact canonical test and removes the redundant PR test delta. No gateway production change or timeout increase is introduced.
Production delta: +259 net lines for retention placement/ownership and the requested UI capabilities, including +5 for the editor invariant. Tests: +593 net lines. Existing preflight cases move intact to a focused helper. Canonical main fixes for route types, lifecycle tests and the SwiftLint declaration are retained without redundant PR deltas.
Evidence
Current qualification
Head:
d3388f1494d1fa660f1150f789f574ce54d043a4, integrating frozen main0dd7810da88d7edb44977d9e7f2945381e9680a0after a concrete test conflict. Independent full-owner integration review found no issues. Fresh scoped autoreview reported no findings; its limited hunk context is supplemented by direct and independent complete owner/caller/dependency inspection. Exact-head ClawSweeper review is READY with no findings or remaining rank-up moves. Native preparation is complete; hosted exact-head gates are being reconciled for landing. Current CI ran at merged1299a1e27381c58a09112cd58f2a3a75fb5a62c(mainbab3136d3c6074faf0c91c409619969749885b7eplus this head): every executed test job passed, including UI6 and both previously affected gateway shards. One large30 job was cancelled before any runner or step; GitHub reports that no self-hosted runner acquired it. The single targeted infrastructure retry passed at 12:06:24 UTC, and attempt 2 including its required aggregate completed SUCCESS at 12:07:01 UTC. Prior successful jobs were carried forward, not rerun. No test failure or human cancellation was observed for this job. The PR remains open and unmerged; no gate bypass or replacement merge dispatch has occurred.The previous head
d9f9fcbc33011f74e3c58de2036e0e24ca94bf32completed CI run 35851693030, including its required aggregate, and ClawSweeper review was READY with no findings or rank-up moves. These results cover that historical head, not this integration. Its single focused UI 6 retry passed 78 files / 360 tests in 702.65 s; both gateway shards, all core type stripes, dependencies and Control UI performance also passed.Unresolved follow-up: identify the extra
sessions.listrequest owner if the session-ownership E2E failure recurs. Attempt 1 expected one request after 4,999 virtual milliseconds and observed two, with 359 other tests passing. Exact checkout was5fa275eeb849289b9d0f9dfd7548f0b0196e4eb3. One observational full-file run on that merge passed 14/14 (37.32 s Vitest; 38.74 s command): traces showed one request through 4,999 ms and the coordinator issuing the second at exactly 5,000 ms. Temporary instrumentation was restored and byte-verified. The failure was not reproduced; the successful single-job retry is qualification, not a source fix or a proven flaky-test diagnosis. No session-refresh or clock patch was made.Updater and UI proof
2026.9.5upgraded in-process to candidate9e0b7f1ec3a0f0360bd69bdca8523b4fcdea9ee2, then that candidate completed a second in-process update with legacy compatibility chunks absent. Both hops exited 0, preserved active service intent, changed the running PID, and left zero transaction residue: 303.9 s for the Docker cell. Later task updater changes remove a type-only import cycle. The final integration also inherits canonical main destination-storage and pre-canary schema checks; the earlier package artifact does not prove those inherited changes. Editor corrections have separate proof below. No missing-chunk negative control was recorded.Ancillary owner proof
The phantom-draft failure was exposed by #156208. Original ordered Chromium fixtures produced 28 passed / 4 failed; new regressions against original production code produced 25 passed / 10 failed. Corrected original-order fixtures (
chat-sidebar-file-view→chat-html-file→chat-file-drafts) pass 35/35, including the final integrated owner interface (11.6 s). Coverage includes read-only/editable mixed-line previews, actual edit/undo, conflict reloads, HTML previews without an editor, uniform save bytes and newer edits during save. Exact installed CodeMirror state 6.7.4 / view 6.43.11 source was inspected directly. Main's draft owner from 5f55b2a9858 and both regression sets are preserved.Historical gateway-test investigation used a temporary 2.2 s lifecycle persistence hold: the old test failed at 2.000 s before the actual error arrived at 2.805 s; the branch synchronization passed 253/253 in the same ordered 22-file group. This injected-latency proof motivated the completion-owner invariant but does not qualify the now-inherited canonical main test bytes. The final PR has no remaining gateway test delta; fresh CI qualifies that main implementation.
A local scoped lint run reported the panel's 701 counted lines against 700, identical to integrated main; canonical Actions policy treats that size limit as advisory. No rule, environment or assertion was weakened. Main's canonical footer-fixture type fix is included, and all previous-head core type stripes passed; final integration checks pass.
Test cost
Single-worker Linux measurements use the repository wrapper; E2E uses its canonical bundled configuration. These are focused proof measurements, not production timings.
src/cli/update-cli.test.tssrc/infra/update-retained-runtime.test.tssrc/infra/update-retained-runtime-tree.test.tsui/src/components/update-run-view.test.tsui/src/e2e/update-run.e2e.test.tsui/src/e2e/update-lifecycle.e2e.test.tsui/src/e2e/update-coalesced.e2e.test.tsThe CLI figure covers the existing suite, including relocated preflight cases. Runtime worker/import checks exercise replacement of an installed runtime; an in-memory mock cannot prove that boundary. No sleep, retry, larger timeout or permanent worker pin was added.
Progress details
Before:
After:
Final report
Before:
After:
All four public images were verified rendering with nonzero natural dimensions.