You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Workspace numbers keep Light-mode colours after the bar turns Dark #669
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.
Steps to reproduce
Use AeroSpace, so workspace cells accept window drops.
Show the workspace widget while the bar is Light, with a theme whose colours have light and dark values (Fern, for example).
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).
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.
Activity
chore(release): 0.16.0 [skip ci]
stablebar-releases commentedon Nov 16, 2026
🎉 This issue has been resolved in version 0.16.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