feat(search): virtualise results list with 500-result soft cap (#677)#678
Merged
Conversation
…#677) 4 compile errors expected — IsCapped, CappedNoticeText, CancelThumbnailLoad not yet implemented. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add IsCapped / CappedNoticeText to SyncedFileSearchViewModel; results capped at 500 with localised notice when limit is hit - Replace WrapPanel with VirtualizingStackPanel in SyncedFileSearchView so only visible containers incur layout/render cost - Defer thumbnail loading to ContainerPrepared; cancel on ContainerClearing via CancellationTokenSource in SyncedFileResultViewModel - Bump ApplicationVersion 0.26.0 → 0.27.0 Closes #677 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…#677) 500-result cap bounds render cost without requiring layout change. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7 tasks
astar-development-jb
approved these changes
Jun 22, 2026
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.
Summary
IsCappedproperty drives visibilityWrapPanelwithVirtualizingStackPanelinSyncedFileSearchViewso only visible containers incur layout and render costContainerPreparedevent and cancels onContainerClearingvia a per-VMCancellationTokenSource, eliminating off-screen thumbnail decodesApplicationVersion0.26.0→0.27.0Closes #677
Type of change
Related issues / links
Closes #677
How was this tested?
New tests in
GivenASyncedFileSearchViewModel:Results.CountandResultCountboth capped at 500CappedNoticeTextdelegates to localisation serviceSearchAsync(deferred to container)New test in
GivenASyncedFileResultViewModel:CancelThumbnailLoad()aborts an in-progress decode and leavesThumbnailnullImpacted areas
apps/desktop/AStar.Dev.OneDrive.Sync.Client— search view, search VM, result VM, localisation filesTDD Checklist (required)
dotnet test)How to run tests locally
dotnet restore AStar.Dev.slnx dotnet test --verbosity normalNotes for reviewers
VirtualizingStackPanelimplementsILogicalScrollablein Avalonia 11, so placing it inside the existingScrollViewer(*row,MinHeight="0") gives a correctly-bounded viewport — scroll delegation passes to the panel, enabling virtualisation.CancelThumbnailLoad()postsThumbnail = nullvia the dispatcher to handle the race where a fast decode completes before cancel is processed.🤖 Generated with Claude Code