Repository navigation
improve(ui): rethink the failed settings save as one card - #191890
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 changes before merge. What this changesThis PR presents failed settings saves as one card with a visible reason, primary Retry action, and confirmation before discarding edits. Example: Changing Log Level to debug fails because the Gateway config file is immutable.
Review scores
ProductKind: Preference · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 6 items remain Keep open: this maintainer-authored PR provides a useful, demonstrated UI improvement, but its confirmation handling and incomplete consumer updates need repair before merge. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe shared Control UI save indicator consumes config-owner status and command callbacks, renders save and recovery feedback, and sends retry, reload, save, and apply requests through the existing owner. flowchart TD
A[Settings edit] --> B[Runtime config owner]
B --> C[Gateway config operation]
C --> B
B --> D[Shared save indicator]
D --> E[Failure card]
E --> F[Discard confirmation]
F --> B
Technical reviewBest possible solution: Keep the card in the existing indicator, scope confirmation to its originating presentation, report dialog failures through the existing outcome slot, and complete the affected test migration. Do we have a high-confidence way to reproduce the issue? The base source directly reloads on discard and hides the reason behind a toggle; supplied real-Gateway screenshots demonstrate that presentation and the replacement card. Is this the best way to solve the issue? The existing indicator and confirm dialog are the right owners, and the retained failure memo supports stable retry presentation without introducing another config owner. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9006d115c8e4. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +24, Tests +57. Total +81 across 8 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 3, 2026, 7:47 AM ET / 12:47 UTC. |
a846e8a to
01d23e2
Compare
…91890) Keep failed Settings saves in one stable card with the reason visible and Retry available. Confirm before discarding edits or reloading; cancel preserves the draft. Update existing test consumers to confirm recovery, read the visible error, and preserve real confirm-dialog exports in the partial mock. Validation: 15 indicator tests, 9 browser E2Es, and UI typecheck passed. The mock-export guard now reports only an unchanged main violation in config-secret-fields.test.ts; the failing test, target module, and baseline are byte-identical to main. Full CI remains pending under the authorized batch policy.
What Problem This Solves
A failed settings save showed four loose pieces in one row: "Save failed", a "Show reason" link, "Retry" and a long "Discard draft and reload" button, all at the same weight. The reason was hidden behind a link, Retry did not stand out, and Discard threw away the unsaved edit in one click with no warning. A rejected save added a fifth piece, "Current settings are unchanged."
User Impact
A failed save is now one small card on the same spot as Saving and Saved: the state in danger color, the reason right below it as plain text, then Retry as the primary button and Discard changes as a quiet secondary one.
Why This Change Was Made
This is the failed state of the shared save status from #191354. It is a status, so it stays on the status's anchor instead of becoming a toast, which can be dismissed and replaced, or an inline message, which would push the form down. One danger signal is enough: only the title is red, the reason is ordinary text, and the actions follow the app's primary and ghost buttons in every theme. The confirm uses the existing confirm dialog.
Evidence
The same failure in each image comes from an isolated real Gateway whose config file was made immutable, so its own write failed. Log Level was changed in Advanced → Logging.
Before and After, CRT dark, 1440:
After, Absolutely light, 390:
Discard changes asks first. Cancel kept the edit, and confirming reloaded the saved value:
Checked in all 22 themes (11 families, light and dark) at 1440 and 390. CRT and Phosphor keep square corners.
Checks run locally: oxfmt, oxlint, stylelint,
pnpm check:control-ui-controllers,pnpm tsgo:ui, unit tests for the save status and the settings sidebar (41 passed), andpnpm ui:check-performance:base(passes; total CSS −23 B gzip). The browser tests that click the old labels are updated; the failed-save and rejected-save ones passed, the rest were not rerun.Stacked on #191354 (base
brzezowski/settings-saved-confirmation). Land #191354 first, then this. #191394 also reads the shared status and needs no change; landing it before or after this works.