Repository navigation
style(settings): normalize spacing and controls to shared design system - #4162
Conversation
…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
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughSettings 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. ChangesSettings design-system normalization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
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
📒 Files selected for processing (26)
app/src/components/settings/panels/AIPanel.tsxapp/src/components/settings/panels/AboutPanel.tsxapp/src/components/settings/panels/AccountPanel.tsxapp/src/components/settings/panels/AgentBoxPanel.tsxapp/src/components/settings/panels/AgentChatPanel.tsxapp/src/components/settings/panels/AnalysisViewsPanel.tsxapp/src/components/settings/panels/EmbeddingsPanel.tsxapp/src/components/settings/panels/MascotPanel.tsxapp/src/components/settings/panels/McpServerPanel.tsxapp/src/components/settings/panels/MemoryDataPanel.tsxapp/src/components/settings/panels/MemoryDebugPanel.tsxapp/src/components/settings/panels/MigrationPanel.tsxapp/src/components/settings/panels/NotificationRoutingPanel.tsxapp/src/components/settings/panels/PermissionsPanel.tsxapp/src/components/settings/panels/ProfileEditorPage.tsxapp/src/components/settings/panels/ProfilesPanel.tsxapp/src/components/settings/panels/RecoveryPhrasePanel.tsxapp/src/components/settings/panels/ScreenAwarenessDebugPanel.tsxapp/src/components/settings/panels/ScreenIntelligencePanel.tsxapp/src/components/settings/panels/SearchPanel.tsxapp/src/components/settings/panels/SystemDiagnostics.tsxapp/src/components/settings/panels/ToolPolicyDiagnosticsPanel.tsxapp/src/components/settings/panels/UsagePanel.tsxapp/src/components/settings/panels/VoicePanel.tsxapp/src/components/settings/panels/__tests__/ScreenIntelligencePanel.test.tsxapp/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).
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%).
c810fda to
a28c055
Compare
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.
space-y-5, row padding topx-4 py-3, chip rows togap-1.5.<section>cards withSettingsSection; raw rows withSettingsRow.controls/primitives (SettingsSwitch/SettingsSelect/SettingsNumberField/SettingsBadge/SettingsRow)and
ui/Button.ScreenIntelligencePaneltest 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-basedpanels were normalized for spacing only, not restructured.
Test plan
pnpm typecheck— cleanpnpm lint— 0 errors (37 pre-existing warnings unrelated)text-neutral-*/border-neutral-*/bg-whiteregressions vs upstream tokensCloses #4154
Summary by CodeRabbit
aria-checked.