Skip to content

Bug: ESC in /btw overlay propagates to underlying option dialog #75201

Description

@idantene

Bug

When /btw is open at the same time as an agent option/permission dialog, pressing ESC to close the /btw overlay also cancels the underlying dialog. The keypress propagates through both layers.

Additionally, while the /btw input window is open, the option dialog beneath it is not visible, so the user cannot see what they are about to accidentally cancel.

Steps to reproduce

  1. Trigger any option or permission dialog (e.g. a tool permission prompt, or an AskUserQuestion dialog).
  2. While the dialog is waiting for input, type /btw to open the background-context overlay.
  3. Press ESC to dismiss the /btw window.
  4. The underlying dialog is also dismissed/cancelled without any explicit user action on it.

Expected behaviour

ESC should close only the /btw overlay. The underlying dialog should remain visible and unaffected, with focus returning to it.

Environment

  • Platform: macOS
  • TUI mode: fullscreen

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:tuibugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions