feat(ui): Introduce Music Island as a seamless notch extension with live lyrics sync#259
Open
tkaprol wants to merge 2 commits into
Open
feat(ui): Introduce Music Island as a seamless notch extension with live lyrics sync#259tkaprol wants to merge 2 commits into
tkaprol wants to merge 2 commits into
Conversation
…nd window controller
…ynced lyrics support
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR introduces a "Music Island" feature — a floating Dynamic Island-style window that displays the currently playing track's album art, synced lyrics, and track info at the top of the screen.
Changes:
- New
MusicIslandViewSwiftUI view andMusicIslandWindowControllerto manage the floating overlay window. - A new
musicIslandEnabledsetting persisted viaSettingsManagerand toggled inGeneralSettingsView. - Integration in
MainWindowto show/hide the island based on the setting and playback state.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Sources/Kaset/Views/MusicIslandView.swift | New SwiftUI view rendering album art, lyrics, and track info in a capsule-style layout. |
| Sources/Kaset/MusicIslandWindowController.swift | New singleton controller to create, position, show, and hide the borderless floating window. |
| Sources/Kaset/Views/MainWindow.swift | Wires up onChange handlers and calls MusicIslandWindowController to toggle the island. |
| Sources/Kaset/Views/GeneralSettingsView.swift | Adds a settings toggle for the Music Island feature. |
| Sources/Kaset/Services/SettingsManager.swift | Adds musicIslandEnabled property with UserDefaults persistence. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /// Manages the floating Music Island window. | ||
| @available(macOS 26.0, *) | ||
| @MainActor | ||
| final class MusicIslandWindowController { |
Comment on lines
+36
to
+41
| let window = NSWindow( | ||
| contentRect: NSRect(x: 0, y: 0, width: 498, height: 116), | ||
| styleMask: [.borderless, .nonactivatingPanel], | ||
| backing: .buffered, | ||
| defer: false | ||
| ) |
| .environment(playerService) | ||
| .environment(lyricsService) | ||
|
|
||
| let hostingView = NSHostingView(rootView: AnyView(contentView)) |
| private func bringAppToFront() { | ||
| for window in NSApplication.shared.windows where window.frameAutosaveName == "KasetMainWindow" { | ||
| window.makeKeyAndOrderFront(nil) | ||
| NSApplication.shared.activate(ignoringOtherApps: true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR introduces the Music Island. A new floating, Dynamic Island-style overlay that acts as a seamless, native-feeling extension of the physical MacBook notch. It provides users with at-a-glance playback information and real-time synced lyrics that operate entirely independently of the main application window.
Features
Absolute Black Blending: Uses an absolute .black background to visually merge the island with the physical MacBook hardware notch.
Decoupled Architecture: MusicIslandView independently observes playerService.currentTrack and invokes fetchLyrics on its own. It also properly manages its own polling lifecycle (SingletonPlayerWebView.shared.startLyricsPoll()).
Reliable Syncing: Real-time synced lyrics will display and update accurately on the Music Island even if the user has the lyrics sidebar closed in the main application window.
How to test
Build the app and enable the Music Island via Settings while playing a song.
Verify that the island aligns perfectly with the top edge of the screen and that the shadow is fully rounded and unclipped at the bottom corners.
Close the main application window's lyrics panel and confirm that the island continues to fetch and display real-time synced lyrics.
Play a song with long lyric lines (or romaji) and observe the text cleanly wrapping to a second line without disrupting the album art or clipping into the notch.