Skip to content

enter commits neither rename over MCP #246

Closed

Description

@bastien-gallay

The symptom

An MCP caller can open a rename (press_keys, or a human's mouse), type into
it, cancel it with escape — but not commit it. enter is swallowed by
the overlay and does nothing.

True of both renames, symmetrically:

Rename escape enter What commits today
tab (tab-rename) ✅ cancels ❌ inert the widget's on_submit, or a blur
session (session-rename) ✅ cancels ❌ inert the widget's on_submit, or the ✓ button

Why

Message::CommitRename / Message::CommitTabRename are emitted only by the
text_input's .on_submit(...) — an iced widget callback. A press_keys
enters through input::event_of → Shell::on_key, which never walks the
widget tree: the callback does not exist on that path.

Why this is not #237

#237 parked the surface: no key could dismiss the overlay, so an agent
stayed stuck until a human intervened. Here the surface always gives way —
escape works. This is a missing capability, not a block, hence a separate
ticket rather than a passenger on that fix.

What it is worth

An agent verifying an ergonomics fix must be able to perform the gesture,
not merely open and close it. Without enter, renaming stays out of reach of
F-mcp-keys while the rest of the keyboard is in it.

Lead

Route enter in tab_rename_key / session_rename_key to the matching
Commit*, the way escape routes to Cancel*. The widget callback stays in
place for the human; both paths converge on the same message. Extend the
every_overlay_that_owns_the_keyboard_can_be_left_from_the_keyboard sweep —
or give it a commit-side twin — so that the cancel/commit pair is an invariant
of the ladder, not two independent behaviours.

Activity

  1. added
    area:sidebar
    area:mcp
    area:keymap
    on Jul 30, 2026
  2. changed the title [-]`enter` ne valide aucun des deux renommages depuis MCP[/-] [+]`enter` commits neither rename over MCP[/+] on Aug 4, 2026
  3. bastien-gallay commented on Oct 31, 2026

    @bastien-gallay
    CollaboratorAuthor

    Confirmed from the routing code: both rename overlays own the keyboard, and press_keys dispatches a synthesised event through Shell::on_key. The rename handlers currently act on Escape only; Enter’s widget on_submit callback is not reached on this path.

    I plan to cover both rename types through the synthesized press path: seed the edit value, assert Enter commits it and releases the overlay, and keep Escape cancellation covered. I’ll also check whether the keyboard-owner sweep should gain a rename-specific commit assertion.

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

Metadata

Metadata

Labels

area:keymaparea:mcparea:sidebar

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions