Skip to content

Log failures currently swallowed by external preview lifecycle operations #4598

Description

@coderabbitai

Summary

Audit external-preview operations for exceptions that are currently swallowed or otherwise not observable, then add useful error logging without changing the user-facing recovery policy.

Rationale

Failures in opening, closing, or switching external previews need diagnostics so maintainers can identify plugin and integration problems. This work should remain separable from behavioral recovery changes.

Affected area

  • Flow.Launcher/ViewModel/MainViewModel.cs
  • External-preview methods in PluginManager and their plugin interfaces

Required changes

  • Identify exception paths for external-preview open, close, and switch operations that can be swallowed or lost by fire-and-forget call sites.
  • Add structured, contextual error logging at the appropriate boundary.
  • Ensure failure does not incorrectly update external-preview state.
  • Add focused tests for logging/state behavior where practical.

Acceptance criteria

  • Failures from external-preview lifecycle operations are observable in Flow Launcher logs with enough context to diagnose the failed operation.
  • Exceptions are not silently swallowed.
  • Logging changes do not alter successful preview behavior.

Requested by @DavidGBrett.

Related PR: #4529
See PR comment: #4529 (review)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions