Skip to content

Commit 90aa342

Browse files
authored
Merge pull request #125 from getagentseal/fix/menubar-force-redraw
fix(menubar): force status bar redraw and lift subprocess QoS
2 parents d69aa34 + 556f2bf commit 90aa342

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

mac/Sources/CodeBurnMenubar/CodeBurnApp.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSPopoverDelegate {
158158
attributes: [.font: font, .foregroundColor: color]
159159
))
160160
button.attributedTitle = composed
161+
// Force immediate redraw. NSStatusItem sometimes defers the status bar paint for an
162+
// accessory app that is not foreground, so the label visually freezes until the user
163+
// opens the popover (which triggers NSApp.activate + a forced redraw cycle).
164+
button.needsDisplay = true
165+
button.display()
161166
}
162167

163168
// MARK: - Popover

mac/Sources/CodeBurnMenubar/Security/CodeburnCLI.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ enum CodeburnCLI {
4141
// `env --` treats everything following as argv, not VAR=val pairs -- guards against an
4242
// argument accidentally resembling an env assignment.
4343
process.arguments = ["--"] + baseArgv() + subcommand
44+
// The menubar runs as an accessory app with no foreground window, and macOS
45+
// background-throttles accessory apps and their children. Without this lift the
46+
// codeburn subprocess parses 5-10x slower than the same command run from a
47+
// user-interactive terminal, which starves the 15s refresh cadence on large corpora.
48+
process.qualityOfService = .userInitiated
4449
return process
4550
}
4651

0 commit comments

Comments
 (0)