Skip to content

TUI for toggling followed artists; musup <N> keeps CLI mode #61

Description

@Jason-Abbott

Overview

Change CLI behavior:

  • musup <number> — same as today: show all artists and albums new within N years
  • musup (no argument) — open a Bubble Tea TUI showing all album artists (using existing is_album_artist filtering) in 3 columns, navigable with arrow keys (up/down/across), with space bar to toggle "follows" checkmark

Tasks

  • Add followed boolean column to artists table (new DB migration v14)
  • Add Bubble Tea + Lip Gloss + Bubbles dependencies to go.mod
  • Create TUI in internal/tui/ package
    • 3-column layout of all album artists
    • Arrow key navigation (up, down, left, right across columns)
    • Space bar toggles followed status (standard checkmark display)
    • Persist follows to DB on toggle
  • Update cmd/root.go: if no args → launch TUI; if <number> arg → current CLI behavior
  • Add DB queries: list all album artists with followed status, toggle followed
  • Tests for new DB queries and migration

Summary of Changes

  • Added followed column to artists table (migration v14, default=1)
  • Added AlbumArtists and SetFollowed sqlc queries
  • Created internal/tui/tui.go with Bubble Tea v2 3-column artist list
  • musup (no args) opens TUI; musup <N> keeps CLI behavior
  • Added tests for new queries; all tests pass, lint clean

Additional Changes (artist_id FK + modal)

  • Migration v15: add artist_id FK to files table, backfill from artist_norm join
  • Updated all queries (NewerReleases, AlbumArtists, DistinctArtistIDs) to use artist_id
  • Updated scan.go to call EnsureArtist and set artist_id on file upsert
  • Updated check.go to use DistinctArtistIDs and pass artist ID directly
  • Added ArtistLocalTracks query and GetArtistByID query
  • Added enter-key modal showing local albums/tracks for selected artist
  • All tests updated and passing, lint clean

👾 This issue is managed by Jig. Edits made here will be overwritten.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions