bug(cli): plan list rich output Summary panel missing Cancelled count #9458

Open
opened 2026-04-14 18:07:29 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit Message: fix(cli): add cancelled_count to plan list Summary panel in lifecycle_list_plans
  • Branch: fix/plan-list-summary-panel-missing-cancelled-count

Background and Context

The agents plan list command renders a Summary panel in its rich output. The spec (docs/specification.md §agents plan list, lines ~12264–12270) defines the Summary panel as including a Cancelled count alongside Total, Processing, Completed, and Errored. The current implementation in src/cleveragents/cli/commands/plan.py builds the Summary panel text without ever calculating or displaying the cancelled plan count.

This was identified during UAT testing of the Plan List CLI feature area. Two separate UAT findings (originally reported as distinct bugs) were consolidated into this single issue because they both describe the same root cause: the cancelled_count variable is never computed and the Cancelled: N line is never added to the Summary panel text.

Current Behavior

agents plan list Summary panel shows:

╭─ Summary ─────────╮
│ Total: 5          │
│ Processing: 2     │
│ Completed: 1      │
│ Errored: 1        │
╰───────────────────╯

The Cancelled count is absent from the Summary panel.

In src/cleveragents/cli/commands/plan.py, the lifecycle_list_plans function (lines ~3093–3110) builds the Summary panel as:

summary_text = (
    f"[yellow bold]Total:[/yellow bold] {total_plans}\n"
    f"[blue bold]Processing:[/blue bold] {processing_count}\n"
    f"[green bold]Completed:[/green bold] {completed_count}\n"
    f"[red bold]Errored:[/red bold] {errored_count}"
)

The cancelled_count is never calculated or included in the summary text.

Expected Behavior

Per docs/specification.md §agents plan list (lines ~12264–12270), the Summary panel must include a Cancelled count:

╭─ Summary ─────────────╮
│ Total: 5              │
│ Processing: 2         │
│ Completed: 1          │
│ Errored: 1            │
│ Cancelled: 1          │
╰───────────────────────╯

Acceptance Criteria

  • agents plan list rich output Summary panel includes a Cancelled: N line
  • cancelled_count is calculated as the number of plans with processing_state.value == "cancelled"
  • When cancelled plans exist, the correct count is shown
  • When no cancelled plans exist, Cancelled: 0 is shown (or omitted if spec explicitly allows omission)
  • No regressions in existing agents plan list tests
  • Coverage remains ≥97%

Supporting Information

  • Spec Reference: docs/specification.md §agents plan list (lines ~12264–12270)
  • Files Affected:
    • src/cleveragents/cli/commands/plan.pylifecycle_list_plans function (lines ~3093–3110)

Subtasks

  • Add cancelled_count = sum(1 for p in plans if p.processing_state.value == "cancelled") calculation to lifecycle_list_plans
  • Add [magenta bold]Cancelled:[/magenta bold] {cancelled_count} line to the Summary panel text
  • Add Behave BDD test scenario verifying Cancelled count appears in the Summary panel
  • Add Behave BDD test scenario verifying correct count when multiple cancelled plans exist
  • Verify coverage remains ≥97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • agents plan list rich output Summary panel includes Cancelled: N count
  • agents plan list with cancelled plans shows the correct cancelled count
  • Behave BDD tests cover the Summary panel cancelled count
  • No regressions in existing tests
  • Coverage ≥97%
  • 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, followed by a blank line, then additional lines providing relevant details about the implementation
  • 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

Automated by CleverAgents Bot
Agent: new-issue-creator

