Re:GitHub New pull request overview page in public preview
by wizardmeridian on Sunday November 08, 2026 @02:41AM
(#50411199)
Individual files, for sure. I feel like plenty of times You have a changeset that involves an new/updated internal helper module of some kind, and also changes/additions to other places that use it, and its helpful to see them in a particular order, but file or folder hierarchies put things into a different order. I feel like a PR comment along the lines of "Look here [link-to-file] first" happens more than occasionally on my team.
As for changing the display of hunks within one file, I think that could be interesting for a couple reasons (but I totally get that could be obnoxious to both build and present a UI for). I can try to dig up an example later, but off the top of my head there's two situations I've seen infrequently this might help with? (I'm sorry if I'm vague - I cannot share any of the code I do for work, which is 99% of the PRs I deal with).
1. A specific file was refactored in such a way that code was moved, deleted, and added, and the interpreted hunks together are intermingled. I feel like I see diffs where it's hard to tell what's going on because there are delete/addition/delete/addition blocks alternating, but they form separate contexts/actions (and often have different indentation levels or other styling quirks) it's just the diff algorithm displaying them poorly that is causing the problem. This is normally the spot where I might switch between a side-by-side diff viewer and a unified viewer, but sometimes neither is good. (This could probably be solved with more careful individual commits, although sometimes this is unavoidable).
2. We have a few large modules (singluar classes in 2000+ln files) that often have a wide public interface, with multiple functions eventually calling the same internal helper (a trivial example would be a multiple separate search functions providing different kinds of windows/orderings/etc of a data source, sharing an private function that really does most of the main work), but this private function is not first in the file. It'd be helpful to order this to be seen first - "here's what I changed' followed by 'here's how it is used now'.
Maybe what I want could just be solved with a commit-by-commit ordering of things, but just showing multiple commits together on screen, with later commits coming further down the page (as opposed to showing the whole unified diff of a group of commits - Github does that, and that is pretty much never what I want other than 'what's changed since I last saw this').
I can attempt to find some specific examples later this week and try to explain these situations clearer if the above is confusing.
As for changing the display of hunks within one file, I think that could be interesting for a couple reasons (but I totally get that could be obnoxious to both build and present a UI for). I can try to dig up an example later, but off the top of my head there's two situations I've seen infrequently this might help with? (I'm sorry if I'm vague - I cannot share any of the code I do for work, which is 99% of the PRs I deal with).
1. A specific file was refactored in such a way that code was moved, deleted, and added, and the interpreted hunks together are intermingled. I feel like I see diffs where it's hard to tell what's going on because there are delete/addition/delete/addition blocks alternating, but they form separate contexts/actions (and often have different indentation levels or other styling quirks) it's just the diff algorithm displaying them poorly that is causing the problem. This is normally the spot where I might switch between a side-by-side diff viewer and a unified viewer, but sometimes neither is good. (This could probably be solved with more careful individual commits, although sometimes this is unavoidable).
2. We have a few large modules (singluar classes in 2000+ln files) that often have a wide public interface, with multiple functions eventually calling the same internal helper (a trivial example would be a multiple separate search functions providing different kinds of windows/orderings/etc of a data source, sharing an private function that really does most of the main work), but this private function is not first in the file. It'd be helpful to order this to be seen first - "here's what I changed' followed by 'here's how it is used now'.
Maybe what I want could just be solved with a commit-by-commit ordering of things, but just showing multiple commits together on screen, with later commits coming further down the page (as opposed to showing the whole unified diff of a group of commits - Github does that, and that is pretty much never what I want other than 'what's changed since I last saw this').
I can attempt to find some specific examples later this week and try to explain these situations clearer if the above is confusing.