Skip to content

feat(ui): Introduce Music Island as a seamless notch extension with live lyrics sync#259

Open
tkaprol wants to merge 2 commits into
sozercan:mainfrom
tkaprol:main
Open

feat(ui): Introduce Music Island as a seamless notch extension with live lyrics sync#259
tkaprol wants to merge 2 commits into
sozercan:mainfrom
tkaprol:main

Conversation

@tkaprol
Copy link
Copy Markdown

@tkaprol tkaprol commented May 19, 2026

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

  1. Seamless "Notch Extension" Integration

Absolute Black Blending: Uses an absolute .black background to visually merge the island with the physical MacBook hardware notch.

  1. Independent Lyrics Engine

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.

Copilot AI review requested due to automatic review settings May 19, 2026 18:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 MusicIslandView SwiftUI view and MusicIslandWindowController to manage the floating overlay window.
  • A new musicIslandEnabled setting persisted via SettingsManager and toggled in GeneralSettingsView.
  • Integration in MainWindow to 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)
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.

2 participants