Skip to content

Music provider settings + login UIs (Apple, Spotify, Tidal, Mopidy) - #2

Draft
chrispmonkey wants to merge 5 commits into
PenumbraOS:masterfrom
chrispmonkey:tidal-shim-wip
Draft

Music provider settings + login UIs (Apple, Spotify, Tidal, Mopidy)#2
chrispmonkey wants to merge 5 commits into
PenumbraOS:masterfrom
chrispmonkey:tidal-shim-wip

Conversation

@chrispmonkey

@chrispmonkey chrispmonkey commented Jul 31, 2026

Copy link
Copy Markdown

Draft — for review, not merge. The Center (web) UI for the multi-provider music work in PenumbraOS/humane-system-hook#5. Adds a Music settings group with provider selection + per-provider credential/login flows, all talking to the Pin's local API (no shared backend — settings go browser → the user's own Pin).

Music settings

  • Provider selector: Apple Music, Spotify, Tidal, Mopidy (applies live — no restart).
  • Apple Music.p8 upload (or paste) + Key ID / Team ID + storefront dropdown, and a MusicKit-JS "Sign in with Apple Music" that captures the Music User Token to the Pin.
  • Spotify — client id/secret + OAuth (PKCE) "Connect Spotify Account" (popup + spotify-callback.html; redirect URI derives from the app's base path so it's correct at the root or under /center/).
  • Tidal — client id/secret + device-authorization "Sign in with Tidal" (shows a code + link.tidal.com, polls the Pin until linked). The tooltip explains the exact credential type required.
  • Mopidy — server URL + Icecast stream URL.

Settings save/discard UX

The settings page previously had a single page-level Save that rebuilt one request for every group and shared one status. This reworks it so each section is self-contained:

  • Scoped per-section Save — Server / LLM / Music / Services / Developer each save only their own changed fields and show their own status; saving one card no longer touches unsaved edits in another.
  • "Unsaved" badges on each section heading, so you can see at a glance which cards still need a Save.
  • Discard controls — a per-section "Discard changes" and a page-level "Discard all" that revert to the last-saved values.
  • Sticky unsaved-changes bar — while anything is pending, a bar rides the bottom of the viewport listing how many sections are unsaved and which ones, with Save all / Discard all always in reach.
  • "Applies immediately" badges on the Apple / Spotify / Tidal sign-in controls, which persist to the Pin the moment they complete — distinct from the manual-Save fields around them.

Other UX

  • InfoTooltip (ⓘ) on each field explaining where to get the value; hover-bridge so tooltip links are clickable.
  • SecretInput gained a multiline mode (for the .p8).

Notes

  • No provider credentials are bundled — users supply their own.
  • tsc, vite build, and the Vitest suite (115 tests) pass; the settings UI was smoke-tested live against a connected Pin.
  • Server/hook side is the companion PR linked above.

- Provider selection (Apple, Spotify, YouTube, Mopidy) with per-provider
  credential/config fields.
- Apple: MusicKit-JS "Sign in with Apple Music", .p8 upload + Key/Team ID,
  storefront dropdown.
- Spotify: OAuth (PKCE) "Connect Spotify Account" with on-device token
  exchange + callback page.
- Mopidy: server URL + Icecast stream URL.
- InfoTooltip for "where to get this value" help; SecretInput multiline.
- Drop YouTube Music from the provider selector.
- Derive the Spotify OAuth redirect URI from Vite's BASE_URL so it's correct
  whether Center is served at the root (dev) or under /center/ (hosted).
Tidal option with client id/secret fields and a "Sign in with Tidal"
device-authorization flow (shows a code + link.tidal.com, polls until done).
Each settings card (Server, LLM, Music, Services, Developer) now saves
and reverts on its own: a scoped Save that persists only that card's
changed fields, an "Unsaved" badge on cards with pending edits, a
per-section Discard changes and a page-level Discard all, and a sticky
summary bar listing the unsaved sections with Save all / Discard all.
Saving or discarding one card leaves the others' edits untouched.
The Apple, Spotify, and Tidal account sign-ins persist to the Pin the
moment they complete, unlike the fields around them that wait for a
Save. Tag each with an "Applies immediately" badge so users don't expect
a follow-up Save or think skipping one lost their sign-in.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant