Skip to content

fix(ui): repair settings titles, scope form-unsafe banner, consolidate advanced settings - #113160

Merged
steipete merged 4 commits into
mainfrom
claude/config-warning-advanced-toggle-3fdd44
Jul 25, 2026
Merged

steipete merged 4 commits into
mainfrom
claude/config-warning-advanced-toggle-3fdd44

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Control UI settings surface had four related problems, all visible on the Advanced settings page:

  1. Raw i18n keys as page titles. The Advanced and Notifications settings pages rendered literal tabs.advanced / tabs.notifications as their headers: configPageTitle() hand-built t("tabs.<id>") keys while the sidebar resolves titles from NAVIGATION_COPY (routeTitles.* for these two routes), so the two sources drifted.
  2. Misleading, full-bleed "form can't represent" banner. The banner rendered as a direct child of the full-width scroller while the form sits in a centered 760px column, and it fired purely off the schema (analysis.unsupportedPaths) — showing "Your config contains fields…" to every user even when their config had no value at any affected path. It also duplicated the inline per-field errors without naming paths or offering an action.
  3. Three overlapping "advanced" reveal mechanisms and a lying badge. Advanced-tier fields rendered in a forced-open-uncloseable <details> under a global synced toggle, plus per-section ephemeral expansion state, plus search/deep-link forcing. Sections that are 100% advanced (e.g. Diagnostics) rendered as husks — header + collapsed "Advanced (18)" and nothing else. Separately, deriveTagsForPath tagged any path with zero matched facets as "advanced", so common fields like update.channel wore an "advanced" chip.
  4. Broken dev-gateway bootstrap (found while validating). openclaw gateway run --dev on a fresh OPENCLAW_STATE_DIR wrote agents.list (an internal projection) instead of the canonical agents.entries, and the validator immediately rejected the config it had just written: Config validation failed: agents: Unrecognized key: "list".

Why This Change Was Made

  • Page titles now resolve through the same titleForRoute() registry the sidebar uses (single source of truth; CONFIG_PAGE_I18N_KEYS deleted). A new test asserts every NAVIGATION_COPY title/subtitle key resolves, guarding the whole class.
  • The banner is now value-aware (only shows when the user's config actually has a value at a form-unsupported path in the visible scope), names the affected paths, offers an "Open Raw editor" button, and is constrained to the content column. The config-issues callout gets the same width treatment.
  • Advanced handling collapses to one mechanism: the global synced toggle. Off → advanced fields are hidden behind a one-line ghost row ("N advanced settings hidden — Show advanced") that flips the toggle; sections keep discoverability without husks. On (or search / ?advanced=1 deep-link) → advanced fields render inline under a plain divider. The per-section expandedAdvancedSections state and the controlled-<details> dance are deleted. The Advanced page — definitionally the advanced surface — always reveals and hides the toggle; the toggle also hides on pages whose scope has no advanced leaves. The zero-facet→"advanced" tag fallback is removed and the "advanced" chip is no longer rendered in form rows (tier is expressed structurally; tag:advanced search still works).
  • The dev bootstrap writes the canonical agents.entries record; the stale agents.list.*.heartbeat.target hint path in schema.ts is corrected.

User Impact

  • Correct "Advanced" / "Notifications" page headers (previously raw i18n keys).
  • The form-unsupported notice only appears when it applies to your config, says which entries, and takes you to the Raw editor in one click — inside the content column instead of a full-width band.
  • One "Show advanced" toggle governs advanced settings everywhere; no more empty section husks or un-closeable disclosure widgets; no more "advanced" chips on common fields.
  • openclaw gateway run --dev works again on a fresh state dir.

Evidence

Before / after

Scene Before After
Advanced page: title, banner, chips before after
Banner when the config actually has an unsupported value (always-on, full-bleed, vague — see above) after banner
Diagnostics (advanced-only section) before diagnostics after diagnostics
Notifications page title before notifications after notifications
Advanced reveal mechanism before forced-open details ghost row: after ghost row toggle on: after toggle on

Screenshots come from a throwaway dev gateway (isolated OPENCLAW_STATE_DIR, --auth none on loopback, no credentials in state).

Sweep byproducts worth calling out

  • The gateway hot-reload rule prefix: "agents.list" never matched canonical configs (diffConfigPaths emits agents.entries.*), so per-agent heartbeat edits fell through to the agents: none tail rule and never restarted the heartbeat. The rule now matches agents.entries; src/gateway/config-reload.test.ts covers the canonical shape.
  • openclaw config set agents.list … replacement protection was equally dead; agents.entries now joins the protected-map family (plugins.entries, auth.profiles, …) in src/cli/config-cli.ts.
  • Every other agents.list occurrence was either converted (display/config-path strings, fix-it hints, elevated-gate messages, doc comments across bash-tools.exec, elevated-unavailable, doctor-core-checks, acp-spawn, tools-effective-inventory, commands-context-report, audit, and config type docs) or intentionally kept: RPC method ids (agents.list gateway method), the internal validated-config list projection, and doctor legacy-migration/deprecation code that genuinely refers to the retired shape.

Validation

Blacksmith Testbox was unreachable (backend.blacksmith.sh timeout), so gate lanes ran locally per the documented fallback; source is trusted maintainer work.

  • Focused vitest (all green): ui/src/pages/config 92, config-form component tests 22, ui/src/app-navigation.test.ts 65, ui/src/components/settings-sidebar.test.ts 8, src/config/schema.test.ts 56, src/cli/gateway-cli 145 (+ new dev.test.ts), src/gateway/config-reload.test.ts 156, src/config/issue-format.test.ts 5, sandbox/tool-policy/workshop 23+, auto-reply/model/cron touched tests 26+, config-form-guidance E2E 1 (Chromium).
  • Gates: tsgo core + core-test + ui lanes clean; oxlint on changed files clean; oxfmt --check clean (34 files); git diff --check clean; pnpm ui:i18n:verify green; pnpm config:docs:check green (baseline regenerated via pnpm config:docs:gen).
  • Live proof: fresh-state openclaw gateway run --dev now boots (HTTP 200, Dev config ready, canonical agents.entries.dev written) — it failed with Unrecognized key: "list" before.
  • Settings-page audit across all 22 settings routes (playwright, live gateway): every page title resolves; the only raw-key titles (tabs.advanced, tabs.notifications) are fixed; no new console errors introduced.
  • Codex autoreview (gpt-5.6-sol, high): clean at final run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes commands Command implementations docker Docker and sandbox tooling agents Agent runtime and tooling labels Jul 23, 2026
@steipete
steipete marked this pull request as ready for review July 23, 2026 22:19
@steipete
steipete requested a review from a team as a code owner July 23, 2026 22:19
@openclaw-barnacle openclaw-barnacle Bot added size: L maintainer Maintainer-authored PR labels Jul 23, 2026
@steipete steipete self-assigned this Jul 25, 2026
steipete added 3 commits July 25, 2026 03:23
…te advanced tier

- Advanced/Notifications settings headers rendered raw i18n keys
  (tabs.advanced/tabs.notifications); configPageTitle now resolves through
  the nav registry titleForRoute, deleting the drifting key map.
- Form-unsafe banner is value-aware (only when the user's config has a value
  at a form-unsupported path in the active scope), names the paths, offers an
  Open Raw editor action, and sits in the content column instead of full-bleed.
- Advanced tier collapses to one synced toggle: hidden advanced fields render
  a ghost row that enables the toggle; the Advanced page always reveals and
  hides the toggle; per-section details state and the controlled-open dance
  are deleted; toggle visibility mirrors the renderer's tier split.
- schema.tags no longer tags facet-less paths as "advanced" (common fields
  like update.channel wore a lying chip); the chip is no longer rendered in
  form rows while tag:advanced search keeps working.
…ale agents.list sweep

- openclaw gateway run --dev failed on a fresh state dir: the bootstrap wrote
  the retired agents.list array and validation rejected its own config
  (Unrecognized key: list). It now writes the keyed agents.entries record;
  new dev.test.ts validates the written shape against the zod schema.
- Revive the dead gateway hot-reload rule: prefix agents.list never matched
  canonical config diffs, so per-agent heartbeat edits fell through to the
  agents:none tail rule; the rule now matches agents.entries.
- config set replacement protection moves from the dead agents.list array
  to the agents.entries map (joins plugins.entries/auth.profiles family).
- Sweep remaining stale agents.list config-path strings in hints, fix-it
  messages, elevated gates, doctor hints, audit text, and type docs to
  agents.entries.*; RPC ids, the internal list projection, and doctor
  legacy-migration references intentionally keep the old name.
…rap hint assertion

- Knip flagged navigationCopyEntries (test-only export); the audit now walks
  ALL_ROUTES through prod titleForRoute/subtitleForRoute and rejects raw
  dotted-key output, so no export exists solely for the test.
- commands-context-report expected the retired agents.list[] hint wording.
@steipete
steipete force-pushed the claude/config-warning-advanced-toggle-3fdd44 branch from d9b7baf to 55aad8d Compare July 25, 2026 07:27
- tool-policy-diagnostic: keep main's test expectations (dotted
  agents.entries.<id> paths from the roster-aware implementation); our
  pre-rebase bracket-style assertions no longer match any code.
