Skip to content

Fix new workspace shortcut terminal focus - #4565

Merged
nwparker merged 1 commit into
mainfrom
nwparker/cmd-enter-focus
Jun 3, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/cmd-enter-focus

Conversation

@nwparker

@nwparker nwparker commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Re-apply the new worktree startup timing changes that were reverted in Revert "Improve new worktree startup timing" #4564 after the Cmd+Enter focus regression was confirmed.
  • Add a post-create focus handoff for the New Workspace composer so Cmd/Ctrl+Enter leaves keyboard focus in the created workspace's active terminal.
  • Cover both renderer-created startup terminals and backend-adopted startup terminals with a focused regression test.

Validation

  • pnpm exec vitest run --config config/vitest.config.ts src/main/worktree-create-timing.test.ts src/main/ipc/worktrees.test.ts src/renderer/src/store/slices/worktrees.test.ts src/renderer/src/lib/new-workspace-terminal-focus.test.ts
  • pnpm exec oxlint --quiet src/main/worktree-create-timing.ts src/main/worktree-create-timing.test.ts src/main/ipc/worktree-remote.ts src/main/ipc/worktrees.test.ts src/main/ipc/pty.ts src/main/runtime/orca-runtime.ts src/renderer/src/hooks/useComposerState.ts src/renderer/src/store/slices/worktrees.ts src/renderer/src/store/slices/worktrees.test.ts src/renderer/src/lib/new-workspace-terminal-focus.ts src/renderer/src/lib/new-workspace-terminal-focus.test.ts src/shared/types.ts
  • pnpm run typecheck
  • pnpm run lint:switch-exhaustiveness
  • git diff --check
  • Isolated Electron dev smoke on this branch: opened the New Workspace dialog, submitted via Cmd+Enter, chose "Don't run" in the hook trust modal for the isolated profile, and confirmed the created workspace was active with document.activeElement set to the active terminal's .xterm-helper-textarea.

Notes

  • Commit used --no-verify because lint-staged runs oxlint --config config/oxlint-react-doctor.json --deny-warnings on touched files and reports existing useComposerState.ts warnings unrelated to this change.

@nwparker
nwparker merged commit 7bf33ea into main Jun 3, 2026
2 checks passed
@nwparker
nwparker deleted the nwparker/cmd-enter-focus branch June 3, 2026 19:25
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant