Skip to content

fix(ui): give embedded settings sections the shared section rhythm - #126541

Merged
steipete merged 2 commits into
mainfrom
steipete/settings-design-browser-tool-a455c8
Aug 20, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/settings-design-browser-tool-a455c8

Conversation

@steipete

@steipete steipete commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

On the agents settings page (Tools tab and siblings), settings sections stacked with zero vertical separation: section titles sat directly against the previous section's card, and section descriptions were pulled to 4px underneath control-height header buttons — the Verify/Save button rows looked squeezed against the text around them.

Root cause: the agent tab panel hosts settings sections in a bare div, outside .settings-page, so it never received the design language's section rhythm. The compensating rule in agents.css (.agents-main > .settings-section:not(:first-child)) missed the nested tabpanel entirely — a page-local fork of the design system that silently failed.

Why This Change Was Made

Per ui/docs/design-system/settings-design.md ("extend the system, don't fork it"), the fix extends the shared design language instead of patching the page:

  • settings.css: new .settings-stack primitive — section rhythm (gap: var(--space-8)) for embedded surfaces (tab panels, split layouts) that host sections without .settings-page's centered column.
  • agents/view.ts: the agent tab panel takes class="settings-stack", fixing all seven tabs at once.
  • agents.css: the bespoke margin fork is deleted.
  • settings.css: descriptions after action-bearing section headers no longer pull up with the negative margin, so text clears the button row (12px instead of 4px). This also improves e.g. the Channels page's "DM access requests" header for free.

User Impact

Agents settings tabs now read with the same 40px section rhythm as every other settings page; section titles and header action buttons (Verify, Save, Refresh…) have proper breathing room everywhere.

Evidence

Verified live on the mocked Control UI dev server (pnpm dev:ui:mock), plus measured DOM geometry: section gaps 0px → 40px, header-actions→description gap 4px → 12px. Checked agents Overview/Tools/Skills tabs and the Channels page for regressions.

Before:

before

After:

after

Validation: pnpm check:changed (stylelint, tsgo core+UI, i18n verify, deadcode) green; ui/src/pages/agents/view.test.ts 24/24 passed; autoreview (Codex gpt-5.6-sol, high) clean.

CI Heal (unrelated main breakage fixed here)

