PR #7: Final Polish - StatusIndicator & Settings View Extraction#75
Merged
Conversation
…iews ## Changes ### StatusIndicator Applied to Global Settings - Applied StatusIndicator component to Global Settings > Tools tab - Replaced manual HStack status displays with StatusIndicator - Consistent with Terminal Details editor (PR #6) - Removed ~90 lines of duplicate status display code ### View Extraction (Fix SwiftLint Violations) - Extracted SettingsGeneralView from SettingsView.swift - Contains Terminal, Bin, Updates, Language, Uninstall, About sections - Reduced SettingsView.swift from 528 → 335 lines - Extracted SettingsDataSecurityView from SettingsView.swift - Contains Security, Data Storage, Data Protection sections - Includes browseForDataDirectory() helper - Fixed file length violations: - File: Was 528/500 (28 over) → Now 335/500 ✅ - Type body: Was 398/300 (98 over) → Under limit ✅ ### Component Documentation - Added "Reusable UI Components" section to code-style.md - Documented all 5 components with usage patterns: - PathInputField - Path inputs with validation - SharedToggle - Two-tier permission toggles - StatusIndicator - Feature/service status display - LargeTextInput - Multi-line input with fixed height - KeyValueEditor - Environment variables, tags ## Testing - All 521 tests pass - Build successful with zero errors - No SwiftLint warnings for modified files - Manual testing: All Settings tabs functional ## Files Modified - SettingsView.swift - View extraction, reduced length - ToolsTabContent.swift - Applied StatusIndicator - code-style.md - Added component documentation ## Files Created - Sources/TermQ/Views/Settings/SettingsGeneralView.swift - Sources/TermQ/Views/Settings/SettingsDataSecurityView.swift ## Technical Notes - Used Binding wrapper for defaultBackend (String ↔ TerminalBackend) - Maintained exact same functionality, no behavior changes - View extraction preserves all existing features Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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.
Overview
Final polish PR completing deferred work from PR #6 and fixing SwiftLint violations in SettingsView.swift.
Changes
1. StatusIndicator Applied to Global Settings ✅
2. Settings View Extraction ✅
Fixed critical SwiftLint violations in SettingsView.swift:
Before:
After:
Extracted Views:
SettingsGeneralView.swift- Terminal, Bin, Updates, Language, Uninstall, About sectionsSettingsDataSecurityView.swift- Security, Data Storage, Data Protection sectionsTechnical Implementation:
3. Component Documentation ✅
Added "Reusable UI Components" section to
.claude/commands/code-style.md:Documented Components:
Each component includes:
Testing
Build & Tests
Manual Testing
Files Modified
Modified
Sources/TermQ/Views/SettingsView.swift- View extraction, reduced from 528 → 335 linesSources/TermQ/Views/ToolsTabContent.swift- Applied StatusIndicator.claude/commands/code-style.md- Added component usage patternsCreated
Sources/TermQ/Views/Settings/SettingsGeneralView.swift- 169 linesSources/TermQ/Views/Settings/SettingsDataSecurityView.swift- 74 linesRelated
.claude/plans/settings-ui-improvements-implementation.md.claude/plans/2026-01-19-pr7-final-polish-documentation.mdSuccess Criteria
Next Steps
After this PR merges:
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com