You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add persistent GitHub PR attachment to worktrees (#146)
Persistent PR attachment model: Worktrees can now have a GitHub PR persistently attached via new github_pr_number and github_pr_url database columns (schema v10 migration). PRs survive app restarts and are stored in SQLite rather than ephemeral in-memory state.
PR picker popover: Replaces the old inline PR state badge with a Popover-based PR picker. Clicking the PR badge opens a dropdown listing all open PRs (sorted with branch-matching PR first), allowing users to switch or detach the attached PR.
Live PR state queries: New git:getPRState IPC channel uses gh pr view to fetch real-time PR state (open/merged/closed) and title, displayed in the PR badge and picker header.
Full-stack IPC plumbing: New db:worktree:attachPR and db:worktree:detachPR IPC handlers with corresponding preload bridge methods (window.db.worktree.attachPR/detachPR) and type declarations.
Git store refactor: Replaced the old prInfo map (with state: 'none' | 'creating' | 'created' | 'merged') with two separate maps — prCreation (transient creation-in-progress tracking) and attachedPR (persistent PR attachment synced to DB). Added attachPR(), detachPR(), and loadAttachedPR() store actions.
PR detection hook update: usePRDetection now calls attachPR() on the store (which persists to DB) when a PR URL is detected in session output, instead of the old setPrState().
Header UI overhaul: The PR button area now has three distinct states — "Create PR" button (no PR attached), spinner (PR being created), and PR badge with popover (PR attached). Merge and Archive buttons now derive visibility from live PR state rather than in-memory state.
New Popover component: Added src/renderer/src/components/ui/popover.tsx (Radix-based shadcn popover primitive).