Context
The scenario "Open from folder" flow (ScenarioLaunchService.LaunchFromFolderAsync) now plumbs a CancellationToken through the off-thread folder enumeration and the parallel per-file channel probe. Cancellation is currently wired to the dashboard's component lifetime: EmptyStateDashboard owns a CancellationTokenSource that is cancelled and disposed in DisposeAsyncCore, so an in-flight scan is abandoned when the user navigates away from or closes the dashboard.
Follow-up
There is no in-place way for the user to cancel a scan while remaining on the dashboard. For a large or slow (for example, network) folder, the only escape today is to navigate away. Add a user-reachable Cancel affordance:
- A per-launch
CancellationTokenSource linked to the lifetime token (CancellationTokenSource.CreateLinkedTokenSource), so a single launch can be cancelled independently of disposal.
- A visible Cancel control (and/or progress/busy indication) shown while
RunGuardedAsync is busy on a folder launch.
- Tests covering user-initiated cancellation (Cancelled outcome, no logs opened, no filter dispatch).
Origin
Deferred from the folder-launch cancellation change after a review panel: 3 of 4 reviewers considered lifetime-only cancellation sufficient to ship; one reviewer recommended a user-facing Cancel affordance. The product decision was to ship lifetime-only cancellation now and track the affordance here.
Context
The scenario "Open from folder" flow (
ScenarioLaunchService.LaunchFromFolderAsync) now plumbs aCancellationTokenthrough the off-thread folder enumeration and the parallel per-file channel probe. Cancellation is currently wired to the dashboard's component lifetime:EmptyStateDashboardowns aCancellationTokenSourcethat is cancelled and disposed inDisposeAsyncCore, so an in-flight scan is abandoned when the user navigates away from or closes the dashboard.Follow-up
There is no in-place way for the user to cancel a scan while remaining on the dashboard. For a large or slow (for example, network) folder, the only escape today is to navigate away. Add a user-reachable Cancel affordance:
CancellationTokenSourcelinked to the lifetime token (CancellationTokenSource.CreateLinkedTokenSource), so a single launch can be cancelled independently of disposal.RunGuardedAsyncis busy on a folder launch.Origin
Deferred from the folder-launch cancellation change after a review panel: 3 of 4 reviewers considered lifetime-only cancellation sufficient to ship; one reviewer recommended a user-facing Cancel affordance. The product decision was to ship lifetime-only cancellation now and track the affordance here.