UAT: Conversation content pruning not implemented — no line counting, no prune trigger, no pruned-note insertion #6350

Open
opened 2026-04-09 20:14:53 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Feature Area: TUI Implementation
Spec Reference: §TUI — Conversation Content Pruning (v3.7.0 deliverable #15)
Milestone: v3.7.0

Summary

The automatic conversation content pruning specified in §TUI — Conversation Content Pruning is entirely unimplemented. The TUI uses a single Static widget for the conversation (#conversation) with no line counting, no prune trigger, and no "Earlier messages pruned" note insertion.

Spec Requirements

Per §TUI — Conversation Content Pruning:

  1. When the conversation stream exceeds prune_low_mark + prune_excess lines (default: 1500 + 1000 = 2500 lines), pruning activates
  2. The oldest message blocks are removed from the DOM (not just hidden) until line count drops to approximately prune_low_mark
  3. A Note block is inserted at the top: (Earlier messages pruned — see session history for full conversation)
  4. Pruning never removes the most recent 500 lines regardless of settings
  5. Welcome blocks, system notes, and the current actor response are never pruned
  6. Pruned messages remain in session history (SQLite) and can be viewed via /session:export

Settings that control pruning:

  • ui.prune_low_mark (default: 1500) — target line count after pruning
  • ui.prune_excess (default: 1000) — excess lines that trigger pruning

Per the acceptance criteria (§TUI — Acceptance Criteria, deliverable #15):

"Long conversations pruned to fit display; older messages summarized"

What Was Found

Code location: /app/src/cleveragents/tui/app.py

The conversation is rendered as a single Static widget (line ~106):

yield _Static("CleverAgents TUI", id="conversation")

In on_input_submitted() (lines ~157–192), conversation updates simply call conversation.update(...) with the latest content, replacing the entire display. There is:

  • No message block list or DOM widget tree (no individual message widgets)
  • No line counting mechanism
  • No prune threshold check
  • No _prune_conversation() method or equivalent
  • No "Earlier messages pruned" note insertion
  • No concept of widget DOM removal for old messages

The cleveragents.tcss stylesheet has no styles for pruned-note blocks or content pruning indicators.

No ui.prune_low_mark, ui.prune_excess, or any settings values are read anywhere in the TUI codebase (since SettingsScreen is also absent — issue #6347).

Expected Behaviour

  • Conversation is composed of individual message/block widgets (not a monolithic Static)
  • A background task or post-update hook tracks the total line count across all conversation widgets
  • When line count exceeds 2500 (or prune_low_mark + prune_excess), oldest blocks are removed from the DOM
  • A Note block appears at the top: (Earlier messages pruned — see session history for full conversation)
  • The most recent 500 lines are always preserved
  • Pruned content remains accessible via /session:export

Actual Behaviour

  • Single Static widget replaces entire conversation on each prompt — no accumulated message widgets exist
  • No line counting, no threshold, no DOM removal, no pruned-note insertion
  • Long conversations accumulate without any pruning mechanism

Steps to Reproduce

  1. Launch agents tui
  2. Submit many prompts to accumulate conversation content
  3. Observe: conversation grows unboundedly with no pruning behaviour

Impact

This is a v3.7.0 deliverable #15. Long TUI sessions will accumulate unlimited conversation content, eventually degrading rendering performance. The pruning mechanism is entirely absent, not merely a configuration gap.


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

## Bug Report **Feature Area**: TUI Implementation **Spec Reference**: §TUI — Conversation Content Pruning (v3.7.0 deliverable #15) **Milestone**: v3.7.0 ### Summary The automatic conversation content pruning specified in §TUI — Conversation Content Pruning is entirely unimplemented. The TUI uses a single `Static` widget for the conversation (`#conversation`) with no line counting, no prune trigger, and no "Earlier messages pruned" note insertion. ### Spec Requirements Per §TUI — Conversation Content Pruning: 1. When the conversation stream exceeds `prune_low_mark + prune_excess` lines (default: 1500 + 1000 = 2500 lines), pruning activates 2. The oldest message blocks are **removed from the DOM** (not just hidden) until line count drops to approximately `prune_low_mark` 3. A `Note` block is inserted at the top: `(Earlier messages pruned — see session history for full conversation)` 4. Pruning never removes the most recent 500 lines regardless of settings 5. Welcome blocks, system notes, and the current actor response are never pruned 6. Pruned messages remain in session history (SQLite) and can be viewed via `/session:export` Settings that control pruning: - `ui.prune_low_mark` (default: 1500) — target line count after pruning - `ui.prune_excess` (default: 1000) — excess lines that trigger pruning Per the acceptance criteria (§TUI — Acceptance Criteria, deliverable #15): > "Long conversations pruned to fit display; older messages summarized" ### What Was Found **Code location**: `/app/src/cleveragents/tui/app.py` The conversation is rendered as a single `Static` widget (line ~106): ```python yield _Static("CleverAgents TUI", id="conversation") ``` In `on_input_submitted()` (lines ~157–192), conversation updates simply call `conversation.update(...)` with the latest content, replacing the entire display. There is: - No message block list or DOM widget tree (no individual message widgets) - No line counting mechanism - No prune threshold check - No `_prune_conversation()` method or equivalent - No "Earlier messages pruned" note insertion - No concept of widget DOM removal for old messages The `cleveragents.tcss` stylesheet has no styles for pruned-note blocks or content pruning indicators. No `ui.prune_low_mark`, `ui.prune_excess`, or any settings values are read anywhere in the TUI codebase (since `SettingsScreen` is also absent — issue #6347). ### Expected Behaviour - Conversation is composed of individual message/block widgets (not a monolithic `Static`) - A background task or post-update hook tracks the total line count across all conversation widgets - When line count exceeds 2500 (or `prune_low_mark + prune_excess`), oldest blocks are removed from the DOM - A `Note` block appears at the top: `(Earlier messages pruned — see session history for full conversation)` - The most recent 500 lines are always preserved - Pruned content remains accessible via `/session:export` ### Actual Behaviour - Single `Static` widget replaces entire conversation on each prompt — no accumulated message widgets exist - No line counting, no threshold, no DOM removal, no pruned-note insertion - Long conversations accumulate without any pruning mechanism ### Steps to Reproduce 1. Launch `agents tui` 2. Submit many prompts to accumulate conversation content 3. Observe: conversation grows unboundedly with no pruning behaviour ### Impact This is a **v3.7.0 deliverable #15**. Long TUI sessions will accumulate unlimited conversation content, eventually degrading rendering performance. The pruning mechanism is entirely absent, not merely a configuration gap. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 21:09:28 +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.

Depends on
Reference
cleveragents/cleveragents-core#6350
No description provided.