UAT: PromptInput uses single-line Input widget instead of multi-line TextArea #10410

Closed
opened 2026-04-18 09:35:59 +00:00 by HAL9000 · 2 comments
Owner

Summary

The spec requires PromptInput to use a multi-line TextArea widget, but the implementation uses a single-line Input widget from Textual.

Expected Behavior (from spec)

PromptInput must use a multi-line TextArea widget (NOT single-line Input), enabling multi-line prompt composition.

Actual Behavior

src/cleveragents/tui/widgets/prompt.py loads textual.widgets.Input as the base class for PromptInput:

def _load_input_base() -> type[Any]:
    try:
        return importlib.import_module("textual.widgets").Input

This is a single-line widget that cannot accept newlines.

Reproduction Steps

  1. Inspect src/cleveragents/tui/widgets/prompt.py
  2. Observe that _load_input_base() imports textual.widgets.Input (single-line)
  3. The spec requires TextArea (multi-line)

Subtasks

  • Replace textual.widgets.Input with textual.widgets.TextArea in prompt.py
  • Update PromptInput class to use TextArea API (.text instead of .value)
  • Update consume_text() to use TextArea.text property
  • Update all callers in app.py that reference prompt.value
  • Add tests verifying multi-line input capability

Definition of Done

  • PromptInput inherits from TextArea (not Input)
  • Multi-line text entry works in the TUI
  • All existing tests pass
  • New tests cover multi-line input

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

## Summary The spec requires `PromptInput` to use a multi-line `TextArea` widget, but the implementation uses a single-line `Input` widget from Textual. ## Expected Behavior (from spec) `PromptInput` must use a multi-line `TextArea` widget (NOT single-line `Input`), enabling multi-line prompt composition. ## Actual Behavior `src/cleveragents/tui/widgets/prompt.py` loads `textual.widgets.Input` as the base class for `PromptInput`: ```python def _load_input_base() -> type[Any]: try: return importlib.import_module("textual.widgets").Input ``` This is a single-line widget that cannot accept newlines. ## Reproduction Steps 1. Inspect `src/cleveragents/tui/widgets/prompt.py` 2. Observe that `_load_input_base()` imports `textual.widgets.Input` (single-line) 3. The spec requires `TextArea` (multi-line) ## Subtasks - [ ] Replace `textual.widgets.Input` with `textual.widgets.TextArea` in `prompt.py` - [ ] Update `PromptInput` class to use `TextArea` API (`.text` instead of `.value`) - [ ] Update `consume_text()` to use `TextArea.text` property - [ ] Update all callers in `app.py` that reference `prompt.value` - [ ] Add tests verifying multi-line input capability ## Definition of Done - [ ] `PromptInput` inherits from `TextArea` (not `Input`) - [ ] Multi-line text entry works in the TUI - [ ] All existing tests pass - [ ] New tests cover multi-line input --- **Automated by CleverAgents Bot** Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor
HAL9000 added the
State
Unverified
Type
Bug
Priority
Critical
MoSCoW
Must have
labels 2026-04-18 09:40:50 +00:00
HAL9000 added
State
Verified
and removed
State
Unverified
labels 2026-04-18 10:00:57 +00:00
Author
Owner

Implementation Attempt — Tier 1: haiku — Success

Implemented the fix for PromptInput using TextArea instead of Input.

Changes made:

  • src/cleveragents/tui/widgets/prompt.py: Replaced textual.widgets.Input with textual.widgets.TextArea, updated consume_text() to use .text instead of .value
  • src/cleveragents/tui/app.py: Updated prompt.value to prompt.text in action_help()
  • features/steps/tui_app_coverage_steps.py: Updated mock to use MockTextArea with text attribute
  • features/tui_prompt_textarea.feature: New feature file with 6 scenarios testing multi-line TextArea behavior
  • features/steps/tui_prompt_textarea_steps.py: New step definitions

All quality gates passing (lint ✓, typecheck ✓, unit_tests ✓ - 6/6 new scenarios, 24/24 existing scenarios).

PR: #10756 - #10756


Automated by CleverAgents Bot
Supervisor: Implementation Pool | Agent: implementation-worker

**Implementation Attempt** — Tier 1: haiku — Success Implemented the fix for PromptInput using TextArea instead of Input. Changes made: - `src/cleveragents/tui/widgets/prompt.py`: Replaced `textual.widgets.Input` with `textual.widgets.TextArea`, updated `consume_text()` to use `.text` instead of `.value` - `src/cleveragents/tui/app.py`: Updated `prompt.value` to `prompt.text` in `action_help()` - `features/steps/tui_app_coverage_steps.py`: Updated mock to use `MockTextArea` with `text` attribute - `features/tui_prompt_textarea.feature`: New feature file with 6 scenarios testing multi-line TextArea behavior - `features/steps/tui_prompt_textarea_steps.py`: New step definitions All quality gates passing (lint ✓, typecheck ✓, unit_tests ✓ - 6/6 new scenarios, 24/24 existing scenarios). PR: #10756 - https://git.cleverthis.com/cleveragents/cleveragents-core/pulls/10756 --- **Automated by CleverAgents Bot** Supervisor: Implementation Pool | Agent: implementation-worker
HAL9000 added
State
In Review
and removed
State
Verified
labels 2026-04-19 12:08:08 +00:00
Author
Owner

Implementation Attempt — Tier 1: haiku — Success

Implemented the fix for PromptInput using TextArea instead of Input.

Changes made:

  • src/cleveragents/tui/widgets/prompt.py: Replaced textual.widgets.Input with textual.widgets.TextArea, updated consume_text() to use .text instead of .value
  • src/cleveragents/tui/app.py: Updated prompt.value to prompt.text in action_help()
  • features/steps/tui_app_coverage_steps.py: Updated mock to use MockTextArea with text attribute
  • features/tui_prompt_textarea.feature: New feature file with 6 scenarios testing multi-line TextArea behavior
  • features/steps/tui_prompt_textarea_steps.py: New step definitions

All quality gates passing (lint ✓, typecheck ✓, unit_tests ✓ - 6/6 new scenarios, 24/24 existing scenarios).

PR: #10756 - #10756


Automated by CleverAgents Bot
Supervisor: Implementation Pool | Agent: implementation-worker

**Implementation Attempt** — Tier 1: haiku — Success Implemented the fix for PromptInput using TextArea instead of Input. Changes made: - `src/cleveragents/tui/widgets/prompt.py`: Replaced `textual.widgets.Input` with `textual.widgets.TextArea`, updated `consume_text()` to use `.text` instead of `.value` - `src/cleveragents/tui/app.py`: Updated `prompt.value` to `prompt.text` in `action_help()` - `features/steps/tui_app_coverage_steps.py`: Updated mock to use `MockTextArea` with `text` attribute - `features/tui_prompt_textarea.feature`: New feature file with 6 scenarios testing multi-line TextArea behavior - `features/steps/tui_prompt_textarea_steps.py`: New step definitions All quality gates passing (lint ✓, typecheck ✓, unit_tests ✓ - 6/6 new scenarios, 24/24 existing scenarios). PR: #10756 - https://git.cleverthis.com/cleveragents/cleveragents-core/pulls/10756 --- **Automated by CleverAgents Bot** Supervisor: Implementation Pool | Agent: implementation-worker
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cleveragents/cleveragents-core#10410