Skip to content

Add worktree Dock labels through the shared desktop launcher #112

Description

@morgmart

Outcome

Make macOS linked-worktree development apps distinguishable in the Dock without changing release icons or app identity. This feature was removed from #111 so that PR can focus on optional personal notification muting.

Starting point and integration

The original implementation remains available at efb9598, including scripts/dev-desktop.mjs, scripts/generate-dev-icon.swift, and dev/dev-desktop.test.mjs. It is a reference, not a merge-ready implementation.

Coordinate with #109, which owns desktop argument/port forwarding in scripts/desktop-dev.mjs. Extend one launcher after that interface is settled; do not reintroduce competing wrappers. Preserve forwarded arguments, port selection, errors, exit codes, and signal termination.

Known defects to resolve

  1. Windows launch: the removed launcher executes the repository's bin/pnpm Bash proxy on every platform. Hermit is unavailable on Windows; preserve the inherited platform-compatible package-manager entry point and verify the actual subprocess boundary, not just returned argument arrays.
  2. Stale branch label: the removed generator always writes src-tauri/target/dev-icons/icon.icns. A branch switch at the same commit changes icon bytes without changing the Tauri configuration. Locked tauri-codegen 2.6.3 embeds a content-hashed cached copy; the app's ordinary tauri_build::build() does not register the source icon as an input. A warm-Cargo probe using the actual cached-icon code reproduced old embedded bytes after changing the source file in place. Use a digest-keyed output/config path or another verified invalidation mechanism.

Acceptance

  • Ordinary checkouts and non-macOS launches retain existing behavior; generation failures warn and fall back to the normal icon.
  • Linked worktrees show the branch suffix; detached checkouts use their directory name.
  • Warm build → rename/switch branch → relaunch displays the new label without cleaning Cargo output. Verify newly embedded bytes as well as the real Dock appearance.
  • Exercise the real launch boundary on Windows and macOS, including forwarded arguments and termination.
  • Production icons, identity, ports, and notification settings are unaffected.

A generated PNG/ICNS preview and the underlying cache probe were checked previously; no actual native Dock launch was performed. That acceptance remains required for this follow-up.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions