UAT: TUI PersonaBar missing session cost display — spec requires cost segment showing cumulative USD cost #4528

Closed
opened 2026-04-08 14:18:05 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: TUI — Persona System (PersonaBar)

Severity: Medium


What Was Tested

Code-level analysis of src/cleveragents/tui/widgets/persona_bar.py against the spec's PersonaBar definition.

Expected Behavior (from spec)

Per docs/specification.md §29238 (PersonaBar), the PersonaBar must display 5 segments:

feature-dev │ claude-4-sonnet │ think: high │ 2 projects │ $0.12
─────────── ─ ─────────────── ─ ─────────── ─ ──────────────── ─ ─────
persona       actor             preset        scope              cost
PersonaBar Segment Style Updates When
Persona name $text-primary on $primary 10% bg tab cycle
Actor name $text-secondary tab cycle
Preset label $text-warning (non-default) / $text-muted (default) ctrl+tab cycle
Scope indicator $text-muted Persona change or /scope:add/remove
Session cost $secondary 70%, right-aligned After each actor response

Actual Behavior

The PersonaBar.set_content() method in src/cleveragents/tui/widgets/persona_bar.py (lines 30-38) accepts only 4 parameters and does not include a cost segment:

def set_content(
    self,
    *,
    persona_name: str,
    actor_name: str,
    preset_name: str,
    scope_text: str,
    # ← NO cost parameter
) -> None:
    self.update(f"{persona_name} | {actor_name} | {preset_name} | {scope_text}")
    # ← No cost in the output

The app.py _refresh_persona_bar() method (lines 155-166) also does not pass a cost value to set_content().

Missing:

  1. cost parameter in PersonaBar.set_content()
  2. Cost display in the rendered output
  3. Cost update mechanism (triggered after each actor response)

Code Location

  • src/cleveragents/tui/widgets/persona_bar.py, lines 30-38
  • src/cleveragents/tui/app.py, lines 155-166 (_refresh_persona_bar)

Spec References

  • docs/specification.md §29238 (PersonaBar section)
  • docs/specification.md §29251 (PersonaBar segment table)

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

## Bug Report **Feature Area:** TUI — Persona System (PersonaBar) **Severity:** Medium --- ## What Was Tested Code-level analysis of `src/cleveragents/tui/widgets/persona_bar.py` against the spec's PersonaBar definition. ## Expected Behavior (from spec) Per `docs/specification.md` §29238 (PersonaBar), the PersonaBar must display 5 segments: ``` feature-dev │ claude-4-sonnet │ think: high │ 2 projects │ $0.12 ─────────── ─ ─────────────── ─ ─────────── ─ ──────────────── ─ ───── persona actor preset scope cost ``` | PersonaBar Segment | Style | Updates When | |--------------------|-------|--------------| | Persona name | `$text-primary` on `$primary 10%` bg | `tab` cycle | | Actor name | `$text-secondary` | `tab` cycle | | Preset label | `$text-warning` (non-default) / `$text-muted` (default) | `ctrl+tab` cycle | | Scope indicator | `$text-muted` | Persona change or `/scope:add/remove` | | **Session cost** | `$secondary 70%`, right-aligned | After each actor response | ## Actual Behavior The `PersonaBar.set_content()` method in `src/cleveragents/tui/widgets/persona_bar.py` (lines 30-38) accepts only 4 parameters and does not include a cost segment: ```python def set_content( self, *, persona_name: str, actor_name: str, preset_name: str, scope_text: str, # ← NO cost parameter ) -> None: self.update(f"{persona_name} | {actor_name} | {preset_name} | {scope_text}") # ← No cost in the output ``` The `app.py` `_refresh_persona_bar()` method (lines 155-166) also does not pass a cost value to `set_content()`. **Missing:** 1. `cost` parameter in `PersonaBar.set_content()` 2. Cost display in the rendered output 3. Cost update mechanism (triggered after each actor response) ## Code Location - `src/cleveragents/tui/widgets/persona_bar.py`, lines 30-38 - `src/cleveragents/tui/app.py`, lines 155-166 (`_refresh_persona_bar`) ## Spec References - `docs/specification.md` §29238 (PersonaBar section) - `docs/specification.md` §29251 (PersonaBar segment table) --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Author
Owner

Closing as duplicate of #4047. Both issues describe the same bug: TUI PersonaBar is missing the session cost display segment. Issue #4047 is older and covers the same root cause.


Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Closing as duplicate of #4047. Both issues describe the same bug: TUI PersonaBar is missing the session cost display segment. Issue #4047 is older and covers the same root cause. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
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#4528
No description provided.