Skip to content

fix: stop the tray crashing when an agent has more than 6 apps - #191

Merged
EhabY merged 1 commit into
mainfrom
fix/agent-apps-crash
Oct 30, 2026
Merged

EhabY merged 1 commit into
mainfrom
fix/agent-apps-crash

Conversation

@EhabY

@EhabY EhabY commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

VisibleApps returned the live Apps collection for up to 6 apps and a Take() copy above that. Adding the 7th app swapped the ItemsRepeater's ItemsSource while Apps was still raising CollectionChanged. That called the released ItemsSourceView's handler and crashed the app on Coder Connect start.

VisibleApps is now a fixed collection that stays in sync with the first 6 apps, so the ItemsSource never changes.

Tested with a Release build against a workspace with 7 apps: starting Coder Connect crashed every time before this change and no longer does.

Related: #190

🤖 Generated with Claude Code

VisibleApps returned the live Apps collection for up to 6 apps and a
Take() copy above that. Each Apps change re-raised VisibleApps, so adding
the 7th app swapped the ItemsRepeater's ItemsSource while Apps was still
raising CollectionChanged. Apps then invoked the handler of the released
ItemsSourceView and crashed the process.

Keep VisibleApps as its own collection, synced with the first 6 apps, so
the ItemsSource never changes.
@EhabY
EhabY requested a review from untra October 30, 2026 16:10
@EhabY
EhabY merged commit 9183668 into main Oct 30, 2026
3 checks passed
@EhabY
EhabY deleted the fix/agent-apps-crash branch October 30, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants