Repository navigation
fix(ui): reconcile superseded config refreshes after mutations - #140551
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 6, 2026, 8:51 PM ET / September 7, 2026, 00:51 UTC. ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherThe 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +97, Tests +236. Total +333 across 4 files. View PR surface stats
Review metrics
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
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: