Skip to content

Release readiness: docs accuracy, test coverage, and UI code-behind decomposition - #16

Merged
DevMando merged 1 commit into
mainfrom
chore/release-readiness
Jul 24, 2026
Merged

Release readiness: docs accuracy, test coverage, and UI code-behind decomposition#16
DevMando merged 1 commit into
mainfrom
chore/release-readiness

Conversation

@DevMando

Copy link
Copy Markdown
Owner

Summary

Pre-release hardening of MandoCode Desktop. This branch makes the documentation match the shipped app, adds automated tests around the highest-risk logic, and decomposes the two large UI code-behind files into focused, maintainable units — with no changes to the shared MandoCode engine and no behavioral changes to the app.

Note on scope: this branch also carries the previously-built session history / compare view / snapshot feature commits, which had not yet reached main. Those are the two feature commits below the hardening commit; the sections here describe the hardening work, which is the primary review target.

Why now

The app was functionally solid but carried three sources of release risk:

  1. Documentation had drifted from the code — including a changelog that described a data model we had removed, and several shipped features that were undocumented.
  2. Test coverage was thin and concentrated on low-risk helpers, with nothing covering the code most likely to break.
  3. Two UI files had grown to ~2,800 lines each, making them slow to navigate and prone to merge conflicts.

This pass pays that down so we can tag a release with confidence.

What changed

Documentation accuracy

  • Reconciled CHANGELOG.md / README.md with the shipped app: removed descriptions of a snapshot data model that no longer exists, and documented three features that shipped but were undocumented (integrated terminal, file-explorer + git awareness, AI skill authoring).
  • Fixed a developer-facing build-guard error message that pointed at APIs which don't exist.

Safety net — automated tests raised from 40 to 73

  • Config clone + validate round-trip — covers a case-sensitivity bug in MCP-server lookups that the code repeatedly warned about but never tested.
  • Agent-name slot reuse, conversation-history flattening, and the invisible request-preamble that gets folded into each model message.
  • The streamed-response loop — the highest-risk path in the app — is now covered, driven by a fake AI-service seam so it runs without a live model (empty response, cancellation, error, and cloud-auth cases are all asserted).

Maintainability — behavior-preserving refactors

  • Decomposed MainWindow (2,877 → 152-line core + 12 focused files) and ChatTabView (2,414 → 351 + 7 files) via partial-class splits. Same classes, same behavior, far more navigable.
  • Moved the transcript view's ~970 lines of embedded CSS/JS out of C# and into asset files (1,258 → 344).
  • Introduced a small IAiService interface so the UI controller depends on an abstraction rather than the concrete engine — this insulates it from engine API changes and is what makes the streaming loop testable.
  • Removed duplicated helpers (project/label formatting, shell-open, config cloning) into single sources of truth.

Bug fixes

  • The MCP server-editor modal rendered pinned in the left sidebar rail instead of centered over the content (a latent layout bug).
  • Tightened the chat input placeholder so it stays legible in the side-by-side compare view.

Risk & verification

  • The shared MandoCode engine (git submodule) is untouched and its pinned version is unchanged, so rolling it forward later works exactly as before.
  • Refactors are behavior-preserving (partial-class splits and pure extractions); the transcript HTML output is unchanged.
  • Build is clean (0 warnings, 0 errors) and all 73 tests pass.
  • Manually smoke-tested: chat streaming, all approval types (write/command/delete/MCP), request cancellation, model switching, theme switching (including the e-ink/CRT/Win98 modes), chat background, tabs, split/compare view, the integrated terminal, and each settings page.

Deferred (non-blocking, tracked for after release)

  • Deeper decoupling of the file-explorer code-behind and the MCP/snapshot command handlers.
  • Extracting the approval overlay and the snapshots/history panels into standalone controls — the partial-class splits already resolve the file-size concern, so these are polish rather than blockers.

…tion

- Reconcile CHANGELOG/README with the shipped app; fix the MANDO001 build-guard message
- Add automated tests (40 -> 73): config clone/clamp, agent naming, history
  flattening, request-preamble composition, and the streamed-response loop
- Decompose MainWindow (2877 -> 152 core) and ChatTabView (2414 -> 351) into partials
- Externalize TranscriptHtmlBuilder CSS/JS into asset files (1258 -> 344)
- Add IAiService/AiServiceAdapter, ResponseStreamer, and ITranscriptHtml seams
- Factor shared helpers (ProjectDisplay, ShellOpen, ConfigCloning, CrashLog)
- Fix MCP editor modal placement; tighten the chat input placeholder

The shared MandoCode harness submodule is untouched; refactors are behavior-preserving.
@DevMando
DevMando merged commit 79613af into main Jul 24, 2026
1 check passed
@DevMando
DevMando deleted the chore/release-readiness branch July 24, 2026 16:07
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