feat(KB-185): add global/project settings hierarchy with scope-aware UI

- Add GlobalSettingsStore with file-based storage in ~/.pi/kb/settings.json
- Implement two-tier hierarchy: global (user prefs) and project (.kb/config.json)
- Update TaskStore to merge settings with project overriding global
- Add API endpoints: GET/PUT /api/settings/global and GET /api/settings/scopes
- Add scope indicators (🌐 global, 📁 project) to settings modal sidebar
- Implement scope-aware save: only save active scope, reject global-only fields
- Add frontend API functions for global settings operations
- Add tests for GlobalSettingsStore, settings routes, and SettingsModal scopes
- Create changeset for the new settings hierarchy feature
- Update AGENTS.md with settings hierarchy documentation
This commit is contained in:
gsxdsm
2026-03-31 03:12:33 -07:00
parent dfe5601622
commit dac4705761
15 changed files with 1178 additions and 104 deletions

View File

@@ -1170,6 +1170,33 @@ body {
margin-bottom: 4px;
}
/* Scope indicators in sidebar nav items */
.settings-scope-icon {
margin-right: 6px;
font-size: 12px;
line-height: 1;
}
/* Scope banner above section content */
.settings-scope-banner {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 20px;
margin: 0 0 4px 0;
font-size: 12px;
border-radius: var(--radius);
color: var(--text-muted);
}
.settings-scope-global {
background: rgba(59, 130, 246, 0.08);
border-left: 3px solid rgba(59, 130, 246, 0.4);
}
.settings-scope-project {
background: rgba(34, 197, 94, 0.08);
border-left: 3px solid rgba(34, 197, 94, 0.4);
}
/* === Auth Provider Cards === */
.auth-provider-row {
display: flex;