UAT: Reference picker and slash command overlays never update while typing — no on_input_changed handler in TUI app #4738

Open
opened 2026-04-08 18:13:37 +00:00 by HAL9000 · 4 comments
Owner

Bug Report

Feature area: TUI @ reference picker and / slash command overlay — live update

Severity: Medium — overlays are only populated on submit, making them useless as interactive pickers


What was tested

src/cleveragents/tui/app.py — event handler registration and overlay update logic.

Expected behavior (from spec)

Both the @ reference picker overlay and the / slash command overlay should update live as the user types:

  • When the user types @, the reference picker should appear and filter candidates in real time
  • When the user types /, the slash command overlay should appear and filter commands in real time
  • As the user continues typing after @ or /, the overlay should narrow its suggestions

Actual behavior

app.py defines only two event handlers:

  1. on_mount(self) — initialises overlays with empty/full data at startup
  2. on_input_submitted(self, event) — fires only when the user presses Enter

There is no on_input_changed handler. The overlays are never updated while the user is typing. Specifically:

  • The slash command overlay is set once on mount with all 70 commands and never updated again
  • The reference picker overlay is only updated in on_input_submitted — after the user has already submitted the message
# app.py — only these two handlers exist
def on_mount(self) -> None:
    # Sets slash overlay once with all commands
    slash.set_commands("", slash_command_specs())
    # Sets ref picker with empty suggestions
    ref_picker.set_suggestions("", [])

def on_input_submitted(self, event) -> None:
    # Only updates ref picker AFTER submit — too late
    if "@" in text:
        ref_picker.set_suggestions(text, suggestions(...))

Code locations

  • src/cleveragents/tui/app.py lines 123–141 — on_mount (no live update)
  • src/cleveragents/tui/app.py lines 168–210 — on_input_submitted (only fires on Enter)
  • Missing: on_input_changed handler that would call slash.set_commands(query, ...) and ref_picker.set_suggestions(query, ...) as the user types

Steps to reproduce

  1. Open the TUI
  2. Type /ses — the slash overlay shows all 70 commands, not filtered to session:*
  3. Type @proj — no reference picker appears while typing
  4. Press Enter with @proj in the prompt — only now does the reference picker update

Impact

The interactive autocomplete UX is completely absent. Users see a static list of all 70 commands regardless of what they type, and the @ reference picker is invisible until after message submission.


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

## Bug Report **Feature area:** TUI @ reference picker and / slash command overlay — live update **Severity:** Medium — overlays are only populated on submit, making them useless as interactive pickers --- ### What was tested `src/cleveragents/tui/app.py` — event handler registration and overlay update logic. ### Expected behavior (from spec) Both the `@` reference picker overlay and the `/` slash command overlay should update **live as the user types**: - When the user types `@`, the reference picker should appear and filter candidates in real time - When the user types `/`, the slash command overlay should appear and filter commands in real time - As the user continues typing after `@` or `/`, the overlay should narrow its suggestions ### Actual behavior `app.py` defines only two event handlers: 1. `on_mount(self)` — initialises overlays with empty/full data at startup 2. `on_input_submitted(self, event)` — fires only when the user presses Enter There is **no `on_input_changed` handler**. The overlays are never updated while the user is typing. Specifically: - The slash command overlay is set once on mount with all 70 commands and never updated again - The reference picker overlay is only updated in `on_input_submitted` — after the user has already submitted the message ```python # app.py — only these two handlers exist def on_mount(self) -> None: # Sets slash overlay once with all commands slash.set_commands("", slash_command_specs()) # Sets ref picker with empty suggestions ref_picker.set_suggestions("", []) def on_input_submitted(self, event) -> None: # Only updates ref picker AFTER submit — too late if "@" in text: ref_picker.set_suggestions(text, suggestions(...)) ``` ### Code locations - `src/cleveragents/tui/app.py` lines 123–141 — `on_mount` (no live update) - `src/cleveragents/tui/app.py` lines 168–210 — `on_input_submitted` (only fires on Enter) - Missing: `on_input_changed` handler that would call `slash.set_commands(query, ...)` and `ref_picker.set_suggestions(query, ...)` as the user types ### Steps to reproduce 1. Open the TUI 2. Type `/ses` — the slash overlay shows all 70 commands, not filtered to `session:*` 3. Type `@proj` — no reference picker appears while typing 4. Press Enter with `@proj` in the prompt — only now does the reference picker update ### Impact The interactive autocomplete UX is completely absent. Users see a static list of all 70 commands regardless of what they type, and the `@` reference picker is invisible until after message submission. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — live overlay updates are essential for interactive TUI experience per spec
  • Milestone: v3.7.0 — TUI features milestone
  • MoSCoW: MoSCoW/Must Have — per CONTRIBUTING.md, all Type/Bug issues are Must Have. Additionally, without live updates the overlays are useless as interactive pickers.
  • Story Points: M (3) — requires adding on_input_changed handler and overlay update logic
  • Assignee: HAL9000

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: High — live overlay updates are essential for interactive TUI experience per spec - **Milestone**: v3.7.0 — TUI features milestone - **MoSCoW**: MoSCoW/Must Have — per CONTRIBUTING.md, all Type/Bug issues are Must Have. Additionally, without live updates the overlays are useless as interactive pickers. - **Story Points**: M (3) — requires adding on_input_changed handler and overlay update logic - **Assignee**: HAL9000 --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — Without on_input_changed, the reference picker and slash command overlays are never updated while typing. The overlays are populated only on mount (static) or on submit (too late). This makes both interactive autocomplete systems completely non-functional during normal use.
  • Milestone: v3.7.0 — TUI Implementation milestone
  • Story Points: 3 (M) — Add on_input_changed handler to app.py that dispatches live updates to both overlays, plus tests
  • MoSCoW: Must Have — Live-updating overlays are the primary UX mechanism for slash commands and @ references per spec. Without them, the TUI interactive experience is absent.
  • Parent Epic: #868 (Epic: TUI Interface, Modals and Persona System)

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: High — Without `on_input_changed`, the reference picker and slash command overlays are never updated while typing. The overlays are populated only on mount (static) or on submit (too late). This makes both interactive autocomplete systems completely non-functional during normal use. - **Milestone**: v3.7.0 — TUI Implementation milestone - **Story Points**: 3 (M) — Add `on_input_changed` handler to `app.py` that dispatches live updates to both overlays, plus tests - **MoSCoW**: Must Have — Live-updating overlays are the primary UX mechanism for slash commands and `@` references per spec. Without them, the TUI interactive experience is absent. - **Parent Epic**: #868 (Epic: TUI Interface, Modals and Persona System) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
HAL9000 added this to the v3.7.0 milestone 2026-04-08 19:31:43 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — spec compliance bug identified by UAT testing
  • Story Points: 3 (M) — targeted fix to align implementation with spec
  • MoSCoW: Must Have — spec compliance is required for correct system behavior

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — spec compliance bug identified by UAT testing - **Story Points**: 3 (M) — targeted fix to align implementation with spec - **MoSCoW**: Must Have — spec compliance is required for correct system behavior --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Author
Owner

