Skip to content

refactor(ui): drop the reset-to-default icon from settings rows - #131960

Merged
steipete merged 1 commit into
mainfrom
claude/remove-revert-default-button-e39095
Aug 28, 2026
Merged

steipete merged 1 commit into
mainfrom
claude/remove-revert-default-button-e39095

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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 / Auto groups, the Default options, the selects, and the clearable text/number inputs all reach the default value directly.

Two independent implementations rendered it:

  • renderRestoreDefaultButton in ui/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).
  • The action branch of renderSettingsDefaultState in ui/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 onReset props, controller methods, and reset-only wiring that existed solely to feed it. The Default: x / Using default: x descriptions 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:

Surface How you reach the default now
Segmented enums (Native Commands, tool profile, memory engine) select the default option
Model thinking / fast mode the existing explicit Default option (onThinkingReset / onFastModeReset)
Language the existing System option (setLocale(undefined))
Browser enabled, tool profile selecting the default value already calls removeFormValue
Text / number / JSON config fields clear the field — that still routes through onRemove
Chat message width, dreaming inputs clear the field
Theme, accent, font, text size unchanged onReselect gesture

Two narrow cases now write the default value explicitly instead of deleting the config key. Effective behavior is identical, but the key stays present:

  • Memory engine — the segmented control has no auto option, so picking the default engine writes plugins.slots.memory rather than removing it.
  • Chat send shortcut — this was the only way to drop a personal override and fall back to the gateway-provided value; picking either option now always sets a personal preference.

Both are accepted tradeoffs of removing the control everywhere. If either matters, the fix belongs in that control (an Auto / Use server value option), 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

Native Commands rows with the reset icon

After

Native Commands rows without the reset icon

No empty settings-row__control wrapper 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 passed
  • node scripts/run-vitest.mjs ui/src/pages — 371 files, 5911 tests passed
  • Chromium E2E defaults lanes — 4 files, 10 tests passed
  • node scripts/check-changed.mjs — format, typecheck, lint, guards, dead-export and i18n checks green
  • Autoreview (Codex, high) on the full diff — clean, no accepted findings

LOC delta (judged, production vs test):

Added Deleted Net
Production (18 files) 215 498 −283
Tests (15 files) 104 581 −477
Total 319 1079 −760

Deleted symbols

Helpers renderRestoreDefaultButton, renderSettingsDefaultState, resetMemoryEngine, type ConfigRemover; controller methods AgentMemoryPanel.resetEnabledOverride / .removeEnabledOverride; props ConfigProps.resetLocale, ConfigProps.resetChatSendShortcut, SecurityViewProps.onBrowserEnabledReset, SecurityViewProps.onToolProfileReset, MemoryViewProps.onEngineReset; the actions slots on renderSettingsToggleRow and renderSettingsSelectRow; i18n key configForm.resetToDefault. renderCollectionDefaultPresentation becomes renderCollectionDefaultDescription and returns only the description.

The shared .btn--icon styles and the refresh icon stay — other controls use both.

@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 28, 2026 17:19
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Aug 28, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 28, 2026, 3:20 PM ET / 19:20 UTC.

ClawSweeper review

What this changes

The PR removes reset-to-default icon controls and their dedicated callback chains from schema-driven and curated Control UI settings.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep 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
Reviewed head: 9d074c34e20c9d0d6566d5e94438a109a5857d89

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The visual cleanup is well scoped, but three documented reset semantics remain broken on the latest head.
Proof confidence 🌊 off-meta tidepool Not applicable: Repository state identifies the author as a MEMBER, so the external-contributor proof gate does not apply; the supplied mocked-Control-UI before/after screenshots remain relevant visual evidence but do not cover the removed inheritance paths.
Patch quality 🦐 gold shrimp (3/6) 3 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository state identifies the author as a MEMBER, so the external-contributor proof gate does not apply; the supplied mocked-Control-UI before/after screenshots remain relevant visual evidence but do not cover the removed inheritance paths.
Evidence reviewed 6 items Send shortcut has a documented removal contract: The preference is explicitly clearable and its reset writes an undefined value; tests verify this becomes a null removal and that removing the value clears the persisted local preference.
PR removes the only Send shortcut reset callback: The introduced row offers only Enter and Mod+Enter and always calls setChatSendShortcut; the deleted base callback invoked resetSyncedAppearancePref, so an override cannot resume a server/profile value.
Memory auto and explicit selection are distinct states: The schema states that an unset memory slot is auto and resolves the default owner, whereas off and pinned values are explicit. The new choice list contains plugin IDs and Off but no Auto/remove operation.
Findings 3 actionable findings [P1] Restore the inherited Send shortcut choice
[P1] Restore the automatic Memory-engine choice
[P1] Retain optional segmented values’ reset path
Security None None.

How this fits together

Control 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
Loading

Before merge

  • Restore the inherited Send shortcut choice (P1) - This select now exposes only literal values and always calls setChatSendShortcut, but chatSendShortcut is explicitly clearable and its reset removes the profile/server override. An overridden user therefore cannot resume an inherited Gateway value; add a local server/default choice that invokes the existing reset owner.
  • Restore the automatic Memory-engine choice (P1) - The slot contract distinguishes an unset auto slot from a pinned plugin, but this introduced option list contains only plugin IDs and Off. Selecting the displayed default engine keeps an existing pin, so users cannot return to auto resolution; add an Auto/default option that removes only the memory slot override.
  • Retain optional segmented values’ reset path (P1) - Small union and enum controls now route every selection through onPatch; deleting the shared reset control removed the only optional-value route to onRemove. A selected default remains authored and an invalid stored value cannot be cleared, unlike the existing select and text controls; wire a local default/reselect action to removal for optional values.
  • Resolve merge risk (P1) - Merging would make default-valued overrides persist instead of inheriting later gateway, profile, or schema defaults on several settings surfaces.

Findings

  • [P1] Restore the inherited Send shortcut choice — ui/src/pages/config/view-appearance-preferences.ts:232-237
  • [P1] Restore the automatic Memory-engine choice — ui/src/pages/config/memory.ts:230-252
  • [P1] Retain optional segmented values’ reset path — ui/src/components/config-form.node.ts:107-113
Agent review details

Security

None.

PR surface

Source -283, Tests -477. Total -760 across 33 files.

View PR surface stats
Area Files Added Removed Net
Source 18 215 498 -283
Tests 15 104 581 -477
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 33 319 1079 -760

Review metrics

Metric Value Why it matters
Production vs test delta production +215/−498 (net −283); tests +104/−581 (net −477) The deletion-focused refactor removes established reset ownership, so retained inheritance behavior needs direct coverage.

Stored data model

Persistent data-model change detected: unknown-data-model-change: ui/src/pages/agents/memory/memory-panel.ts, unknown-data-model-change: ui/src/pages/config/memory-dreaming.ts, unknown-data-model-change: ui/src/pages/config/memory.ts, vector/embedding metadata: ui/src/pages/agents/memory/memory-panel.ts, vector/embedding metadata: ui/src/pages/config/memory-defaults.ts, vector/embedding metadata: ui/src/pages/config/memory-dreaming.ts, and 1 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Restore local inheritance controls (recommended)
    Add explicit control-local routes to remove the affected overrides without restoring the global icon.
  2. Accept persistent overrides
    Land the deletion only if maintainers intentionally change the existing preference and slot contracts so default-valued settings remain explicitly stored.

Technical review

Best 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:

  • [P1] Restore the inherited Send shortcut choice — ui/src/pages/config/view-appearance-preferences.ts:232-237
    This select now exposes only literal values and always calls setChatSendShortcut, but chatSendShortcut is explicitly clearable and its reset removes the profile/server override. An overridden user therefore cannot resume an inherited Gateway value; add a local server/default choice that invokes the existing reset owner.
    Confidence: 0.99
  • [P1] Restore the automatic Memory-engine choice — ui/src/pages/config/memory.ts:230-252
    The slot contract distinguishes an unset auto slot from a pinned plugin, but this introduced option list contains only plugin IDs and Off. Selecting the displayed default engine keeps an existing pin, so users cannot return to auto resolution; add an Auto/default option that removes only the memory slot override.
    Confidence: 0.99
  • [P1] Retain optional segmented values’ reset path — ui/src/components/config-form.node.ts:107-113
    Small union and enum controls now route every selection through onPatch; deleting the shared reset control removed the only optional-value route to onRemove. A selected default remains authored and an invalid stored value cannot be cleared, unlike the existing select and text controls; wire a local default/reselect action to removal for optional values.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 0ee6c35299aa.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove proof: 📸 screenshot: Current real behavior proof evidence kind is not_applicable.

Label justifications:

  • P1: The introduced change removes existing users’ route back to inherited settings behavior.
  • merge-risk: 🚨 compatibility: Existing stored preferences and config overrides can no longer be deleted through several affected controls.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Repository state identifies the author as a MEMBER, so the external-contributor proof gate does not apply; the supplied mocked-Control-UI before/after screenshots remain relevant visual evidence but do not cover the removed inheritance paths.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs ui/src/app/server-prefs.test.ts.
  • [P1] node scripts/run-vitest.mjs ui/src/pages/config/view.browser.test.ts ui/src/pages/config/memory.test.ts ui/src/components/config-form-scalar-integrity.browser.test.ts.
  • [P1] node scripts/run-vitest.mjs ui/src/e2e/appearance-settings-defaults.e2e.test.ts ui/src/e2e/memory-settings-defaults.e2e.test.ts ui/src/e2e/config-form-defaults.e2e.test.ts.

What I checked:

  • Send shortcut has a documented removal contract: The preference is explicitly clearable and its reset writes an undefined value; tests verify this becomes a null removal and that removing the value clears the persisted local preference. (ui/src/app/server-prefs-state.ts:112, 9d074c34e20c)
  • PR removes the only Send shortcut reset callback: The introduced row offers only Enter and Mod+Enter and always calls setChatSendShortcut; the deleted base callback invoked resetSyncedAppearancePref, so an override cannot resume a server/profile value. (ui/src/pages/config/view-appearance-preferences.ts:232, 9d074c34e20c)
  • Memory auto and explicit selection are distinct states: The schema states that an unset memory slot is auto and resolves the default owner, whereas off and pinned values are explicit. The new choice list contains plugin IDs and Off but no Auto/remove operation. (ui/src/pages/config/memory.ts:230, 9d074c34e20c)
  • Small schema enums now only author values: Both small union and enum branches send every selection to onPatch. The base helper deliberately called onRemove for optional values, so picking a displayed default now retains an authored value instead of restoring inheritance. (ui/src/components/config-form.node.ts:107, 9d074c34e20c)
  • Current main retains the removed behavior: Current main still contains both reset-rendering helpers; no changes to the central reset/default files occurred between the PR base and fetched main. (ui/src/components/settings-ui.ts:295, 0ee6c35299aa)
  • Feature-history ownership: Blame attributes the current-main reset renderers to the same commit, establishing the current owner trail for the affected feature. (ui/src/components/settings-ui.ts:295, 7a288ed013e6)

Likely related people:

  • steipete: Current-main blame attributes the reset/default renderers and their affected callers to Peter Steinberger's prior implementation commit. (role: feature introducer and recent area contributor; confidence: high; commits: 7a288ed013e6; files: ui/src/components/settings-ui.ts, ui/src/components/config-form.node.shared.ts, ui/src/pages/config/view-appearance-preferences.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add local remove/inherit choices for Send shortcut, Memory engine, and generic optional segmented controls.
  • Cover the three reset paths at their preference/config owner boundaries and in the relevant browser flows.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-28T17:30:14.258Z sha 462e50e :: found issues before merge. :: [P1] Preserve the inherited Send shortcut option | [P1] Retain an Auto choice for the memory slot | [P1] Keep optional segmented values resettable

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.
@steipete
steipete force-pushed the claude/remove-revert-default-button-e39095 branch from 462e50e to 9d074c3 Compare August 28, 2026 19:07
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Aug 28, 2026
@steipete
steipete merged commit 9396ea2 into main Aug 28, 2026
158 checks passed
@steipete
steipete deleted the claude/remove-revert-default-button-e39095 branch August 28, 2026 19:37
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 29, 2026
…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.
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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant