UAT: shift+enter and ctrl+j do not insert newlines in PromptInput #10427

Open
opened 2026-04-18 09:37:49 +00:00 by HAL9000 · 0 comments
Owner

Summary

The spec requires shift+enter and ctrl+j to insert newlines in the prompt. Since PromptInput uses a single-line Input widget (not TextArea), newline insertion is impossible.

Expected Behavior (from spec)

shift+enter and ctrl+j must insert newlines in the prompt, enabling multi-line prompt composition.

Actual Behavior

PromptInput inherits from textual.widgets.Input (single-line). The Input widget does not support newlines. No key bindings for shift+enter or ctrl+j are defined in app.py or prompt.py.

The app's BINDINGS only include:

  • ctrl+q → quit
  • f1 → help
  • ctrl+t → cycle_preset

Reproduction Steps

  1. Inspect src/cleveragents/tui/app.py — no shift+enter or ctrl+j binding
  2. Inspect src/cleveragents/tui/widgets/prompt.py — uses single-line Input
  3. Pressing shift+enter in the TUI submits the form (default Input behavior) instead of inserting a newline

Subtasks

  • Fix PromptInput to use TextArea (prerequisite)
  • Add shift+enter key binding to insert newline
  • Add ctrl+j key binding to insert newline
  • Ensure enter alone still submits
  • Add tests for newline insertion

Definition of Done

  • shift+enter inserts \n in prompt
  • ctrl+j inserts \n in prompt
  • Tests pass

Automated by CleverAgents Bot
Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor

## Summary The spec requires `shift+enter` and `ctrl+j` to insert newlines in the prompt. Since `PromptInput` uses a single-line `Input` widget (not `TextArea`), newline insertion is impossible. ## Expected Behavior (from spec) `shift+enter` and `ctrl+j` must insert newlines in the prompt, enabling multi-line prompt composition. ## Actual Behavior `PromptInput` inherits from `textual.widgets.Input` (single-line). The `Input` widget does not support newlines. No key bindings for `shift+enter` or `ctrl+j` are defined in `app.py` or `prompt.py`. The app's BINDINGS only include: - `ctrl+q` → quit - `f1` → help - `ctrl+t` → cycle_preset ## Reproduction Steps 1. Inspect `src/cleveragents/tui/app.py` — no `shift+enter` or `ctrl+j` binding 2. Inspect `src/cleveragents/tui/widgets/prompt.py` — uses single-line `Input` 3. Pressing `shift+enter` in the TUI submits the form (default Input behavior) instead of inserting a newline ## Subtasks - [ ] Fix PromptInput to use TextArea (prerequisite) - [ ] Add `shift+enter` key binding to insert newline - [ ] Add `ctrl+j` key binding to insert newline - [ ] Ensure `enter` alone still submits - [ ] Add tests for newline insertion ## Definition of Done - [ ] `shift+enter` inserts `\n` in prompt - [ ] `ctrl+j` inserts `\n` in prompt - [ ] Tests pass --- **Automated by CleverAgents Bot** Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor
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#10427
No description provided.