Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- First-run crash on startup (`RPC_E_WRONG_THREAD` / `0x8001010E`):
`ShellViewModel.LoadAsync` resumed on a thread-pool thread after loading
the store and then mutated `CliChoices`, an `ObservableCollection` already
bound to the CLI switcher. WinRT rejects cross-thread collection-changed
marshalling. The await now stays on the UI thread.

### Added — Phase 6: Settings page + Velopack updater
- **Settings page becomes editable.** Theme switches live (System/Light/Dark
apply immediately via `IThemeApplier` → `MainWindow`'s content tree). Close
Expand Down
5 changes: 4 additions & 1 deletion src/Snipdeck.Core/ViewModels/ShellViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ public ShellViewModel(

public async Task LoadAsync(CancellationToken cancellationToken = default)
{
_document = await _store.LoadAsync(cancellationToken).ConfigureAwait(false);
// Stay on the UI thread after the await — RebuildCliChoices mutates
// an ObservableCollection that XAML is already bound to, and WinRT
// collection-change marshalling requires the original thread.
_document = await _store.LoadAsync(cancellationToken).ConfigureAwait(true);
RebuildCliChoices();
SelectedCliChoice = CliChoices.FirstOrDefault();
}
Expand Down
Loading