🤖 tests: add E2E regression tests for terminal keyboard input (#1586)#1590
🤖 tests: add E2E regression tests for terminal keyboard input (#1586)#1590
Conversation
Adds end-to-end tests that verify keyboard input reaches the terminal, preventing regression of the bug fixed in PR #1586. The bug: attachCustomKeyEventHandler returned inverted values, causing ghostty-web to block all keyboard input (characters, Enter, arrows, etc.) instead of only clipboard shortcuts. Tests verify: - Characters can be typed and commands executed - Special keys (Enter, Backspace, Tab, arrows) work correctly - The terminal doesn't freeze when receiving keyboard input Also adds helper methods to the E2E UI utils for terminal interaction: - focusTerminal() - typeInTerminal() - pressKeyInTerminal() - runTerminalCommand()
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a7e357070
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Summary
Adds end-to-end tests that verify keyboard input reaches the terminal, preventing regression of the bug fixed in PR #1586.
Root Cause (from #1586)
The bug in
attachCustomKeyEventHandlerhad inverted return values:trueto PREVENT default,falseto ALLOW defaulttruefor all non-clipboard keys, blocking ALL inputTests Added
keyboard input reaches terminal- Types a command that creates a marker file and verifies executionspecial keys work in terminal- Tests Enter, Backspace, Tab, and arrow keysHelper Methods Added
New E2E UI utils for terminal interaction:
focusTerminal()typeInTerminal(text)pressKeyInTerminal(key)runTerminalCommand(command)Generated with
mux• Model:anthropic:claude-opus-4-5• Thinking:high• Cost:$2.96