UAT: Key passthrough from Conversation widget to prompt TextArea not implemented #1348

Open
opened 2026-04-02 16:57:09 +00:00 by freemo · 0 comments
Owner

Bug Report: [tui] — Key passthrough from Conversation widget to prompt not implemented

Severity Assessment

  • Impact: Medium. When a user is navigating blocks with the block cursor and starts typing, the keystrokes are lost — they are not forwarded to the prompt. This breaks the expected UX flow where typing always goes to the prompt.
  • Likelihood: 100% reproducible once block cursor navigation is implemented.
  • Priority: Medium

Location

  • Missing implementation: src/cleveragents/tui/screens/main_screen.py (in unmerged PR branch feature/m8-tui-mainscreen) — no on_key handler for printable character passthrough
  • Spec reference: docs/specification.md, line 29827

Description

The specification requires that when the Conversation widget (or Window widget) has focus during block cursor navigation, any printable character typed is forwarded to the prompt TextArea. This ensures users can always start typing without explicitly clicking or focusing the prompt — focus shifts automatically on the first printable keypress.

Neither the current master app.py nor the unmerged PR branch main_screen.py implements this key passthrough behavior. There is no on_key handler that intercepts printable characters and forwards them to the prompt.

Evidence

Spec requirement (docs/specification.md, line 29827):

When the conversation Window widget has focus (e.g., during block cursor navigation), any printable character typed is forwarded to the prompt TextArea. This ensures the user can always start typing without explicitly focusing the prompt — the focus shifts automatically on the first printable keypress.

Spec keyboard shortcut table (docs/specification.md, line 30219):

| Any printable character | Forward to prompt (key passthrough) |

PR branch main_screen.py — no on_key handler or passthrough logic:

# src/cleveragents/tui/screens/main_screen.py (PR branch)
# Searched for: on_key, passthrough, printable, forward
# Result: No such handler exists

Steps to Reproduce

  1. Run the TUI app with block cursor navigation enabled
  2. Navigate to a block using alt+up/alt+down
  3. Type any printable character (e.g., h, e, l, l, o)
  4. Expected: characters appear in the prompt TextArea and focus shifts to prompt
  5. Actual: characters are lost / no action occurs

Expected Behavior

Any printable character typed while the Conversation widget has focus should be forwarded to the prompt TextArea, and focus should shift to the prompt automatically.

Actual Behavior

No key passthrough is implemented. Printable characters typed during block cursor navigation are not forwarded to the prompt.

Category

tui / block-cursor / key-passthrough / uat


Metadata

  • Branch: feat/tui-conversation-key-passthrough
  • Commit Message: feat(tui): implement key passthrough from Conversation widget to prompt TextArea
  • Milestone: v3.7.0
  • Parent Epic: #694

Subtasks

  • Add an on_key handler to MainScreen (or Conversation widget) that intercepts printable characters when the conversation has focus
  • Forward the character to the prompt TextArea and shift focus to the prompt
  • Ensure non-printable keys (arrows, function keys, ctrl combinations) are NOT forwarded
  • Write Behave BDD scenarios: typing a printable char during block cursor navigation inserts it into the prompt and shifts focus
  • Run nox -e typecheck, nox -e unit_tests, nox -e coverage_report

Definition of Done

  • Printable characters typed during block cursor navigation are forwarded to the prompt TextArea
  • Focus shifts to the prompt on the first printable keypress
  • Non-printable keys are not forwarded
  • BDD scenarios cover the passthrough behavior
  • All nox stages pass
  • Coverage ≥ 97%
## Bug Report: [tui] — Key passthrough from Conversation widget to prompt not implemented ### Severity Assessment - **Impact**: Medium. When a user is navigating blocks with the block cursor and starts typing, the keystrokes are lost — they are not forwarded to the prompt. This breaks the expected UX flow where typing always goes to the prompt. - **Likelihood**: 100% reproducible once block cursor navigation is implemented. - **Priority**: Medium ### Location - **Missing implementation**: `src/cleveragents/tui/screens/main_screen.py` (in unmerged PR branch `feature/m8-tui-mainscreen`) — no `on_key` handler for printable character passthrough - **Spec reference**: `docs/specification.md`, line 29827 ### Description The specification requires that when the `Conversation` widget (or `Window` widget) has focus during block cursor navigation, **any printable character typed is forwarded to the prompt `TextArea`**. This ensures users can always start typing without explicitly clicking or focusing the prompt — focus shifts automatically on the first printable keypress. Neither the current master `app.py` nor the unmerged PR branch `main_screen.py` implements this key passthrough behavior. There is no `on_key` handler that intercepts printable characters and forwards them to the prompt. ### Evidence **Spec requirement** (`docs/specification.md`, line 29827): > When the conversation `Window` widget has focus (e.g., during block cursor navigation), any printable character typed is forwarded to the prompt `TextArea`. This ensures the user can always start typing without explicitly focusing the prompt — the focus shifts automatically on the first printable keypress. **Spec keyboard shortcut table** (`docs/specification.md`, line 30219): > | Any printable character | Forward to prompt (key passthrough) | **PR branch `main_screen.py`** — no `on_key` handler or passthrough logic: ```python # src/cleveragents/tui/screens/main_screen.py (PR branch) # Searched for: on_key, passthrough, printable, forward # Result: No such handler exists ``` ### Steps to Reproduce 1. Run the TUI app with block cursor navigation enabled 2. Navigate to a block using `alt+up`/`alt+down` 3. Type any printable character (e.g., `h`, `e`, `l`, `l`, `o`) 4. Expected: characters appear in the prompt TextArea and focus shifts to prompt 5. Actual: characters are lost / no action occurs ### Expected Behavior Any printable character typed while the `Conversation` widget has focus should be forwarded to the prompt `TextArea`, and focus should shift to the prompt automatically. ### Actual Behavior No key passthrough is implemented. Printable characters typed during block cursor navigation are not forwarded to the prompt. ### Category tui / block-cursor / key-passthrough / uat --- ## Metadata - **Branch**: `feat/tui-conversation-key-passthrough` - **Commit Message**: `feat(tui): implement key passthrough from Conversation widget to prompt TextArea` - **Milestone**: v3.7.0 - **Parent Epic**: #694 ## Subtasks - [ ] Add an `on_key` handler to `MainScreen` (or `Conversation` widget) that intercepts printable characters when the conversation has focus - [ ] Forward the character to the prompt `TextArea` and shift focus to the prompt - [ ] Ensure non-printable keys (arrows, function keys, ctrl combinations) are NOT forwarded - [ ] Write Behave BDD scenarios: typing a printable char during block cursor navigation inserts it into the prompt and shifts focus - [ ] Run `nox -e typecheck`, `nox -e unit_tests`, `nox -e coverage_report` ## Definition of Done - [ ] Printable characters typed during block cursor navigation are forwarded to the prompt TextArea - [ ] Focus shifts to the prompt on the first printable keypress - [ ] Non-printable keys are not forwarded - [ ] BDD scenarios cover the passthrough behavior - [ ] All nox stages pass - [ ] Coverage ≥ 97%
freemo self-assigned this 2026-04-02 18:45:20 +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.

Dependencies

No dependencies set.

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