Skip to content

fix(player): mount shared PlayerBar via music navigation coordinator - #449

Open
atirna wants to merge 5 commits into
sozercan:mainfrom
atirna:fix/playerbar-remount
Open

fix(player): mount shared PlayerBar via music navigation coordinator#449
atirna wants to merge 5 commits into
sozercan:mainfrom
atirna:fix/playerbar-remount

Conversation

@atirna

@atirna atirna commented Aug 17, 2026

Copy link
Copy Markdown

Description

Each music sidebar view used to mount its own PlayerBar, so switching Home / Search / Library destroyed the bar, reset @State, and re-ran artwork + navigation prep on every navigation (#445).

This moves music navigation paths into MusicNavigationCoordinator, mounts one shared PlayerBar on the music detail column in MainWindow, and removes the per-view bar instances plus the old playerBarMusicNavigation wiring.

Fixes #445

AI Prompt (Optional)

🤖 AI Prompt Used
Fix kaset #445: PlayerBar remounts on every navigation.

Implement the issue's proposed direction:
- add MusicNavigationCoordinator to own music sidebar NavigationPaths + active route
- mount a single PlayerBar in MainWindow outside each NavigationStack
- remove per-view PlayerBar / playerBarNavigationAction plumbing
- keep pinned playlist + sidebar reselect behavior working
- add ADR 0033 and coordinator regression tests

AI Tool: Cursor Agent (composer-2.5)

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • 🎨 UI/UX improvement
  • ♻️ Refactoring (no functional changes)
  • 🧪 Test update

Related Issues

Fixes #445

Changes Made

  • added MusicNavigationCoordinator for music sidebar paths, active route, and shared player-bar navigation targets
  • mounted one PlayerBar in MainWindow for the music detail column
  • removed per-view PlayerBar instances and deleted dead playerBarMusicNavigation plumbing
  • route album/artist context now flows through the coordinator for the shared bar
  • added ADR 0033-music-navigation-coordinator.md
  • added MusicNavigationCoordinatorTests

Testing

  • Unit tests pass (swift test --skip KasetUITests)
  • Manual testing performed
  • UI tested on macOS 26+

Verified locally:

  • swift build --target Kaset
  • swift test --skip KasetUITests (2981 tests)
  • swift test --filter MusicNavigationCoordinatorTests

Checklist

  • My code follows the project's style guidelines
  • I have run swiftlint --strict && swiftformat . (not installed in this environment)
  • I have added tests that prove my fix/feature works
  • New and existing unit tests pass locally
  • I have updated documentation if needed
  • I have checked for any performance implications
  • My changes generate no new warnings

Additional Notes

This follows the structural direction from #445 (central coordinator + single shared bar). Happy to tweak if you'd rather land the ADR separately first.

Made with Cursor

atirna added 4 commits August 17, 2026 08:27
Hoist PlayerBar to MainWindow so it survives sidebar navigation, centralize
music navigation paths in MusicNavigationCoordinator, and remove per-view
player bar plumbing that caused remounts and artwork flicker.

Fixes sozercan#445

Signed-off-by: Atirna <288419661+atirna@users.noreply.github.com>
…ests

Remove per-stack navigation environment wiring superseded by the shared
PlayerBar mount, and add MusicNavigationCoordinator regression tests for
active-route targeting across tab and pinned sidebar navigation.

Fixes sozercan#445

Signed-off-by: Atirna <288419661+atirna@users.noreply.github.com>
SwiftFormat/SwiftLint CI failed on consecutive blank lines left when
per-view PlayerBar safeAreaInset blocks were deleted.

Signed-off-by: Atirna <288419661+atirna@users.noreply.github.com>
Guest users on Liked Music, Library, or History see SignInRequiredView
without a NavigationStack; block coordinator pushes so artist/album taps
do not append to a hidden path.

Signed-off-by: Atirna <288419661+atirna@users.noreply.github.com>
@atirna
atirna force-pushed the fix/playerbar-remount branch from e06491a to 902d94e Compare August 17, 2026 06:00
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.

PlayerBar remounts on every navigation: artwork flicker, redundant network resolves, lost player state

1 participant