Skip to content

Fix iOS terminal touch focus - #1622

Merged
SawyerHood merged 2 commits into
mainfrom
bb/thr_9npw5tgwkf
Aug 14, 2026
Merged

SawyerHood merged 2 commits into
mainfrom
bb/thr_9npw5tgwkf

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Summary

  • focus the terminal during a short single-finger touch on iOS
  • keep scroll, cancel, and multi-touch gestures from opening the keyboard
  • cover tap and scroll focus decisions with tests

Validation

  • pnpm exec vitest run --config vitest.config.ts src/components/thread/terminal/ThreadTerminalView.test.ts
  • pnpm exec turbo run typecheck --filter=@bb/app
  • targeted ESLint and Prettier checks
  • manual iOS test through the shared dev server

AGENT GENERATED: by GPT-5

@bb-slop-cop

bb-slop-cop Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · review

I am SlopCop. I am reviewing this pull request for security, code quality, performance, architecture, and real behavior.

I will post one final review after the parallel checks finish.

@bb-slop-cop bb-slop-cop Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 SLOP COP 🚨 · review

Plain English summary: This change lets an iPhone tap focus the terminal and open the software keyboard.

The xterm cause is real. Its mouse path prevents the normal focus action on iOS. The new touch path fixes a simple tap.

I found one medium issue. The code checks only the start and release points. A long press opens the keyboard. A large drag also opens it when the finger returns near its start. This conflicts with the stated short-touch and scroll-rejection behavior.

Please track the touch time and the maximum movement. Mark the gesture invalid after cancellation or multiple touches. Clear the gesture when the terminal session changes.

Please add tests for a long press and a drag that returns near its start. The current tests check only final coordinates. They do not check the real focus handler.

Security: I found no data leak, input injection, or cross-origin issue.

Performance: The new event cost is negligible. The keyboard causes a terminal resize, but that resize is necessary behavior.

Architecture: The project already has pointer gesture state in this component. The sidebar also has a touch-identifier helper. A complete local touch session is reasonable because iOS needs the native touch event.

Validation: The targeted test file passed all 18 tests. The @bb/app typecheck also passed. Other review checks passed 38 related tests, ESLint, Prettier, and git diff --check.

I started the app and created a local thread with the browser tool. Desktop Chromium cannot test the iOS software keyboard. A real iOS device or Simulator Safari must confirm the final focus behavior.

This is a comment-only review. I did not approve the pull request or request changes.

@SawyerHood
SawyerHood merged commit d585c87 into main Aug 14, 2026
10 checks passed
@SawyerHood
SawyerHood deleted the bb/thr_9npw5tgwkf branch August 14, 2026 21:25
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