UAT: agents session show Rich output missing Automation field and Linked Plans panel shows IDs only (not Phase/State table) #3413

Open
opened 2026-04-05 16:35:31 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/session-show-missing-automation-and-plans-table
  • Commit Message: fix(cli): add Automation field and Phase/State table to agents session show Rich output
  • Milestone: (none — backlog)
  • Parent Epic: #397

Background

During UAT code-level analysis of src/cleveragents/cli/commands/session.py against docs/specification.md §"agents session show" (lines 1719–1871), two spec deviations were found in the show() command's Rich output rendering.

Problem 1 — Missing Automation Field in Session Summary Panel

The Session Summary panel (lines 377–385 of session.py) does not include the Automation field required by the specification.

Actual code (non-compliant):

details = (
    f"[bold]Session ID:[/bold] {session.session_id}\n"
    f"[bold]Actor:[/bold] {session.actor_name or '(none)'}\n"
    f"[bold]Namespace:[/bold] {session.namespace}\n"
    f"[bold]Messages:[/bold] {session.message_count}\n"
    f"[bold]Created:[/bold] {session.created_at.strftime('%Y-%m-%d %H:%M')}\n"
    f"[bold]Updated:[/bold] {session.updated_at.strftime('%Y-%m-%d %H:%M')}"
)

Expected output (per spec):

╭─ Session Summary ───────────────╮
│ ID: 01HXM2A6K1P2E9Q9D4GQ7J4S7Z  │
│ Actor: local/orchestrator       │
│ Messages: 6                     │
│ Created: 2026-02-08 12:30       │
│ Updated: 2026-02-08 12:44       │
│ Automation: review              │
╰─────────────────────────────────╯

Problem 2 — Linked Plans Panel Shows Bullet List Instead of Phase/State Table

The Linked Plans panel (lines 406–408 of session.py) renders a plain bullet list of plan IDs instead of the required table with Plan ID, Phase, and State columns.

Actual code (non-compliant):

if session.linked_plan_ids:
    plan_text = "\n".join(f"  • {pid}" for pid in session.linked_plan_ids)
    console.print(Panel(plan_text, title="Linked Plans", expand=False))

Expected output (per spec):

╭─ Linked Plans ────────────────────────────────╮
│ Plan ID                     Phase   State     │
│ ──────────────────────────  ──────  ────────  │
│ 01HXM8C2ZK4Q7C2B3F2R4VYV6J  execute  complete │
╰───────────────────────────────────────────────╯

Additional Complexity Note

The Session domain model (src/cleveragents/domain/models/core/session.py) stores linked_plan_ids as a flat list of ULID strings (line 200) — it does not store plan phase or state. To render the Phase/State table, either:

  • The domain model must be extended to store (plan_id, phase, state) tuples alongside each plan ID, or
  • The show command must look up plan details from the plan service at display time.

This architectural decision should be made before implementing the fix.

Steps to Reproduce

  1. Create a session: agents session create
  2. Run: agents session show <SESSION_ID>
  3. Observe Session Summary panel has no Automation field
  4. If linked plans exist, observe they appear as a bullet list, not a Phase/State table

Code Locations

  • src/cleveragents/cli/commands/session.py: show() function, lines 377–408
  • src/cleveragents/domain/models/core/session.py: linked_plan_ids field (line 200)

Subtasks

  • Decide on architectural approach for surfacing plan Phase/State in agents session show (extend domain model vs. plan service lookup)
  • Add Automation field to the Session Summary panel in show() (session.py lines 377–385)
  • Replace the bullet-list Linked Plans panel with a Rich Table rendering Plan ID, Phase, and State columns (session.py lines 406–408)
  • Update or extend the Session domain model if the plan phase/state storage approach requires it
  • Add/update Behave scenarios in features/ covering both the Automation field and the Linked Plans table rendering
  • Verify all nox sessions pass

Definition of Done

  • agents session show Rich output includes Automation field in the Session Summary panel
  • agents session show Linked Plans panel renders a table with Plan ID, Phase, and State columns (not a bullet list)
  • Domain model changes (if any) are fully typed and pass nox -e typecheck
  • Behave scenarios assert both the Automation field and the Linked Plans table format
  • A PR is opened, reviewed (≥ 2 approvals), and merged
  • All nox stages pass
  • Coverage >= 97%

Backlog note: This issue was discovered during autonomous operation
on milestone v3.5.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/session-show-missing-automation-and-plans-table` - **Commit Message**: `fix(cli): add Automation field and Phase/State table to agents session show Rich output` - **Milestone**: *(none — backlog)* - **Parent Epic**: #397 ## Background During UAT code-level analysis of `src/cleveragents/cli/commands/session.py` against `docs/specification.md` §"agents session show" (lines 1719–1871), two spec deviations were found in the `show()` command's Rich output rendering. ## Problem 1 — Missing `Automation` Field in Session Summary Panel The Session Summary panel (lines 377–385 of `session.py`) does **not** include the `Automation` field required by the specification. **Actual code (non-compliant):** ```python details = ( f"[bold]Session ID:[/bold] {session.session_id}\n" f"[bold]Actor:[/bold] {session.actor_name or '(none)'}\n" f"[bold]Namespace:[/bold] {session.namespace}\n" f"[bold]Messages:[/bold] {session.message_count}\n" f"[bold]Created:[/bold] {session.created_at.strftime('%Y-%m-%d %H:%M')}\n" f"[bold]Updated:[/bold] {session.updated_at.strftime('%Y-%m-%d %H:%M')}" ) ``` **Expected output (per spec):** ``` ╭─ Session Summary ───────────────╮ │ ID: 01HXM2A6K1P2E9Q9D4GQ7J4S7Z │ │ Actor: local/orchestrator │ │ Messages: 6 │ │ Created: 2026-02-08 12:30 │ │ Updated: 2026-02-08 12:44 │ │ Automation: review │ ╰─────────────────────────────────╯ ``` ## Problem 2 — Linked Plans Panel Shows Bullet List Instead of Phase/State Table The Linked Plans panel (lines 406–408 of `session.py`) renders a plain bullet list of plan IDs instead of the required table with Plan ID, Phase, and State columns. **Actual code (non-compliant):** ```python if session.linked_plan_ids: plan_text = "\n".join(f" • {pid}" for pid in session.linked_plan_ids) console.print(Panel(plan_text, title="Linked Plans", expand=False)) ``` **Expected output (per spec):** ``` ╭─ Linked Plans ────────────────────────────────╮ │ Plan ID Phase State │ │ ────────────────────────── ────── ──────── │ │ 01HXM8C2ZK4Q7C2B3F2R4VYV6J execute complete │ ╰───────────────────────────────────────────────╯ ``` ## Additional Complexity Note The `Session` domain model (`src/cleveragents/domain/models/core/session.py`) stores `linked_plan_ids` as a flat list of ULID strings (line 200) — it does **not** store plan phase or state. To render the Phase/State table, either: - The domain model must be extended to store `(plan_id, phase, state)` tuples alongside each plan ID, **or** - The `show` command must look up plan details from the plan service at display time. This architectural decision should be made before implementing the fix. ## Steps to Reproduce 1. Create a session: `agents session create` 2. Run: `agents session show <SESSION_ID>` 3. Observe Session Summary panel has no `Automation` field 4. If linked plans exist, observe they appear as a bullet list, not a Phase/State table ## Code Locations - `src/cleveragents/cli/commands/session.py`: `show()` function, lines 377–408 - `src/cleveragents/domain/models/core/session.py`: `linked_plan_ids` field (line 200) ## Subtasks - [ ] Decide on architectural approach for surfacing plan Phase/State in `agents session show` (extend domain model vs. plan service lookup) - [ ] Add `Automation` field to the Session Summary panel in `show()` (`session.py` lines 377–385) - [ ] Replace the bullet-list Linked Plans panel with a Rich `Table` rendering Plan ID, Phase, and State columns (`session.py` lines 406–408) - [ ] Update or extend the `Session` domain model if the plan phase/state storage approach requires it - [ ] Add/update Behave scenarios in `features/` covering both the `Automation` field and the Linked Plans table rendering - [ ] Verify all nox sessions pass ## Definition of Done - [ ] `agents session show` Rich output includes `Automation` field in the Session Summary panel - [ ] `agents session show` Linked Plans panel renders a table with Plan ID, Phase, and State columns (not a bullet list) - [ ] Domain model changes (if any) are fully typed and pass `nox -e typecheck` - [ ] Behave scenarios assert both the `Automation` field and the Linked Plans table format - [ ] A PR is opened, reviewed (≥ 2 approvals), and merged - [ ] All nox stages pass - [ ] Coverage >= 97% > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.5.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
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.

Blocks
#397 Epic: Server & Autonomy Infrastructure
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3413
No description provided.