Conversation
Add preset themes (dark, light, nord, dracula, gruvbox, catppuccin) with runtime switching via :theme command and --theme CLI flag. Theme System: - 6 preset themes with full color customization - Config support: preset name or object with overrides - :theme command for persistent change (when autosave enabled) - --theme CLI flag for transient theme selection - ThemeChangedMsg for runtime style reload across all views Config Autosave: - :autosave on/off command with flash feedback - --autosave/--no-autosave CLI flags - Multi-profile support with startup.profiles array format - YAML patching to preserve comments and unknown keys Table Improvements: - Migrate to lipgloss/v2/table for proper cell theming - Extract TableCursor and NewTableStyleFunc for code reuse - Consistent table styling across resource browser and tag search BREAKING CHANGE: Config key renamed from 'persistence' to 'autosave' BREAKING CHANGE: CLI flags renamed from --persist to --autosave BREAKING CHANGE: Config 'startup.profile' (string) replaced by 'startup.profiles' (array) - Old format still readable for backward compatibility - New saves use profiles array format
- Add RWMutex to Current()/SetTheme() for thread safety - Show warning flash when theme save fails with autosave enabled - Add concurrent access test with race detector
Style helpers now call Current() which acquires RLock instead of directly accessing the module-level current variable.
Save methods now hold mutex during both in-memory update and file I/O to prevent concurrent saves from overwriting each other's changes. Renamed patchConfig to patchConfigLocked to indicate caller holds lock.
feat(ui): theming support with config autosave
PR Review: Release v0.8.0 - Theming SupportOverviewThis is a substantial and well-implemented feature PR that adds theming support with 6 preset themes, runtime theme switching, and config autosave functionality. The code quality is high with excellent test coverage and proper concurrency handling. ✅ StrengthsCode Quality & Architecture
Testing
Thread Safety
User Experience
🔍 Issues & Concerns1. Potential Race Condition in SaveRegions (Medium Priority)Location: The early return when Recommendation: Consider moving the check inside the lock or document why it is safe. 2. SaveProfiles Does Not Handle Empty Profiles (Low Priority)Location:
Recommendation: Add the same empty check or document the difference in behavior. 3. Missing Validation for Theme Names (Low Priority)Location: Error handling is good in Recommendation: Add tab completion for theme names or validation in the command input layer. 4. Inconsistent Error Handling in Config Save Paths (Low Priority)Location: Throughout Some places show user warnings on save failure, others silently log. Recommendation: Standardize whether config save failures should show user-visible warnings. 5. ParseColor Accepts #RGB but Documentation Unclear (Low Priority)Location: The Recommendation: Update README.md or add examples showing #RGB support. 🎯 Performance Considerations✅ Good
|
| Category | Rating | Notes |
|---|---|---|
| Code Quality | ⭐⭐⭐⭐⭐ | Excellent architecture, clean separation |
| Testing | ⭐⭐⭐⭐⭐ | Comprehensive coverage, edge cases handled |
| Security | ⭐⭐⭐⭐⭐ | No concerns, proper validation |
| Performance | ⭐⭐⭐⭐☆ | Good, minor lock contention possible |
| Documentation | ⭐⭐⭐⭐☆ | Good, could add more examples |
| Thread Safety | ⭐⭐⭐⭐⭐ | Excellent concurrency handling |
✅ Verdict: APPROVED (with minor suggestions)
This is a high-quality PR that adds significant value with minimal risk. The few issues noted are minor and do not block merging. The code demonstrates excellent engineering practices with proper concurrency, testing, and backward compatibility.
Great work! 🎉
Release v0.8.0
New Features
:themecommand - Switch themes at runtime (persisted when autosave enabled)--themeCLI flag - Set theme for session:autosavecommand - Toggle config persistence on/off--autosave/--no-autosaveCLI flags - Control config persistenceImprovements
startup.profilesarray)Breaking Changes⚠️
persistence.enabledautosave.enabledautosave--persist/--no-persist--autosave/--no-autosavestartup.profile(string)startup.profiles(array)Closes
Note: develop → main PRs use merge commit (not squash)