Skip to content

feat(gui): Library empty/no-results state + clearer preview play affordance (#121, #109)#136

Open
prekabreki wants to merge 1 commit into
mainfrom
fix/121-109-library-empty-state-play-button
Open

feat(gui): Library empty/no-results state + clearer preview play affordance (#121, #109)#136
prekabreki wants to merge 1 commit into
mainfrom
fix/121-109-library-empty-state-play-button

Conversation

@prekabreki

Copy link
Copy Markdown
Owner

Summary

Two GUI-audit fixes on the Library view, both scoped to views/library.py + library_model.py (+ tests). No shell.py changes.

#121 (audit H6) - empty-state / no-results overlay

The QTableView used to show a bare blank grid with no guidance. A new Qt-free helper empty_state_message(total, visible) decides the message; the view floats it over the table viewport:

  • total == 0 -> "No catalog yet - run Scan on the Pipeline tab"
  • total > 0 and visible == 0 (filters exclude everything) -> "No lines match - clear filters"
  • otherwise -> nothing (the grid)

The decision lives in the Qt-free model so it unit-tests without Qt. ASCII hyphens only, per repo convention.

#109 (audit, relates M10) - preview affordance reads as a play control

The tiny read as a tree-expand triangle. Now:

  • Filled for playable rows, hollow for unavailable ones - shape (not just color) carries availability.
  • Rendered enlarged via a FontRole on the preview column, with a roomier fixed column width.
  • Pointing-hand cursor while hovering a playable cell (arrow otherwise).
  • Click behavior unchanged: an unavailable row is still a no-op.

Scope kept to glyph/size/cursor - no tooltip/elide work (separate issue).

Tests

  • test_library_model.py: empty_state_message for all three states + ASCII-hyphen assertion.
  • test_library_view.py: overlay text/visibility for no-catalog, filtered-empty, and populated cases; filled-vs-hollow glyph for playable vs unavailable rows; enlarged preview font.

Full suite: 1136 passed, 33 skipped (env-gated). ruff check src tests: clean.

Closes #121
Closes #109

🤖 Generated with Claude Code

…rdance

Addresses two GUI audit findings on the Library view:

- #121 (H6): the QTableView showed a bare blank grid with no guidance when
  empty. Add a viewport overlay driven by a Qt-free empty_state_message(total,
  visible) helper: total==0 -> "No catalog yet - run Scan on the Pipeline tab";
  total>0 & visible==0 -> "No lines match - clear filters"; otherwise nothing.
  ASCII hyphens throughout.

- #109 (M10): the tiny "▷" preview glyph read as a tree-expand triangle. Use a
  filled ▶ for playable rows and a hollow ▷ for unavailable ones (shape now
  carries availability, not just color), render it enlarged via a FontRole, give
  the column a roomier fixed width, and show a pointing-hand cursor while
  hovering a playable cell. Click behavior is unchanged (unavailable = no-op).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant