feat: add explicit worktree setup flow#286
Merged
Merged
Conversation
- Centralize worktree activation setup flow - fix: render orca.yaml file contents in settings repo pane instead of tags when using config file - fix: command preview title for yaml configs - fix: update UI copy and styling to better reflect yaml setup hooks - fix: run setup hook in background if CLI worktree is created while GUI is closed - fix: prevent duplicate terminal tab creation when creating worktrees from the UI - fix: ensure CLI worktree create returns correct payload type and hooks up UI setup flow - Squashed commits - fix minor regression - fix: close worktree context menu when deleting - fix: keep delete dialog open while archive hook runs and support inline yaml scripts - chore: fix lint, typecheck and react state mutations during render for setup script feature
Extract Windows path-handling tests into worktrees-windows.test.ts to bring the original file under the 300-line oxlint max-lines rule.
The computeWorktreePathMock and ensurePathWithinWorkspaceMock were cleared by afterEach but not re-established in the test, causing areWorktreePathsEqual to receive undefined and crash.
thomaszdxsn
pushed a commit
to thomaszdxsn/orca
that referenced
this pull request
Jun 15, 2026
* feat: add explicit worktree setup flow - Centralize worktree activation setup flow - fix: render orca.yaml file contents in settings repo pane instead of tags when using config file - fix: command preview title for yaml configs - fix: update UI copy and styling to better reflect yaml setup hooks - fix: run setup hook in background if CLI worktree is created while GUI is closed - fix: prevent duplicate terminal tab creation when creating worktrees from the UI - fix: ensure CLI worktree create returns correct payload type and hooks up UI setup flow - Squashed commits - fix minor regression - fix: close worktree context menu when deleting - fix: keep delete dialog open while archive hook runs and support inline yaml scripts - chore: fix lint, typecheck and react state mutations during render for setup script feature * fix(lint): split worktrees.test.ts to stay under max-lines limit Extract Windows path-handling tests into worktrees-windows.test.ts to bring the original file under the 300-line oxlint max-lines rule. * fix(test): set up path mocks for setup launch payload test The computeWorktreePathMock and ensurePathWithinWorkspaceMock were cleared by afterEach but not re-established in the test, causing areWorktreePathsEqual to receive undefined and crash.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Orca worktree creation did not treat repo setup as an explicit product flow. Users could not choose whether setup should run for a new worktree, setup failures were hard to inspect, CLI-created worktrees did not feed the renderer startup path consistently, and several related worktree/terminal regressions around path handling and teardown were still open.
Solution
Promote setup to a first-class worktree creation flow while keeping the existing hook plumbing. The change adds repo-level setup run policy and per-create decisions, generates runner scripts plus PTY env injection for interactive setup terminals, wires both UI and CLI worktree creation through the same activation path, preserves Windows path normalization and delete-time terminal shutdown behavior, and updates the settings/create-worktree UI plus tests to cover the new setup lifecycle end to end.