UAT: agents resource type show rich output uses a single flat panel instead of spec-required separate structured panels #2062

Open
opened 2026-04-03 03:46:22 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/resource-type-show-rich-output-panels
  • Commit Message: fix(cli): restructure resource type show rich output into spec-required separate panels
  • Milestone: v3.7.0
  • Parent Epic: #936

Background and Context

During UAT testing of the agents resource type show command, the rich (default) output was found to render all resource type information in a single flat panel. The specification requires five separate, structured panels: one for the type overview, one for CLI Arguments (with a formatted table), one for Parent Types, one for Child Types (with a formatted table), and one for Sandbox details — plus a success footer line.

The implementation in src/cleveragents/cli/commands/resource.py (lines 417–470, the _print_type_panel() function) diverges significantly from the display contract defined in docs/specification.md (lines 10407–10439).

Current Behavior

Running agents resource type show git-checkout renders a single panel titled "Resource Type" containing all fields as flat text:

╭─ Resource Type ──────────────────────────────────────────────────────╮
│ Name: git-checkout                                                   │
│ Description: (none)                                                  │
│ Inherits: (none)                                                     │
│ Inheritance Chain: (root type)                                       │
│ Kind: physical                                                       │
│ Sandbox Strategy: git_worktree                                       │
│ Built-in: yes                                                        │
│ User-addable: yes                                                    │
│ Handler: (none)                                                      │
│ CLI Arguments:                                                       │
│   --path (path, required)                                            │
│   --branch (string, optional)                                        │
│ Parent Types: (none)                                                 │
│ Child Types: git, fs-directory                                       │
╰──────────────────────────────────────────────────────────────────────╯

Key differences from the spec:

  1. Single panel instead of 5 separate panels
  2. CLI Arguments shown as a plain text list instead of a formatted table with Argument/Required/Type/Description columns
  3. Child Types shown as a comma-separated list instead of a table with Type/Auto/Manual Link/Description columns
  4. Parent Types shown as a comma-separated list instead of a structured panel with "Allowed: (any, top-level OK)" format
  5. Missing Source field (built-in/custom)
  6. Missing Physical/Virtual label (shows Kind instead)
  7. Missing success footer: ✓ OK Resource type details loaded
  8. Shows extra fields not in spec: Inherits, Inheritance Chain, Sandbox Strategy (in main panel)

Code Location: src/cleveragents/cli/commands/resource.py, lines 417–470 (_print_type_panel() function).

Expected Behavior

Per docs/specification.md (lines 10407–10439), the rich output for agents resource type show git-checkout must render five separate panels plus a footer:

╭─ Resource Type ──────────────────────────────────────────────────────╮
│ Name: git-checkout                                                   │
│ Source: built-in                                                     │
│ Description: A locally checked-out git repository with worktree      │
│ Physical/Virtual: physical                                           │
│ User Addable: yes                                                    │
╰──────────────────────────────────────────────────────────────────────╯

╭─ CLI Arguments (agents resource add git-checkout) ─────────────────╮
│ Argument    Required  Type    Description                           │
│ ──────────  ────────  ──────  ──────────────────────────────        │
│ --path      yes       path    Local checkout directory              │
│ --branch    no        string  Default branch (default: main)        │
╰────────────────────────────────────────────────────────────────────╯

╭─ Parent Types ───────────────╮
│ Allowed: (any, top-level OK) │
╰──────────────────────────────╯

╭─ Child Types ────────────────────────────────────────────────────╮
│ Type           Auto  Manual Link  Description                    │
│ ─────────────  ────  ───────────  ──────────────────────────     │
│ git            yes   no           Repo object DB and history     │
│ fs-directory   yes   no           Worktree root directory        │
╰──────────────────────────────────────────────────────────────────╯

╭─ Sandbox ──────────────────────╮
│ Strategy: git_worktree         │
│ Checkpointable: yes            │
│ Handler: GitCheckoutHandler    │
╰────────────────────────────────╯

✓ OK Resource type details loaded

Steps to Reproduce

  1. Run agents resource type show git-checkout
  2. Observe: single flat panel with all fields as plain text
  3. Expected: five separate structured panels as described in the spec

