Skip to content

chore: improve CLI maintainability and test reliability - #133

Merged
DevMando merged 1 commit into
mainfrom
chore/cli-maintainability-tests
Oct 9, 2026
Merged

DevMando merged 1 commit into
mainfrom
chore/cli-maintainability-tests

Conversation

@DevMando

@DevMando DevMando commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Large sections of the CLI were handling commands, menus, AI requests, rendering, and agent shutdown in the same place. This made changes harder to review and increased the chance of breaking another feature. This PR separates those responsibilities, makes the code easier to follow, and improves the reliability of the test suite.

What improves

  • Organize the main CLI component into focused files for commands, planning, attachments, integrations, requests, startup/shutdown, and terminal output.
  • Give menu visibility and global agent shortcuts clear owners, so nested menus and independent agents remain easier to maintain.
  • Move model inspection, image delivery, conversation-history serialization, and response-limit messages into smaller shared-engine helpers.
  • Clean up dense component wiring and delegation logic, with comments explaining important lifecycle decisions.

Reliability fixes

  • Closing an agent completes pending menu and approval requests instead of leaving them waiting.
  • Disposing an old component no longer removes a callback owned by its replacement.
  • Failed history serialization and context-summary persistence produce diagnostic warnings.

Testing and delivery

  • Group tests by unit, component, integration, and compatibility coverage.
  • Consolidate duplicate graph checks, strengthen workflow/tool assertions, and remove platform cases that could pass without checking behavior.
  • Introduce a shared widget-renderer harness and observable completion checks in place of fixed waits in the affected tests.
  • Add a Windows/Linux CI matrix for both supported .NET targets, repeated component checks, and targeted mutation-probe tooling.
  • Document maintenance boundaries, testing practices, and interactive terminal checks.

The large diff mainly reflects moving existing code into focused files and adding test categories. The existing terminal interface and public engine APIs remain supported. Native clipboard, terminal resizing, and platform keyboard behavior still benefit from interactive testing; the new Linux CI results must be checked separately.

Validation

  • CLI Release tests: 1,243 passed on .NET 10 and 1,243 passed on .NET 8.
  • Desktop compatibility: build succeeded with zero warnings/errors; 571 Desktop tests passed.

@DevMando
DevMando merged commit 9dd09f2 into main Oct 9, 2026
0 of 4 checks passed
@DevMando
DevMando deleted the chore/cli-maintainability-tests branch October 9, 2026 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant