UAT: TUI multiline prompt detection not implemented — shift+enter/ctrl+j newline insertion and ctrl+enter submit absent from PromptInput #4787

Open
opened 2026-04-08 18:57:53 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: TUI Prompt Multiline Input
Severity: Medium (backlog)
Found by: UAT tester instance uat-tui-worker-1
Spec reference: docs/specification.md §Multiline Detection (lines ~30036–30046)


What Was Tested

The src/cleveragents/tui/widgets/prompt.py and src/cleveragents/tui/input/modes.py were inspected for multiline detection.

Expected Behavior (from spec)

The prompt auto-detects multiline input and switches the prompt symbol to :

Condition Result
Input contains \n (newline character) Switch to multiline mode
Input contains triple backticks (```) Switch to multiline mode
shift+enter or ctrl+j pressed Insert newline, switch to multiline
All newlines removed Revert to single-line mode

In multiline mode:

  • enter inserts a newline
  • ctrl+enter submits
  • Prompt symbol changes to

In single-line mode:

  • enter submits
  • Prompt symbol is (normal), $ (shell), or (multiline)

Actual Behavior

The PromptInput widget in widgets/prompt.py is a thin wrapper around Textual's Input widget:

class PromptInput(_InputBase):
    def consume_text(self) -> PromptSubmitted:
        text = self.value
        self.value = ""
        return PromptSubmitted(text=text)

There is no multiline detection, no shift+enter/ctrl+j handling, no ctrl+enter submit in multiline mode, and no prompt symbol switching ().

The InputModeRouter.detect_mode() only checks the first character for / or ! — it does not detect multiline content.

Code Location

  • Widget: src/cleveragents/tui/widgets/prompt.pyPromptInput class
  • Router: src/cleveragents/tui/input/modes.pyInputModeRouter.detect_mode()
  • Missing: Multiline mode detection (newline or triple backtick in content)
  • Missing: shift+enter / ctrl+j key handlers to insert newline
  • Missing: ctrl+enter submit in multiline mode
  • Missing: Prompt symbol switching ( / $ / )

Impact

  • Users cannot compose multi-line prompts (e.g., code blocks with triple backticks)
  • shift+enter does not insert a newline
  • The prompt symbol never changes to for multiline mode
  • Pasting multi-line content submits immediately on the first newline

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

## Bug Report **Feature Area:** TUI Prompt Multiline Input **Severity:** Medium (backlog) **Found by:** UAT tester instance `uat-tui-worker-1` **Spec reference:** docs/specification.md §Multiline Detection (lines ~30036–30046) --- ### What Was Tested The `src/cleveragents/tui/widgets/prompt.py` and `src/cleveragents/tui/input/modes.py` were inspected for multiline detection. ### Expected Behavior (from spec) The prompt auto-detects multiline input and switches the prompt symbol to `☰`: | Condition | Result | |-----------|--------| | Input contains `\n` (newline character) | Switch to multiline mode | | Input contains triple backticks (` ``` `) | Switch to multiline mode | | `shift+enter` or `ctrl+j` pressed | Insert newline, switch to multiline | | All newlines removed | Revert to single-line mode | In multiline mode: - `enter` inserts a newline - `ctrl+enter` submits - Prompt symbol changes to `☰` In single-line mode: - `enter` submits - Prompt symbol is `❯` (normal), `$` (shell), or `☰` (multiline) ### Actual Behavior The `PromptInput` widget in `widgets/prompt.py` is a thin wrapper around Textual's `Input` widget: ```python class PromptInput(_InputBase): def consume_text(self) -> PromptSubmitted: text = self.value self.value = "" return PromptSubmitted(text=text) ``` There is no multiline detection, no `shift+enter`/`ctrl+j` handling, no `ctrl+enter` submit in multiline mode, and no prompt symbol switching (`❯` → `☰`). The `InputModeRouter.detect_mode()` only checks the first character for `/` or `!` — it does not detect multiline content. ### Code Location - **Widget:** `src/cleveragents/tui/widgets/prompt.py` — `PromptInput` class - **Router:** `src/cleveragents/tui/input/modes.py` — `InputModeRouter.detect_mode()` - **Missing:** Multiline mode detection (newline or triple backtick in content) - **Missing:** `shift+enter` / `ctrl+j` key handlers to insert newline - **Missing:** `ctrl+enter` submit in multiline mode - **Missing:** Prompt symbol switching (`❯` / `$` / `☰`) ### Impact - Users cannot compose multi-line prompts (e.g., code blocks with triple backticks) - `shift+enter` does not insert a newline - The prompt symbol never changes to `☰` for multiline mode - Pasting multi-line content submits immediately on the first newline --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
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
HAL9000 added this to the v3.7.0 milestone 2026-04-09 03:03:57 +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#4787
No description provided.