Commit graph

13 commits

Author SHA1 Message Date
maxsoch e579ac1d56 fix: show a GUI password dialog when brew needs sudo
Brew runs inside a Process with no terminal attached, so any sudo prompt
(cask upgrades, some installers) would hang or fail silently — there was
nowhere to type the password.

Set SUDO_ASKPASS to a small helper script written to Application Support
at launch. When sudo detects no tty, it runs the helper, which shows a
native macOS password dialog via osascript and prints the answer for
sudo to consume. Cancelling the dialog makes sudo fail cleanly instead
of hanging.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 21:27:45 +02:00
maxsoch 7390d68a33 fix: deliver runBrew completion on the main thread
Completions were invoked on a background queue. Most call sites wrapped
their UI work in DispatchQueue.main.async, but upgradeSingle's completion
calls refreshAll(), which sets statusMenuItem.title directly — an AppKit
mutation off the main thread. It also raced on cachedOutdated /
lastOutdatedFetch (written from background, read from main).

runBrew now always dispatches its completion to the main queue, so every
caller can safely touch UI, and the now-redundant inner main.async hops
are removed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 21:26:14 +02:00
maxsoch 4ab3cc1e70 add unit test target with BrewParser extraction
Extract brew output parsing into BrewParser.swift (pure Swift, no AppKit)
and add BrewBarTests target with 7 passing tests covering parseOutdated
and parseVersion edge cases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-06 21:17:26 +02:00
maxsoch 6f255380d0 add dev tooling from /init: swiftlint, skills, gitignore; apply swiftformat
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-06 21:07:17 +02:00
Maxence Socheleau 5def46f2cd n/a 2026-07-03 15:41:00 +02:00
Maxence Socheleau 03e121fdae update README 2026-06-30 15:53:48 +00:00
Maxence Socheleau c9b68492e7 addind logo as asset 2026-06-30 17:47:46 +02:00
Maxence Socheleau 28115f4a59 Merge branch 'main' of https://forgejo.socheleau.fr/maxsoch/BrewBar 2026-06-30 17:42:07 +02:00
Maxence Socheleau b7fb754e09 Adding Xcode project; base code available and working 2026-06-30 17:40:51 +02:00
Maxence Socheleau df1c09d9c4 Initial commit 2026-06-30 15:33:33 +00:00
Maxence Socheleau 8a70403d59 Merge branch 'main' of https://forgejo.socheleau.fr/maxsoch/BrewBar 2026-06-30 17:18:40 +02:00
Maxence Socheleau f09aead8af Initial commit 2026-06-30 15:16:27 +00:00
Maxence Socheleau 7bc7a53442 Initial Commit 2026-06-26 11:10:41 +02:00