Implementation Attempt — Tier 3: sonnet — Success

Added the missing on_input_changed event handler to src/cleveragents/tui/app.py.

What was done

  • Added on_input_changed handler to _TextualCleverAgentsTuiApp that:
    • When text starts with /, filters slash commands by the query after the slash in real time
    • When text contains @, extracts the token after the last @ and updates the reference picker with matching suggestions
    • Otherwise resets both overlays to their default (unfiltered) state
  • Added 5 BDD scenarios to features/tui_app_coverage.feature covering all branches of the new handler
  • Added step definitions to features/steps/tui_app_coverage_steps.py

Quality gates

  • lint ✓
  • typecheck ✓ (0 errors)
  • unit_tests ✓ (1132 scenarios passed, 0 failed)
  • integration_tests ⚠️ (56 pre-existing failures, TUI tests passed)
  • e2e_tests ⚠️ (10 pre-existing failures, unrelated to TUI changes)
  • coverage_report (timed out — test suite takes >1 hour)

PR: #10918


Automated by CleverAgents Bot
Supervisor: Implementation | Agent: task-implementor

**Implementation Attempt** — Tier 3: sonnet — Success Added the missing `on_input_changed` event handler to `src/cleveragents/tui/app.py`. ### What was done - Added `on_input_changed` handler to `_TextualCleverAgentsTuiApp` that: - When text starts with `/`, filters slash commands by the query after the slash in real time - When text contains `@`, extracts the token after the last `@` and updates the reference picker with matching suggestions - Otherwise resets both overlays to their default (unfiltered) state - Added 5 BDD scenarios to `features/tui_app_coverage.feature` covering all branches of the new handler - Added step definitions to `features/steps/tui_app_coverage_steps.py` ### Quality gates - lint ✓ - typecheck ✓ (0 errors) - unit_tests ✓ (1132 scenarios passed, 0 failed) - integration_tests ⚠️ (56 pre-existing failures, TUI tests passed) - e2e_tests ⚠️ (10 pre-existing failures, unrelated to TUI changes) - coverage_report ⏳ (timed out — test suite takes >1 hour) PR: https://git.cleverthis.com/cleveragents/cleveragents-core/pulls/10918 --- Automated by CleverAgents Bot Supervisor: Implementation | Agent: task-implementor
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.

Blocks
Reference
cleveragents/cleveragents-core#4738
No description provided.