feat: Phase 2 UX Polish — theme system, config profiles, error banner, tests
- Add Theme struct with 3 predefined themes (dark/light/druntime) - Add Profile struct for named configuration profiles - Add ErrorBanner with severity levels and auto-dismiss - Add unit tests for theme, error banner, and models - Update CHANGELOG.md and PROJECT_STATE.md
This commit is contained in:
@@ -148,3 +148,31 @@
|
||||
|
||||
### Models Updated
|
||||
- `AppConfig`: added `EncryptionEnabled`, `PasswordHash`, `KnownHostsFile`
|
||||
|
||||
## Phase 2 UX Polish (Done)
|
||||
|
||||
### Theme System
|
||||
- **NEW `themes.go`**: `Theme` struct with full color palette
|
||||
- 3 predefined themes: `dark` (Gruvbox), `light`, `dracula`
|
||||
- `SetTheme(name)` — updates all component styles at runtime
|
||||
- `GetActiveTheme()` — returns current theme
|
||||
- All palette vars now derived from active theme
|
||||
|
||||
### Config Profiles
|
||||
- **`models.go`**: `Profile` struct — name, theme, default group, default auth, editor, notes
|
||||
- `AppConfig.Profiles []Profile` — list of named profiles
|
||||
- `AppConfig.ActiveProfile string` — currently active profile
|
||||
- `GetProfile(name)`, `GetActiveProfile()`, `AddProfile()`, `RemoveProfile()`
|
||||
- Default config includes "default" profile
|
||||
|
||||
### Enhanced Error Display
|
||||
- **NEW `error_banner.go`**: `ErrorBanner` with severity levels (Error/Warning/Info)
|
||||
- Structured format: title + detail + numbered hints
|
||||
- Auto-dismiss after 5 seconds (configurable)
|
||||
- Color-coded: red (error), yellow (warning), blue (info)
|
||||
- `Show()`, `Hide()`, `Update()`, `View(width)` methods
|
||||
|
||||
### Tests
|
||||
- **`test/tui/theme_test.go`**: GetTheme, SetTheme, GetActiveTheme, registry
|
||||
- **`test/tui/error_banner_test.go`**: Show/Hide, AutoDismiss, Severity, View
|
||||
- **`test/models_test.go`**: DefaultConfig, Profile CRUD
|
||||
|
||||
Reference in New Issue
Block a user