UAT: PersonaBar missing session cost display field #1342

Open
opened 2026-04-02 16:56:20 +00:00 by freemo · 0 comments
Owner

Bug Report: [tui/persona] — PersonaBar does not display session cost

Severity Assessment

  • Impact: Medium. The session cost display is a key feature of the PersonaBar — users need to see how much their current session has cost. The missing field means cost tracking is invisible in the TUI.
  • Likelihood: 100% reproducible — the set_content() method has no cost parameter.
  • Priority: Medium

Location

  • File: src/cleveragents/tui/widgets/persona_bar.pyPersonaBar.set_content() (lines 30–38)

Description

The specification defines the PersonaBar as showing five segments:

  feature-dev │ claude-4-sonnet │ think: high │ 2 projects       │ $0.12
  ─────────── ─ ─────────────── ─ ────────── ─ ────────── ─ ────────────
  persona       actor             preset       scope        cost

From the PersonaBar segment table (spec §PersonaBar):

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 set_content() method only accepts four parameters — persona_name, actor_name, preset_name, scope_text — with no cost parameter:

def set_content(
    self,
    *,
    persona_name: str,
    actor_name: str,
    preset_name: str,
    scope_text: str,
) -> None:
    self.update(f"{persona_name} | {actor_name} | {preset_name} | {scope_text}")

The output is: "feature-dev | anthropic/claude-4 | think: high | 2 projects" — no cost field.

Expected Behavior (from spec)

The set_content() method should accept a cost parameter and display it:

def set_content(
    self,
    *,
    persona_name: str,
    actor_name: str,
    preset_name: str,
    scope_text: str,
    cost: str = "$0.00",
) -> None:
    self.update(f"{persona_name} | {actor_name} | {preset_name} | {scope_text} | {cost}")

The cost should be right-aligned and styled with $secondary 70% per the spec.

Steps to Reproduce

from cleveragents.tui.widgets.persona_bar import PersonaBar
import inspect
sig = inspect.signature(PersonaBar.set_content)
print(list(sig.parameters.keys()))
# Output: ['self', 'persona_name', 'actor_name', 'preset_name', 'scope_text']
# Missing: 'cost'
  • #1315 (Refactor TUI to Align with ADR-44 and ADR-45)

References

  • Spec §PersonaBar (line ~29066)
  • ADR-045 §PersonaBar Display
  • src/cleveragents/tui/widgets/persona_bar.py lines 30–38
## Bug Report: [tui/persona] — PersonaBar does not display session cost ### Severity Assessment - **Impact**: Medium. The session cost display is a key feature of the PersonaBar — users need to see how much their current session has cost. The missing field means cost tracking is invisible in the TUI. - **Likelihood**: 100% reproducible — the `set_content()` method has no `cost` parameter. - **Priority**: Medium ### Location - **File**: `src/cleveragents/tui/widgets/persona_bar.py` — `PersonaBar.set_content()` (lines 30–38) ### Description The specification defines the PersonaBar as showing five segments: ``` feature-dev │ claude-4-sonnet │ think: high │ 2 projects │ $0.12 ─────────── ─ ─────────────── ─ ────────── ─ ────────── ─ ──────────── persona actor preset scope cost ``` From the PersonaBar segment table (spec §PersonaBar): | 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 `set_content()` method only accepts four parameters — `persona_name`, `actor_name`, `preset_name`, `scope_text` — with no `cost` parameter: ```python def set_content( self, *, persona_name: str, actor_name: str, preset_name: str, scope_text: str, ) -> None: self.update(f"{persona_name} | {actor_name} | {preset_name} | {scope_text}") ``` The output is: `"feature-dev | anthropic/claude-4 | think: high | 2 projects"` — no cost field. ### Expected Behavior (from spec) The `set_content()` method should accept a `cost` parameter and display it: ```python def set_content( self, *, persona_name: str, actor_name: str, preset_name: str, scope_text: str, cost: str = "$0.00", ) -> None: self.update(f"{persona_name} | {actor_name} | {preset_name} | {scope_text} | {cost}") ``` The cost should be right-aligned and styled with `$secondary 70%` per the spec. ### Steps to Reproduce ```python from cleveragents.tui.widgets.persona_bar import PersonaBar import inspect sig = inspect.signature(PersonaBar.set_content) print(list(sig.parameters.keys())) # Output: ['self', 'persona_name', 'actor_name', 'preset_name', 'scope_text'] # Missing: 'cost' ``` ### Related Issues - #1315 (Refactor TUI to Align with ADR-44 and ADR-45) ### References - Spec §PersonaBar (line ~29066) - ADR-045 §PersonaBar Display - `src/cleveragents/tui/widgets/persona_bar.py` lines 30–38
freemo self-assigned this 2026-04-02 18:45:21 +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.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#1342
No description provided.