Commit Graph

13 Commits

Author SHA1 Message Date
Alexander 5a34fafd3f style: apply rustfmt to existing files
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/claude-agent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-10 10:59:43 +02:00
Alexander 85093d0ff0 fix: update album counters from GetAlbum response
GetArtists returns albums with total_tracks=0 and no release info.
When GetAlbum response arrives with richer data, update the album
in the artist list (have/total/status/quality/monitored). Also fall
back to release.track_count when total_tracks is 0 in the proto.

Updates proto to match new API: GetAlbumResponse.info wrapper,
AlbumDetail.release field, ReleaseInfo struct, flat TrackDetail
file fields. Passes album download state to convert_track so
tracks show as owned when album download is completed.
2026-05-09 23:31:39 +02:00
Alexander 1232b76fff fix: match 'completed' download state and prefer format over quality
The API returns download.state='completed' but convert_album only
matched 'downloaded', causing monitored+downloaded albums to display
as Wanted with 0 tracks. Also prefer download.format ('FLAC') over
download.quality (empty) for the quality display.
2026-05-09 23:23:43 +02:00
Alexander 7a35958c42 feat: separate albums/tracks into bordered panes, fix click handling
- Replace single Detail pane with separate Albums and Tracks panes,
  each with its own border that highlights yellow when focused
- Store rendered Rect areas on LibraryState instead of hardcoding
  layout offsets, fixing album click selection
- Split render functions into public components for isolated testing
- Restructure snapshot tests by component (artists, albums, tracks,
  header, detail) — 13 tests expanded to 26
2026-05-09 19:42:48 +02:00
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
Alexander 620bd374de refactor: replace vim keybindings with mouse navigation, remove mock data
- Remove all sample/mock data (artists, albums, tracks, queue, history, calendar)
- Delete input module (vim.rs, leader.rs) and related UI (which_key, cmdline)
- Add mouse support: click tabs, click list items, scroll wheel navigation
- Show real disk space via nix::statvfs instead of hardcoded value
- Simplify topbar/statusbar by removing mode display and key hints
- Hide album/track sections when no artist is selected
2026-05-08 22:16:38 +02:00
Alexander eccf0d8de5 docs: add evil-keys keybinding library implementation plan 2026-05-08 14:51:00 +02:00
Alexander fcefcc02a0 feat: implement harmony TUI with vim/evil-mode navigation and SPC leader
Full Ratatui implementation of the harmony music library manager prototype:
- 6 tab views (Library 3-pane, Wanted, Queue, History, Calendar, Settings)
- Vim/evil-mode keybindings (hjkl, counts, gg/G, w/b/e, Ctrl-d/u, H/M/L, marks, operator-pending)
- SPC leader key with which-key popup (Doom Emacs style)
- Command mode (:q, :theme, :help) and / search filter
- Help and quit confirmation modals
- Toast notification system with auto-dismiss
- Gruvbox dark theme throughout
2026-05-08 13:26:09 +02:00
Alexander f967256708 add flake.lock, gitignore .pre-commit-config.yaml 2026-05-08 12:35:33 +02:00
Alexander e68342c93a init: Rust/Ratatui TUI project scaffold with nix flake 2026-05-08 12:31:19 +02:00