fix(cli): add spec-required Validation and Merge panels and correct title/message in agents session import #3460

Merged
freemo merged 2 commits from fix/session-import-missing-validation-merge-panels into master 2026-04-05 18:08:09 +00:00

2 Commits

Author SHA1 Message Date
freemo bffec08f65 fix(cli): add spec-required Validation and Merge panels and correct title/message in agents session import
CI / lint (pull_request) Successful in 20s
CI / typecheck (pull_request) Successful in 47s
CI / quality (pull_request) Successful in 30s
CI / security (pull_request) Successful in 1m2s
CI / build (pull_request) Successful in 23s
CI / helm (pull_request) Successful in 24s
CI / unit_tests (pull_request) Successful in 7m10s
CI / e2e_tests (pull_request) Successful in 16m55s
CI / integration_tests (pull_request) Failing after 23m17s
CI / coverage (pull_request) Successful in 10m46s
CI / docker (pull_request) Successful in 1m22s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 57m4s
Fixes five spec deviations in the agents session import Rich output:

1. Renamed panel title from 'Session Imported' to 'Session Import' per spec
2. Replaced Actor/Namespace fields with Input (file path) and Schema (version)
   in the primary panel
3. Added 'Validation' panel with Checksum, Schema, and Actor Ref fields
4. Added 'Merge' panel with Existing and Strategy fields
5. Fixed success message from 'Session imported' to 'Import completed'

Data sources:
- Input: the --input file path argument
- Schema: data['schema_version'] from the import JSON (available before
  calling service.import_session())
- Actor Ref: 'resolved' if actor_name present in import data, else 'none'
- Checksum/Schema validation: always 'verified'/'compatible' since the
  service raises SessionImportError on failure before reaching this code
- Merge Existing/Strategy: always 'none'/'create new' since import always
  creates a new session with a fresh ULID

Updated tests:
- features/session_cli.feature: updated existing scenario and added new
  scenario verifying all panel fields
- features/session_cli_coverage_boost.feature: updated assertion
- robot/helper_session_cli.py: updated export_import_roundtrip assertions
  and added import_rich_panels() test function
- robot/session_cli.robot: added Session Import Rich Output Panels test case

Closes #3428
2026-04-05 17:55:07 +00:00
freemo 260d54a2f1 fix(tui): make /help command list all catalogued slash commands from SLASH_COMMAND_SPECS
Replace the hardcoded help string in TuiCommandRouter.handle() with a
dynamic lookup against SLASH_COMMAND_SPECS from slash_catalog.py.

Changes:
- Add _help_command(), _help_list_all(), _help_for_command() methods to
  TuiCommandRouter
- /help (no args): iterates SLASH_COMMAND_SPECS, groups commands by
  namespace (sorted alphabetically), renders all 70 commands with
  descriptions in colon-namespaced format (e.g. persona:list)
- /help <command>: looks up the given command in SLASH_COMMAND_SPECS and
  renders its full help (group, description)
- /help <unknown>: returns 'Unknown command: /<cmd>' message
- /help /persona:list (with leading slash): strips the slash and resolves
  correctly
- Import defaultdict and SLASH_COMMAND_SPECS at module level

Tests:
- Update tui_commands_coverage.feature: replace old exact-match scenario
  for help text with new dynamic-listing assertions
- Add tui_commands_coverage_steps.py: new 'should contain' step definition
- Add tui_help_command_full_catalog.feature: 12 BDD scenarios covering
  /help no-args, /help <command>, /help <unknown>, namespace grouping,
  colon-namespaced format, and regression against old hardcoded string
- Add tui_help_command_full_catalog_steps.py: step definitions for the
  new feature (all-commands check, not-equal assertion)
- Add robot/tui_help_command.robot: 5 Robot Framework integration tests
  verifying the help command via direct Python invocation and headless
  TUI startup

Closes #3434

---
**Automated by CleverAgents Bot**
Supervisor: Implementation | Agent: ca-issue-worker
2026-04-05 17:45:40 +00:00