UAT: TUI @ reference picker triggers only on submit, not in real-time as user types #3345

Open
opened 2026-04-05 10:24:18 +00:00 by freemo · 0 comments
Owner

Summary

The @ reference picker overlay is only triggered after the user submits text (on on_input_submitted), not in real-time as the user types @. ADR-046 requires the overlay to appear immediately when @ is typed anywhere in the prompt.

Expected Behavior (from ADR-046)

  1. User types @ anywhere in the prompt → overlay appears with all items (most recent first)
  2. User continues typing after @ → overlay filters results in real-time
  3. User navigates with up/down arrows → highlight moves through results
  4. User presses enter → selected item's canonical reference replaces the @... text in the prompt
  5. User presses escape → overlay dismisses, @ text remains as typed (treated as literal text)
  6. User presses tab → switches from search mode to tree browser mode

Actual Behavior

In src/cleveragents/tui/app.pyon_input_submitted() (lines 144-185):

def on_input_submitted(self, event):
    ...
    if "@" in text:
        ref_picker = self.query_one("#reference-picker", ReferencePickerOverlay)
        ref_picker.set_suggestions(text, suggestions(text.replace("@", "").strip()))

The reference picker is only updated after the user submits the prompt (presses Enter). There is no on_input_changed handler that would trigger the overlay in real-time as the user types @.

Additionally, the ReferencePickerOverlay widget is initialized with set_suggestions("", []) on mount (hidden), but there is no mechanism to show/hide it dynamically as the user types.

Code Location

  • src/cleveragents/tui/app.pyon_input_submitted(): reference picker updated only on submit
  • src/cleveragents/tui/app.py — missing on_input_changed() handler for real-time @ detection
  • src/cleveragents/tui/widgets/reference_picker.py — overlay not shown/hidden dynamically

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

## Summary The `@` reference picker overlay is only triggered after the user submits text (on `on_input_submitted`), not in real-time as the user types `@`. ADR-046 requires the overlay to appear immediately when `@` is typed anywhere in the prompt. ## Expected Behavior (from ADR-046) 1. User types `@` anywhere in the prompt → overlay appears with all items (most recent first) 2. User continues typing after `@` → overlay filters results in real-time 3. User navigates with `up`/`down` arrows → highlight moves through results 4. User presses `enter` → selected item's canonical reference replaces the `@...` text in the prompt 5. User presses `escape` → overlay dismisses, `@` text remains as typed (treated as literal text) 6. User presses `tab` → switches from search mode to tree browser mode ## Actual Behavior In `src/cleveragents/tui/app.py` — `on_input_submitted()` (lines 144-185): ```python def on_input_submitted(self, event): ... if "@" in text: ref_picker = self.query_one("#reference-picker", ReferencePickerOverlay) ref_picker.set_suggestions(text, suggestions(text.replace("@", "").strip())) ``` The reference picker is only updated **after** the user submits the prompt (presses Enter). There is no `on_input_changed` handler that would trigger the overlay in real-time as the user types `@`. Additionally, the `ReferencePickerOverlay` widget is initialized with `set_suggestions("", [])` on mount (hidden), but there is no mechanism to show/hide it dynamically as the user types. ## Code Location - `src/cleveragents/tui/app.py` — `on_input_submitted()`: reference picker updated only on submit - `src/cleveragents/tui/app.py` — missing `on_input_changed()` handler for real-time `@` detection - `src/cleveragents/tui/widgets/reference_picker.py` — overlay not shown/hidden dynamically --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
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.

Dependencies

No dependencies set.

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