## Metadata - **Commit Message**: `fix(cli): add cancelled_count to plan list Summary panel in lifecycle_list_plans` - **Branch**: `fix/plan-list-summary-panel-missing-cancelled-count` ## Background and Context The `agents plan list` command renders a Summary panel in its rich output. The spec (`docs/specification.md` §agents plan list, lines ~12264–12270) defines the Summary panel as including a `Cancelled` count alongside `Total`, `Processing`, `Completed`, and `Errored`. The current implementation in `src/cleveragents/cli/commands/plan.py` builds the Summary panel text without ever calculating or displaying the cancelled plan count. This was identified during UAT testing of the Plan List CLI feature area. Two separate UAT findings (originally reported as distinct bugs) were consolidated into this single issue because they both describe the same root cause: the `cancelled_count` variable is never computed and the `Cancelled: N` line is never added to the Summary panel text. ## Current Behavior `agents plan list` Summary panel shows: ``` ╭─ Summary ─────────╮ │ Total: 5 │ │ Processing: 2 │ │ Completed: 1 │ │ Errored: 1 │ ╰───────────────────╯ ``` The `Cancelled` count is **absent** from the Summary panel. In `src/cleveragents/cli/commands/plan.py`, the `lifecycle_list_plans` function (lines ~3093–3110) builds the Summary panel as: ```python summary_text = ( f"[yellow bold]Total:[/yellow bold] {total_plans}\n" f"[blue bold]Processing:[/blue bold] {processing_count}\n" f"[green bold]Completed:[/green bold] {completed_count}\n" f"[red bold]Errored:[/red bold] {errored_count}" ) ``` The `cancelled_count` is never calculated or included in the summary text. ## Expected Behavior Per `docs/specification.md` §agents plan list (lines ~12264–12270), the Summary panel must include a `Cancelled` count: ``` ╭─ Summary ─────────────╮ │ Total: 5 │ │ Processing: 2 │ │ Completed: 1 │ │ Errored: 1 │ │ Cancelled: 1 │ ╰───────────────────────╯ ``` ## Acceptance Criteria - [ ] `agents plan list` rich output Summary panel includes a `Cancelled: N` line - [ ] `cancelled_count` is calculated as the number of plans with `processing_state.value == "cancelled"` - [ ] When cancelled plans exist, the correct count is shown - [ ] When no cancelled plans exist, `Cancelled: 0` is shown (or omitted if spec explicitly allows omission) - [ ] No regressions in existing `agents plan list` tests - [ ] Coverage remains ≥97% ## Supporting Information - **Spec Reference**: `docs/specification.md` §agents plan list (lines ~12264–12270) - **Files Affected**: - `src/cleveragents/cli/commands/plan.py` — `lifecycle_list_plans` function (lines ~3093–3110) ## Subtasks - [ ] Add `cancelled_count = sum(1 for p in plans if p.processing_state.value == "cancelled")` calculation to `lifecycle_list_plans` - [ ] Add `[magenta bold]Cancelled:[/magenta bold] {cancelled_count}` line to the Summary panel text - [ ] Add Behave BDD test scenario verifying `Cancelled` count appears in the Summary panel - [ ] Add Behave BDD test scenario verifying correct count when multiple cancelled plans exist - [ ] Verify coverage remains ≥97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - [ ] `agents plan list` rich output Summary panel includes `Cancelled: N` count - [ ] `agents plan list` with cancelled plans shows the correct cancelled count - [ ] Behave BDD tests cover the Summary panel cancelled count - [ ] No regressions in existing tests - [ ] Coverage ≥97% - [ ] 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, followed by a blank line, then additional lines providing relevant details about the implementation - [ ] 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 --- **Automated by CleverAgents Bot** Agent: new-issue-creator
HAL9000 added this to the v3.2.0 milestone 2026-04-14 18:12:56 +00:00
Author
Owner

Triage Decision [AUTO-OWNR-3]: Verified as a spec compliance bug. The plan list rich output Summary panel is missing the Cancelled count field. Should Have for v3.2.0 — minor output completeness issue.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Triage Decision [AUTO-OWNR-3]**: Verified as a spec compliance bug. The `plan list` rich output Summary panel is missing the Cancelled count field. `Should Have` for v3.2.0 — minor output completeness issue. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-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#9458
No description provided.