Repository navigation
Open the window on macOS by running gioapp.Main on the main thread - #123
Merged
quanticstudios merged 1 commit intoOct 17, 2026
Merged
Conversation
AppKit needs the main thread for [NSApp run], which gioapp.Main starts. cmd/pitwall never called it, so on macOS Gio's newWindow waited forever for the app to launch and no window appeared. Run the GUI commands in a goroutine and call gioapp.Main on main, as cmd/pwdemo-* already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
quanticstudios
approved these changes
Oct 17, 2026
quanticstudios
enabled auto-merge (squash)
October 17, 2026 02:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On macOS,
pitwallnever opens a window. Fixes #122.AppKit has to run
[NSApp run]on the main thread, and Gio starts it fromgioapp.Main().cmd/pitwallnever calls it, sonewWindowwaits forever for the app to finish launching.Result
The GUI commands (
pitwall,-s,--host) now go throughonMain. On darwin it runs the command in a goroutine and callsgioapp.Main()on the main goroutine, the same waycmd/pwdemo-*do. It exits the process when the window closes. Other platforms behave as before. The existing error handling moved unchanged intoexit().Verification
GOFLAGS=-tags=novulkan go build ./cmd/pitwall: ok;go vet ./...: ok;gofmt -l: cleango test ./internal/agent ./internal/pane ./internal/model ./internal/layout ./internal/input: all ok. Manual: the patched binary opens the window (display: AppKit,window focused: truein gui.log); the unpatched build does not.go test ./cmd/pitwall(not in CONTRIBUTING's macOS list) fails the same 8 tests on unpatchedmainand on this branch (TestDialOrStart*, TestAgentTalk, TestRemoteReconnects, TestRunStaysOffHome, TestHookRefusalLostToReset), so this change doesn't cause them.Platforms not tested: Linux, Windows. The non-darwin path calls the same function synchronously, as before.
🤖 Generated with Claude Code