Repository navigation
fix: resume Settings autosave after Reload Config - #147136
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 13, 2026, 2:16 PM ET / 18:16 UTC (Revision 4). ClawSweeper reviewWhat this changesRoutes Settings reloads through the shared draft-discard operation so successful reloads restore autosave, preserves offline drafts, and removes unused reset paths. Merge readiness✅ Ready for maintainer review This remains a useful fix: current main retains the faulty reload path, and the related merged work does not supersede it. No actionable introduced defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI keeps a local settings draft and sends revision-checked writes to the Gateway. Its write coordinator manages autosave, reconnect pauses, and explicit discard or reload actions. flowchart TD
A[Settings edits] --> B[Local configuration draft]
B --> C[Write coordinator]
D[Reload Config] --> C
C --> E{Fresh read succeeds?}
E -->|Yes| F[Replace draft and resume autosave]
E -->|Offline or failed| G[Keep pending draft]
F --> C
C --> H[Gateway configuration writes]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -18, Tests +99, Docs +5. Total +86 across 18 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep reload and discard lifecycle decisions in the existing write coordinator, preserving offline drafts and resuming autosave only after a successful reload. Do we have a high-confidence way to reproduce the issue? Yes: retain an interrupted form edit across reconnect, choose Reload Config, then make a fresh edit. Current-main source leaves the reconnect latch set; the supplied browser regression reports that exact failure before the fix. Is this the best way to solve the issue? Yes: reusing the existing discard owner fixes the missed lifecycle transition without adding another reset mechanism, and reloadOnly preserves the pages' offline behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 83b9a532ef4c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
90dfba0 to
55bf0c5
Compare
Route page reloads through the config write coordinator so a successful reload retires the reconnect latch. Preserve offline drafts with the existing discard operation's reload-only mode and remove the parallel discard entry point. The real Agents browser regression failed before the fix and passes afterward. All four browser cases, 294 owner/caller tests, changed-file checks, and independent P2 review passed.
The UI moved to discardDraft in #107458. Remove the leftover capability and coordinator method, retire its duplicate test scenario, and use the real discard action or write suspension in remaining tests. All 293 owner/caller tests and independent P2 delta review passed. The full changed gate and startup-size investigation remain in progress.
55bf0c5 to
6f93387
Compare
|
Merged via squash.
|
* commit 'cf45ff4d6a9c13164463db860285a02c1c4f2e8c': test(macos): observe readiness cancellation and deadline ownership (#145056) fix(ci): route QA Profile Evidence to its run-status owner test (#147293) fix(install): preserve runtime links when Node validation fails (#147221) test(auto-reply): reuse memory session fixtures (#147262) fix: hide subagent sessions from Activity (#147253) ci: record resources for slow runtime test commands (#147254) fix(update): recognize FreeBSD boot identities in triage leases (#147243) refactor(active-memory): share closing tag line scan (#147031) fix: resume Settings autosave after Reload Config (#147136) fix(cli): keep conversation context after cancellation (#147139) fix(channels): make system-agent approval cards actionable (#147152) refactor: retain shared database handles until their last worker closes (#147246) refactor(slack): share workspace-qualified target resolution (#147024) refactor(msteams): remove duplicate quoted-table test (#147270)
* commit 'ac59d5e09eb468dc23cf95e447608b57e71b52af': (176 commits) improve(gateway): avoid redundant startup preflight work (#147285) test(macos): observe readiness cancellation and deadline ownership (#145056) fix(ci): route QA Profile Evidence to its run-status owner test (#147293) fix(install): preserve runtime links when Node validation fails (#147221) test(auto-reply): reuse memory session fixtures (#147262) fix: hide subagent sessions from Activity (#147253) ci: record resources for slow runtime test commands (#147254) fix(update): recognize FreeBSD boot identities in triage leases (#147243) refactor(active-memory): share closing tag line scan (#147031) fix: resume Settings autosave after Reload Config (#147136) fix(cli): keep conversation context after cancellation (#147139) fix(channels): make system-agent approval cards actionable (#147152) refactor: retain shared database handles until their last worker closes (#147246) refactor(slack): share workspace-qualified target resolution (#147024) refactor(msteams): remove duplicate quoted-table test (#147270) fix(qa): bind coverage IDs to producer assertions (#144000) fix(linux): explain FreeBSD desktop setup prerequisites (#147211) fix(memory): split embedding batches rejected for an input array item cap (#139541) test: isolate timing metadata persistence from inherited settings (#147112) refactor(status): retire test-only helper publication (#147071) ...
* fix: resume Settings autosave after reloading config Route page reloads through the config write coordinator so a successful reload retires the reconnect latch. Preserve offline drafts with the existing discard operation's reload-only mode and remove the parallel discard entry point. The real Agents browser regression failed before the fix and passes afterward. All four browser cases, 294 owner/caller tests, changed-file checks, and independent P2 review passed. * refactor: retire the unused Settings reset operation The UI moved to discardDraft in openclaw#107458. Remove the leftover capability and coordinator method, retire its duplicate test scenario, and use the real discard action or write suspension in remaining tests. All 293 owner/caller tests and independent P2 delta review passed. The full changed gate and startup-size investigation remain in progress.
What Problem This Solves
Fixes form edits remaining unsaved after reconnecting and choosing Reload Config in Settings.
User Impact
A successful reload discards the old draft and restores autosave for subsequent edits. Reloading while offline still preserves pending edits, including when the connection drops while an earlier save is settling.
Why This Change Was Made
Page reloads drained pending writes and replaced the draft without clearing the write coordinator's reconnect latch. All five callers now use that coordinator's existing discard operation. Its reload-only option preserves the pages' offline behavior; the footer's local discard behavior and background refreshes remain intact. The competing discard entry point, unused load-options export, and synchronous reset operation whose UI callers were removed in #107458 are retired. Production code decreases by 18 lines.
Evidence
The browser regression failed before the fix: after reconnecting, reloading, and selecting a new model, the UI returned to Autosave paused after reconnect and sent no
config.set. After the fix, the same flow saved the fresh edit against the reloaded revision.That CI run failed only extension lint and the aggregate gate because main's Workboard test did not await its asynchronous harness cleanup. Main now includes that fix. This PR has been refreshed onto
fc1975991f22403d4a8a723c2a27071bbc16d55fwith the same patch; fresh CI for the rebased head is pending.No operator Gateway or real provider/channel was used.