Skip to content

[Bug]: Album Play button becomes invisible when the window loses focus #412

Description

@isturiz

Bug Description

On an album detail page, the header Play button can become visually invisible when the Kaset window loses focus, while its hit target remains active. Clicking the location where the button should be still triggers playback.

Other header actions changing appearance when the window is inactive may be intentional. This report is specifically about the Play button disappearing while remaining clickable.

Steps to Reproduce

  1. Open an album with at least one playable track.
  2. Confirm that the header Play button is visible.
  3. Focus another app or window while leaving Kaset visible and on the album detail page.
  4. Observe the header Play action.
  5. Click the location where the Play button was rendered.

ref:

With windows focus:

Image

Without windows focus:
Image

Actual Behavior

The Play button background and/or label becomes visually indistinguishable or disappears when the Kaset window is inactive, but clicking its original location still starts playback.

Expected Behavior

The Play button remains visible and legible while the window is inactive, using an appropriate inactive-window appearance. Its visual state should match its hit-test and enabled state.

Initial Technical Context

The button is implemented in Sources/Kaset/Views/PlaylistDetailView+HeaderActions.swift with:

self.headerActionLabel(localized: "Play", systemImage: "play.fill", showsTitle: showsTitles)
    .foregroundStyle(.white)

and:

.buttonStyle(.glassProminent)
.controlSize(.large)
.disabled(playableTracks.isEmpty)

There is no focus-dependent opacity or conditional rendering in this code. The button remains in the view hierarchy and is only disabled when there are no playable tracks. The combination of a fixed white foreground with the inactive rendering of GlassProminentButtonStyle is a likely cause: the glass background may be attenuated when inactive while the white label remains unreadable.

The current implementation was introduced in PR #232 (d1db281). The same PlaylistDetailView is shared by album and playlist details.

Environment

  • macOS: 26.x (exact patch version to confirm)
  • Kaset source context: main at 2ea911a / v0.13.1 checkout
  • Appearance: light or dark mode to confirm

Acceptance Criteria

  • The Play button remains visible and legible when the Kaset window is active and inactive.
  • The behavior works in both light and dark appearances.
  • Both the full-label and compact icon-only ViewThatFits variants remain correct.
  • The enabled and disabled states remain visually and functionally consistent.
  • Other album and playlist header actions do not regress.

Related implementation history: #232

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions