UAT: TUI SessionTabs widget and multi-session management not implemented #10308

Open
opened 2026-04-18 08:31:12 +00:00 by HAL9000 · 0 comments
Owner

Metadata

Field Value
Branch bugfix/m7-tui-session-tabs-multi-session
Commit Message feat(tui): implement SessionTabs widget and multi-session management with A2A bindings
Milestone v3.7.0
Parent Epic
TDD Issue #10303

Background and Context

UAT testing of the TUI Multi-Session Tabs + A2A Bindings feature area (v3.7.0) has confirmed that the SessionTabs widget and all multi-session management functionality are completely absent from the implementation.

Per ADR-044 (TUI Architecture and Framework), the TUI must support a multi-session tab bar where multiple concurrent sessions are supported, each with an independent persona, conversation history, and A2A Task binding.

Current Behavior

Code inspection of src/cleveragents/tui/ confirms:

  1. No SessionTabs widget existssrc/cleveragents/tui/widgets/ contains no session_tabs.py file. The widgets/__init__.py does not export any SessionTabs class.

  2. Single-session onlyCleverAgentsTuiApp initializes with a single hardcoded session:

    self._session = SessionView(session_id="default", transcript=[])
    

    There is no session list, no session creation, no session switching.

  3. Missing keyboard bindingsCleverAgentsTuiApp.BINDINGS only contains:

    BINDINGS = [
        ("ctrl+q", "quit", "Quit"),
        ("f1", "help", "Help"),
        ("ctrl+t", "cycle_preset", "Cycle Preset"),
    ]
    

    The required ctrl+n (new session), ctrl+w (close session), ctrl+[ (prev session), and ctrl+] (next session) bindings are absent.

  4. No independent A2A bindings per session — Each session should have an independent A2A session ID and Task binding. The current implementation has no A2A binding management at all.

  5. No session state indicators — The spec requires (actor working), (awaiting user input), and plain (idle) state indicators on session tabs. No such indicators exist.

  6. No 10-session concurrency support — The spec requires support for at least 10 concurrent sessions. Only 1 session is supported.

Expected Behavior

Per ADR-044 §Multi-Session Management:

  • A SessionTabs widget appears at the top of the screen when ≥2 sessions exist
  • ctrl+n creates a new session tab with the current persona
  • ctrl+w closes the current session tab (with confirmation if unsaved)
  • ctrl+[ navigates to the previous session tab
  • ctrl+] navigates to the next session tab
  • Each session has independent: conversation history, persona, A2A Task binding
  • Session tabs show state indicators: (actor working), (awaiting user input), plain (idle)
  • At least 10 concurrent sessions are supported

Per ADR-044 §MainScreen Layout:

SessionTabs (height: auto, visible when ≥2 sessions)

Reproduction Steps

  1. Clone the repository and inspect src/cleveragents/tui/widgets/
  2. Observe: no session_tabs.py file exists
  3. Inspect src/cleveragents/tui/app.py
  4. Observe: BINDINGS has only 3 entries (ctrl+q, f1, ctrl+t)
  5. Observe: self._session is a single hardcoded SessionView(session_id="default", ...)
  6. Launch the TUI: agents tui
  7. Press ctrl+n — nothing happens (binding not registered)
  8. Press ctrl+[ or ctrl+] — nothing happens (bindings not registered)

Acceptance Criteria

  • src/cleveragents/tui/widgets/session_tabs.py exists with a SessionTabs Textual widget
  • SessionTabs is exported from src/cleveragents/tui/widgets/__init__.py
  • SessionTabs is mounted in CleverAgentsTuiApp.compose() (visible when ≥2 sessions)
  • ctrl+n binding exists and creates a new session with an independent A2A session ID
  • ctrl+w binding exists and closes the current session (with confirmation if unsaved)
  • ctrl+[ binding exists and navigates to the previous session
  • ctrl+] binding exists and navigates to the next session
  • Each session has independent: conversation history, persona, A2A session ID
  • Session tabs display state indicators: (working), (awaiting input), plain (idle)
  • At least 10 concurrent sessions are supported without errors
  • The @tdd_expected_fail tag is removed from the TDD scenarios in issue #10303
  • All existing tests continue to pass
  • Coverage ≥ 97%

Subtasks

  • Create src/cleveragents/tui/widgets/session_tabs.py with SessionTabs widget
  • Export SessionTabs from src/cleveragents/tui/widgets/__init__.py
  • Add ctrl+n, ctrl+w, ctrl+[, ctrl+] to CleverAgentsTuiApp.BINDINGS
  • Implement action_new_session() method — creates session, assigns A2A session ID, updates tab bar
  • Implement action_close_session() method — closes current session with confirmation
  • Implement action_prev_session() and action_next_session() methods
  • Refactor _session to a session list with active session tracking
  • Add session state indicator logic (idle/running/error) to SessionTabs
  • Mount SessionTabs in compose() with conditional visibility (≥2 sessions)
  • Write/update Behave scenarios in features/tui_session_tabs_multi_session.feature
  • Remove @tdd_expected_fail from TDD scenarios (issue #10303)
  • Run nox -s unit_tests and verify all tests pass
  • Run nox -s coverage_report and verify coverage ≥ 97%

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done
  • The TDD testing issue #10303 is resolved (its @tdd_expected_fail scenarios now pass)
  • Coverage ≥ 97%

Supporting Information

  • Spec: ADR-044 §Multi-Session Management — "Multiple concurrent sessions are supported, each with an independent persona, conversation history, and A2A Task binding"
  • Spec: ADR-044 §MainScreen Layout — SessionTabs (height: auto, visible when ≥2 sessions)
  • Source: src/cleveragents/tui/app.pyBINDINGS has only 3 entries; _session is a single hardcoded SessionView
  • Source: src/cleveragents/tui/widgets/ — no session_tabs.py file exists
  • TDD Issue: #10303

Automated by CleverAgents Bot
Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor

## Metadata | Field | Value | |---|---| | **Branch** | `bugfix/m7-tui-session-tabs-multi-session` | | **Commit Message** | `feat(tui): implement SessionTabs widget and multi-session management with A2A bindings` | | **Milestone** | v3.7.0 | | **Parent Epic** | — | | **TDD Issue** | #10303 | ## Background and Context UAT testing of the TUI Multi-Session Tabs + A2A Bindings feature area (v3.7.0) has confirmed that the `SessionTabs` widget and all multi-session management functionality are completely absent from the implementation. Per **ADR-044 (TUI Architecture and Framework)**, the TUI must support a multi-session tab bar where multiple concurrent sessions are supported, each with an independent persona, conversation history, and A2A Task binding. ## Current Behavior **Code inspection of `src/cleveragents/tui/` confirms:** 1. **No `SessionTabs` widget exists** — `src/cleveragents/tui/widgets/` contains no `session_tabs.py` file. The `widgets/__init__.py` does not export any `SessionTabs` class. 2. **Single-session only** — `CleverAgentsTuiApp` initializes with a single hardcoded session: ```python self._session = SessionView(session_id="default", transcript=[]) ``` There is no session list, no session creation, no session switching. 3. **Missing keyboard bindings** — `CleverAgentsTuiApp.BINDINGS` only contains: ```python BINDINGS = [ ("ctrl+q", "quit", "Quit"), ("f1", "help", "Help"), ("ctrl+t", "cycle_preset", "Cycle Preset"), ] ``` The required `ctrl+n` (new session), `ctrl+w` (close session), `ctrl+[` (prev session), and `ctrl+]` (next session) bindings are absent. 4. **No independent A2A bindings per session** — Each session should have an independent A2A session ID and Task binding. The current implementation has no A2A binding management at all. 5. **No session state indicators** — The spec requires `⌛` (actor working), `❯` (awaiting user input), and plain (idle) state indicators on session tabs. No such indicators exist. 6. **No 10-session concurrency support** — The spec requires support for at least 10 concurrent sessions. Only 1 session is supported. ## Expected Behavior Per **ADR-044 §Multi-Session Management**: - A `SessionTabs` widget appears at the top of the screen when ≥2 sessions exist - `ctrl+n` creates a new session tab with the current persona - `ctrl+w` closes the current session tab (with confirmation if unsaved) - `ctrl+[` navigates to the previous session tab - `ctrl+]` navigates to the next session tab - Each session has independent: conversation history, persona, A2A Task binding - Session tabs show state indicators: `⌛` (actor working), `❯` (awaiting user input), plain (idle) - At least 10 concurrent sessions are supported Per **ADR-044 §MainScreen Layout**: ``` SessionTabs (height: auto, visible when ≥2 sessions) ``` ## Reproduction Steps 1. Clone the repository and inspect `src/cleveragents/tui/widgets/` 2. Observe: no `session_tabs.py` file exists 3. Inspect `src/cleveragents/tui/app.py` 4. Observe: `BINDINGS` has only 3 entries (ctrl+q, f1, ctrl+t) 5. Observe: `self._session` is a single hardcoded `SessionView(session_id="default", ...)` 6. Launch the TUI: `agents tui` 7. Press `ctrl+n` — nothing happens (binding not registered) 8. Press `ctrl+[` or `ctrl+]` — nothing happens (bindings not registered) ## Acceptance Criteria - [ ] `src/cleveragents/tui/widgets/session_tabs.py` exists with a `SessionTabs` Textual widget - [ ] `SessionTabs` is exported from `src/cleveragents/tui/widgets/__init__.py` - [ ] `SessionTabs` is mounted in `CleverAgentsTuiApp.compose()` (visible when ≥2 sessions) - [ ] `ctrl+n` binding exists and creates a new session with an independent A2A session ID - [ ] `ctrl+w` binding exists and closes the current session (with confirmation if unsaved) - [ ] `ctrl+[` binding exists and navigates to the previous session - [ ] `ctrl+]` binding exists and navigates to the next session - [ ] Each session has independent: conversation history, persona, A2A session ID - [ ] Session tabs display state indicators: `⌛` (working), `❯` (awaiting input), plain (idle) - [ ] At least 10 concurrent sessions are supported without errors - [ ] The `@tdd_expected_fail` tag is removed from the TDD scenarios in issue #10303 - [ ] All existing tests continue to pass - [ ] Coverage ≥ 97% ## Subtasks - [ ] Create `src/cleveragents/tui/widgets/session_tabs.py` with `SessionTabs` widget - [ ] Export `SessionTabs` from `src/cleveragents/tui/widgets/__init__.py` - [ ] Add `ctrl+n`, `ctrl+w`, `ctrl+[`, `ctrl+]` to `CleverAgentsTuiApp.BINDINGS` - [ ] Implement `action_new_session()` method — creates session, assigns A2A session ID, updates tab bar - [ ] Implement `action_close_session()` method — closes current session with confirmation - [ ] Implement `action_prev_session()` and `action_next_session()` methods - [ ] Refactor `_session` to a session list with active session tracking - [ ] Add session state indicator logic (idle/running/error) to `SessionTabs` - [ ] Mount `SessionTabs` in `compose()` with conditional visibility (≥2 sessions) - [ ] Write/update Behave scenarios in `features/tui_session_tabs_multi_session.feature` - [ ] Remove `@tdd_expected_fail` from TDD scenarios (issue #10303) - [ ] Run `nox -s unit_tests` and verify all tests pass - [ ] Run `nox -s coverage_report` and verify coverage ≥ 97% ## Definition of Done This issue is complete when: - [ ] All subtasks above are completed and checked off - [ ] A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly - [ ] The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly - [ ] The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done - [ ] The TDD testing issue #10303 is resolved (its `@tdd_expected_fail` scenarios now pass) - [ ] Coverage ≥ 97% ## Supporting Information - **Spec**: ADR-044 §Multi-Session Management — "Multiple concurrent sessions are supported, each with an independent persona, conversation history, and A2A Task binding" - **Spec**: ADR-044 §MainScreen Layout — `SessionTabs (height: auto, visible when ≥2 sessions)` - **Source**: `src/cleveragents/tui/app.py` — `BINDINGS` has only 3 entries; `_session` is a single hardcoded `SessionView` - **Source**: `src/cleveragents/tui/widgets/` — no `session_tabs.py` file exists - **TDD Issue**: #10303 --- **Automated by CleverAgents Bot** Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor
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#10308
No description provided.