Repository navigation
Keep the package list's scroll position when an operation completes - #5512
Merged
Gabriel Dufresne (GabrielDuf) merged 1 commit intoOct 13, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The incremental update path is consistent with existing filtering and sorting behavior and is adequately covered by focused tests.
0 open findings
What changed in this PR
Preserves package-list scroll position by incrementally updating filtered rows when operations complete.
Changes:
- Adds reference-based removals and stable sorted insertions.
- Shares filtering, state updates, and sorting logic.
- Adds coverage for incremental collection behavior.
| File | Description |
|---|---|
src/UniGetUI.Tests/ObservablePackageCollectionTests.cs |
Tests removals, insertion order, notifications, and stable sorting. |
src/UniGetUI.Avalonia/ViewModels/SoftwarePages/PackagesPageViewModel.cs |
Applies procedural package deltas without resetting the collection. |
src/UniGetUI.Avalonia/Models/PackageCollections.cs |
Implements incremental updates and unified comparison logic. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🤖 Pull request was approved automatically: the AI review is complete and all its review threads are resolved. 🎉
Integration Details
{
"deliveryId": "82247bb0-c731-11f1-81db-30b6c68fe9b9",
"headSha": "85df2964bc91f4ced83dc3509b04bc9cb97b2462",
"reviewer": "copilot-pull-request-reviewer[bot]"
}
Gabriel Dufresne (GabrielDuf)
deleted the
fix/keep-scroll-on-operation-complete
branch
October 13, 2026 19:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cause
When an install/update/uninstall finishes, the operation adds/removes the package through the loader's procedural
Remove/AddForeignpath. The page answered by callingFilterPackages, which didFilteredPackages.Clear()and re-added every row.Clear()raises aReset, and the DataGrid returns to the top on aReset, so every completed operation scrolled the list view back to row 0 even though one row changed.Headless Avalonia repro (same DataGrid version, 500 rows, scrolled to row 289):
Clear()+ re-add (old)RemoveInsertFix
ObservablePackageCollection.ApplyChanges.Removenotifications.ApplyToListnow sorts through the same comparer used by the insert, so they can't disagree. Checked against the previousOrderBy/OrderByDescending/ThenBychain over 20,000 random orderings (both directions, download-size sort, ties): identical.fromQueryparameter ofFilterPackages; split outBuildPackageFilter/UpdateFilteredStateso both paths share them.ObservablePackageCollectionTests(5 tests, incl. a 500-case randomized comparison with a full stable sort; a deliberate tie-break mutation fails 2 of them).Reviewer notes
Clear()); the fix is for the default List view.Closes #5505