Fix packaged-app launch crash, quit teardown, and broaden GitHub repo picker - #74
Open
duncsdownunder wants to merge 7 commits into
Open
duncsdownunder wants to merge 7 commits into
duncsdownunder wants to merge 7 commits into
Conversation
before-quit is async but only called preventDefault() on the confirm-dialog path, so on a normal quit Electron could exit before disposeTray() ran. quitWithoutConfirmation() used app.exit(0), which skips before-quit entirely. Now preventDefault runs unconditionally, both paths funnel through the same teardown + app.exit(0) (guarded by isQuitting), and quitWithoutConfirmation routes through app.quit() so teardown runs there too. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gh repo list only returns repos the authenticated user owns, so the New Agent modal's "Pick from GitHub" mode hid organization repos entirely. List via the REST /user/repos endpoint instead, with affiliation=owner,collaborator,organization_member (paginated, sorted by updated). Falls back to the old owner-only gh repo list when gh api --slurp is unavailable (gh too old), and keeps the existing degrade-to-unauthenticated behavior on total failure. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The packaged app crashed on launch: server-core modules import ./local-db relatively, bypassing the lib/local-db shim that guaranteed hook registration order. main/index.ts imported agent-memory-backfill before the shim, so migrations ran with no hooks and resolved the dev-only migrations path, which doesn't exist inside the .app bundle. Hoist the register-host-hooks import to the top of the entry file so it always evaluates first. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
DialogContent's auto grid column sized to its content, so long nowrap text (e.g. repo descriptions in the New Agent GitHub picker) blew the column past max-w and every w-full field stretched across the window. Pin the column with grid-cols-[minmax(0,1fr)] so truncation works, and cap NewAgentModal at 90vh with scroll so it fits short windows. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the placeholder icon with the papyrus-scroll artwork, remapped onto Apple's icon grid (824px tile, 185px radius, transparent 1024 canvas) and exported as icns/png/ico. Canary icons unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rktree
Agents own a standalone clone at <agent-home>/worktree, but the delete
flow still treated them as `git worktree`s of the Category's
mainRepoPath — canDelete ran `git worktree list` in a non-repo ("fatal:
not a git repository", Delete disabled) and delete would have failed the
same way, leaving files behind.
canDelete now checks the agent clone directly (uncommitted/unpushed
warnings work), delete removes the whole agent home (worktree + memory
+ .codex) via rename-then-background-rm, and the dialog states agent
delete semantics and hides the local-branch checkbox for agents.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
Three changes bundled from my local branch:
./local-dbrelatively, bypassing thelib/local-dbshim that was supposed to guarantee host-hook registration order, so migrations ran with no hooks and resolved the dev-only migrations path (which doesn't exist inside the bundle). The hook registration import is now the first import of the main entry file.Test plan
bun run build, launched the binary from the terminal: migrations resolve toContents/Resources/resources/migrationsand complete; app boots to a working window./Applications/Papyrus.appcopy launches cleanly.🤖 Generated with Claude Code