Skip to content

Open and import workflow bundles from Finder #856

Open

Description

@onevcat

Goal

Open a .pwlworkflow bundle from Finder (double-click or Open With):

  • If Prowl already knows the workflow, open its detail page in Settings.
  • Otherwise, show an import confirmation alert with Cancel and Import. Import the bundle only after confirmation, then open the imported workflow's detail page in Settings.

Requested during preparation of v2026.10.4. Deferred from that release because the app has no document-open handler or bundle import operation yet. This follows #787 / #845, which registered the document package and icon without opening or importing it.

Existing code to reuse

  • App/Config/Info.plist declares com.onevcat.prowl.workflow as a package, currently with CFBundleTypeRole = None.
  • AppFeature.openWorkflowDetails already selects global or repository Settings and routes to an exact workflow row.
  • WorkflowSettingsClient supports discovery, starter creation, and deletion, but not import.
  • WorkflowSettingsRow.id is the bundle path; workflow IDs alone are not unique across scopes.
  • WorkflowBundleSnapshot supplies existing bundle validation and rejects symlinks. Reuse the existing approval boundary for script actions.

Proposed scope

  • Add a macOS document-open entry point and register Prowl as an appropriate handler. Support both a running app and cold launch; retain requests until the store and Settings are ready.
  • Resolve known bundles by canonical location across built-in, personal, and known repository sources. Open the exact Settings detail without copying or running the workflow.
  • For an external bundle, show its name and the personal workflow destination in the confirmation alert. Copy the entire validated bundle into the personal workflow directory, refresh discovery, and open the imported detail.
  • Define how a repeated open of the original external bundle is recognized after import. Decide how same-ID/different-content bundles and filename conflicts are handled; do not silently overwrite or route to an unrelated definition.
  • Cancel must leave the filesystem unchanged. Failed or partial imports must not leave a discoverable broken bundle.
  • Import must not run agents/scripts or grant script execution approval. Preserve the existing review-before-execution policy.
  • Report malformed bundles and filesystem failures clearly. Respect the Workflow UI feature gate and handle multiple incoming URLs without losing requests or stacking alerts.

Acceptance

  • Tests cover known personal/repository bundles, canonical path aliases, external import, cancellation, duplicate opens, ID/name conflicts, invalid bundles, and copy failures.
  • Verify Finder double-click with Prowl closed and running, plus the alert and exact Settings detail routing in Debug.
  • Update docs/components/workflows.md, add localized UI copy, and revise the release note that says Finder opening is unsupported when this feature ships.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions