Skip to content

Fix Windows PR diff pager launch - #871

Open
RasputinKaiser wants to merge 1 commit into
dlvhdr:mainfrom
RasputinKaiser:codex/openpledge-gh-dash-866-windows-pager
Open

Fix Windows PR diff pager launch#871
RasputinKaiser wants to merge 1 commit into
dlvhdr:mainfrom
RasputinKaiser:codex/openpledge-gh-dash-866-windows-pager

Conversation

@RasputinKaiser

Copy link
Copy Markdown
Contributor

Summary

This avoids shelling out to gh pr diff for the full-screen PR diff flow. Instead, gh-dash now fetches the PR diff through the existing go-gh authenticated REST path and streams that diff into the configured pager directly.

That keeps pager.diff behavior for common values like less and delta --paging always, while avoiding the extra gh -> pager process chain that can fail on Windows with only exit status 4 surfaced in the TUI.

It also adds coverage for:

  • diff repo parsing, including host/owner/repo
  • configured pager selection from GH_PAGER
  • diff fetch errors surfacing as ErrMsg
  • Windows cmd /C and Unix shell command construction for pagers

Duplicate/competition check before opening:

  • gh issue view 866 --repo dlvhdr/gh-dash --json number,title,state,comments,updatedAt,url showed the issue still open with no comments.
  • gh pr list --repo dlvhdr/gh-dash --state all --search "866 OR \"pager issue\" OR \"exit status 4\"" returned no matching PRs.

AI usage disclosure: this PR was prepared with OpenAI Codex assistance for investigation, implementation, duplicate checks, and local verification. The diff and verification output were reviewed in the Codex session before submission.

How Did You Test this Change?

  • mise exec go@1.25.10 -- go test ./internal/data ./internal/tui/common
  • mise exec go@1.25.10 -- go test ./...
  • git diff --check

Images/Videos

Not applicable.

@dlvhdr

dlvhdr commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Hey @RasputinKaiser, any idea why this fails on Windows? Is there an existing issue on the cli/cli repo for this?

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.

2 participants