Skip to content

feat(desktop): isolate development profiles per worktree - #5575

Open
chihumyum wants to merge 1 commit into
apache:mainfrom
chihumyum:feat/dev-worktree-profile
Open

chihumyum wants to merge 1 commit into
apache:mainfrom
chihumyum:feat/dev-worktree-profile

Conversation

@chihumyum

Copy link
Copy Markdown
Contributor

Summary

Multiple development checkouts currently share the default data directory. A branch that writes a different persisted format can leave another checkout unable to start its Runtime Host.

Add npm run dev:worktree to select a separate, stable profile from the checkout's canonical path. The command prints the selected directory and reuses the existing HMR launcher. Explicit --user-data-dir arguments take precedence. The default npm run dev behavior is unchanged; profiles start empty, and existing data is neither copied nor removed.

Includes platform-specific profile locations, argument validation, and English/Chinese contributor documentation. Profile identity follows the checkout path, so switching branches within one checkout reuses its data.

Verification

  • 26 launcher tests pass, including profile separation, stable paths, symlink aliases, platform locations, explicit overrides, invalid arguments, and plain/TCC argument forwarding.
  • npm run lint, npm run format:check, npm run build, npm run typecheck, and npm run check:asf-headers pass.
  • npx knip --workspace apps/desktop, npx knip --workspace packages/ui, and git diff --check pass.
  • macOS smoke: npm run dev:worktree printed a directory under ~/Library/Application Support/Maka Dev Worktrees/, launched on Vite port 5174 alongside an existing development instance, and displayed onboarding. Stopping this launcher left the existing instance running.
  • Windows/Linux path selection and TCC forwarding are covered by tests; Windows/Linux launches and a TCC permission-grant flow were not run. The full workspace test suite was not run locally.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex implemented the launcher, tests, and documentation, ran the checks, and prepared this pull request. The commit includes Generated-by: Codex.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/M Under 500 readable lines label Sep 21, 2026
Add an opt-in dev:worktree launcher that selects a stable data directory from the checkout path and forwards explicit profile overrides to the existing launcher.

Generated-by: Codex
@chihumyum
chihumyum force-pushed the feat/dev-worktree-profile branch from b467952 to 40a24ea Compare September 23, 2026 17:36

This branch has not been deployed

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

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant