Skip to content

fix(ui): reconcile superseded config refreshes after mutations - #140551

Merged
steipete merged 1 commit into
mainfrom
codex/ui-config-refresh-completion
Sep 7, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/ui-config-refresh-completion

Conversation

@steipete

@steipete steipete commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

A successful plugin or other external config mutation could show a configuration-refresh warning even when a later refresh had already loaded the new state. The original read reported that it was superseded, and the mutation treated that as a failed refresh.

Record completion at the config-read owner and follow actual later reads within the same connection. Every mutation still starts a fresh read after its RPC. A later failure remains a failure; writes, disconnects, and disposal release pending refresh waits. Ordinary loads keep their own result and recovery callback, and unsaved drafts retain their bytes and base hash.

Validation: both successful response-order regressions fail on main; 184 config tests pass with the fix. An independent browser check passed nine synthetic contracts, including the actual plugin Enable → config.get flow and browser capability checks for ordering, failures, drafts, reconnects, and callback ownership. No real Gateway or plugin backend is claimed. Independent Codex review and the full changed-file gate passed, including UI/test types and i18n. Paired, inspected screenshots show the false warning on main and successful completion with the fix under identical mocked Gateway traffic.

Production +97 lines records the actual read's completion and invalidation using the existing request versions and connection epochs. No new config, schema, dependency, or public API is introduced. This is independent of the larger plugin lifecycle work in #135599.

Before and after under identical mocked Gateway traffic:

Before: false refresh warning

After: completed refresh

@clawsweeper

clawsweeper Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Sep 7, 2026
@steipete steipete self-assigned this Sep 7, 2026
@clawsweeper

clawsweeper Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 8:51 PM ET / September 7, 2026, 00:51 UTC.

ClawSweeper review

What this changes

The Control UI follows superseding configuration reads after external mutations, preserving draft edits and reporting the actual refresh outcome.

Merge readiness

✅ Ready for maintainer review

The fix remains useful: current main can report a refresh failure after a newer read succeeds. No introduced correctness defect was found, and the related lifecycle PR does not supersede this focused repair.

Priority: P2
Reviewed head: 5e430ab74d3c8879343805377b0048bacbdfab5b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with meaningful ordering and lifecycle coverage and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its body reports the plugin Enable → configuration-refresh flow in a synthetic browser setup; linked captures were inaccessible here, and no live backend coverage is claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its body reports the plugin Enable → configuration-refresh flow in a synthetic browser setup; linked captures were inaccessible here, and no live backend coverage is claimed.
Evidence reviewed 8 items Current-main defect remains: Current main returns false for a superseded configuration load, and executeConfigExternalMutation converts that false result into a refresh warning even when another read has succeeded. The three production files are unchanged between the pinned merge base and fetched main.
Read completion stays with its lifecycle owner: The mutation refresh starts a new read, follows actual successors, and rejects connection changes or write invalidation. Ordinary loadConfig retains its own completion result; snapshot adoption rechecks ownership after the recovery callback.
Consumer and draft boundary: Plugin mutations translate the coordinator's refresh result into visible feedback. Snapshot adoption already retains dirty draft bytes and their original base hash; this patch preserves that path and does not change plugin APIs, authorization, or persisted configuration.
Findings None None.
Security None None.

How this fits together

The Control UI configuration coordinator serializes settings mutations and reloads configuration from the Gateway. Its results drive plugin-operation feedback and the settings editor’s snapshot while preserving unsaved drafts.

flowchart TD
  A[Plugin or settings action] --> B[Configuration write coordinator]
  B --> C[Gateway mutation]
  C --> D[Fresh configuration read]
  D --> E{Later read or invalidation?}
  E -->|Later read| D
  E -->|Current result| F[Snapshot and operation feedback]
  E -->|Write or connection change| G[Refresh failure feedback]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +97, Tests +236. Total +333 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 3 118 21 +97
Tests 1 236 0 +236
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 354 21 +333

Review metrics

Metric Value Why it matters
Production versus regression coverage production net +97 lines; tests +236 lines The production growth has a stated lifecycle justification: tracking read completion and invalidation without adding configuration or public API surface.

Technical review

Best possible solution:

Keep refresh reconciliation in the configuration-read owner, preserving real failures, connection fencing, and unsaved draft intent.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: complete an external mutation, supersede its configuration read with a successful later read, then settle the original read; current main reports refresh failure. This review did not execute that scenario.

Is this the best way to solve the issue?

Yes. Recording completion at the existing read owner fixes the false warning without borrowing another load’s recovery callback or weakening genuine failure handling.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2413c5e3dcde.

Labels

Label changes:

  • add P2: This repairs misleading configuration-refresh feedback after successful mutations, with limited blast radius and no demonstrated loss of saved data.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Label justifications:

  • P2: This repairs misleading configuration-refresh feedback after successful mutations, with limited blast radius and no demonstrated loss of saved data.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Sebastien Tardif: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 0cd1ca7 into main Sep 7, 2026
128 checks passed
@steipete
steipete deleted the codex/ui-config-refresh-completion branch September 7, 2026 01:19
@steipete

steipete commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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 maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant