Skip to content

Conversation

@razor-x
Copy link

@razor-x razor-x commented Jan 13, 2026

Fixes #3851

What does this PR do?

Summary

  • Add a global app_exit handler so leader key combos reach exit even when prompt focus is blurred, while still respecting the “only exit when prompt is empty” rule in packages/opencode/src/cli/cmd/tui/app.tsx:183.
    Why this fixes it
  • q was being consumed while the prompt was blurred by leader mode, so the prompt-level app_exit handler never ran. The new global handler uses useKeyboard and usePromptRef to exit consistently.

How did you verify your code works?

Built and ran locally, verified q exits the app as expected.

@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@razor-x razor-x marked this pull request as ready for review January 13, 2026 07:22
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.

Keybind: <leader>q for app_exit doesn't exit in 1.0

1 participant