Skip to content

Open changed files from the Git actions dialog in Files - #270

Merged
henrychu04 merged 1 commit into
coder-onlyfrom
t3code/git-dialog-open-file
Oct 28, 2026
Merged

henrychu04 merged 1 commit into
coder-onlyfrom
t3code/git-dialog-open-file

Conversation

@henrychu04

Copy link
Copy Markdown
Owner

Fixes #265.

Cause: GitActionsControl's onOpenFile seam (changed files open in the Files surface rather than an editor) was added without wiring its only caller. ThreadDetailsPanel never passed the prop, so the commit dialog's changed-file buttons were always disabled.

Fix:

  • ChatView passes openFileSurfaceStable through ThreadDetailsPanel's new onOpenFile prop, for server threads.
  • Clicking a changed file opens it in Files and closes the modal dialog, so the file is visible. Reopening the dialog keeps the typed commit message, because only the excluded-file selection resets on open.
  • The button regains an accessible label ("Open in Files").
  • The seams doc entry now describes the wiring.

Verification:

  • pnpm typecheck:web, pnpm knip:check and vp fmt --check pass.
  • 63 web test files pass (components/chat, GitActionsControl.logic, ChatView.logic).
  • A throwaway browser test, not committed, rendered the dialog with the deleted upstream test's mocks. Clicking file.ts called onOpenFile("file.ts") and closed the dialog, and without the prop the button stays disabled.

🤖 Generated with Claude Code

GitActionsControl's onOpenFile seam was never passed by its only caller, so the dialog's changed-file buttons were always disabled. ChatView now passes openFileSurfaceStable through ThreadDetailsPanel, and the dialog closes after opening a file so the Files surface is visible; its commit message stays for the next open. The button regains an accessible label.

Fixes #265

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Git actions dialog never opens changed files in Files

1 participant