Repository navigation
Fix iOS terminal touch focus - #1622
Conversation
|
🚨 SLOP COP 🚨 · 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. |
There was a problem hiding this comment.
🚨 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.
66e2ada to
14cd5d5
Compare
Summary
Validation
pnpm exec vitest run --config vitest.config.ts src/components/thread/terminal/ThreadTerminalView.test.tspnpm exec turbo run typecheck --filter=@bb/app