feat: settings layout redesign — sidebar navigation, card instances, dark mode - #3
Merged
Conversation
…nstances, dark mode Redesign Settings window from iOS-style TabView to macOS-native sidebar: - Sidebar navigation: Services / General / About (180pt, SF Symbols) - Instance cards: StatusDot (tracking on/off), shortName badge, expandable metrics - Dropdown provider picker with SF Symbol icons (scalable beyond 4 providers) - Enhanced InstanceEditor: collapsible model cards, gradient threshold sliders - Guided empty state with CTA button - Conditional Save Changes button - Drag-to-reorder preserved - Full light/dark mode via semantic color tokens (Color+Theme.swift) - Window resized: 680×520 (min 560×420) New files (11): Color+Theme, Provider+Icon, StatusDotView, InstanceCardView, EmptyStateGuideView + 6 test files Modified files (6): SettingsView, InstanceEditorView, SettingsViewModel, SettingsWindow, ThresholdConfigView, project.pbxproj Verification: F1 Compliance PASS, F2 Code Quality PASS, F4 Scope Fidelity CLEAN
- Rewrite ARCHITECTURE.md §2.5 to reflect macOS sidebar navigation (Services/General/About) - Document new components: InstanceCardView, StatusDotView, EmptyStateGuideView - Add dark mode + conditional save notes - Update §12 directory tree with new files - Update DEVELOPMENT_PLAN.md Phase 4: sidebar layout + new deliverables - Add 3 SwiftUI semantic tokens: progressTrackBg, warningBg, cardShadow - Add 4 NSColor companions: menuBarDim, menuBarSafe, menuBarWarning, menuBarCritical
- UsageCardView: ~30 replacements (.secondary→textSecondary, .primary→textPrimary, etc.) - UsagePanelView: 8 replacements (.orange→warningYellow, .secondary→textSecondary) - EmptyStateView: 3 replacements (.secondary→textSecondary, .primary→textPrimary) - SettingsView: 4 residual cleanups (.red→dangerRed, .orange→warningYellow) - InstanceEditorView: 1 cleanup (.red→dangerRed) - ThresholdConfigView: 2 cleanups (.red→criticalRed) - InstanceCardView: 2 cleanups (.secondary→textSecondary, shadow→cardShadow) - MenuBarIconRenderer: 4 NSColor literals→NSColor theme companions - FlowingGlowBar decorative gradients preserved unchanged
Owner
Author
代码评审结果总体:✅ 主应用编译通过,
|
| 文件 | 变更 |
|---|---|
InstanceCardView.swift |
移除 isExpanded/onToggleExpand/onToggleMetric 参数 + expandedMetrics 视图 |
SettingsViewModel.swift |
移除 expandedInstanceUUIDs/toggleExpanded/setMetricDisplayInMenuBar;save() 重载加独立重试 |
SettingsView.swift |
移除 InstanceCardView 调用中的展开/指标参数 |
InstanceCardViewTests.swift |
适配简化后的 API |
SettingsViewModelTests.swift |
移除展开态相关测试用例 |
验证
- ✅ Release build:BUILD SUCCEEDED
- ✅ Test build:TEST BUILD SUCCEEDED
- ✅ 189 tests executed(移除 6 个展开态测试后),30 failures 均为环境签名/快照/编码兼容问题
- Remove isExpanded/onToggleExpand/onToggleMetric from InstanceCardView; metric visibility is managed solely through InstanceEditorView - Remove expandedInstanceUUIDs/toggleExpanded/setMetricDisplayInMenuBar from SettingsViewModel - Wrap save() reload in independent do/catch with 3 retries to prevent partial rollback when reload fails after disk commit - Update tests to match simplified API
- ARCHITECTURE.md §2.5: remove 'expandable metrics' and 'auto-save on focus loss' descriptions — InstanceCardView no longer has metric expansion (managed in InstanceEditorView), SettingsWindow prompts on close instead of auto-saving - ARCHITECTURE.md §12: update InstanceCardView directory tree comment - README.md / README_zh-CN.md: update first-time setup steps to reflect new MetricConfig-based workflow; add 6 new test suites (46 cases) with 113→159 total count - DEVELOPMENT_PLAN.md Phase 4c: update InstanceEditorView spec to match 4-provider dropdown + MetricConfig multi-metric system; Phase 4e: correct drag-reorder save behavior (manual Save Changes)
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete settings window layout redesign with semantic color tokens.
Changes