Skip to content

TUI: tool, resource and prompt forms still receive keys while a sampling or elicitation overlay is open #2967

Closed

Description

@cliffhall

Raised by Copilot's review of the v2.15.0 milestone merge (#2961), and confirmed in the source. It is a follow-up to #2829 / PR #2903.

Problem

While a sampling or elicitation request is open in PendingRequestModal, the TUI's tool, resource and prompt test modals (ToolTestModal, ResourceTestModal, PromptTestModal) gate their own useInput with inputActive={!pendingRequestOpen}, and their handleFormSubmit returns early. The ink-form <Form> each one renders in its form state is not gated, though. As the code's own comment says, "ink-form still sees its keys". Keystrokes meant for the overlay's form therefore also move focus and edit values in the form underneath it.

Impact

  • Nothing is sent. Submit is blocked in all three modals.
  • A draft can be silently changed. Field values and the focused field in the hidden form can change while the user answers the request.
  • Narrow trigger. The form is mounted only while the modal is in its form state. A request the server sends during a call (state loading) does not leak. It happens only when a request arrives unprompted while a form is open.

Expected

While a pending request is open, the underlying form receives no input, for example by not rendering <Form> (or rendering it inert) while inputActive is false, so the draft is exactly as the user left it.

Activity

  1. added this to the v2.16.0 milestone on Nov 12, 2026
  2. added
    bugSomething isn't working
    v2Issues and PRs for v2
    on Nov 12, 2026
  3. cliffhall commented on Nov 12, 2026

    @cliffhall
    MemberAuthor

    Triage: Priority Medium (total 6)

    • Severity 2: minor friction. A hidden draft can change, but nothing is sent.
    • Urgency 2: wanted eventually. The trigger is narrow (an unprompted request while a form is open).
    • Bonuses: +1 bug label, +1 milestone (v2.16.0).

    Board: #28, Status Todo.

  4. self-assigned this
    on Nov 12, 2026
  5. cliffhall commented on Nov 12, 2026

    @cliffhall
    MemberAuthor

    Fixed by #2975 (merged in d10b08b).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingv2Issues and PRs for v2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions