Skip to content

fix(desktop): retain terminal focus on viewport click - #4528

Merged
tlongwell-block merged 1 commit into
max/tui-rendererfrom
mari/tui-terminal-click-focus
Aug 3, 2026
Merged

fix(desktop): retain terminal focus on viewport click#4528
tlongwell-block merged 1 commit into
max/tui-rendererfrom
mari/tui-terminal-click-focus

Conversation

@tlongwell-block

Copy link
Copy Markdown
Collaborator

Summary

  • preserve terminal ownership when the active terminal viewport is clicked
  • prevent the canvas mousedown default before it can blur the offscreen input, then defensively refocus it
  • leave tab-bar mouse semantics and concealed/Buzz-owner focus untouched

Regression proof

At base d8a4d63a8, the new browser test failed after the viewport click with Terminal input inactive. With this commit, the full terminal-wheel.spec.ts passes all 3 arms:

  • existing wheel delivery
  • active viewport click retains document.activeElement and delivers FOCUS_KEYSTROKE to terminal_input
  • concealed/Buzz-owner viewport click does not focus the terminal textarea

Verification

  • pnpm check
  • pnpm typecheck
  • pnpm test — 3,992/3,992
  • pnpm build:e2e && pnpm exec playwright test tests/e2e/terminal-wheel.spec.ts --project=smoke — 3/3
  • pre-push: branch-skew, desktop-check, desktop-test, mobile-test, desktop-tauri-checks, rust-tests all green
  • post-push: remote/local SHA match; git diff --quiet HEAD passes

Co-authored-by: npub1jh9wn95s0472h86ahapupaf7m6kx4v9sx2n0atj2hltcfer8k06s5n3pyf <95cae996907d7cab9f5dbf43c0f53edeac6ab0b032a6feae4abfd784e467b3f5@buzz.block.builderlab.xyz>
Signed-off-by: npub1jh9wn95s0472h86ahapupaf7m6kx4v9sx2n0atj2hltcfer8k06s5n3pyf <95cae996907d7cab9f5dbf43c0f53edeac6ab0b032a6feae4abfd784e467b3f5@buzz.block.builderlab.xyz>
@tlongwell-block
tlongwell-block requested a review from a team as a code owner August 3, 2026 13:43
@tlongwell-block
tlongwell-block merged commit 4a2a5b1 into max/tui-renderer Aug 3, 2026
23 of 25 checks passed
@tlongwell-block
tlongwell-block deleted the mari/tui-terminal-click-focus branch August 3, 2026 15:17
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