mirror of
https://github.com/1Remote/1Remote.git
synced 2026-04-25 13:36:03 +03:00
[PR #1038] [CLOSED] Fix VirtualizingWrapPanel crash in Card View during auto-startup #3870
Labels
No labels
area-configuration
area-ct-app
area-ct-rdp
area-ct-remoteapp
area-ct-ssh
area-ct-vnc
area-launcher
area-list
area-tags
area-teamwork
bug
chore
dependencies
general-build/ci
general-performance
general-refactor
general-security
general-supportive
general-ux
meta-documentation
meta-enhancement
meta-enhancement
meta-feature
meta-help-wanted
meta-unknown-error
priority-hi
priority-low
pull-request
question
resolution-duplicate
resolution-invalid
resolution-wontfix
stale
task-put-off
task-still-considering
task-working-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/1Remote#3870
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/1Remote/1Remote/pull/1038
Author: @Copilot
Created: 11/25/2025
Status: ❌ Closed
Base:
main← Head:copilot/fix-issue-1014-root-cause📝 Commits (4)
df81605Initial plan50eccbeFix VirtualizingWrapPanel crash by using DeferRefresh during collection modifications14f2808Refactor: Extract GetDeferredRefresh helper method to reduce code duplication577583cFix VirtualizingWrapPanel crash by detaching ItemsSource during collection changes📊 Changes
1 file changed (+86 additions, -20 deletions)
View changed files
📝
Ui/View/ServerView/List/ServerListPageViewModel.cs(+86 -20)📄 Description
ItemContainerManager.Virtualize()during layout measurementBuildView()to detach/reattach around Clear+Add operationsVmServerListDummyNode()to detach/reattach around Add/Remove operationsDeleteServer()to detach/reattach around Remove operationwasDetachedflag for clarity)Summary
The previous
DeferRefresh()approach failed because WPF throwsInvalidOperationExceptionwhen trying to modify a collection while refresh is deferred.The new approach temporarily sets
ListBox.ItemsSource = nullbefore making collection changes, then restores the original source after all changes are complete. This prevents the VirtualizingWrapPanel from receiving CollectionChanged events during modifications.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.