feat(settings): add top-row tab navigation; fold Providers + mode + secrets into one IA

The settings page was a single vertical scroll containing seven
unrelated concerns. Users had to scroll past theme preferences to
reach Providers — which is the most-touched surface — and mode +
secrets + shortcuts lived below that. There was no signal about
where anything was.

Introduced `SettingsShell` with a horizontal tab row along the top:

  General | Execution mode | Providers | Shortcuts | Data | Secrets

Each tab swaps the content pane. Active tab is visually anchored
with a 2px primary underline + foreground text; inactive tabs stay
muted with a hover promotion. All tabs are real `role="tab"` +
`aria-selected` so screen readers announce the current pane; the
nav has `aria-label="Settings categories"`.

Tab state is local — settings are ephemeral navigation, no reason
to persist across company switches or app restarts. Default is
"general" because that's where first-time users land.

Refactor consequences:

- `OperationsSections.tsx` now renders `<SettingsShell />` + the
  OAuth prompt modal portal; the old double-Panel wrapper with
  "Profile and release" + "Providers" titles is gone. The "Profile
  and release" label always fought with what was actually inside
  the pane — Jobs audit item S-S2 addressed.
- Providers moved from a separate sibling Panel into the main IA.
  Previously Providers came AFTER a 7-section scroll; now it is a
  peer of General / Mode / etc., reachable in one click.
- Deleted the now-unused `SettingsPane.tsx` orchestrator. Its
  single-column rendering survived only as a composition step that
  SettingsShell replaces.

Added i18n keys (zh + en):
  settings.tabs.general / mode / providers / shortcuts / data /
  secrets; settings.tabsAria.

Covers J-S2 / J-S7 / S-S5 / S-S7 from the settings audit.
This commit is contained in:
ZacharyZhang-NY committed 2026-04-17 21:07:52 -04:00
1 parent 16e45b6a8d
commit 03bcc8a8f0
5 files changed
+144 -73

No files matched your search

+7
View File
@@ -1276,6 +1276,13 @@ export const en: Record<string, string> = {
"org.statusAria": "Status: {status}",
// ── Settings pane ──
"settings.tabs.general": "General",
"settings.tabs.mode": "Execution mode",
"settings.tabs.providers": "Providers",
"settings.tabs.shortcuts": "Shortcuts",
"settings.tabs.data": "Data",
"settings.tabs.secrets": "Secrets",
"settings.tabsAria": "Settings categories",
"settings.updaterHint": "Check for application updates at launch",
"settings.modeScope": "Applies to current company: {company}",
"settings.backupRestore": "Backup & restore",
+7
View File
@@ -1276,6 +1276,13 @@ export const zh: Record<string, string> = {
"org.statusAria": "状态:{status}",
// ── 设置面板 ──
"settings.tabs.general": "通用",
"settings.tabs.mode": "运营模式",
"settings.tabs.providers": "连接器",
"settings.tabs.shortcuts": "快捷键",
"settings.tabs.data": "数据",
"settings.tabs.secrets": "密钥",
"settings.tabsAria": "设置分类",
"settings.updaterHint": "启动时自动检查应用更新",
"settings.modeScope": "应用于当前公司:{company}",
"settings.backupRestore": "备份与恢复",