diff --git a/CHANGELOG.md b/CHANGELOG.md index ca213521b7..9fdd062e85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 0.51.1 — Unreleased ### Fixed +- Mission Control: stop the lifecycle keepalive window from participating as a floating all-Spaces window on macOS 27 (#2955). Thanks @phuchong89 for the diagnostics! - 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! ### Added - Usage & Spend: aggregate per-project spend into ranked, window-scoped rows and carry project/session breakdowns through the cached Codex prefill so the dashboard and the menu chart agree on project data (#2984). Thanks @Yuxin-Qiao! diff --git a/Sources/CodexBar/HiddenWindowView.swift b/Sources/CodexBar/HiddenWindowView.swift index 489e17e2e8..ec48e24f25 100644 --- a/Sources/CodexBar/HiddenWindowView.swift +++ b/Sources/CodexBar/HiddenWindowView.swift @@ -105,11 +105,11 @@ final class KeepaliveWindowConfiguratorView: NSView { guard let window = self.windowProvider(self) else { return } window.identifier = NSUserInterfaceItemIdentifier("CodexBarLifecycleKeepalive") - // Make the keepalive window truly invisible and non-interactive. + // Keep the live SwiftUI scene inert without projecting it across Spaces. window.styleMask = [.borderless] - window.collectionBehavior = [.auxiliary, .ignoresCycle, .transient, .canJoinAllSpaces] + window.collectionBehavior = [.auxiliary, .ignoresCycle, .transient] window.isExcludedFromWindowsMenu = true - window.level = .floating + window.level = .normal window.isOpaque = false window.alphaValue = 0 window.backgroundColor = .clear diff --git a/Tests/CodexBarTests/SettingsWindowOpeningTests.swift b/Tests/CodexBarTests/SettingsWindowOpeningTests.swift index 2e937c91cf..e895624316 100644 --- a/Tests/CodexBarTests/SettingsWindowOpeningTests.swift +++ b/Tests/CodexBarTests/SettingsWindowOpeningTests.swift @@ -5,7 +5,7 @@ import Testing @MainActor struct SettingsWindowOpeningTests { @Test - func `recreated keepalive shell is configured and missing relay invokes settings fallback`() { + func `keepalive shell stays invisible and inert to Mission Control`() { let keepaliveShell = NSWindow( contentRect: NSRect(x: 0, y: 0, width: 500, height: 500), styleMask: [.titled], @@ -16,14 +16,27 @@ struct SettingsWindowOpeningTests { #expect(keepaliveShell.identifier?.rawValue == "CodexBarLifecycleKeepalive") #expect(keepaliveShell.styleMask == [.borderless]) + #expect(keepaliveShell.level == .normal) + #expect(keepaliveShell.collectionBehavior == [.auxiliary, .ignoresCycle, .transient]) + #expect(!keepaliveShell.collectionBehavior.contains(.canJoinAllSpaces)) + #expect(keepaliveShell.isExcludedFromWindowsMenu) + #expect(!keepaliveShell.isOpaque) #expect(keepaliveShell.alphaValue == 0) + #expect(!keepaliveShell.hasShadow) + #expect(keepaliveShell.ignoresMouseEvents) + #expect(!keepaliveShell.canHide) #expect(keepaliveShell.frame.size == NSSize(width: 1, height: 1)) + #expect(keepaliveShell.frame.origin == NSPoint(x: -5000, y: -5000)) + } + @Test + func `missing keepalive relay invokes settings fallback`() { let settingsWindow = NSWindow( contentRect: NSRect(x: 0, y: 0, width: 640, height: 480), styleMask: [.titled], backing: .buffered, defer: false) + var presentedWindow: NSWindow? var prepareCount = 0 let opener = SettingsWindowOpener(