Repository navigation
fix(ui): give embedded settings sections the shared section rhythm - #126541
Conversation
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.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
…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.
|
Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 1:12 AM ET / 05:12 UTC. ClawSweeper reviewWhat this changesThe 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 readinessKeep 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 Review scores
Verification
Live VerificationEntry: Result: FAIL (partial) — step 4 Steps:
How this fits togetherThe 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]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +10, Tests +3, Docs +1. Total +14 across 5 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat 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
|
|
Merged via squash.
|
…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.
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 inagents.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-stackprimitive — 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 takesclass="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:
After:
Validation:
pnpm check:changed(stylelint, tsgo core+UI, i18n verify, deadcode) green;ui/src/pages/agents/view.test.ts24/24 passed; autoreview (Codex gpt-5.6-sol, high) clean.CI Heal (unrelated main breakage fixed here)
Main's
checks-node-compact-largeshard was red before this PR: #126531 routedprovider-model-routesthroughprojectConfigOntoRuntimeSourceSnapshot, which readsgetRuntimeConfigSourceSnapshot, andsrc/agents/agent-command.live-model-switch.test.ts's explicitvi.mockfactory did not export it — 24 failures (repro'd onorigin/main, also red on commit 9441e3f). Fixed in this PR per repo policy by exporting the missing binding (returnsnull, so the projection no-ops). Suite is 126/126 locally after the fix.