TDD: Up/down arrow keys do not navigate prompt history (JSONL per project) #10432

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

Summary

TDD counterpart: Prompt history navigation via up/down arrows with JSONL persistence.

Tests to Write

def test_prompt_history_navigation():
    from cleveragents.tui.widgets.prompt import PromptInput
    widget = PromptInput()
    widget.add_to_history("first command")
    widget.add_to_history("second command")
    widget.navigate_history_up()
    assert widget.text == "second command"
    widget.navigate_history_up()
    assert widget.text == "first command"

def test_prompt_history_jsonl_persistence(tmp_path):
    from cleveragents.tui.widgets.prompt import PromptHistory
    history = PromptHistory(project_dir=tmp_path)
    history.append("test command")
    history2 = PromptHistory(project_dir=tmp_path)
    assert "test command" in history2.entries

Subtasks

  • Write failing BDD scenarios for history navigation and JSONL persistence
  • Verify tests fail with current implementation
  • Implement history feature
  • Verify tests pass

Definition of Done

  • BDD scenarios exist and pass
  • History navigation works
  • JSONL persistence works

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

## Summary TDD counterpart: Prompt history navigation via up/down arrows with JSONL persistence. ## Tests to Write ```python def test_prompt_history_navigation(): from cleveragents.tui.widgets.prompt import PromptInput widget = PromptInput() widget.add_to_history("first command") widget.add_to_history("second command") widget.navigate_history_up() assert widget.text == "second command" widget.navigate_history_up() assert widget.text == "first command" def test_prompt_history_jsonl_persistence(tmp_path): from cleveragents.tui.widgets.prompt import PromptHistory history = PromptHistory(project_dir=tmp_path) history.append("test command") history2 = PromptHistory(project_dir=tmp_path) assert "test command" in history2.entries ``` ## Subtasks - [ ] Write failing BDD scenarios for history navigation and JSONL persistence - [ ] Verify tests fail with current implementation - [ ] Implement history feature - [ ] Verify tests pass ## Definition of Done - [ ] BDD scenarios exist and pass - [ ] History navigation works - [ ] JSONL persistence works --- **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#10432
No description provided.