Summary
When using split panes, clicking into a pane after switching worktrees does not always update which pane looks active.
The terminal itself appears clickable, but the visual active-pane state stays on the previous pane. The transparency/dimming only updates after clicking the already-highlighted pane again, then clicking the other pane.
Steps to reproduce
- Open a worktree with two terminal panes.
- Switch to another worktree.
- Switch back, or switch between worktrees with split panes.
- Click into the pane that is not currently highlighted.
Expected behavior
The pane I click should immediately become the active/highlighted pane.
Actual behavior
The highlighted pane does not change on the first click. It only updates after clicking the currently highlighted pane again, then clicking the other pane.
Notes from a quick code check
This looks like the visual active-pane state is tied to the Ghostty surface becoming first responder. Normal mouseDown forwards the click to Ghostty, but does not appear to explicitly focus the clicked surface when the window is already active. So the click can reach the terminal without updating Supacode's active-pane state.
A likely fix is to focus the clicked surface on mouseDown before forwarding the click.
Summary
When using split panes, clicking into a pane after switching worktrees does not always update which pane looks active.
The terminal itself appears clickable, but the visual active-pane state stays on the previous pane. The transparency/dimming only updates after clicking the already-highlighted pane again, then clicking the other pane.
Steps to reproduce
Expected behavior
The pane I click should immediately become the active/highlighted pane.
Actual behavior
The highlighted pane does not change on the first click. It only updates after clicking the currently highlighted pane again, then clicking the other pane.
Notes from a quick code check
This looks like the visual active-pane state is tied to the Ghostty surface becoming first responder. Normal
mouseDownforwards the click to Ghostty, but does not appear to explicitly focus the clicked surface when the window is already active. So the click can reach the terminal without updating Supacode's active-pane state.A likely fix is to focus the clicked surface on
mouseDownbefore forwarding the click.