Skip to content

fix(ui): discard stale config state on explicit reload - #72624

Merged
vincentkoc merged 4 commits into
mainfrom
clownfish/ghcrawl-156594-autonomous-smoke
Apr 27, 2026
Merged

vincentkoc merged 4 commits into
mainfrom
clownfish/ghcrawl-156594-autonomous-smoke

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

Credits

Validation

  • pnpm check:changed
  • pnpm -s vitest run ui/src/ui/controllers/config.test.ts ui/src/ui/app-channels.test.ts ui/src/ui/views/agents.browser.test.ts
  • Fresh Codex /review must pass before merge consideration.

ProjectClownfish replacement details:

@vincentkoc vincentkoc added the clawsweeper Tracked by ClawSweeper automation label Apr 27, 2026
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Apr 27, 2026
@greptile-apps

greptile-apps Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds an explicit discardPendingChanges option to loadConfig / applyConfigSnapshot so that user-initiated Reload Config actions wipe stale local edits, while background/recovery refreshes (e.g. after a failed save) preserve in-progress drafts. The three app-render.ts call sites and handleChannelConfigReload are updated to pass { discardPendingChanges: true }, handleChannelConfigSave is reworked to use the boolean return of saveConfig to decide whether to keep or discard drafts, and a post-save Nostr profile refresh now re-bases the form on the server-normalized snapshot.

Confidence Score: 4/5

PR is safe to merge; the logic is sound, tests cover the key paths, and no P0/P1 defects were found.

All changed call sites that use discardPendingChanges: true are user-initiated actions (button clicks verified in nodes.ts). The applyConfigSnapshot flag logic is correct for both the preserve and discard branches, including the new configFormDirty = false write. The handleChannelConfigSave error-preservation dance is validated by a dedicated test. No security concerns or data-loss paths were identified.

No files require special attention.

Reviews (1): Last reviewed commit: "fix(clownfish): address review for ghcra..." | Re-trigger Greptile

@vincentkoc
vincentkoc force-pushed the clownfish/ghcrawl-156594-autonomous-smoke branch from 951a88e to 27aa107 Compare April 27, 2026 17:01
@vincentkoc

Copy link
Copy Markdown
Member Author

ProjectClownfish follow-up: rebased this branch on current main and kept the changelog entry with the current Unreleased fixes.

Remote Blacksmith validation passed: pnpm test:serial ui/src/ui/controllers/config.test.ts ui/src/ui/app-channels.test.ts (31 tests).

@vincentkoc

Copy link
Copy Markdown
Member Author

ProjectClownfish follow-up pushed: 045f1e8a3

Fix:

  • aligned the channel config test host with the current ConfigState update-status fields that landed on main

Blacksmith validation:

  • pnpm check:changed
    • passed on Blacksmith after the test-host fix

@vincentkoc
vincentkoc merged commit d9bef3f into main Apr 27, 2026
66 checks passed
@vincentkoc
vincentkoc deleted the clownfish/ghcrawl-156594-autonomous-smoke branch April 27, 2026 18:10
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
* fix(ui): discard stale config state on explicit reload

* fix(clownfish): address review for ghcrawl-156594-autonomous-smoke (1)

* fix(clownfish): address review for ghcrawl-156594-autonomous-smoke (1)

* test(ui): align channel config host state
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
* fix(ui): discard stale config state on explicit reload

* fix(clownfish): address review for ghcrawl-156594-autonomous-smoke (1)

* fix(clownfish): address review for ghcrawl-156594-autonomous-smoke (1)

* test(ui): align channel config host state
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
* fix(ui): discard stale config state on explicit reload

* fix(clownfish): address review for ghcrawl-156594-autonomous-smoke (1)

* fix(clownfish): address review for ghcrawl-156594-autonomous-smoke (1)

* test(ui): align channel config host state
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
* fix(ui): discard stale config state on explicit reload

* fix(clownfish): address review for ghcrawl-156594-autonomous-smoke (1)

* fix(clownfish): address review for ghcrawl-156594-autonomous-smoke (1)

* test(ui): align channel config host state
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
* fix(ui): discard stale config state on explicit reload

* fix(clownfish): address review for ghcrawl-156594-autonomous-smoke (1)

* fix(clownfish): address review for ghcrawl-156594-autonomous-smoke (1)

* test(ui): align channel config host state
vixco pushed a commit to vixco/openclaw that referenced this pull request Aug 16, 2026
* fix(ui): discard stale config state on explicit reload

* fix(clownfish): address review for ghcrawl-156594-autonomous-smoke (1)

* fix(clownfish): address review for ghcrawl-156594-autonomous-smoke (1)

* test(ui): align channel config host state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui clawsweeper Tracked by ClawSweeper automation maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant