Skip to content

Commit 26c612e

Browse files
committed
fix: keep lifecycle window out of Mission Control
1 parent 45ca0b4 commit 26c612e

3 files changed

Lines changed: 18 additions & 4 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 0.51.1 — Unreleased
44

55
### Fixed
6+
- Mission Control: stop the lifecycle keepalive window from participating as a floating all-Spaces window on macOS 27 (#2955). Thanks @phuchong89 for the diagnostics!
67
- Cost history chart: localize the Projects, Conversations, session, and standard/fast mode labels that previously stayed English for all 23 app languages (#2983). Thanks @Yuxin-Qiao!
78

89
## 0.51.0 — 2026-08-16

‎Sources/CodexBar/HiddenWindowView.swift‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ final class KeepaliveWindowConfiguratorView: NSView {
105105
guard let window = self.windowProvider(self) else { return }
106106

107107
window.identifier = NSUserInterfaceItemIdentifier("CodexBarLifecycleKeepalive")
108-
// Make the keepalive window truly invisible and non-interactive.
108+
// Keep the live SwiftUI scene inert without projecting it across Spaces.
109109
window.styleMask = [.borderless]
110-
window.collectionBehavior = [.auxiliary, .ignoresCycle, .transient, .canJoinAllSpaces]
110+
window.collectionBehavior = [.auxiliary, .ignoresCycle, .transient]
111111
window.isExcludedFromWindowsMenu = true
112-
window.level = .floating
112+
window.level = .normal
113113
window.isOpaque = false
114114
window.alphaValue = 0
115115
window.backgroundColor = .clear

‎Tests/CodexBarTests/SettingsWindowOpeningTests.swift‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Testing
55
@MainActor
66
struct SettingsWindowOpeningTests {
77
@Test
8-
func `recreated keepalive shell is configured and missing relay invokes settings fallback`() {
8+
func `keepalive shell stays invisible and inert to Mission Control`() {
99
let keepaliveShell = NSWindow(
1010
contentRect: NSRect(x: 0, y: 0, width: 500, height: 500),
1111
styleMask: [.titled],
@@ -16,14 +16,27 @@ struct SettingsWindowOpeningTests {
1616

1717
#expect(keepaliveShell.identifier?.rawValue == "CodexBarLifecycleKeepalive")
1818
#expect(keepaliveShell.styleMask == [.borderless])
19+
#expect(keepaliveShell.level == .normal)
20+
#expect(keepaliveShell.collectionBehavior == [.auxiliary, .ignoresCycle, .transient])
21+
#expect(!keepaliveShell.collectionBehavior.contains(.canJoinAllSpaces))
22+
#expect(keepaliveShell.isExcludedFromWindowsMenu)
23+
#expect(!keepaliveShell.isOpaque)
1924
#expect(keepaliveShell.alphaValue == 0)
25+
#expect(!keepaliveShell.hasShadow)
26+
#expect(keepaliveShell.ignoresMouseEvents)
27+
#expect(!keepaliveShell.canHide)
2028
#expect(keepaliveShell.frame.size == NSSize(width: 1, height: 1))
29+
#expect(keepaliveShell.frame.origin == NSPoint(x: -5000, y: -5000))
30+
}
2131

32+
@Test
33+
func `missing keepalive relay invokes settings fallback`() {
2234
let settingsWindow = NSWindow(
2335
contentRect: NSRect(x: 0, y: 0, width: 640, height: 480),
2436
styleMask: [.titled],
2537
backing: .buffered,
2638
defer: false)
39+
2740
var presentedWindow: NSWindow?
2841
var prepareCount = 0
2942
let opener = SettingsWindowOpener(

0 commit comments

Comments
 (0)