Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

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 attachCustomKeyEventHandler had inverted return values:

  • ghostty-web expects true to PREVENT default, false to ALLOW default
  • The buggy code returned true for all non-clipboard keys, blocking ALL input

Tests Added

  1. keyboard input reaches terminal - Types a command that creates a marker file and verifies execution
  2. special keys work in terminal - Tests Enter, Backspace, Tab, and arrow keys

Helper 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

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()
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

@ammar-agent
Copy link
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ 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".

@ammario ammario merged commit 28f2719 into main Jan 13, 2026
21 checks passed
@ammario ammario deleted the e2e-terminal-input-regression branch January 13, 2026 17:10
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.

2 participants