Skip to content

Workspace numbers keep Light-mode colours after the bar turns Dark #669

Closed

Description

@M4n0x

What happens

With AeroSpace, a workspace number can draw the theme's Light colour on the bar's Dark fill. On Fern, the focused number turned white on the green fill instead of Fern's dark green, while the fill kept its Dark colour.

Focused empty workspace 4 with a white number on Fern

Steps to reproduce

  1. Use AeroSpace, so workspace cells accept window drops.
  2. Show the workspace widget while the bar is Light, with a theme whose colours have light and dark values (Fern, for example).
  3. Switch the bar to Dark without any other change.

The fills switch to Dark; the numbers keep their Light colours. They stay that way through later focus changes. On a live bar the white number showed up after a long session; what switched the bar from Light to Dark there isn't known.

Expected

Numbers follow the bar's appearance, as the fills do.

Environment

StableBar 0.16.0-beta.20261114170809.1078, macOS 27.2, built-in display and a Dell U2722D, AeroSpace, Fern 1.2.0, glass on.

Evidence

Drawn offscreen: the widget first drawn in Light (top row), switched to Dark (middle), then focus moved to an empty workspace (bottom).

Before: numbers keep Light colours on Dark. After: they follow Dark.

Diagnosis

WorkspaceWindowDropTarget.updateNSView (Sources/StableBar/WorkspaceWindowDrag.swift:149) gives each cell's content its own hosting view, with a copy of the bar's environment: .environment(\.self, context.environment). SwiftUI calls updateNSView again only for the environment values it read there, and nothing reads the colour scheme, so the copy keeps the scheme it had: the nested view goes on drawing light-and-dark colours in Light. The fill is drawn outside that view (the .background in WorkspaceView), so it switches.

The same copy feeds the app icons' drag sources (WorkspaceWindowDrag.swift:47), the equalizer (Equalizer.swift:70) and scrolling text (ScrollingText.swift:57). Reading the colour scheme and contrast in updateNSView makes SwiftUI refresh the copy when they change.

Related

#400 / #401 fixed theme previews that drew a focus fill; a different problem.

Triaged by Claude Code (Claude Opus 5.5).

Activity

  1. added
    bug
    on Nov 15, 2026
  2. stablebar-releases commented on Nov 16, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.16.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions