Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
6 changes: 3 additions & 3 deletions Sources/CodexBar/HiddenWindowView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 14 additions & 1 deletion Tests/CodexBarTests/SettingsWindowOpeningTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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(
Expand Down