Skip to content

Commit e60b9f8

Browse files
authored
refactor(settings): restructure settings page for better UX (tinyhumansai#494)
* refactor(settings): restructure settings page for better UX Reorganize settings into 4 clean sections (Account & Billing, Features, AI & Models, Developer Options) and extract developer-oriented options from user-facing panels into dedicated debug panels. - Merge Account & Security + Billing into Account & Billing section - Rename Automation & Channels to Features; add Tools, Voice here - Simplify AI & Skills to AI & Models (just Local AI Model) - Expand Developer Options from 4 to 10 items - Create 4 debug panels: ScreenAwarenessDebug, AutocompleteDebug, VoiceDebug, LocalModelDebug - Simplify 4 user panels by stripping dev knobs (FPS, debounce timers, test harnesses, diagnostics, etc.) - Delete AccessibilityPanel (merged into Screen Awareness) - Add "Advanced settings" link in each simplified panel - Update navigation breadcrumbs for new hierarchy * fix(settings): address PR review feedback on debug panels - Guard null result from openhumanAutocompleteDebugFocus() - Block save/start until full config loaded in AutocompletePanel - Separate poll errors from action errors in LocalModelDebugPanel - Replace useEffect setState with render-time one-shot init in ScreenAwarenessDebugPanel to avoid set-state-in-effect lint rule - Remove unused openhumanLocalAiAssetsStatus call from VoiceDebugPanel * fix(settings): update tests for simplified panel structure - Update ScreenIntelligencePanel test for renamed title, button text, and platform message - Rewrite AutocompletePanel test for simplified panel (dev options moved to AutocompleteDebugPanel)
1 parent 8e8da17 commit e60b9f8

16 files changed

Lines changed: 2239 additions & 1652 deletions

app/src/components/settings/SettingsHome.tsx

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -78,54 +78,42 @@ const SettingsHome = () => {
7878
const groupedMenuItems = [
7979
{
8080
id: 'account',
81-
title: 'Account & Security',
82-
description: 'Recovery phrase, team management, and linked account access',
83-
icon: (
84-
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
85-
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 12h14M12 5v14" />
86-
</svg>
87-
),
88-
onClick: () => navigateToSettings('account'),
89-
dangerous: false,
90-
},
91-
{
92-
id: 'billing',
93-
title: 'Billing & Usage',
94-
description: 'Subscription plan, pay-as-you-go credits, and payment methods',
81+
title: 'Account & Billing',
82+
description: 'Recovery phrase, team, connections, billing, and privacy',
9583
icon: (
9684
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
9785
<path
9886
strokeLinecap="round"
9987
strokeLinejoin="round"
10088
strokeWidth={2}
101-
d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3 3v8a3 3 0 003 3z"
89+
d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
10290
/>
10391
</svg>
10492
),
105-
onClick: () => navigateToSettings('billing'),
93+
onClick: () => navigateToSettings('account'),
10694
dangerous: false,
10795
},
10896
{
109-
id: 'automation',
110-
title: 'Automation & Channels',
111-
description: 'Accessibility, screen intelligence, messaging, autocomplete, and cron jobs',
97+
id: 'features',
98+
title: 'Features',
99+
description: 'Screen awareness, autocomplete, voice, messaging, and tools',
112100
icon: (
113101
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
114102
<path
115103
strokeLinecap="round"
116104
strokeLinejoin="round"
117105
strokeWidth={2}
118-
d="M3 5h18v12H3zM8 21h8m-4-4v4"
106+
d="M13 10V3L4 14h7v7l9-11h-7z"
119107
/>
120108
</svg>
121109
),
122-
onClick: () => navigateToSettings('automation'),
110+
onClick: () => navigateToSettings('features'),
123111
dangerous: false,
124112
},
125113
{
126-
id: 'ai-tools',
127-
title: 'AI & Skills',
128-
description: 'Local model runtime, AI configuration, and skills behavior',
114+
id: 'ai-models',
115+
title: 'AI & Models',
116+
description: 'Local AI model setup and downloads',
129117
icon: (
130118
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
131119
<path
@@ -136,13 +124,13 @@ const SettingsHome = () => {
136124
/>
137125
</svg>
138126
),
139-
onClick: () => navigateToSettings('ai-tools'),
127+
onClick: () => navigateToSettings('ai-models'),
140128
dangerous: false,
141129
},
142130
{
143131
id: 'developer-options',
144132
title: 'Developer Options',
145-
description: 'Diagnostic tools, console access, webhooks, and memory inspection',
133+
description: 'Diagnostics, debug panels, webhooks, and memory inspection',
146134
icon: (
147135
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
148136
<path

app/src/components/settings/hooks/useSettingsNavigation.ts

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { useLocation, useNavigate } from 'react-router-dom';
44
export type SettingsRoute =
55
| 'home'
66
| 'account'
7-
| 'automation'
8-
| 'ai-tools'
7+
| 'features'
8+
| 'ai-models'
99
| 'connections'
1010
| 'messaging'
1111
| 'cron-jobs'
@@ -17,15 +17,19 @@ export type SettingsRoute =
1717
| 'team-members'
1818
| 'team-invites'
1919
| 'developer-options'
20-
| 'accessibility'
2120
| 'ai'
2221
| 'local-model'
2322
| 'voice'
23+
| 'tools'
2424
| 'memory-data'
2525
| 'memory-debug'
2626
| 'recovery-phrase'
2727
| 'webhooks-debug'
28-
| 'agent-chat';
28+
| 'agent-chat'
29+
| 'screen-awareness-debug'
30+
| 'autocomplete-debug'
31+
| 'voice-debug'
32+
| 'local-model-debug';
2933

3034
export interface BreadcrumbItem {
3135
label: string;
@@ -69,20 +73,24 @@ export const useSettingsNavigation = (): SettingsNavigationHook => {
6973
if (path.includes('/settings/team/invites')) return 'team-invites';
7074
if (path.includes('/settings/team')) return 'team';
7175
if (path.includes('/settings/account')) return 'account';
72-
if (path.includes('/settings/automation')) return 'automation';
73-
if (path.includes('/settings/ai-tools')) return 'ai-tools';
76+
if (path.includes('/settings/features')) return 'features';
77+
if (path.includes('/settings/ai-models')) return 'ai-models';
7478
if (path.includes('/settings/connections')) return 'connections';
7579
if (path.includes('/settings/messaging')) return 'messaging';
7680
if (path.includes('/settings/cron-jobs')) return 'cron-jobs';
81+
if (path.includes('/settings/screen-awareness-debug')) return 'screen-awareness-debug';
7782
if (path.includes('/settings/screen-intelligence')) return 'screen-intelligence';
83+
if (path.includes('/settings/autocomplete-debug')) return 'autocomplete-debug';
7884
if (path.includes('/settings/autocomplete')) return 'autocomplete';
7985
if (path.includes('/settings/privacy')) return 'privacy';
8086
if (path.includes('/settings/billing')) return 'billing';
8187
if (path.includes('/settings/developer-options')) return 'developer-options';
82-
if (path.includes('/settings/accessibility')) return 'accessibility';
8388
if (path.includes('/settings/ai')) return 'ai';
89+
if (path.includes('/settings/local-model-debug')) return 'local-model-debug';
8490
if (path.includes('/settings/local-model')) return 'local-model';
91+
if (path.includes('/settings/voice-debug')) return 'voice-debug';
8592
if (path.includes('/settings/voice')) return 'voice';
93+
if (path.includes('/settings/tools')) return 'tools';
8694
if (path.includes('/settings/memory-data')) return 'memory-data';
8795
if (path.includes('/settings/memory-debug')) return 'memory-debug';
8896
if (path.includes('/settings/webhooks-debug')) return 'webhooks-debug';
@@ -126,18 +134,18 @@ export const useSettingsNavigation = (): SettingsNavigationHook => {
126134
const settingsCrumb: BreadcrumbItem = { label: 'Settings', onClick: () => navigate('/settings') };
127135

128136
const accountCrumb: BreadcrumbItem = {
129-
label: 'Account & Security',
137+
label: 'Account & Billing',
130138
onClick: () => navigate('/settings/account'),
131139
};
132140

133-
const automationCrumb: BreadcrumbItem = {
134-
label: 'Automation & Channels',
135-
onClick: () => navigate('/settings/automation'),
141+
const featuresCrumb: BreadcrumbItem = {
142+
label: 'Features',
143+
onClick: () => navigate('/settings/features'),
136144
};
137145

138-
const aiToolsCrumb: BreadcrumbItem = {
139-
label: 'AI & Skills',
140-
onClick: () => navigate('/settings/ai-tools'),
146+
const aiModelsCrumb: BreadcrumbItem = {
147+
label: 'AI & Models',
148+
onClick: () => navigate('/settings/ai-models'),
141149
};
142150

143151
const teamCrumb: BreadcrumbItem = { label: 'Team', onClick: () => navigate('/settings/team') };
@@ -151,48 +159,49 @@ export const useSettingsNavigation = (): SettingsNavigationHook => {
151159
switch (currentRoute) {
152160
// Section pages
153161
case 'account':
154-
case 'automation':
155-
case 'ai-tools':
162+
case 'features':
163+
case 'ai-models':
156164
return [settingsCrumb];
157165

158-
// Top-level billing leaf (promoted out of Account & Security)
159-
case 'billing':
160-
return [settingsCrumb];
161-
162-
// Leaf panels under account
166+
// Leaf panels under account & billing
163167
case 'recovery-phrase':
164168
case 'team':
165169
case 'connections':
170+
case 'billing':
171+
case 'privacy':
166172
return [settingsCrumb, accountCrumb];
167173

168-
// Leaf panels under automation
169-
case 'accessibility':
174+
// Leaf panels under features
170175
case 'screen-intelligence':
171176
case 'autocomplete':
177+
case 'voice':
172178
case 'messaging':
173-
case 'cron-jobs':
174-
return [settingsCrumb, automationCrumb];
179+
case 'tools':
180+
return [settingsCrumb, featuresCrumb];
175181

176-
// Leaf panels under ai-tools
177-
case 'voice':
182+
// Leaf panels under AI & Models
178183
case 'local-model':
179-
case 'ai':
180-
return [settingsCrumb, aiToolsCrumb];
184+
return [settingsCrumb, aiModelsCrumb];
181185

182186
// Team sub-pages
183187
case 'team-members':
184188
case 'team-invites':
185189
return [settingsCrumb, accountCrumb, teamCrumb];
186190

187191
// Developer sub-pages
192+
case 'ai':
193+
case 'agent-chat':
194+
case 'cron-jobs':
195+
case 'screen-awareness-debug':
196+
case 'autocomplete-debug':
197+
case 'voice-debug':
198+
case 'local-model-debug':
188199
case 'webhooks-debug':
189200
case 'memory-data':
190201
case 'memory-debug':
191202
return [settingsCrumb, developerCrumb];
192203

193-
// Other leaf pages
194-
case 'privacy':
195-
case 'agent-chat':
204+
// Developer options section page
196205
case 'developer-options':
197206
return [settingsCrumb];
198207

0 commit comments

Comments
 (0)