Main's checks-node-compact-large shard was red before this PR: #126531 routed provider-model-routes through projectConfigOntoRuntimeSourceSnapshot, which reads getRuntimeConfigSourceSnapshot, and src/agents/agent-command.live-model-switch.test.ts's explicit vi.mock factory did not export it — 24 failures (repro'd on origin/main, also red on commit 9441e3f). Fixed in this PR per repo policy by exporting the missing binding (returns null, so the projection no-ops). Suite is 126/126 locally after the fix.

The agents tab panel hosted settings sections in a bare div, so sections
stacked with zero separation; the bespoke .agents-main margin rule in
agents.css missed the nested tabpanel entirely. Descriptions also pulled
up to 4px under control-height header actions (squeezed Verify/Save rows).

Add a .settings-stack primitive to settings.css for embedded surfaces,
use it on the agent tab panel, delete the page-local margin fork, and let
section descriptions clear action-bearing headers.
@clawsweeper

clawsweeper Bot commented Aug 20, 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 20, 2026 04:56
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Aug 20, 2026
…shot mock

Main's checks-node-compact-large shard is red: #126531 routed
provider-model-routes through projectConfigOntoRuntimeSourceSnapshot,
which reads getRuntimeConfigSourceSnapshot, and this suite's explicit
vi.mock factory did not export it (24 failures). Return null so the
projection no-ops and resolvers keep reading the provided config.
@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Aug 20, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 20, 2026
@clawsweeper

clawsweeper Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 1:12 AM ET / 05:12 UTC.

ClawSweeper review

What this changes

The PR gives embedded Agent settings tabs the shared section spacing, prevents action-header descriptions from crowding buttons, documents that shared primitive, and repairs a runtime-config test mock.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep this maintainer-authored PR open for normal merge review. The current base lacks the embedded section container, while the patch centralizes the rhythm in the shared settings stylesheet and makes the runtime-snapshot mock match the projection’s no-source-snapshot path; no blocking patch defect was found.

Priority: P2
Reviewed head: 9e585e23323195273a3a69f73d2a172de91e6314

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused shared-owner UI repair with strong reported visual evidence, held to a normal-good rating until the latest review guidance is verified.
Proof confidence 🦞 diamond lobster (5/6) Not applicable: This maintainer-authored PR is not subject to the external-contributor proof gate; its body nonetheless records an after-fix mocked Control UI run with before/after screenshots and geometry measurements.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is not subject to the external-contributor proof gate; its body nonetheless records an after-fix mocked Control UI run with before/after screenshots and geometry measurements.
Evidence reviewed 7 items Current-base UI gap: The current main revision renders the agent tab panel as a bare tabpanel, while the PR adds the shared stack class; its existing page-local selector could only target direct sections under the outer Agents layout.
Shared owner-boundary repair: The PR adds the reusable flex-and-gap primitive in the shared settings stylesheet, applies it at the tab-panel owner, and removes the Agents-only spacing fork; the checked design guidance explicitly prescribes this shape for embedded surfaces.
Action-description behavior: Settings sections render action markup only when supplied, and existing Logs and Appearance screens use the same header-plus-description structure; limiting the negative description margin to headers without actions preserves the ordinary compact layout.
Findings None None.
Security None None.

Live Verification

Entry: /agents

Result: FAIL (partial) — step 4 wait_for #agent-panel .settings-section__actions: locator.waitFor: Error: strict mode violation: locator('#agent-panel .settings-section__actions') resolved to 2 elements:

Steps:

  • PASS goto /agents
  • PASS wait_for #agent-panel
  • PASS click #agents-tab-tools
  • FAIL wait_for #agent-panel .settings-section__actions — locator.waitFor: Error: strict mode violation: locator('#agent-panel .settings-section__actions') resolved to 2 elements:

How this fits together

The Control UI’s Agents page renders several tab panels containing settings sections; shared settings CSS controls their spacing and header layout. Separately, the agent model-switch suite replaces runtime configuration snapshots so model-route code can run without a gateway.

flowchart LR
A[Agent settings tabs] --> B[Agent tab panel]
B --> C[Shared settings stack]
C --> D[Settings sections]
D --> E[Header actions and descriptions]
E --> F[Spaced Control UI]
Loading

Before merge

  • Resolve merge risk (P1) - The visual fix is net +10 production lines; the shared primitive and removal of the Agents-only fork justify that growth, but later pages should reuse the primitive rather than add another local spacing rule.
  • Resolve merge risk (P1) - The supplied context omits the body of the latest ClawSweeper comment, and live GitHub lookup was unavailable, so its Rank-up moves must be checked before landing.
  • Complete next step (P2) - No repair job is warranted: no actionable defect was found, and this maintainer-labelled PR needs ordinary exact-head review completion rather than automated changes.
Agent review details

Security

None.

PR surface

Source +10, Tests +3, Docs +1. Total +14 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 3 16 6 +10
Tests 1 3 0 +3
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 20 6 +14

Review metrics

Metric Value Why it matters
Production versus test delta production +10/-6 (net +4), tests +3, docs +1 The shared CSS primitive and one tab-panel class replace six lines of page-local CSS; the small positive production delta is justified by making seven embedded tabs follow one owner rule.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the shared settings-stack primitive and action-header rule, then land once the current ClawSweeper guidance is accounted for and exact-head checks complete.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the shared settings-stack primitive and action-header rule, then land once the current ClawSweeper guidance is accounted for and exact-head checks complete.

Do we have a high-confidence way to reproduce the issue?

Yes—current main renders sibling settings sections inside a bare agent tab panel without the shared stack class, and the PR body supplies a mocked-Control-UI before/after reproduction; this review did not execute the browser flow because the checkout is read-only.

Is this the best way to solve the issue?

Yes—the shared settings stylesheet is the correct owner because the checked design guide requires embedded section containers to use a shared primitive instead of an Agents-local margin rule.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4b55192f818c.

Labels

Label changes:

  • add P2: This fixes a visible settings-layout defect with limited blast radius and no reported data, delivery, auth, or availability impact.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is not subject to the external-contributor proof gate; its body nonetheless records an after-fix mocked Control UI run with before/after screenshots and geometry measurements.

Label justifications:

  • P2: This fixes a visible settings-layout defect with limited blast radius and no reported data, delivery, auth, or availability impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is not subject to the external-contributor proof gate; its body nonetheless records an after-fix mocked Control UI run with before/after screenshots and geometry measurements.

Evidence

What I checked:

  • Current-base UI gap: The current main revision renders the agent tab panel as a bare tabpanel, while the PR adds the shared stack class; its existing page-local selector could only target direct sections under the outer Agents layout. (ui/src/pages/agents/view.ts:333, 4b55192f818c)
  • Shared owner-boundary repair: The PR adds the reusable flex-and-gap primitive in the shared settings stylesheet, applies it at the tab-panel owner, and removes the Agents-only spacing fork; the checked design guidance explicitly prescribes this shape for embedded surfaces. (ui/src/styles/settings.css:93, 9e585e233231)
  • Action-description behavior: Settings sections render action markup only when supplied, and existing Logs and Appearance screens use the same header-plus-description structure; limiting the negative description margin to headers without actions preserves the ordinary compact layout. (ui/src/components/settings-ui.ts:62, 9e585e233231)
  • Test-mock contract: The projection returns its provided config whenever either runtime snapshot is absent, so the added null source snapshot preserves this suite’s pre-projection behavior rather than inventing a new config state. (src/config/runtime-source-projection.ts:41, 9e585e233231)
  • Related model-route provenance: The recently merged model-route change is commit 9441e3f; this PR’s additional mock binding is adjacent test repair, not a second provider-routing implementation. (src/plugins/provider-model-routes.ts:91, 9441e3fe6e55)
  • History and ownership: History identifies Peter Steinberger’s merged agent-settings work and Hannes Rudolph’s merged provider-route work; blame records the present UI and mock lines at the PR head. (ui/src/pages/agents/view.ts:333, 9e585e233231)

Likely related people:

  • steipete: Current-main path history attributes agent-settings work to Peter Steinberger, and the PR-head blame identifies the same author on the affected UI lines. (role: recent Control UI design-system and agent-settings contributor; confidence: high; commits: 0a86702241ce, 9e585e233231; files: ui/src/styles/settings.css, ui/src/pages/agents/view.ts)
  • hannesrudolph: The merged provider-route revision introduced the projection path whose missing runtime-snapshot export this PR repairs in the agent test mock. (role: recent provider-route contributor; confidence: high; commits: 9441e3fe6e55; files: src/plugins/provider-model-routes.ts, src/agents/agent-command.live-model-switch.test.ts)

Rank-up moves

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

  • Read the latest ClawSweeper comment and apply or explicitly skip any Rank-up moves before landing.

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.

@steipete
steipete merged commit 0a8226c into main Aug 20, 2026
183 of 185 checks passed
@steipete
steipete deleted the steipete/settings-design-browser-tool-a455c8 branch August 20, 2026 05:31
@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 21, 2026
…penclaw#126541)

* fix(ui): give embedded settings sections the shared section rhythm

The agents tab panel hosted settings sections in a bare div, so sections
stacked with zero separation; the bespoke .agents-main margin rule in
agents.css missed the nested tabpanel entirely. Descriptions also pulled
up to 4px under control-height header actions (squeezed Verify/Save rows).

Add a .settings-stack primitive to settings.css for embedded surfaces,
use it on the agent tab panel, delete the page-local margin fork, and let
section descriptions clear action-bearing headers.

* test(agents): export getRuntimeConfigSourceSnapshot from runtime-snapshot mock

Main's checks-node-compact-large shard is red: openclaw#126531 routed
provider-model-routes through projectConfigOntoRuntimeSourceSnapshot,
which reads getRuntimeConfigSourceSnapshot, and this suite's explicit
vi.mock factory did not export it (24 failures). Return null so the
projection no-ops and resolvers keep reading the provided config.
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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant