Skip to content

feat(ui): add Open In dropdown for diff files#679

Open
matt2e wants to merge 4 commits intomainfrom
open-in-from-diffs
Open

feat(ui): add Open In dropdown for diff files#679
matt2e wants to merge 4 commits intomainfrom
open-in-from-diffs

Conversation

@matt2e
Copy link
Copy Markdown
Contributor

@matt2e matt2e commented May 4, 2026

🤖 Summary:

  • Add an editor-only Open In dropdown to diff file headers.
  • Open files with project context for VS Code, Cursor, and Zed via their CLI tools.
  • Preserve existing branch Open In behavior by passing the worktree as project context.

matt2e and others added 4 commits April 24, 2026 12:46
Add an "Open In" dropdown button to the after-pane (current view) header
in the diff viewer. Shows available editors that can open the file,
filtered to exclude terminals and Finder (directory-only openers).

- Add afterHeaderExtra snippet prop to DiffViewer for extensible headers
- Create OpenInDropdown component with click-to-toggle dropdown
- Pass worktreePath from BranchCard through DiffModal to construct
  full file paths for opening

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add `kind` field to OpenerApp (editor/terminal/file-browser) so the
  frontend filters by kind instead of maintaining a hardcoded blocklist
- Use position:fixed with getBoundingClientRect() to prevent the
  dropdown menu from being clipped by overflow:hidden on diff panes
- Add .catch() handler on getAvailableOpeners() to log failures

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When opening a file from the diff viewer or branch actions bar, editors
that support it (VS Code, Cursor, Zed) now receive the worktree path as
a project argument via `open -b <bundle_id> --args <project> <file>`.
This opens the file within the worktree workspace context, enabling
search, go-to-definition, and git integration scoped to the worktree.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace `open -b <bundle_id> --args` with dedicated CLI tools (`code`,
`cursor`, `zed`) that properly handle window reuse, IPC, and workspace
resolution. Falls back to `open -b` without `--args` when the CLI is
not installed or for other apps.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners May 4, 2026 05:54
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