Repository navigation
View a pull request file in full from the Code tab #21718
a-salimkhanov
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
In the pull request panel's Code tab, each file shows only as a diff. Its header has the collapse chevron, the +/− counts and the Viewed checkbox, but nothing that opens the whole file, like GitHub's View file.
I need this most for files I use as a whole, not just review. For example, a PR adds a SQL migration that someone has to run by hand. To get the file today, I open the PR on GitHub or find the file in a local checkout of the branch. For a changed file, I can also expand every "N unmodified lines" bar one at a time.
The right-click menu from #11842 (Open, Reveal, Open with) covers files in a thread's changed-files list and in the Diff panel. It doesn't cover the Code tab. A PR's files may not be in any local checkout anyway.
Proposal
Add a View file action to each file header in the Code tab, as a button, a right-click item, or both. It opens the file read-only as it is at the PR's head commit, for example in the existing file preview. When the Code tab shows a single commit, it opens the file at that commit.
The view should have a button that copies the whole file, like GitHub's file view. The file preview doesn't have one today, and copying the file is often the reason to open it.
The Code tab already fetches whole files at the PR head to expand the "unmodified lines" bars, so the contents are already available.
Drafted with Claude Code (Claude Opus 5.5).
All reactions