- Reapply the placeholder sweep the conflict resolution dropped:
  generic agents.list[] fallbacks in tool-policy-diagnostic and the audit
  sandbox-mode hint now say agents.entries.*.
@steipete
steipete merged commit e069b9d into main Jul 25, 2026
117 checks passed
@steipete
steipete deleted the claude/config-warning-advanced-toggle-3fdd44 branch July 25, 2026 07:52
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Jul 25, 2026
…gnostics (#113603)

Audit findings, dangerous-flag labels, exec-approval provenance, filesystem
policy drift, and the skill-workshop tool diagnostic printed agents.list.*
paths users cannot paste into openclaw.json: dotted agents.list.<id> is valid
in no shape, and index-keyed agents.list.<n> only names the internal
validation projection. All display surfaces now emit agents.entries.<id>;
the summary agent-id extractor regex follows the new labels. Roster-aware
builders keep an indexed fallback only for id-less malformed legacy rows,
and validation/doctor/legacy-migration paths intentionally keep the legacy
form because they point into the user's actual file. Follow-up deferred
from #113160.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 26, 2026
…e advanced settings (openclaw#113160)

* feat(ui): repair settings titles, scope form-unsafe banner, consolidate advanced tier

- Advanced/Notifications settings headers rendered raw i18n keys
  (tabs.advanced/tabs.notifications); configPageTitle now resolves through
  the nav registry titleForRoute, deleting the drifting key map.
- Form-unsafe banner is value-aware (only when the user's config has a value
  at a form-unsupported path in the active scope), names the paths, offers an
  Open Raw editor action, and sits in the content column instead of full-bleed.
- Advanced tier collapses to one synced toggle: hidden advanced fields render
  a ghost row that enables the toggle; the Advanced page always reveals and
  hides the toggle; per-section details state and the controlled-open dance
  are deleted; toggle visibility mirrors the renderer's tier split.
- schema.tags no longer tags facet-less paths as "advanced" (common fields
  like update.channel wore a lying chip); the chip is no longer rendered in
  form rows while tag:advanced search keeps working.

* fix(config): dev bootstrap writes canonical agents.entries; finish stale agents.list sweep

- openclaw gateway run --dev failed on a fresh state dir: the bootstrap wrote
  the retired agents.list array and validation rejected its own config
  (Unrecognized key: list). It now writes the keyed agents.entries record;
  new dev.test.ts validates the written shape against the zod schema.
- Revive the dead gateway hot-reload rule: prefix agents.list never matched
  canonical config diffs, so per-agent heartbeat edits fell through to the
  agents:none tail rule; the rule now matches agents.entries.
- config set replacement protection moves from the dead agents.list array
  to the agents.entries map (joins plugins.entries/auth.profiles family).
- Sweep remaining stale agents.list config-path strings in hints, fix-it
  messages, elevated gates, doctor hints, audit text, and type docs to
  agents.entries.*; RPC ids, the internal list projection, and doctor
  legacy-migration references intentionally keep the old name.

* test(ui): derive nav i18n audit from route registry; fix stale bootstrap hint assertion

- Knip flagged navigationCopyEntries (test-only export); the audit now walks
  ALL_ROUTES through prod titleForRoute/subtitleForRoute and rejects raw
  dotted-key output, so no export exists solely for the test.
- commands-context-report expected the retired agents.list[] hint wording.

* fix(config): align rebase resolution with main's roster-aware diagnostic

- tool-policy-diagnostic: keep main's test expectations (dotted
  agents.entries.<id> paths from the roster-aware implementation); our
  pre-rebase bracket-style assertions no longer match any code.
- Reapply the placeholder sweep the conflict resolution dropped:
  generic agents.list[] fallbacks in tool-policy-diagnostic and the audit
  sandbox-mode hint now say agents.entries.*.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 26, 2026
…gnostics (openclaw#113603)

Audit findings, dangerous-flag labels, exec-approval provenance, filesystem
policy drift, and the skill-workshop tool diagnostic printed agents.list.*
paths users cannot paste into openclaw.json: dotted agents.list.<id> is valid
in no shape, and index-keyed agents.list.<n> only names the internal
validation projection. All display surfaces now emit agents.entries.<id>;
the summary agent-id extractor regex follows the new labels. Roster-aware
builders keep an indexed fallback only for id-less malformed legacy rows,
and validation/doctor/legacy-migration paths intentionally keep the legacy
form because they point into the user's actual file. Follow-up deferred
from openclaw#113160.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui cli CLI command changes commands Command implementations docker Docker and sandbox tooling docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant