Skip to content

feat: add GitHub PR/issue import picker to new branch modal#88

Merged
wesbillman merged 3 commits intomainfrom
add-create-branch-from-pr-or-issue
Feb 12, 2026
Merged

feat: add GitHub PR/issue import picker to new branch modal#88
wesbillman merged 3 commits intomainfrom
add-create-branch-from-pr-or-issue

Conversation

@wesbillman
Copy link
Copy Markdown
Collaborator

@wesbillman wesbillman commented Feb 12, 2026

Summary

  • Adds an "Import from GitHub" button to the new branch modal that opens a picker for open PRs and issues
  • Selecting a PR auto-populates the branch name and sets the base branch to the PR's target branch
  • Selecting an issue auto-populates the branch name with the issue number and title
  • Includes client-side search/filter, keyboard navigation, and tabbed PR/issue switching
  • Exposes list_pull_requests and list_issues Tauri commands with proper camelCase serde for the frontend

Test plan

  • Open the new branch modal and verify the "Import from GitHub" button appears
  • Click the button and verify PRs load in the picker
  • Switch to the Issues tab and verify issues load
  • Select a PR and verify branch name and base branch are auto-populated
  • Select an issue and verify branch name is auto-populated
  • Test search filtering and keyboard navigation (arrow keys + enter)
  • Press Escape to dismiss the picker without selecting

🤖 Generated with Claude Code

wesbillman and others added 3 commits February 12, 2026 14:02
Adds a PR/Issue picker to the new branch dialog. Clicking "Import from
GitHub..." opens an inline tabbed picker (PRs/Issues) that fetches from
the GitHub API via `gh` CLI. Selecting a PR auto-populates the branch
name as `pr-{number}-{title}` and sets the base branch to the PR's
target. Selecting an issue populates `issue-{number}-{title}`. Data is
loaded lazily (PRs on first open, issues on tab switch) with loading
spinners, client-side filtering, and keyboard navigation.

Backend: two new Tauri commands (`list_pull_requests`, `list_issues`)
wrap existing `git::github` functions. Added `#[serde(rename_all =
"camelCase")]` to PullRequest and Issue structs for frontend compat.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace single githubLoading flag with per-tab prsLoading/issuesLoading
states so switching between PR and Issue tabs shows a spinner immediately
for unloaded data without blocking the already-loaded tab. Also clears
the search query on tab switch and handles the case where PRs haven't
loaded yet when switching back to the PR tab.

Style the "Import from GitHub..." link as a full-width bordered button
with hover states so it looks like a proper interactive element.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Style the 'Import from GitHub...' button with align-self: flex-start
instead of full-width so it sits naturally at the left edge of the modal.

Refactor data fetching into fire-and-forget loadPrs()/loadIssues()
helpers using .then()/.catch()/.finally() instead of async/await. This
ensures openGithubPicker() and switchGithubTab() return synchronously so
the picker UI (tabs, search, list area) renders immediately with a
spinner confined to the list content area, never blocking interaction
with the rest of the modal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wesbillman wesbillman merged commit 4ada592 into main Feb 12, 2026
3 checks passed
@wesbillman wesbillman deleted the add-create-branch-from-pr-or-issue branch February 12, 2026 22:20
loganj added a commit that referenced this pull request Feb 26, 2026
* feat: mermaid diagram selection and commenting in React frontend

Port drag-to-select commenting from Go template UI to the React frontend.
Users can drag-select regions on mermaid diagrams to create comment threads
with SVG snippet previews, matching the existing Go template behavior.

- New MermaidSelection component with drag-to-select on mermaid SVGs
- SVG snippet extraction with re-IDing to avoid DOM collisions
- SVG highlight rects for existing threads on diagrams
- Thread focus activates/deactivates SVG highlights
- Set data-source-line on mermaid containers at render time via AST position
- Dark mode support for SVG highlights

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: scroll to SVG highlight rect instead of container top on thread focus

For mermaid diagram comments, clicking a thread now scrolls to the
actual selection rectangle within the diagram rather than the top of
the mermaid container.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant