Skip to content

style(settings): normalize spacing and controls to shared design system - #4162

Merged
graycyrus merged 3 commits into
tinyhumansai:mainfrom
graycyrus:feat/settings-ui-consistency
Jun 26, 2026
Merged

graycyrus merged 3 commits into
tinyhumansai:mainfrom
graycyrus:feat/settings-ui-consistency

Conversation

@graycyrus

@graycyrus graycyrus commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Consistency pass over the Settings panels so they follow the shared design-system
ruler. Spacing + obvious-control swaps only — deeply bespoke layouts are left
structurally intact.

  • Normalized section rhythm to space-y-5, row padding to px-4 py-3, chip rows to gap-1.5.
  • Replaced hand-rolled <section> cards with SettingsSection; raw rows with SettingsRow.
  • Swapped raw checkbox/toggle/number/select/textarea/button controls for the shared
    controls/ primitives (SettingsSwitch/SettingsSelect/SettingsNumberField/SettingsBadge/SettingsRow)
    and ui/Button.
  • Kept upstream's semantic color tokens throughout (no literal-palette regressions).
  • Updated ScreenIntelligencePanel test queries for the checkbox → SettingsSwitch (role="switch") swap.

Reference for the canonical pattern: app/src/components/settings/panels/AgentAccessPanel.tsx.

Scope

Bespoke layouts (state machines, radio-card pickers, modals) and PanelPage-based
panels were normalized for spacing only, not restructured.

Test plan

  • pnpm typecheck — clean
  • pnpm lint — 0 errors (37 pre-existing warnings unrelated)
  • settings Vitest suite — 97 files, 1168 passed / 1 skipped
  • no text-neutral-* / border-neutral-* / bg-white regressions vs upstream tokens

Closes #4154

Summary by CodeRabbit

  • New Features
    • None
  • Bug Fixes
    • Improved accessibility for screen intelligence toggles by using switch controls, with updated tests asserting aria-checked.
  • Refactor
    • Standardized multiple Settings panels to shared UI controls/layouts (buttons, switches, selects, rows/sections) for consistency.
  • Style
    • Refreshed vertical spacing, chip/gap spacing, and card rounding across many settings screens.
  • Tests
    • Added/expanded coverage for account, embedded panels, notification routing, and permissions workflows.

…imitives

Consistency pass across Settings panels: normalize section rhythm to
space-y-5, row padding to px-4 py-3, replace hand-rolled section cards with
SettingsSection, and swap raw checkbox/select/number/button controls for the
shared controls primitives (SettingsSwitch/Select/NumberField/Badge/Row) and
ui/Button. Bespoke layouts (state machines, radio-card pickers, modals) kept
structurally intact. Updated ScreenIntelligencePanel test queries for the
checkbox -> SettingsSwitch (role="switch") swap.

Part of tinyhumansai#4154
@coderabbitai

coderabbitai Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 38b36912-d533-4014-94be-b639e8813e75

📥 Commits

Reviewing files that changed from the base of the PR and between c810fda and a28c055.

📒 Files selected for processing (5)
  • app/src/components/settings/panels/ProfileEditorPage.test.tsx
  • app/src/components/settings/panels/__tests__/AccountPanel.test.tsx
  • app/src/components/settings/panels/__tests__/MemoryDataPanel.test.tsx
  • app/src/components/settings/panels/__tests__/NotificationRoutingPanel.test.tsx
  • app/src/components/settings/panels/screen-intelligence/__tests__/PermissionsSection.test.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
  • app/src/components/settings/panels/tests/NotificationRoutingPanel.test.tsx
  • app/src/components/settings/panels/tests/MemoryDataPanel.test.tsx
  • app/src/components/settings/panels/ProfileEditorPage.test.tsx
  • app/src/components/settings/panels/tests/AccountPanel.test.tsx
  • app/src/components/settings/panels/screen-intelligence/tests/PermissionsSection.test.tsx

📝 Walkthrough

Walkthrough

Settings panels were normalized to shared spacing and layout primitives, with several raw inputs and buttons replaced by shared controls. Related tests were updated to match switch-based interactions and the revised panel structure.

Changes

Settings design-system normalization

Layer / File(s) Summary
Spacing and padding
app/src/components/settings/panels/AIPanel.tsx, app/src/components/settings/panels/AboutPanel.tsx, app/src/components/settings/panels/AnalysisViewsPanel.tsx, app/src/components/settings/panels/EmbeddingsPanel.tsx, app/src/components/settings/panels/MemoryDebugPanel.tsx, app/src/components/settings/panels/MigrationPanel.tsx, app/src/components/settings/panels/ProfilesPanel.tsx, app/src/components/settings/panels/RecoveryPhrasePanel.tsx, app/src/components/settings/panels/SearchPanel.tsx, app/src/components/settings/panels/SystemDiagnostics.tsx, app/src/components/settings/panels/ToolPolicyDiagnosticsPanel.tsx, app/src/components/settings/panels/UsagePanel.tsx, app/src/components/settings/panels/VoicePanel.tsx, app/src/components/settings/panels/McpServerPanel.tsx, app/src/components/settings/panels/PermissionsPanel.tsx
Panel spacing, row padding, chip gaps, and card radius values were adjusted across multiple settings panels.
Section and row layouts
app/src/components/settings/panels/AccountPanel.tsx, app/src/components/settings/panels/MemoryDataPanel.tsx, app/src/components/settings/panels/AgentBoxPanel.tsx, app/src/components/settings/panels/__tests__/AccountPanel.test.tsx, app/src/components/settings/panels/__tests__/MemoryDataPanel.test.tsx
SettingsSection and SettingsRow replace custom wrapper markup around the account summary, memory explanation block, and agent box ready state, with tests covering the updated account and memory rendering.
Shared form controls
app/src/components/settings/panels/AgentChatPanel.tsx, app/src/components/settings/panels/MascotPanel.tsx, app/src/components/settings/panels/NotificationRoutingPanel.tsx, app/src/components/settings/panels/ScreenAwarenessDebugPanel.tsx, app/src/components/settings/panels/ScreenIntelligencePanel.tsx, app/src/components/settings/panels/__tests__/ScreenIntelligencePanel.test.tsx, app/src/components/settings/panels/__tests__/NotificationRoutingPanel.test.tsx
Raw select, checkbox, switch, and number inputs are replaced with shared controls, and the affected panel tests now query switch roles and the updated routing toggle behavior.
Button-backed actions and permissions
app/src/components/settings/panels/screen-intelligence/PermissionsSection.tsx, app/src/components/settings/panels/PermissionsPanel.tsx, app/src/components/settings/panels/ProfileEditorPage.tsx, app/src/components/settings/panels/screen-intelligence/__tests__/PermissionsSection.test.tsx, app/src/components/settings/panels/ProfileEditorPage.test.tsx
Permissions status rows use SettingsBadge and shared Button actions, and the access-tier and allowlist toggles use shared Button components with matching tests.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

feature

Poem

A rabbit hummed through settings halls,
With tidy gaps and softly round walls.
Switches clicked, and badges shone,
Buttons sat where raw bits were sown.
Hop, hop — the panels found their calls.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the PR’s main focus on settings UI spacing and shared controls.
Linked Issues check ✅ Passed The diff matches the linked scope: it standardizes spacing, swaps raw controls for shared primitives, and updates tests for the switch semantics.
Out of Scope Changes check ✅ Passed All changes stay within settings-panel spacing and shared-control normalization, with matching test updates and no unrelated feature work.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

Comment @coderabbitai help to get the list of available commands.

@graycyrus

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/components/settings/panels/ProfilesPanel.tsx`:
- Line 106: The row padding in ProfilesPanel is using a non-canonical vertical
spacing value, which makes this settings list inconsistent with the rest of the
normalized panels. Update the row class in ProfilesPanel’s settings row
container to use the standard `px-4 py-3` padding instead of the tighter
`py-2.5`, keeping the alignment consistent with the other settings panels.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8a3f23b6-5f75-447c-a86d-d85391bb3dbc

📥 Commits

Reviewing files that changed from the base of the PR and between d6149bb and c83e150.

📒 Files selected for processing (26)
  • app/src/components/settings/panels/AIPanel.tsx
  • app/src/components/settings/panels/AboutPanel.tsx
  • app/src/components/settings/panels/AccountPanel.tsx
  • app/src/components/settings/panels/AgentBoxPanel.tsx
  • app/src/components/settings/panels/AgentChatPanel.tsx
  • app/src/components/settings/panels/AnalysisViewsPanel.tsx
  • app/src/components/settings/panels/EmbeddingsPanel.tsx
  • app/src/components/settings/panels/MascotPanel.tsx
  • app/src/components/settings/panels/McpServerPanel.tsx
  • app/src/components/settings/panels/MemoryDataPanel.tsx
  • app/src/components/settings/panels/MemoryDebugPanel.tsx
  • app/src/components/settings/panels/MigrationPanel.tsx
  • app/src/components/settings/panels/NotificationRoutingPanel.tsx
  • app/src/components/settings/panels/PermissionsPanel.tsx
  • app/src/components/settings/panels/ProfileEditorPage.tsx
  • app/src/components/settings/panels/ProfilesPanel.tsx
  • app/src/components/settings/panels/RecoveryPhrasePanel.tsx
  • app/src/components/settings/panels/ScreenAwarenessDebugPanel.tsx
  • app/src/components/settings/panels/ScreenIntelligencePanel.tsx
  • app/src/components/settings/panels/SearchPanel.tsx
  • app/src/components/settings/panels/SystemDiagnostics.tsx
  • app/src/components/settings/panels/ToolPolicyDiagnosticsPanel.tsx
  • app/src/components/settings/panels/UsagePanel.tsx
  • app/src/components/settings/panels/VoicePanel.tsx
  • app/src/components/settings/panels/__tests__/ScreenIntelligencePanel.test.tsx
  • app/src/components/settings/panels/screen-intelligence/PermissionsSection.tsx

Address CodeRabbit: align the profiles list rows with the standard
settings row padding (was py-2.5).
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 26, 2026
@graycyrus
graycyrus marked this pull request as ready for review June 26, 2026 10:31
@graycyrus
graycyrus requested a review from a team June 26, 2026 10:31
@coderabbitai coderabbitai Bot added the working A PR that is being worked on by the team. label Jun 26, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 26, 2026
Add/extend Vitest tests for PermissionsSection, AccountPanel,
NotificationRoutingPanel, MemoryDataPanel, and ProfileEditorPage so the
PR's changed lines clear the 80% diff-coverage gate (local diff-cover: 89%).
@graycyrus
graycyrus force-pushed the feat/settings-ui-consistency branch from c810fda to a28c055 Compare June 26, 2026 11:19
@coderabbitai coderabbitai Bot added feature Net-new user-facing capability or product behavior. and removed working A PR that is being worked on by the team. labels Jun 26, 2026
@graycyrus
graycyrus merged commit b74f645 into tinyhumansai:main Jun 26, 2026
19 of 27 checks passed
senamakel pushed a commit to nocstah/openhuman that referenced this pull request Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Net-new user-facing capability or product behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalize spacing and controls across Settings panels to the shared design system

1 participant