GitHub PR Integration
Overview
Section titled “Overview”Navi displays comprehensive GitHub PR context directly in the TUI — CI/CD check statuses, review state, comments, labels, draft/merge status, and change statistics — so you never need to leave the terminal to understand your PR’s status.
Quick Start
Section titled “Quick Start”- Install the
ghCLI and authenticate (gh auth login) - Open a session working on a branch with an open PR
- The session row shows a compact PR indicator:
[PR#42 ✓] - Press
Gto open the full git detail view with PR metadata - Press
cto read PR comments,rto refresh,oto open in browser
Inline PR Indicator
Section titled “Inline PR Indicator”Each session row shows at-a-glance PR status:
| Indicator | Meaning |
|---|---|
[PR#42 ✓] | All checks passing |
[PR#42 ✗] | Checks failing |
[PR#42 ●] | Checks pending/running |
[PR#42 ✓ 💬5] | Passing with 5 comments |
[PR#42 draft] | Draft PR |
Git Detail View
Section titled “Git Detail View”Press G to open the full detail view showing:
- PR title and state — Color-coded OPEN/CLOSED/MERGED
- Draft indicator —
(draft)in dimmed text for draft PRs - Merge status —
✓ No conflicts,✗ Has conflicts, or? Unknown - Review status —
✓ Approved by alice, bob/✗ Changes requested by alice/⏳ Review pending - Labels — PR labels displayed in dimmed text
- Changed files —
12 files (+340 / -85) - CI/CD checks — Individual checks with status icons (
✓passed,✗failed,●pending) - Check summary —
Checks (3/4 passed)
Detail View Keybindings
Section titled “Detail View Keybindings”| Key | Action |
|---|---|
r | Refresh PR data from GitHub |
c | View PR comments |
o | Open PR in browser |
d | View git diff |
Esc | Close detail view |
Comment Viewer
Section titled “Comment Viewer”Press c from the git detail view to open a scrollable panel showing all PR comments:
- Review comments include file path and line number:
[filename.go:42] - General comments show author, timestamp, and body
- All comments sorted chronologically
- Scrollable with
j/k,PgUp/PgDn,g/G
Auto-Refresh
Section titled “Auto-Refresh”When the git detail view is open and checks are pending:
- PR data refreshes automatically every 30 seconds
- The ticker starts when pending checks are detected
- Stops automatically when all checks reach a terminal state
- Manual refresh (
r) resets the interval - Display shows
Auto-refreshing...indicator
How It Works
Section titled “How It Works”Data Fetching
Section titled “Data Fetching”PR metadata is fetched on-demand (not during regular polling) using the gh CLI:
gh pr view --json number,title,state,isDraft,mergeable,labels,changedFiles,additions,deletions,reviewDecision,reviews,comments,statusCheckRollup,urlFor remote sessions, the -R owner/repo flag is used instead of relying on the local git directory.
Comments are fetched via the GitHub API:
gh api repos/{owner}/{repo}/pulls/{number}/comments # Review commentsgh api repos/{owner}/{repo}/issues/{number}/comments # General commentsBoth types are merged and sorted chronologically.
Caching
Section titled “Caching”- PR detail is cached per session with a 60-second TTL
- Lazy-loaded only when the user opens the git detail view
- Does not affect the existing 5-second git info polling cycle
Check Status Aggregation
Section titled “Check Status Aggregation”Checks are classified as:
| Classification | Criteria |
|---|---|
| Passed | Status=COMPLETED and Conclusion=SUCCESS |
| Failed | Status=COMPLETED and Conclusion=FAILURE/CANCELLED/TIMED_OUT |
| Pending | Everything else (IN_PROGRESS, QUEUED, etc.) |
Both GitHub Check Runs and Status Contexts are handled.
Configuration
Section titled “Configuration”No additional configuration required. The gh CLI must be installed and authenticated. PR detection uses the existing git remote URL to determine the repository.
Related Features
Section titled “Related Features”- Git Integration — Branch, status, and diff display
- Content Viewer — Scrollable viewer used for comments
- Remote Sessions — PR features work for remote sessions