[PR #1845] [MERGED] Fix Spotify DJ parity regressions #5314

Closed
opened 2026-10-22 04:15:10 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1845
Author: @cha1latte
Created: 6/1/2026
Status: ✅ Merged
Merged: 6/1/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-1810-spotify-parity


📝 Commits (2)

  • 7495a35 Fix Spotify DJ parity regressions
  • 1da6714 Retrigger PR checks after template fix

📊 Changes

3 files changed (+632 additions, -62 deletions)

View changed files

📝 src-tauri/src/commands/storage/connection_secrets.rs (+8 -13)
📝 src-tauri/src/commands/storage/integrations/spotify.rs (+608 -49)
📝 src/features/modes/game/api/game-api.ts (+16 -0)

📄 Description

Linked issue

Closes #1810

Why this change

  • Restores refactor-line Spotify parity for Game Mode Spotify DJ source constraints, scene playback fallback, mini-player device retry behavior, and token-at-rest handling.

What changed

  • Game Mode Spotify candidate requests now include the saved Spotify source metadata from chat/game setup settings.
  • Spotify candidate lookup now honors liked songs, playlist, artist, and broad Spotify source modes instead of always doing a generic search.
  • Scene playback now resolves an active or available Spotify device, reports a clear no-device error, clears repeat before playback, and sets repeat to track after the scene track starts.
  • Mini-player play/pause/next/previous/volume/shuffle/repeat calls retry against the active or available Spotify device when a selected device is stale or restricted.
  • Spotify access and refresh tokens are now stored in encrypted settings fields, with legacy plaintext token settings migrated when Spotify status or credentials are read.

Refactor impact

Primary owner:

Rust storage / Spotify integration

Impact areas reviewed:

  • Game Mode Spotify DJ candidate preparation
  • Spotify scene playback
  • Spotify mini-player controls
  • Spotify OAuth token persistence and legacy plaintext token migration
  • Shared connection secret encryption helper reuse

Boundary notes:

  • React feature code still calls the focused shared Spotify API wrapper.
  • Runtime/provider behavior remains in src-tauri.
  • Engine code was not changed.
  • Remote-runtime command routing was not changed.

Pressure points touched:

  • src/features/modes/game/api/game-api.ts
  • src-tauri/src/commands/storage/integrations/spotify.rs
  • src-tauri/src/commands/storage/connection_secrets.rs

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • Codex ran cargo test --manifest-path src-tauri/Cargo.toml spotify_ -- --nocapture; result: 3 focused Spotify tests passed.
  • Codex ran pnpm check; result: passed line endings, architecture, frontend typecheck, Rust cargo check, docs, discovery metadata, and unused-code checks.
  • Codex ran node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json; result: passed.
  • Manual blocker before ready-for-review: live Spotify account/device verification still needs a configured Spotify client, Premium playback, and available Spotify Connect devices. Please verify liked/playlist/artist source selection, stale-device mini-player retry, scene playback fallback, and token persistence in a real Spotify setup.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Bugfix for existing Spotify DJ behavior; no new discoverable surface.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

N/A. This is backend/integration behavior with no visible UI layout change. Verification is command-based plus pending live Spotify runtime testing.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1845 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/1/2026 **Status:** ✅ Merged **Merged:** 6/1/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-1810-spotify-parity` --- ### 📝 Commits (2) - [`7495a35`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7495a3561ef321c7345879d29a77ccd9a228af2b) Fix Spotify DJ parity regressions - [`1da6714`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1da67140e4e9ba2e8cc183a6ac004823fb4c79c5) Retrigger PR checks after template fix ### 📊 Changes **3 files changed** (+632 additions, -62 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/connection_secrets.rs` (+8 -13) 📝 `src-tauri/src/commands/storage/integrations/spotify.rs` (+608 -49) 📝 `src/features/modes/game/api/game-api.ts` (+16 -0) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Closes #1810 ## Why this change - Restores refactor-line Spotify parity for Game Mode Spotify DJ source constraints, scene playback fallback, mini-player device retry behavior, and token-at-rest handling. ## What changed - Game Mode Spotify candidate requests now include the saved Spotify source metadata from chat/game setup settings. - Spotify candidate lookup now honors liked songs, playlist, artist, and broad Spotify source modes instead of always doing a generic search. - Scene playback now resolves an active or available Spotify device, reports a clear no-device error, clears repeat before playback, and sets repeat to `track` after the scene track starts. - Mini-player play/pause/next/previous/volume/shuffle/repeat calls retry against the active or available Spotify device when a selected device is stale or restricted. - Spotify access and refresh tokens are now stored in encrypted settings fields, with legacy plaintext token settings migrated when Spotify status or credentials are read. ## Refactor impact Primary owner: Rust storage / Spotify integration Impact areas reviewed: - Game Mode Spotify DJ candidate preparation - Spotify scene playback - Spotify mini-player controls - Spotify OAuth token persistence and legacy plaintext token migration - Shared connection secret encryption helper reuse Boundary notes: - React feature code still calls the focused shared Spotify API wrapper. - Runtime/provider behavior remains in `src-tauri`. - Engine code was not changed. - Remote-runtime command routing was not changed. Pressure points touched: - `src/features/modes/game/api/game-api.ts` - `src-tauri/src/commands/storage/integrations/spotify.rs` - `src-tauri/src/commands/storage/connection_secrets.rs` ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> <!-- Do not submit *.test.ts or *.test.tsx files as PR proof; cite existing checks, command output, app/browser/Tauri verification, or manual notes instead. --> - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - Codex ran `cargo test --manifest-path src-tauri/Cargo.toml spotify_ -- --nocapture`; result: 3 focused Spotify tests passed. - Codex ran `pnpm check`; result: passed line endings, architecture, frontend typecheck, Rust cargo check, docs, discovery metadata, and unused-code checks. - Codex ran `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json`; result: passed. - Manual blocker before ready-for-review: live Spotify account/device verification still needs a configured Spotify client, Premium playback, and available Spotify Connect devices. Please verify liked/playlist/artist source selection, stale-device mini-player retry, scene playback fallback, and token persistence in a real Spotify setup. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [x] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Bugfix for existing Spotify DJ behavior; no new discoverable surface. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence N/A. This is backend/integration behavior with no visible UI layout change. Verification is command-based plus pending live Spotify runtime testing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:15:10 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5314
No description provided.