Skip to content

fix(cmd-j): restore focus when issue match routing declines - #11010

Merged
nwparker merged 1 commit into
mainfrom
nwparker/fix-10695-issue-match-focus-fallback
Jul 27, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/fix-10695-issue-match-focus-fallback

Conversation

@nwparker

Copy link
Copy Markdown
Contributor

Summary

Restore fallback focus in both existing issue/PR match paths when destination-scoped terminal focus declines. This follows up on #10695 and addresses #10695 (comment).

Screenshots

No visual change.

Testing

  • pnpm lint — changed files pass oxlint and React Doctor via the commit hook
  • pnpm typecheck — pnpm run typecheck:web passes
  • pnpm test — 10 focused focus-routing tests pass
  • pnpm build — not run; no build-system or production-bundle changes
  • Added or updated high-quality tests that would catch regressions

AI Review Report

Reviewed both existing issue/PR match branches, hook dependencies, and the false-return cases from destination-scoped terminal focus. The test now requires guarded fallback routing in both branches, preventing an unconditional fallback or a discarded return value. The change is DOM-focus-only and introduces no shortcuts, labels, paths, shell behavior, Electron platform APIs, or platform-specific differences across macOS, Linux, and Windows.

Security Audit

No new input handling, command execution, path handling, authentication, secrets, dependencies, or IPC. The change only handles an existing boolean result and schedules the existing focus fallback.

Notes

The fallback preserves the established non-terminal behavior when scoped terminal routing declines. SSH and folder workspaces use the same renderer focus path.

@nwparker
nwparker merged commit 0ab5f49 into main Jul 27, 2026
22 checks passed
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4f3f91ca-a657-4fcb-adfc-8814470e3030

📥 Commits

Reviewing files that changed from the base of the PR and between a065db1 and 7495942.

📒 Files selected for processing (2)
  • src/renderer/src/components/WorktreeJumpPalette.tsx
  • src/renderer/src/components/cmd-j/palette-activation-focus-routing.test.ts

📝 Walkthrough

Walkthrough

Updated existing-workspace issue/PR activation handling for both pasted URLs and raw issue/PR numbers. The flow now calls focusFallbackSurface() only when terminal focus queuing returns false, and the callback dependency list includes the fallback function. The focus-routing test now verifies activation calls and guarded fallback behavior for both matching paths.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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