UAT: TUI Conversation Content Pruning not implemented — spec requires configurable automatic pruning of conversation history to manage memory usage #3024

Open
opened 2026-04-05 04:04:23 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: feat/tui-conversation-pruning
  • Commit Message: feat(tui): implement configurable conversation content pruning for memory management
  • Milestone: v3.7.0
  • Parent Epic: #868

Description

The spec states: "To manage memory usage and maintain a responsive UI, the TUI automatically prunes the conversation history as it grows. The pruning strategy is configurable, but by default, it will keep a certain number of recent messages in memory and unload older messages, which can be reloaded on demand."

Current behavior: The TUI conversation area is a plain _Static widget that simply replaces its content with each new message (via conversation.update(text)). There is no conversation history maintained at all — each new message completely replaces the previous content. There is no pruning mechanism, no configurable pruning strategy, and no ability to reload older messages.

Expected behavior per spec:

  1. The conversation stream should maintain a history of all messages
  2. When the history grows beyond a configurable threshold, older messages should be unloaded from memory
  3. Unloaded messages should be reloadable on demand (e.g., by scrolling up)
  4. The pruning strategy should be configurable (e.g., keep last N messages in memory)

Code locations:

  • src/cleveragents/tui/app.py lines 186–209: on_input_submitted calls conversation.update(...) which replaces the entire content — no history is maintained
  • src/cleveragents/tui/app.py line 107: SessionView(session_id="default", transcript=[]) — transcript list is never populated or used for display
  • No pruning configuration exists in the TUI settings

Subtasks

  • Implement conversation history data structure in SessionView or a dedicated ConversationHistory class
  • Implement configurable pruning strategy (keep last N messages in memory)
  • Implement on-demand reload of older messages (scroll-to-load)
  • Add pruning configuration to TUI settings
  • Write BDD scenarios in features/tui_conversation_pruning.feature

Definition of Done

  • Conversation history is maintained across messages (not replaced)
  • Pruning automatically unloads older messages when threshold is exceeded
  • Older messages can be reloaded on demand by scrolling up
  • Pruning threshold is configurable via TUI settings
  • BDD scenarios cover pruning behaviour (features/tui_conversation_pruning.feature)
  • nox -e typecheck passes
  • nox -e unit_tests passes
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `feat/tui-conversation-pruning` - **Commit Message**: `feat(tui): implement configurable conversation content pruning for memory management` - **Milestone**: v3.7.0 - **Parent Epic**: #868 ## Description The spec states: *"To manage memory usage and maintain a responsive UI, the TUI automatically prunes the conversation history as it grows. The pruning strategy is configurable, but by default, it will keep a certain number of recent messages in memory and unload older messages, which can be reloaded on demand."* **Current behavior:** The TUI conversation area is a plain `_Static` widget that simply replaces its content with each new message (via `conversation.update(text)`). There is no conversation history maintained at all — each new message completely replaces the previous content. There is no pruning mechanism, no configurable pruning strategy, and no ability to reload older messages. **Expected behavior per spec:** 1. The conversation stream should maintain a history of all messages 2. When the history grows beyond a configurable threshold, older messages should be unloaded from memory 3. Unloaded messages should be reloadable on demand (e.g., by scrolling up) 4. The pruning strategy should be configurable (e.g., keep last N messages in memory) **Code locations:** - `src/cleveragents/tui/app.py` lines 186–209: `on_input_submitted` calls `conversation.update(...)` which replaces the entire content — no history is maintained - `src/cleveragents/tui/app.py` line 107: `SessionView(session_id="default", transcript=[])` — transcript list is never populated or used for display - No pruning configuration exists in the TUI settings ## Subtasks - [ ] Implement conversation history data structure in `SessionView` or a dedicated `ConversationHistory` class - [ ] Implement configurable pruning strategy (keep last N messages in memory) - [ ] Implement on-demand reload of older messages (scroll-to-load) - [ ] Add pruning configuration to TUI settings - [ ] Write BDD scenarios in `features/tui_conversation_pruning.feature` ## Definition of Done - [ ] Conversation history is maintained across messages (not replaced) - [ ] Pruning automatically unloads older messages when threshold is exceeded - [ ] Older messages can be reloaded on demand by scrolling up - [ ] Pruning threshold is configurable via TUI settings - [ ] BDD scenarios cover pruning behaviour (`features/tui_conversation_pruning.feature`) - [ ] `nox -e typecheck` passes - [ ] `nox -e unit_tests` passes - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 04:06:58 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Confirmed
  • MoSCoW: Should Have

Valid finding verified during batch triage.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Confirmed - **MoSCoW**: Should Have Valid finding verified during batch triage. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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.

Blocks
Reference
cleveragents/cleveragents-core#3024
No description provided.