Commit Graph
26 Commits
Author SHA1 Message Date
vicrodh 7eb9627eab feat(slint): context menus for album cards and track rows
Add a first cut of context menus, opened from the "more" (ellipsis)
button on Discover album cards and on album track rows.

- ContextMenu / ContextMenuItem primitives (PopupWindow-hosted panel)
- AlbumCard: the overlay action buttons are now interactive (they gate
  their pointer handling so non-hovered cards still open on click); the
  more button opens a menu — Open album, Play, Add to queue, Add to
  favorites
- TrackRow: a hover-revealed more button opens a menu — Play, Add to
  queue, Add to favorites; AlbumTrackItem and TrackData carry the
  track id
- Menu actions bubble up as a single media-action(kind, id, action)
  callback through the shell; main.rs logs it for now — playback and
  favorites wiring lands with the playback session
- user and list-plus icons

cc
2026-05-18 17:32:56 -06:00
vicrodh 1fd3cfcb2b fix(slint): album card overlay, award ribbon, and quality tooltip
Three corrections to the Discover album card:

- Overlay meta: the genre is one point larger and bold, and the year
  now sits a single line below it (conditional `if` rows with explicit
  heights, instead of `visible` toggles that left a phantom gap)
- Award ribbon: width hugs its label (capped at 200px, below the card
  width) instead of spanning the full card — it reads as a ribbon again
- Quality badge: extracted to a QualityBadge primitive that reveals
  the exact quality ("Hi-Res: 24-bit / 96 kHz") on hover, mirroring the
  Tauri QualityBadge; home.rs derives the label from the discover
  audio info

cc
2026-05-18 17:22:43 -06:00
vicrodh 54b3a7350d fix(slint): drop the reserved horizontal scrollbar gutter on Home
The carousels' clipped, oversized inner track inflated the scroll
content's preferred width, so the vertical ScrollView reserved a
bottom gutter for a horizontal scrollbar that is never shown. Pin the
ScrollView viewport-width to its visible width so horizontal content
can never overflow.

cc
2026-05-18 17:17:31 -06:00
vicrodh a9d5f8d30d fix(slint): center the header search field on the window
The three header columns shared free space by stretch but kept their
own preferred widths, so the wide tab row pushed the center column —
and the search field with it — off true window center. Anchor the
tabs left and the user element right, and position the search field
absolutely at the window center instead.

cc
2026-05-18 17:17:31 -06:00
vicrodh 5d78fb0a09 feat(slint): add Settings page with Audio and Playback panels
Introduce the Settings page, reachable from the Discover gear and the
header menu. Two sub-sections backed by the existing UI-agnostic stores.

- Audio panel: backend, output device and sample-rate dropdowns;
  toggles for exclusive mode, DAC passthrough, PipeWire force
  bit-perfect, gapless, normalization and quality fallback
- Playback panel: autoplay mode, show context icon, remember session
  and resume position
- settings.rs controller owns AudioSettingsStore + PlaybackPreferencesStore
  at the shared global path; persists changes and applies audio ones to
  the live Player (reload_settings, plus reinit_device for routing-
  critical changes); a backend switch re-enumerates output devices
- QbzToggle (switch) and QbzSelect (PopupWindow dropdown) primitives,
  SettingRow layout helper, chevron-down icon
- SettingsState global, ContentView::settings, settings-bool /
  settings-select callbacks wired through the shell

cc
2026-05-18 17:08:24 -06:00
vicrodh 1662b3824e feat(slint): add slim-card grid for Popular albums
Add a compact "slim" card variant and a 4-column grid section that
renders it, used for the Popular albums row on Discover Home.

- SlimCard: 60px row with optional rank, 44px thumbnail, title/subtitle
- GridSection: 4-column grid; cards absolutely positioned since Slint
  GridLayout cannot host a `for`
- state.slint: SlimItem struct and HomeState.popular model
- home.rs: load_home now returns HomeData { sections, popular };
  map_slim maps the discover most-streamed container
- artwork pipeline: ArtworkTarget enum routes decoded covers to either
  a section card or a popular card

cc
2026-05-18 16:08:42 -06:00
vicrodh 4e143bbcd5 feat(qbz-slint): artist detail page
Clicking an artist (from the album page's artist line) opens the
artist detail view: a circular portrait, name, biography, action
buttons, a Popular Tracks list, and a Discography carousel.

- artist.rs: fetches the artist page via QbzCore::get_artist_page and
  maps name, biography (HTML-stripped), portrait URL, top tracks and
  releases; the portrait loads through the shared image cache.
- ArtistPageView.slint reuses AlbumCard for the discography (through
  the Carousel) and AlbumTrackItem for the track list.
- NavState becomes a three-way ContentView (home / album / artist) and
  AppShell routes the content region accordingly. The album page's
  artist line and the artist page's release cards are navigable.

cc
2026-05-18 15:59:47 -06:00
vicrodh ece878ed49 feat(qbz-slint): drop content borders, add Cider-style carousel fades
- Removes the hairline borders around the content region; the chrome
  and content surface colors already delineate the regions cleanly.
- Carousels gain edge-fade gradients: clipped cards dissolve into the
  content background at the left and right edges, shown only when there
  is more to page in that direction — like Cider's row edges.

cc
2026-05-18 15:27:37 -06:00
vicrodh b9be2dc0d9 feat(qbz-slint): three-section header with responsive tabs
The header is now three equal sections — navigation tabs (left), the
search field (center, so it lands at the window center), and the user
element (right) — fixing the tabs stretching to full width under the
search field.

- Nav tabs regain Lucide icons (compass, library, hard-drive,
  cassette-tape) and use a 12px label.
- The user element uses a hamburger icon instead of the QBZ logo, which
  aliased badly as a scaled PNG.
- Responsive: below 1140px the tabs drop their icons; below 960px the
  search field narrows to 70%.

cc
2026-05-18 15:27:36 -06:00
vicrodh 8c27de5651 feat(qbz-slint): header redesign, Lucide icons, scrollbar fixes
- Replace every Unicode glyph placeholder with Lucide icons via QbzIcon
  (player transport, carousel nav, album-card overlay, album-page
  actions, gear, search, checkbox, sidebar).
- Header: the search field is centered to the window width and gets a
  search icon; the header and player bar now use the elevated surface,
  so all chrome (header, sidebar, player bar) shares one color over the
  darker content area.
- The sidebar user card moves to the header as a user element (name +
  QBZ logo) that opens a dropdown — Settings, Keyboard Shortcuts,
  Documentation, Report an Issue, About, plus Log Out and Close. Log Out
  clears the session and returns to login; Close quits the app.
- Content ScrollViews disable the horizontal scrollbar — no view scrolls
  horizontally, so the phantom reserved lane is gone.

cc
2026-05-18 14:58:58 -06:00
vicrodh 636b3e8a06 feat(qbz-slint): add the Lucide icon set
Adds 28 Lucide icons (the same set the QBZ Svelte app uses) as SVGs
under ui/assets/icons/, plus a QbzIcon primitive — an Image wrapper that
applies `colorize` so a monochrome SVG renders in any theme color.

cc
2026-05-18 14:58:58 -06:00
vicrodh 6b772b41b0 feat(qbz-slint): album detail page
Clicking an album card opens the album detail view: a back button,
the album header (224px artwork, title, artist, and info line — year,
label, genre, track count, duration — plus play / shuffle / favorite /
more action buttons), and the track list with a column header (#,
title, artist, duration, quality).

- album.rs: fetches the album via QbzCore::get_album, maps it (info
  line, per-track quality tier, durations) onto the AlbumState global,
  and loads the header artwork through the shared image cache.
- AlbumPageView.slint, with NavState driving the shell content region
  between Home and the album page.
- Album clicks bubble AlbumCard -> Carousel -> HomeView -> AppShell ->
  AppWindow -> main; the back button returns to Home.

cc
2026-05-18 14:38:45 -06:00
vicrodh 2a7147a008 feat(qbz-slint): album card hover overlay
Album cards gain the AlbumCardLite-style hover overlay: a dark scrim,
genre/year meta in the top-left, and circular favorite / play / more
action buttons (play primary, white). The action buttons are visual
for now; one TouchArea over the artwork drives the hover state and
emits a clicked(album_id) callback for navigation.

AlbumCardItem carries genre and year; home.rs maps them from the
discover album (genre name, year from the release dates).

cc
2026-05-18 14:29:45 -06:00
vicrodh 0fce415e3a feat(qbz-slint): discover toolbar and distinct sidebar surface
- The sidebar now uses the elevated surface (#1a1a1a) over the #0f0f0f
  content area, matching the QBZ dark theme (--bg-secondary over
  --bg-primary).
- Discover Home gains a proper 56px toolbar with a bottom border: the
  tab pill on the left, a "Filter by genre" button and a settings gear
  on the right. The toolbar is fixed; only the section carousels scroll
  below it.

cc
2026-05-18 14:22:49 -06:00
vicrodh 8748ef1211 feat(qbz-slint): splash screen during session restore
Adds a splash screen (logo, wordmark, spinner) shown while the app
boots and restores a saved session. The login form no longer flashes
for returning users — the app starts on `splash` and resolves to
`shell` (restored) or `login` (no saved session), matching the current
QBZ app behavior.

cc
2026-05-18 13:50:11 -06:00
vicrodh 7730b07ac4 feat(qbz-slint): replace section scroll with a paginated carousel
Discover sections now use a Carousel: a clipped, sliding track of
album cards with prev/next page controls, paginated by slice like the
Svelte DiscoverySection. With no ScrollView the row height is exactly
the card height — the horizontal scrollbar no longer injects vertical
space, so the earlier internal-scroll problem is resolved structurally
rather than patched.

per-page is derived from the viewport width and self-corrects on
resize. Replaces SectionRow.

cc
2026-05-18 13:50:11 -06:00
vicrodh 3871143bd3 feat(qbz-slint): restore saved sessions from the encrypted token store
The MVP no longer requires re-authenticating on every launch. On
startup it loads the saved OAuth token via qbz-credentials, validates
it against Qobuz, and — if valid — activates the session and goes
straight to the Discover/Home view. A rejected token is cleared and
the login screen is shown instead. Successful sign-ins now persist the
token to the shared encrypted store.

- auth.rs: save_oauth_token after login, restore_saved_session at
  startup.
- main.rs: enter_shell helper shared by the login and restore paths.

cc
2026-05-18 13:42:17 -06:00
vicrodh 3e61ec3b0f feat(qbz-slint): route album artwork through the shared image cache
Cover art now goes through the QBZ image cache instead of being
downloaded directly every time, matching the Tauri behavior.

- Moves ImageCacheService / ImageCacheStats into the qbz-cache crate
  (LRU disk cache, MD5-keyed, SQLite index). src-tauri/image_cache.rs
  re-exports it and keeps the Tauri managed-state wrapper, so the Tauri
  app stays behavior-identical and both shells share one implementation
  and one on-disk cache (~/.cache/qbz/images).
- qbz-slint artwork.rs checks the cache first, downloads and stores on
  a miss, and trims the cache to 200MB on startup.

cc
2026-05-18 13:32:10 -06:00
vicrodh 2e47fbb544 fix(qbz-slint): pin section row height to the card height
The album card now has a fully deterministic 266px height (artwork 220
+ 6 spacer + 40 meta, with fixed-height title and artist text). The
section row's ScrollView pins viewport-height to its height, so the
vertical scroll range is zero — the row can no longer scroll
vertically, even invisibly.

cc
2026-05-18 13:32:10 -06:00
vicrodh 7801478819 fix(qbz-slint): match current QBZ Discover Home
Corrections from testing feedback:
- Remove the greeting — the current QBZ discovery view has no greeting,
  only the tab selector. Drops HomeState.greeting and the chrono dep.
- Quality badge is now the icon-only badge (hi-res.svg, or cd.svg in a
  framed square), not a numeric text pill. AlbumCardItem carries a
  quality tier instead of a quality string.
- Tighten the album card: deterministic 274px height, title and artist
  in a 2px-spaced stack — removes the large gap between them.
- SectionRow no longer scrolls vertically (vertical-scrollbar-policy
  always-off, height pinned to the card height).
- Artwork is downscaled to 264px on decode instead of holding ~600px
  source textures.

cc
2026-05-18 13:20:52 -06:00
vicrodh e2e409cf93 feat(qbz-slint): album artwork pipeline
Discover cards now show real Qobuz cover art. Artwork is fetched and
decoded off the UI thread, capped at 16 concurrent downloads, and each
result is applied to its own card row on the Slint event loop — so a
cover arriving never resets a section.

- artwork.rs: download + decode worker and per-row apply.
- AlbumCardItem gains an `artwork` image field; AlbumCard overlays the
  cover, falling back to the elevated placeholder until it resolves.
- main.rs: after the discover sections render, artwork jobs are spawned
  for every card with an image URL.

qbz-slint now depends on reqwest and image.

cc
2026-05-18 13:05:12 -06:00
vicrodh 8246ad5dd6 feat(qbz-slint): real Discover Home view
After sign-in the app loads the real Qobuz discover index and renders
the Home view: a time-based greeting with the user's name, the tab
pill (Home / Editor's Picks / For You), and discover sections — New
Releases, Press Accolades, Ideal Discography, Qobuzissimes, Albums of
the Week — each a horizontally scrolling row of album cards.

- state.slint: AlbumCardItem / DiscoverSection structs, HomeState global.
- discover/: AlbumCard (artwork area, award ribbon, title, artist,
  quality badge), SectionRow, HomeView.
- home.rs: discover-index fetch and mapping (award-ribbon priority,
  quality string), greeting, and event-loop model application. Unit
  tests for ribbon, quality, and greeting logic.
- AppShell content region is now the HomeView.

Album artwork images load in the next increment (artwork pipeline);
cards currently show the elevated placeholder. No fixtures — all data
is the live discover index.

cc
2026-05-18 13:01:45 -06:00
vicrodh 03b9a1c528 feat(qbz-slint): functional system-browser OAuth login
Wires real authentication. "Sign in via Browser" now runs the actual
Qobuz OAuth flow with no Tauri and no WebView: opens the system
browser, captures the authorization code on a one-shot localhost
listener, exchanges it via QbzCore's Qobuz client, and activates a
real per-user session through AppRuntime.

- adapter.rs: SlintAdapter implements FrontendAdapter.
- auth.rs: system-browser OAuth, mirrors v2_start_system_browser_oauth
  without Tauri. Includes a query-param parse test.
- main.rs: tokio runtime; sign-in / offline callbacks run real async
  work and navigate to the shell on success.
- Sidebar: placeholder playlist fixtures removed.

qbz-slint now depends on qbz-app, qbz-core, and qbz-models.

cc
2026-05-18 12:48:13 -06:00
vicrodh 7535869e61 feat(qbz-slint): app shell frame
M1 progress. Adds the post-login shell: HeaderBar (nav tabs and
search), Sidebar (playlists list and user card), PlayerBar (transport,
now-playing, volume), and AppShell composing them with the content
region as a placeholder.

app.slint gains an AppScreen enum; clicking sign-in or start-offline
navigates login -> shell (no real auth yet — that is M2). New layout
foundation tokens (sidebar width, header/player-bar heights) plus
border and hover semantic colors.

cc
2026-05-18 12:34:01 -06:00
vicrodh d5be0029b6 feat(qbz-slint): foundation tokens and login screen
M1 progress. Adds the foundation token layer (palette, semantic
colors, spacing, radius, typography) bound to the QBZ dark theme,
three primitives (QbzCheckbox, QbzPrimaryButton, QbzTextLink), and
the LoginScreen feature component.

The login screen mirrors the Svelte LoginView: centered card, logo,
QBZ wordmark, Qobuz ToS checkbox, "Sign in via Browser" button,
system-browser and offline links, and the legal disclaimer. Colors
are lifted verbatim from src/app.css; strings use @tr() markers.

Rust side: typed AppCommand enum; UI callbacks dispatch through it.
M2 wires the command handler to AppRuntime.

cc
2026-05-18 12:13:52 -06:00
vicrodh f1748383a5 feat(qbz-slint): scaffold Slint POC crate
First increment of M1 of the Slint functional POC. Adds the qbz-slint
workspace member: Slint 1.x dependency, build.rs compiling ui/app.slint,
a minimal AppWindow, and the binary entry point.

Verifies the Slint toolchain builds in this environment before the
foundation layer (tokens, shell, theme, i18n, typed commands) lands.

Private slint-poc branch only (ADR-007).

cc
2026-05-18 11:57:49 -06:00