Flow-Launcher / Flow-Launcher/Flow.Launcher
Recover internal preview when opening an external preview fails
- Dominant language
- C#
- Stars
- 15.6k
- Forks
- 644
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 4
Description
## Summary
External-preview opening can fail after the internal preview has already been hidden, leaving users without either preview. Define and implement reliable recovery for this failure path.
## Rationale
External previews are an existing feature and failures should not leave the preview UI in an unavailable state.
## Affected area
- `Flow.Launcher/ViewModel/MainViewModel.cs`
- External-preview open/close/switch orchestration in `PluginManager`
## Required changes
- Make the external-preview open operation expose whether it completed successfully (or otherwise make failure unambiguous to its callers).
- When opening an external preview fails after hiding the internal preview, restore the appropriate internal preview.
- Preserve the successful external-preview behavior and keep `ExternalPreviewVisible` consistent with the actual outcome.
- Cover the failure/recovery path with focused tests where the surrounding UI architecture permits.
## Acceptance criteria
- A failed external-preview open does not leave the user with no preview when an internal preview is available.
- The external-preview visibility state is not marked visible after a failed open.
- Existing successful external-preview and internal-preview flows remain unchanged.
Requested by @DavidGBrett.
Related PR: https://github.com/Flow-Launcher/Flow.Launcher/pull/4529
Originating review discussion: https://github.com/Flow-Launcher/Flow.Launcher/pull/4529#discussion_r3685731098
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.