Skip to content

[Bug]: GitHub Enterprise PR work item diffs do not load #8935

Closed

Description

@wonjerry

Operating system

macOS

Orca version

1.4.141

Details

Short summary:

Image

GitHub Enterprise Server PR work items can open in Orca, but the file diff/content view does not load for the PR.

What happened?
When using Orca with a repository whose origin is hosted on GitHub Enterprise Server, opening a PR from the work item/task list showed the PR metadata, but the file diff area did not render the expected file contents. This made it look like the work item had no usable file diff even though the PR did have changed files.

How can we reproduce it?

  1. Configure Orca with a repository whose origin remote points to a GitHub Enterprise Server host rather than github.com.
  2. Open a GitHub PR work item for that repository.
  3. Navigate to the file diff/content view for the work item.
  4. Observe that the PR diff/file contents do not load as expected.

What seems to be causing it?
The PR work item detail path uses GitHub CLI/API calls to load PR files and file contents. Those calls need to target the Enterprise host, but this path could fall back to GitHub.com-style owner/repo handling and omit gh --hostname <enterprise-host>. As a result, file/diff API requests could be sent to the wrong host.

What changed in the proposed fix?
I opened a PR that routes PR detail API calls through the GitHub Enterprise host when the repository remote resolves to an Enterprise slug. It also preserves GitHub.com behavior and encodes GitHub contents API file paths by path segment so special characters in filenames do not break the request URL.

Proposed fix:
#8932

Local verification completed:

  • Confirmed the dev app loads the GitHub Enterprise PR file diff locally using a copied Orca user data directory.
  • pnpm lint
  • pnpm typecheck
  • pnpm test (latest full passing run: 2,871 test files / 30,430 tests passed)
  • pnpm build
  • Additional targeted tests for the GitHub work item details path passed.

Activity

  1. added
    bugSomething isn't working
    has_reproConclusive reproduction exists (test/script/CLI evidence). See docs/bug-reproductions/
    and removed on Jul 16, 2026
  2. nwparker commented on Jul 16, 2026

    @nwparker
    Contributor

    🤖 Agent handoff — reproduction kit

    Status: REPRODUCED · GitHub label has_repro
    Writeup (branch): docs/bug-reproductions/8935.md
    Branch with tests + docs: nwparker/bug-repro-handoffs

    Summary

    For GitHub Enterprise Server remotes, PR work items open with metadata but the
    file diff / contents view stays empty because API calls never target the Enterprise host.

    Automated re-run

    git fetch origin nwparker/bug-repro-handoffs
    git checkout nwparker/bug-repro-handoffs
    # or: git worktree add /tmp/orca-repro-8935 origin/nwparker/bug-repro-handoffs
    
    pnpm exec vitest run --config config/vitest.config.ts src/main/github/repro-8935-ghe-pr-diff-host.test.ts

    Code / evidence files

    How another agent should use this

    1. Check out nwparker/bug-repro-handoffs (or cherry-pick the repro-* test for this issue).
    2. Run the command(s) above — green documents the bug (or cannot_repro proves current tree does not show it).
    3. Implement the fix on a new branch from main; keep/adapt the repro test as a regression test that should flip behavior or stay as a guard.
    4. Open a PR with: Description, Evidence, ELI5, User-regression-tradeoffs.

    Posted by bug-repro orchestration so work is not trapped in a local worktree only.

  3. self-assigned this
    on Jul 17, 2026
  4. nwparker commented on Jul 17, 2026

    @nwparker
    Contributor

    👀 Looking at this — @nwparker picking up (repro kit + compare existing PR if any).

  5. nwparker commented on Jul 17, 2026

    @nwparker
    Contributor

    Landed a focused fix on current main as #9111.

    Takes the PR-diff host-routing approach from @wonjerry’s #8932 (credit), scoped to work-item details so GHES file diffs load without waiting on the broader host rewrite still open on that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghas_reproConclusive reproduction exists (test/script/CLI evidence). See docs/bug-reproductions/

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions