-
Notifications
You must be signed in to change notification settings - Fork 707
Show diffs for all selected files in Combined Changes area #10653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
bf45307
to
7d103c5
Compare
Without having looked at the code at all, I am surprised it actually works! The prompt was
Screen.Recording.2025-10-15.at.06.40.09.movOf course, ideally we figure out how to deal with filenames, and it seems like getting this right is a little less trivial. But overall, even with this improvement, it feels much more natural than it did before. What do you think, @PavelLaptev, @krlvi. And does @estib-vega think the code is salvageable? |
Co-authored-by: Byron <[email protected]>
7d103c5
to
a3a0b3f
Compare
@Byron displaying just one file diff at a time was originally done in part as a performance tweak. When users would try to do something like select 50 files to amend a commit with them, it would cause the UI to freeze as we tried to mount all those elements and query their data. We do now have some more intelligent lazy loading so maybe those performance characteristics have changed |
Thanks for the reminder! I wonder if there can be a 'safe' way to do this that gets this behaviour for common usecases. The reason I noticed this isn't even that I personally want or need this feature, it's just that it feels unintuitive that I can't see more in a row when multi-selecting. I also had no idea that files can be dragged, so it seemed useless to be able to multi-select them at all and showing more would have given them meaning. In any case, it looks like this PR is nothing more than a motivator to put in the time to make this safe even if 500 files are selected, and that then isn't so straightforward anymore. In any case, it might not be worth it to pursue this feature based on performance concerns alone (even though saying this always makes me sad). |
Problem
When multiple files were selected in the "Combined Changes" area, only the diff of the last selected file was displayed. This made it difficult to review changes across multiple files simultaneously.
Solution
Modified
SelectionView.svelte
to iterate over and display diffs for all selected files instead of just one.Key Changes
selectedFile
to using the fullselectedFiles
array from the selection{#each}
loop: Now renders a diff view for each selected file sequentiallyflex-direction: column
to properly stack multiple diffs verticallyreadKey
importTechnical Details
The original implementation used logic to determine which single file to display:
Now it uses all selected files:
Behavior
This change makes it much easier to review changes across multiple related files without having to switch between individual file selections.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.