Subtasks

  • Refactor _print_type_panel() (lines 417–470 in resource.py) to render five separate panels: Resource Type overview, CLI Arguments, Parent Types, Child Types, and Sandbox
  • Implement the Resource Type panel with fields: Name, Source (built-in/custom), Description, Physical/Virtual, User Addable — remove non-spec fields (Inherits, Inheritance Chain) from this panel
  • Implement the CLI Arguments panel as a rich table with columns: Argument, Required, Type, Description — titled CLI Arguments (agents resource add <type-name>)
  • Implement the Parent Types panel showing either Allowed: (any, top-level OK) or a list of allowed parent type names
  • Implement the Child Types panel as a rich table with columns: Type, Auto, Manual Link, Description
  • Implement the Sandbox panel with fields: Strategy, Checkpointable, Handler
  • Add the success footer line ✓ OK Resource type details loaded after all panels
  • Ensure the Source field correctly maps to "built-in" or "custom" (not a raw boolean)
  • Ensure the Physical/Virtual field label is used (not Kind)
  • Update/add Behave BDD scenarios covering the corrected five-panel rich output structure
  • Update/add Behave scenarios verifying each panel's content and table columns
  • Run nox -e typecheck — fix any type errors introduced
  • Run nox -e unit_tests and nox -e integration_tests — all must pass
  • Verify coverage ≥ 97% via nox -e coverage_report
  • Run full nox (all default sessions) — fix any remaining errors

Definition of Done

  • agents resource type show <type> renders exactly five separate rich panels in the order: Resource Type, CLI Arguments, Parent Types, Child Types, Sandbox
  • The CLI Arguments panel uses a formatted table with columns: Argument, Required, Type, Description
  • The Child Types panel uses a formatted table with columns: Type, Auto, Manual Link, Description
  • The Parent Types panel shows Allowed: (any, top-level OK) when no parent restriction exists
  • The success footer ✓ OK Resource type details loaded is printed after all panels
  • The Source field displays "built-in" or "custom" (not a raw boolean or enum)
  • The Physical/Virtual label is used (not Kind)
  • Non-spec fields (Inherits, Inheritance Chain, Sandbox Strategy in main panel) are removed from the overview panel
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly (fix(cli): restructure resource type show rich output into spec-required separate panels), followed by a blank line, then additional lines providing relevant details about the implementation, and a footer ISSUES CLOSED: #<this issue number>
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly (fix/resource-type-show-rich-output-panels)
  • The commit is submitted as a pull request to master, reviewed by at least two contributors, and merged before this issue is marked done
  • All nox stages pass
  • Coverage ≥ 97%

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

## Metadata - **Branch**: `fix/resource-type-show-rich-output-panels` - **Commit Message**: `fix(cli): restructure resource type show rich output into spec-required separate panels` - **Milestone**: v3.7.0 - **Parent Epic**: #936 ## Background and Context During UAT testing of the `agents resource type show` command, the rich (default) output was found to render all resource type information in a single flat panel. The specification requires five separate, structured panels: one for the type overview, one for CLI Arguments (with a formatted table), one for Parent Types, one for Child Types (with a formatted table), and one for Sandbox details — plus a success footer line. The implementation in `src/cleveragents/cli/commands/resource.py` (lines 417–470, the `_print_type_panel()` function) diverges significantly from the display contract defined in `docs/specification.md` (lines 10407–10439). ## Current Behavior Running `agents resource type show git-checkout` renders a single panel titled "Resource Type" containing all fields as flat text: ``` ╭─ Resource Type ──────────────────────────────────────────────────────╮ │ Name: git-checkout │ │ Description: (none) │ │ Inherits: (none) │ │ Inheritance Chain: (root type) │ │ Kind: physical │ │ Sandbox Strategy: git_worktree │ │ Built-in: yes │ │ User-addable: yes │ │ Handler: (none) │ │ CLI Arguments: │ │ --path (path, required) │ │ --branch (string, optional) │ │ Parent Types: (none) │ │ Child Types: git, fs-directory │ ╰──────────────────────────────────────────────────────────────────────╯ ``` Key differences from the spec: 1. Single panel instead of 5 separate panels 2. CLI Arguments shown as a plain text list instead of a formatted table with Argument/Required/Type/Description columns 3. Child Types shown as a comma-separated list instead of a table with Type/Auto/Manual Link/Description columns 4. Parent Types shown as a comma-separated list instead of a structured panel with "Allowed: (any, top-level OK)" format 5. Missing `Source` field (built-in/custom) 6. Missing `Physical/Virtual` label (shows `Kind` instead) 7. Missing success footer: `✓ OK Resource type details loaded` 8. Shows extra fields not in spec: `Inherits`, `Inheritance Chain`, `Sandbox Strategy` (in main panel) **Code Location:** `src/cleveragents/cli/commands/resource.py`, lines 417–470 (`_print_type_panel()` function). ## Expected Behavior Per `docs/specification.md` (lines 10407–10439), the rich output for `agents resource type show git-checkout` must render five separate panels plus a footer: ``` ╭─ Resource Type ──────────────────────────────────────────────────────╮ │ Name: git-checkout │ │ Source: built-in │ │ Description: A locally checked-out git repository with worktree │ │ Physical/Virtual: physical │ │ User Addable: yes │ ╰──────────────────────────────────────────────────────────────────────╯ ╭─ CLI Arguments (agents resource add git-checkout) ─────────────────╮ │ Argument Required Type Description │ │ ────────── ──────── ────── ────────────────────────────── │ │ --path yes path Local checkout directory │ │ --branch no string Default branch (default: main) │ ╰────────────────────────────────────────────────────────────────────╯ ╭─ Parent Types ───────────────╮ │ Allowed: (any, top-level OK) │ ╰──────────────────────────────╯ ╭─ Child Types ────────────────────────────────────────────────────╮ │ Type Auto Manual Link Description │ │ ───────────── ──── ─────────── ────────────────────────── │ │ git yes no Repo object DB and history │ │ fs-directory yes no Worktree root directory │ ╰──────────────────────────────────────────────────────────────────╯ ╭─ Sandbox ──────────────────────╮ │ Strategy: git_worktree │ │ Checkpointable: yes │ │ Handler: GitCheckoutHandler │ ╰────────────────────────────────╯ ✓ OK Resource type details loaded ``` ## Steps to Reproduce 1. Run `agents resource type show git-checkout` 2. Observe: single flat panel with all fields as plain text 3. Expected: five separate structured panels as described in the spec ## Subtasks - [ ] Refactor `_print_type_panel()` (lines 417–470 in `resource.py`) to render five separate panels: Resource Type overview, CLI Arguments, Parent Types, Child Types, and Sandbox - [ ] Implement the **Resource Type** panel with fields: Name, Source (built-in/custom), Description, Physical/Virtual, User Addable — remove non-spec fields (`Inherits`, `Inheritance Chain`) from this panel - [ ] Implement the **CLI Arguments** panel as a `rich` table with columns: Argument, Required, Type, Description — titled `CLI Arguments (agents resource add <type-name>)` - [ ] Implement the **Parent Types** panel showing either `Allowed: (any, top-level OK)` or a list of allowed parent type names - [ ] Implement the **Child Types** panel as a `rich` table with columns: Type, Auto, Manual Link, Description - [ ] Implement the **Sandbox** panel with fields: Strategy, Checkpointable, Handler - [ ] Add the success footer line `✓ OK Resource type details loaded` after all panels - [ ] Ensure the `Source` field correctly maps to "built-in" or "custom" (not a raw boolean) - [ ] Ensure the `Physical/Virtual` field label is used (not `Kind`) - [ ] Update/add Behave BDD scenarios covering the corrected five-panel rich output structure - [ ] Update/add Behave scenarios verifying each panel's content and table columns - [ ] Run `nox -e typecheck` — fix any type errors introduced - [ ] Run `nox -e unit_tests` and `nox -e integration_tests` — all must pass - [ ] Verify coverage ≥ 97% via `nox -e coverage_report` - [ ] Run full `nox` (all default sessions) — fix any remaining errors ## Definition of Done - [ ] `agents resource type show <type>` renders exactly five separate `rich` panels in the order: Resource Type, CLI Arguments, Parent Types, Child Types, Sandbox - [ ] The CLI Arguments panel uses a formatted table with columns: Argument, Required, Type, Description - [ ] The Child Types panel uses a formatted table with columns: Type, Auto, Manual Link, Description - [ ] The Parent Types panel shows `Allowed: (any, top-level OK)` when no parent restriction exists - [ ] The success footer `✓ OK Resource type details loaded` is printed after all panels - [ ] The `Source` field displays "built-in" or "custom" (not a raw boolean or enum) - [ ] The `Physical/Virtual` label is used (not `Kind`) - [ ] Non-spec fields (`Inherits`, `Inheritance Chain`, `Sandbox Strategy` in main panel) are removed from the overview panel - [ ] A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly (`fix(cli): restructure resource type show rich output into spec-required separate panels`), followed by a blank line, then additional lines providing relevant details about the implementation, and a footer `ISSUES CLOSED: #<this issue number>` - [ ] The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly (`fix/resource-type-show-rich-output-panels`) - [ ] The commit is submitted as a **pull request** to `master`, reviewed by at least two contributors, and **merged** before this issue is marked done - [ ] All nox stages pass - [ ] Coverage ≥ 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-03 03:46:26 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium (confirmed)
  • Milestone: v3.7.0 (confirmed — part of the Output Rendering Pipeline Epic #936)
  • MoSCoW: Should Have — The spec defines a detailed five-panel output structure for agents resource type show. The current single-panel output works but doesn't match the spec. Important for spec compliance.
  • Parent Epic: #936 (confirmed correct)

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium (confirmed) - **Milestone**: v3.7.0 (confirmed — part of the Output Rendering Pipeline Epic #936) - **MoSCoW**: Should Have — The spec defines a detailed five-panel output structure for `agents resource type show`. The current single-panel output works but doesn't match the spec. Important for spec compliance. - **Parent Epic**: #936 (confirmed correct) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo self-assigned this 2026-04-03 16:58:12 +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.

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