You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GitHub used to ship native "Collapse all" / "Expand all" buttons above the file list on PRs (closed in #1486 as redundant in 2018), but that UI is no longer present. Today the only built-in way to toggle every file at once is via the modifier-click affordance in toggle-everything-with-alt.tsx: hold ⌥ Option (macOS) / Alt (Windows/Linux) and click any chevron or "Load diff" link to apply to all. That's invisible — there's no UI hint, and on macOS there isn't even a key labeled "Alt" to guess at.
For large PRs this matters: skimming a 50-file PR is much easier when you can collapse everything to a TOC of file headers, then expand on demand — and vice versa when reviewing top-to-bottom.
Proposed UX
Two small buttons in the PR Files page toolbar (next to File filter / Conversations / Diff settings):
Collapse all — collapses every `.js-file` (chevron closed)
Expand all — expands every `.js-file`, and clicks "Load diff" on the ones GitHub hid behind that link (so the user actually gets the diff content, not just the header)
Same behavior the modifier-click already provides, just discoverable. No new keybindings, no settings.
Notes
`toggle-everything-with-alt` can stay as-is; the buttons just provide an explicit entry point to the same operations.
For large PRs this matters: skimming a 50-file PR is much easier when you can collapse everything to a TOC of file headers, then expand on demand — and vice versa when reviewing top-to-bottom.
There's a sidebar for that, you can already skim the PR from the sidebar and then click each file
there's no UI hint, and on macOS there isn't even a key labeled "Alt" to guess at.
This is somewhat of a known issue, the keyboard shortcut is only visible in the native shortcut guide via improve-shortcut-help. GitHub also has the same alt-click shortcut natively on some toggles (I forgot which)
There's a sidebar for that, you can already skim the PR from the sidebar and then click each file
That view doesn't give you a bird-eye view of the scale of each change tho. E.g. you have a 100 files CL where they are all 1 lines (e.g. updating an import) and then a few files where there is actual change.
I don't disagree, but we have to pick and choose which features have the greatest advantage. Here you're just saying that we need this feature because:
the main view tells shows you the diff amount
the alt-click, which already works, is hard to find
neither reason is compelling enough.
Because... after all, why not also add a "Mark all files as viewed | Mark all files as not viewed" as well? Just as useful if not more.
We'll probably want a button to toggle all review comments, they clutter the UI (yes there's a shortcut, but it's hidden).
We also want a button expand every file (like, show the whole file instead of the diff), that will give a proper overview. Also a button to revert it, of course. (yes toggle-everything-with-alt supports this, but it's hidden)
Activity
fregante commentedon May 6, 2026
There's a sidebar for that, you can already skim the PR from the sidebar and then click each file
fregante commentedon May 6, 2026
This is somewhat of a known issue, the keyboard shortcut is only visible in the native shortcut guide via
improve-shortcut-help. GitHub also has the samealt-clickshortcut natively on some toggles (I forgot which)fregante commentedon May 6, 2026
Duplicates:
simonepri commentedon May 6, 2026
FME: What the harm in adding this more visible in the UI? Not clutter the UI?
simonepri commentedon May 6, 2026
That view doesn't give you a bird-eye view of the scale of each change tho. E.g. you have a 100 files CL where they are all 1 lines (e.g. updating an import) and then a few files where there is actual change.
simonepri commentedon May 6, 2026
I agree that once you know you can alt-click,the buttons are not really useful. I'm just arguing that's pretty hidden (but maybe it's just me).
fregante commentedon May 6, 2026
There are hundreds of actions one can take on that page, what's the harm in adding a button for each of them?
fregante commentedon May 6, 2026
I don't disagree, but we have to pick and choose which features have the greatest advantage. Here you're just saying that we need this feature because:
neither reason is compelling enough.
Because... after all, why not also add a "Mark all files as viewed | Mark all files as not viewed" as well? Just as useful if not more.
We'll probably want a button to toggle all review comments, they clutter the UI (yes there's a shortcut, but it's hidden).
We also want a button expand every file (like, show the whole file instead of the diff), that will give a proper overview. Also a button to revert it, of course. (yes
toggle-everything-with-altsupports this, but it's hidden)and so on, you catch my drift