Skip to content

Add GitHub pull request integration to the mac app#22

Closed
khoi wants to merge 3 commits intomainfrom
khoiracle/sup-44-add-github-pull-request-integration-with-batched-refresh-and
Closed

Add GitHub pull request integration to the mac app#22
khoi wants to merge 3 commits intomainfrom
khoiracle/sup-44-add-github-pull-request-integration-with-batched-refresh-and

Conversation

@khoi
Copy link
Copy Markdown
Contributor

@khoi khoi commented Apr 9, 2026

Summary

  • Problem: Supaterm had no native pull request awareness in the macOS terminal UI, and branch-to-PR resolution could be inefficient or wrong for multi-workspace repos and fork workflows.
  • Why it matters: users could not see the active PR and checks state in the sidebar, and forked repos could resolve the fork PR instead of the upstream PR.
  • What changed: added a gh-backed GitHub integration with explicit availability and auth states, repo-level batched PR refresh, upstream-first multi-remote resolution, richer PR and check models, and sidebar presentation plus open-PR action.
  • What did NOT change (scope boundary): no non-GitHub provider support, no migration layer, and no expansion beyond the current macOS app sidebar and settings flow.

Rationale

The implementation keeps branch watching close to each workspace but moves PR refresh to the repository level so multiple workspaces in the same repo share one GitHub lookup path. It also preserves fork correctness by preferring upstream, then origin, then other GitHub remotes, and carrying host, owner, and repo data through the lookup path so GitHub Enterprise hosts work the same way.

User-visible / Behavior Changes

  • Terminal tabs can show the current branch pull request and a compact checks summary in the sidebar.
  • Clicking the PR opens it.
  • Settings now expose explicit GitHub integration states: disabled, checking, unavailable, unauthenticated, authenticated, and failure.
  • Repositories with multiple workspaces refresh PR state in batches instead of one lookup per workspace.

Diagram (if applicable)

Before:
[branch/worktree change] -> [per-workspace probing] -> [stale or fork-mismatched PR state]

After:
[branch/worktree change] -> [workspace HEAD watcher] -> [repo-level refresh queue]
-> [upstream-first remote resolution] -> [batched gh GraphQL lookup]
-> [sidebar PR + checks state]

Human Verification

  • Verified scenarios: focused SettingsFeatureTests and GithubPullRequestParsingTests, make mac-lint, and the full pre-push path: make web-check, make web-test, and make mac-test.
  • Edge cases checked: unauthenticated or missing gh, GitHub CLI command failure handling, upstream-vs-fork PR selection, and settings reducer task ordering.
  • What you did not verify: manual end-to-end UI interaction in the macOS app against a live GitHub repo after the final rebase.
  • How can a human manually verify this: enable GitHub integration in Settings, open a repo with an upstream PR, switch branches and workspaces, confirm the sidebar updates and clears correctly, and click the PR row to open it.

@khoi khoi force-pushed the khoiracle/sup-44-add-github-pull-request-integration-with-batched-refresh-and branch from 70001a2 to 9ae4469 Compare April 9, 2026 15:17
@khoi
Copy link
Copy Markdown
Contributor Author

khoi commented Apr 11, 2026

Closing all open PRs per request.

@khoi khoi closed this Apr 11, 2026
@khoi khoi deleted the khoiracle/sup-44-add-github-pull-request-integration-with-batched-refresh-and branch April 11, 2026 13:09
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