Skip to content

fix(playback): skip unchecked facet tracks - #63

Merged
rianjs merged 2 commits into
mainfrom
codex/62-skip-unchecked-facet-tracks
Sep 3, 2026
Merged

fix(playback): skip unchecked facet tracks#63
rianjs merged 2 commits into
mainfrom
codex/62-skip-unchecked-facet-tracks

Conversation

@rianjs

@rianjs rianjs commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Build Genre, Artist, and Album facet queues from the resolved enabled projection.
  • Preserve explicit direct-track starts and existing browse/queue semantics.
  • Document the enabled facet playback rule.

Tests

  • cd apps/desktop && npm run test (94 passed)
  • cd apps/desktop && npm run lint
  • cd apps/desktop && npm run build
  • node scripts/check-docs.mjs
  • Focused UI and App interaction regressions passed after final follow-ups.
  • git diff --check

@rianjs

rianjs commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator Author

Test coverage assessment — PR #63

Major

  • apps/desktop/test/interactions.test.tsx:84-120 mocks every browse call with the same BrowseView. The Genre double-click therefore cannot distinguish the initial/broader projection from the newly resolved facet projection, and would still pass if playback consumed stale rows. It also leaves Artist and Album and an explicit visible-sort ordering unexercised. Make the initial and selected responses different (with the selected response deferred), then cover the three facet paths and assert the resulting start/queue comes only from the resolved, sorted response.

  • apps/desktop/test/ui.test.ts:1046-1054 proves that an all-disabled input produces an empty helper result, but no App-level test proves the required no-op: starting a facet with no checked tracks must leave an existing playback state untouched. The effect at apps/desktop/src/App.tsx:247-249 is the behavior at risk; a regression that clears/stops/replaces playback for an empty queue would pass the current tests.

Minor

  • apps/desktop/test/ui.test.ts:1046-1054 checks the direct-start exception only at the helper boundary, with one disabled track. There is no interaction assertion that a direct double-click of an unchecked track starts it and that a subsequent Next skips additional unchecked tracks. The helper test is useful, but it would not catch a regression in the unchanged TrackList-to-player wiring at apps/desktop/src/App.tsx:691.

@rianjs-bot rianjs-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: c304721f716a
Profile: codex-rianjs-bot - Posting as: rianjs-bot[bot]

Summary

Reviewer Findings
frontend:view-state 1
tauri:config-ipc 0
frontend:view-state (1 finding)

Major - apps/desktop/test/interactions.test.tsx:84

The new integration test does not cover the requested resolved-projection behavior for successful facet starts. Its Genre selection receives the same browse fixture as the initial view, while the only changed response is an all-disabled Artist projection; Album and explicit visible-sort ordering are not exercised. Consequently, a regression that starts the prior projection (or ignores displayedTracks ordering) for Genre/Artist/Album can still pass. Return distinct enabled-track fixtures based on the selected sel for each facet, set an explicit sort whose first enabled row differs from projection order, and assert the launched track/queue comes from each resolved fixture.

Reviewer Coverage

  • frontend:view-state — complete (constrained); skipped: none; constraints: Focused test command could not complete because the workspace lacks @tauri-apps/api, causing the existing gateways test import to fail before Vitest ran. Narrow frontend state and regression-test review only.
  • tauri:config-ipc — complete (constrained); skipped: none; constraints: Narrow Tauri configuration/IPC review; assigned changes are frontend test files and the production diff changes no command, DTO, event, capability, CSP, or release configuration.
  • unassigned⚠️ unassigned; skipped: apps/desktop/src/App.tsx, apps/desktop/src/ui.ts, docs/architecture/library.md; changed files were not assigned to a selected reviewer
Inspected files (2)
  • apps/desktop/test/interactions.test.tsx
  • apps/desktop/test/ui.test.ts

0 PR discussion threads considered. 0 summarized; 0 resolved.


Completed in 1m 53s | gpt-5.6-terra | cr 0.10.298
Field Value
Model gpt-5.6-terra
Reviewers frontend:view-state, tauri:config-ipc
Engine codex_cli · gpt-5.6-terra
Reviewed by cr · rianjs-bot[bot]
Duration 1m 53s wall · 2m 13s compute
Cost unavailable
Tokens 423.0k in / 4.9k out

Per-workstream usage

  • orchestrator-selection — gpt-5.6-terra
    • In: 17.3k
    • Out: 239
    • Cache read: 11.0k
    • Cache create: unavailable
    • Cost: unavailable
    • Duration: 8s
  • frontend:view-state — gpt-5.6-terra
    • In: 248.9k
    • Out: 3.1k
    • Cache read: 196.1k
    • Cache create: unavailable
    • Cost: unavailable
    • Duration: 1m 18s
  • tauri:config-ipc — gpt-5.6-terra
    • In: 136.9k
    • Out: 1.5k
    • Cache read: 96.3k
    • Cache create: unavailable
    • Cost: unavailable
    • Duration: 39s
  • orchestrator-rollup — gpt-5.6-terra
    • In: 19.9k
    • Out: 85
    • Cache read: 17.2k
    • Cache create: unavailable
    • Cost: unavailable
    • Duration: 5s

})

describe('mounted native interaction boundaries', () => {
it('starts a facet with its first enabled visible track', async () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new integration test does not cover the requested resolved-projection behavior for successful facet starts. Its Genre selection receives the same browse fixture as the initial view, while the only changed response is an all-disabled Artist projection; Album and explicit visible-sort ordering are not exercised. Consequently, a regression that starts the prior projection (or ignores displayedTracks ordering) for Genre/Artist/Album can still pass. Return distinct enabled-track fixtures based on the selected sel for each facet, set an explicit sort whose first enabled row differs from projection order, and assert the launched track/queue comes from each resolved fixture.

Reply inline to this comment.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The three columns invoke the same facet-agnostic callback with no per-facet branch. Exact projection invalidation is already covered by the pending-navigation regression, and the queue filter preserves displayed order. The mounted Genre/Artist checks plus the planned native three-column pass cover the changed behavior without duplicating fixtures.

@rianjs

rianjs commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator Author

These are low-value, please approve the PR

@rianjs-bot rianjs-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving after an explicit PR author override request following a prior codereview pass.

@rianjs

rianjs commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator Author

Manual validation on macOS release bundle c304721: with Man! I Feel Like A Woman! unchecked, double-clicking Genre Country, Artist Shania Twain, and Album Come On Over each started the first enabled track, I’m Holdin’ On To Love. The initially reported failure was also reproduced on the pre-fix codex/60-daily-spotify-sync build. CI’s frontend failure is the existing Tauri permission-list baseline fixed on PR #61; both Windows failures are the unrelated concurrent persistence test hitting Access is denied. macOS, Ubuntu, Rust, and title checks pass.

@rianjs
rianjs merged commit 3cbad6b into main Sep 3, 2026
5 of 8 checks passed
@rianjs
rianjs deleted the codex/62-skip-unchecked-facet-tracks branch September 3, 2026 14:07
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