Merge pull request #125 from getagentseal/fix/menubar-force-redraw
Some checks are pending
CI / semgrep (push) Waiting to run

fix(menubar): force status bar redraw and lift subprocess QoS
This commit is contained in:
Resham Joshi 2026-04-21 12:47:58 -07:00 committed by GitHub
commit 90aa342a34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -158,6 +158,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSPopoverDelegate {
attributes: [.font: font, .foregroundColor: color]
))
button.attributedTitle = composed
// Force immediate redraw. NSStatusItem sometimes defers the status bar paint for an
// accessory app that is not foreground, so the label visually freezes until the user
// opens the popover (which triggers NSApp.activate + a forced redraw cycle).
button.needsDisplay = true
button.display()
}
// MARK: - Popover

View file

@ -41,6 +41,11 @@ enum CodeburnCLI {
// `env --` treats everything following as argv, not VAR=val pairs -- guards against an
// argument accidentally resembling an env assignment.
process.arguments = ["--"] + baseArgv() + subcommand
// The menubar runs as an accessory app with no foreground window, and macOS
// background-throttles accessory apps and their children. Without this lift the
// codeburn subprocess parses 5-10x slower than the same command run from a
// user-interactive terminal, which starves the 15s refresh cadence on large corpora.
process.qualityOfService = .userInitiated
return process
}