Repository navigation
refactor(ui): drop the reset-to-default icon from settings rows - #131960
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed August 28, 2026, 3:20 PM ET / 19:20 UTC. ClawSweeper reviewWhat this changesThe PR removes reset-to-default icon controls and their dedicated callback chains from schema-driven and curated Control UI settings. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open: the force-pushed head still removes three existing routes that delete overrides and restore inherited behavior, including Send shortcut, Memory engine auto-selection, and optional schema-backed segmented settings. Priority: P1 Review scores
Verification
How this fits togetherControl UI settings translate form controls into gateway configuration and local preference overrides. Removing an override is distinct from writing a literal default because it resumes an inherited gateway, profile, or schema value. flowchart LR
A[Settings row] --> B[User control]
B --> C[Config or preference update]
C --> D[Stored override]
D --> E[Effective setting]
F[Gateway or schema default] --> E
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource -283, Tests -477. Total -760 across 33 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the global icon removed, but add control-local reset choices that call the existing deletion owners: a server-value choice for Send shortcut, Auto for Memory engine, and optional-value reset behavior for generic segmented controls. Do we have a high-confidence way to reproduce the issue? Yes, in source: an overridden Send shortcut, pinned Memory engine, or optional small enum can be inspected through its only remaining control path, which writes a value rather than removing the override. Is this the best way to solve the issue? No. Removing the icon is a reasonable cleanup, but the current replacement controls do not preserve the documented distinction between an explicit default and inheritance. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0ee6c35299aa. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
The schema-driven config form and the hand-written settings pages each rendered their own circular "Reset to default" icon button next to any overridden row. It was persistent chrome on a surface that is already dense, and every affected control can reach its default directly. Deletes both implementations (`renderRestoreDefaultButton`, `renderSettingsDefaultState`) and the callback chains that existed only to feed them. The "Default: x" / "Using default: x" descriptions stay.
462e50e to
9d074c3
Compare
|
Merged via squash.
|
…claw#131960) The schema-driven config form and the hand-written settings pages each rendered their own circular "Reset to default" icon button next to any overridden row. It was persistent chrome on a surface that is already dense, and every affected control can reach its default directly. Deletes both implementations (`renderRestoreDefaultButton`, `renderSettingsDefaultState`) and the callback chains that existed only to feed them. The "Default: x" / "Using default: x" descriptions stay.
What Problem This Solves
Every overridden row in the Control UI settings surfaces rendered a circular "Reset to default" icon button. It is persistent chrome on an already dense surface, and it duplicated an affordance the controls themselves provide — the segmented
On / Off / Autogroups, theDefaultoptions, the selects, and the clearable text/number inputs all reach the default value directly.Two independent implementations rendered it:
renderRestoreDefaultButtoninui/src/components/config-form.node.shared.ts— the schema-driven config form (segmented enums, selects, text/number inputs, JSON textareas, boolean toggle rows, object/array collection headers).actionbranch ofrenderSettingsDefaultStateinui/src/components/settings-ui.ts— the hand-written settings pages (appearance prefs, security, memory, dreaming, model providers, agent memory panel).Why This Change Was Made
Maintainer decision: remove it everywhere rather than hide it behind hover, so there is one canonical path to a default value — pick it in the control. Deleting the button also removes a long dead-code chain of
onResetprops, controller methods, and reset-only wiring that existed solely to feed it. TheDefault: x/Using default: xdescriptions stay; only the icon disappears.User Impact
Settings rows lose the trailing refresh icon. Reverting to a default is unchanged everywhere the control already exposes it:
Native Commands, tool profile, memory engine)onThinkingReset/onFastModeReset)setLocale(undefined))removeFormValueonRemoveonReselectgestureTwo narrow cases now write the default value explicitly instead of deleting the config key. Effective behavior is identical, but the key stays present:
autooption, so picking the default engine writesplugins.slots.memoryrather than removing it.Both are accepted tradeoffs of removing the control everywhere. If either matters, the fix belongs in that control (an
Auto/Use server valueoption), not in a restored global icon.Evidence
Before / after —
/settings/automation, the exact rows from the report, captured on the mocked Control UI dev server (pnpm dev:ui:mock) at 2x, dark theme:Before
After
No empty
settings-row__controlwrapper is left behind; the segmented group sits flush at the row edge.Validation, all from a clean worktree:
node scripts/run-vitest.mjs ui/src/components— 133 files, 1906 tests passednode scripts/run-vitest.mjs ui/src/pages— 371 files, 5911 tests passednode scripts/check-changed.mjs— format, typecheck, lint, guards, dead-export and i18n checks greenhigh) on the full diff — clean, no accepted findingsLOC delta (judged, production vs test):
Deleted symbols
Helpers
renderRestoreDefaultButton,renderSettingsDefaultState,resetMemoryEngine, typeConfigRemover; controller methodsAgentMemoryPanel.resetEnabledOverride/.removeEnabledOverride; propsConfigProps.resetLocale,ConfigProps.resetChatSendShortcut,SecurityViewProps.onBrowserEnabledReset,SecurityViewProps.onToolProfileReset,MemoryViewProps.onEngineReset; theactionsslots onrenderSettingsToggleRowandrenderSettingsSelectRow; i18n keyconfigForm.resetToDefault.renderCollectionDefaultPresentationbecomesrenderCollectionDefaultDescriptionand returns only the description.The shared
.btn--iconstyles and therefreshicon stay — other controls use both.