UAT: TUI Slash Command Overlay does not filter commands while typing — app.py has no on_change handler for real-time overlay updates #6829

Open
opened 2026-04-10 02:24:19 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Feature Area: TUI — Slash Command Overlay (/ prefix)
Spec Reference: §TUI — Slash Command Overlay (/), §TUI — Reference Picker (@)

Summary

The spec requires both the Slash Command Overlay and Reference Picker Overlay to respond interactively while the user types — filtering/searching in real-time as characters are entered. The current implementation has no on_change or on_key handlers in app.py, so neither overlay filters as the user types. The slash command overlay shows all 70 commands on mount and never updates based on what the user is typing.

Spec Requirements

From §TUI — Slash Command Overlay:

Typing / as the first character activates command mode.

The spec overlay mockup shows:

│ /se                           │
│  /session:create         ...  │
│  /session:list           ...  │
│  /session:show           ...  │
│  ...                          │

This implies real-time filtering as the user types /se to narrow from 70 commands down to session-related ones.

From the Slash Command Overlay key bindings table:

Key Action
typing Fuzzy search commands
tab Auto-complete command name
up / down Navigate command list
escape Dismiss overlay

What Was Found

File: src/cleveragents/tui/app.py

There is no on_input_changed, on_change, or on_key event handler. The only overlay setup happens at:

  1. on_mount() (line ~124): Sets commands to all 70 commands with empty query — this populates the overlay once at startup
  2. on_input_submitted() (line ~159): Never updates the slash overlay

The SlashCommandOverlay.set_commands(query, commands) method supports filtering (line ~35 of slash_command_overlay.py): if a non-empty query is passed, it filters to commands starting with query. But this is never called with a non-empty query anywhere in the codebase.

As a result, the slash command overlay:

  • Always shows all 70 commands regardless of what the user has typed after /
  • Never narrows down as the user types /se, /plan:, etc.
  • The tab auto-complete binding is not implemented either

The same root cause affects the Reference Picker (see also issue #6827).

Expected Behavior

  1. User types / — slash command overlay opens showing all commands
  2. User continues typing se — overlay filters to session:*, settings commands in real-time
  3. User presses up/down to navigate the filtered list
  4. User presses enter to execute, tab to auto-complete the command name
  5. User presses escape to dismiss

Root Cause

app.py needs a on_input_changed (or Textual on_input_changed) handler that:

  1. Detects when the input starts with /
  2. Passes the remainder as a query to SlashCommandOverlay.set_commands()
  3. Shows/hides the overlay appropriately

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area**: TUI — Slash Command Overlay (`/` prefix) **Spec Reference**: §TUI — Slash Command Overlay (/), §TUI — Reference Picker (@) ### Summary The spec requires both the Slash Command Overlay and Reference Picker Overlay to respond interactively while the user types — filtering/searching in real-time as characters are entered. The current implementation has **no `on_change` or `on_key` handlers** in `app.py`, so neither overlay filters as the user types. The slash command overlay shows all 70 commands on mount and never updates based on what the user is typing. ### Spec Requirements From §TUI — Slash Command Overlay: > Typing `/` as the first character activates command mode. The spec overlay mockup shows: ``` │ /se │ │ /session:create ... │ │ /session:list ... │ │ /session:show ... │ │ ... │ ``` This implies real-time filtering as the user types `/se` to narrow from 70 commands down to session-related ones. From the Slash Command Overlay key bindings table: | Key | Action | |-----|--------| | *typing* | Fuzzy search commands | | `tab` | Auto-complete command name | | `up` / `down` | Navigate command list | | `escape` | Dismiss overlay | ### What Was Found **File**: `src/cleveragents/tui/app.py` There is no `on_input_changed`, `on_change`, or `on_key` event handler. The only overlay setup happens at: 1. **`on_mount()`** (line ~124): Sets commands to all 70 commands with empty query — this populates the overlay once at startup 2. **`on_input_submitted()`** (line ~159): Never updates the slash overlay The `SlashCommandOverlay.set_commands(query, commands)` method supports filtering (line ~35 of `slash_command_overlay.py`): if a non-empty `query` is passed, it filters to commands starting with `query`. But this is **never called with a non-empty query** anywhere in the codebase. As a result, the slash command overlay: - Always shows all 70 commands regardless of what the user has typed after `/` - Never narrows down as the user types `/se`, `/plan:`, etc. - The `tab` auto-complete binding is not implemented either The same root cause affects the Reference Picker (see also issue #6827). ### Expected Behavior 1. User types `/` — slash command overlay opens showing all commands 2. User continues typing `se` — overlay filters to session:*, settings commands in real-time 3. User presses `up`/`down` to navigate the filtered list 4. User presses `enter` to execute, `tab` to auto-complete the command name 5. User presses `escape` to dismiss ### Root Cause `app.py` needs a `on_input_changed` (or Textual `on_input_changed`) handler that: 1. Detects when the input starts with `/` 2. Passes the remainder as a query to `SlashCommandOverlay.set_commands()` 3. Shows/hides the overlay appropriately --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.6.0 milestone 2026-04-10 02:24:19 +00:00
HAL9000 self-assigned this 2026-04-10 06:07:50 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#6829
No description provided.