Commit Graph

4 Commits

Author SHA1 Message Date
Alexander c1205e5fb0 refactor: migrate to DDD layered architecture
Split the monolithic app.rs (762 lines) into four DDD layers:
- domain/: models, navigation enums (Tab, ModalKind), conversions, aggregates
- application/: App state, LibraryState, NotificationManager, event handlers
- infrastructure/: config, gRPC client, system utilities
- presentation/: all render functions, widgets, views, modals

Original modules (app, data, ui, config, grpc) preserved as thin
re-export facades for backward compatibility. All 13 insta snapshot
tests pass without modification.
2026-05-09 12:25:10 +02:00
Alexander 5bee7092d3 feat: add insta snapshot testing for TUI components
- Add insta dev-dependency for visual regression testing
- Create lib.rs to expose modules for integration tests
- Add snapshot tests for progress_bar, topbar, library, help modal
- Add unit tests for LibraryState navigation
- Move all tests to tests/ directory (proper Rust convention)
- Make build.rs skip proto compilation when protoc unavailable
- Add docs/testing-possible-solutions.md with testing strategies
2026-05-09 11:35:10 +02:00
Alexander f7660436c2 feat: add notification history dropdown and track fetching
- Add notifications dropdown in topbar with click-to-expand details
- Implement GetAlbum gRPC call for fetching track details
- Add track caching to avoid duplicate requests
- Guard against albums with empty IDs from server
- Increase notification TTL from 4s to 6s
- Add grpcurl to flake.nix for debugging
2026-05-09 11:19:24 +02:00
Alexander e77e854d2e feat: add gRPC client with config-based server address and album support
- Add tonic/prost gRPC client connecting to music-agregator service
- Add config.yaml for configurable server host/port
- Add build.rs for proto compilation from music-agregator
- Update Artist/Album models to match proto with MonitorState enum
- Convert album list from GetArtists response
- Fix album click selection with correct layout offsets
- Improve monitor state icons for better visibility
2026-05-08 23:10:15 +02:00