UAT: TUI app holds only a single session — no multi-session state management implemented #1378

Open
opened 2026-04-02 17:01:15 +00:00 by freemo · 0 comments
Owner

Bug Report

Feature Area: Multi-session tabs — session state management
Severity: Critical
Found by: UAT tester instance uat-worker-tabs


Expected Behavior (from spec §TUI Architecture Overview)

The specification (docs/specification.md, line ~28853) states:

Multi-session tabs — independent sessions with separate personas, conversations, and A2A bindings

Each session tab must maintain its own:

  • Persona (independent per session)
  • Conversation history (independent per session)
  • A2A binding (independent per session)

The spec also requires the ability to:

  • Create new sessions (/session:create, ctrl+n)
  • Switch between sessions (ctrl+[, ctrl+], 1-9, /session:switch <id>)
  • Close sessions (ctrl+w, /session:close)
  • List all active sessions (Sessions Screen via ctrl+s)

Actual Behavior

The _TextualCleverAgentsTuiApp.__init__ method (lines 96–105 of src/cleveragents/tui/app.py) creates exactly one SessionView and stores it in self._session:

def __init__(
    self,
    *,
    command_router: _CommandRouter,
    persona_state: PersonaState,
) -> None:
    super().__init__()
    self._command_router = command_router
    self._persona_state = persona_state
    self._session = SessionView(session_id="default", transcript=[])

There is:

  • No list of sessions (e.g., self._sessions: list[SessionView])
  • No active session index/pointer
  • No method to create a new session
  • No method to switch between sessions
  • No method to close a session
  • No per-session conversation history (the transcript field on SessionView is never populated)

The SessionView dataclass (lines 53–58) only has session_id and transcript fields — it has no persona, a2a_binding, or status fields as required by the spec.


Steps to Reproduce

  1. Read src/cleveragents/tui/app.py lines 53–58 (SessionView dataclass)
  2. Read src/cleveragents/tui/app.py lines 96–105 (__init__ method)
  3. Search for self._sessions, _active_session, _session_list in the file
  4. Observe: only a single self._session exists; no multi-session management

Code Location

  • src/cleveragents/tui/app.py, lines 53–58 — SessionView missing persona, a2a_binding, status fields
  • src/cleveragents/tui/app.py, lines 96–105 — __init__ creates only one session, no session list

Impact

The TUI is fundamentally single-session only. All multi-session tab features (tab bar, tab switching, per-session personas and conversations) depend on this foundational state management being in place. Without it, none of the multi-session tab features can function.

## Bug Report **Feature Area:** Multi-session tabs — session state management **Severity:** Critical **Found by:** UAT tester instance `uat-worker-tabs` --- ### Expected Behavior (from spec §TUI Architecture Overview) The specification (docs/specification.md, line ~28853) states: > **Multi-session tabs** — independent sessions with separate personas, conversations, and A2A bindings Each session tab must maintain its own: - Persona (independent per session) - Conversation history (independent per session) - A2A binding (independent per session) The spec also requires the ability to: - Create new sessions (`/session:create`, `ctrl+n`) - Switch between sessions (`ctrl+[`, `ctrl+]`, `1-9`, `/session:switch <id>`) - Close sessions (`ctrl+w`, `/session:close`) - List all active sessions (Sessions Screen via `ctrl+s`) --- ### Actual Behavior The `_TextualCleverAgentsTuiApp.__init__` method (lines 96–105 of `src/cleveragents/tui/app.py`) creates exactly **one** `SessionView` and stores it in `self._session`: ```python def __init__( self, *, command_router: _CommandRouter, persona_state: PersonaState, ) -> None: super().__init__() self._command_router = command_router self._persona_state = persona_state self._session = SessionView(session_id="default", transcript=[]) ``` There is: - **No list of sessions** (e.g., `self._sessions: list[SessionView]`) - **No active session index/pointer** - **No method to create a new session** - **No method to switch between sessions** - **No method to close a session** - **No per-session conversation history** (the `transcript` field on `SessionView` is never populated) The `SessionView` dataclass (lines 53–58) only has `session_id` and `transcript` fields — it has no `persona`, `a2a_binding`, or `status` fields as required by the spec. --- ### Steps to Reproduce 1. Read `src/cleveragents/tui/app.py` lines 53–58 (`SessionView` dataclass) 2. Read `src/cleveragents/tui/app.py` lines 96–105 (`__init__` method) 3. Search for `self._sessions`, `_active_session`, `_session_list` in the file 4. Observe: only a single `self._session` exists; no multi-session management --- ### Code Location - `src/cleveragents/tui/app.py`, lines 53–58 — `SessionView` missing `persona`, `a2a_binding`, `status` fields - `src/cleveragents/tui/app.py`, lines 96–105 — `__init__` creates only one session, no session list --- ### Impact The TUI is fundamentally single-session only. All multi-session tab features (tab bar, tab switching, per-session personas and conversations) depend on this foundational state management being in place. Without it, none of the multi-session tab features can function.
freemo self-assigned this 2026-04-02 18:45:16 +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#1378
No description provided.