Matt Toohey cf68533896 feat: add branch-based dev icons and stable ports for worktree disambiguation (#19)
* feat: add branch-based dev icon for worktree disambiguation

Add a Swift script that generates a modified .icns file with a blue badge
containing the current branch name. When running in a git worktree, the
`just dev` and `just dev-debug` recipes automatically detect this and
generate a badged icon, making it easy to distinguish between multiple
dev instances in the dock.

- scripts/generate-dev-icon.swift: Generates badged icons with text
  wrapping on hyphens, multi-size iconset generation via iconutil
- justfile: dev and dev-debug recipes now detect worktrees and pass
  icon override config to Tauri via --config JSON merge
- Generated icons go to src-tauri/target/dev-icons/ (already gitignored)

* feat: derive stable dev port from working directory for worktree disambiguation

Each worktree gets a stable, unique port derived from the SHA-256 hash of
the working directory path (range 10000-64999). This prevents port conflicts
when running multiple dev instances simultaneously.

- justfile: dev and dev-debug recipes compute VITE_PORT and pass it via
  --config JSON merge to override devUrl and beforeDevCommand
- vite.config.ts: server port and HMR port read from VITE_PORT env var,
  falling back to 1520 for standalone frontend dev (just dev-frontend)
- Icon config in dev recipe now merges into existing TAURI_CONFIG via
  python3 JSON manipulation instead of replacing it
- Icon config in dev-debug recipe appends a separate --config flag
2026-03-31 14:09:58 +11:00
S
Description
No description provided
Apache-2.0 1.5 GiB
Languages
Rust 63.6%
TypeScript 29.6%
JavaScript 1.7%
Shell 1.6%
Python 1.5%
Other 1.8%