Skip to content

refactor(cli): promote --demo flag to demo subcommand#787

Merged
cpcloud merged 2 commits intomainfrom
demo-subcommand
Mar 17, 2026
Merged

refactor(cli): promote --demo flag to demo subcommand#787
cpcloud merged 2 commits intomainfrom
demo-subcommand

Conversation

@cpcloud
Copy link
Owner

@cpcloud cpcloud commented Mar 17, 2026

Summary

  • Promote --demo from a root-level flag to a demo subcommand
  • Move --years to the demo subcommand (no longer requires a separate --demo prerequisite)
  • Split TUI launch into runTUI (normal) and launchTUI (shared core) with runDemo handling demo-specific :memory: default
  • Update all docs, blog posts, VHS tapes, issue templates, and plans to use micasa demo syntax

Before: micasa --demo --years 10 /tmp/perf.db
After: micasa demo --years 10 /tmp/perf.db

cpcloud and others added 2 commits March 17, 2026 09:20
Move demo mode from a root-level --demo flag to a dedicated `demo`
subcommand. The --years flag moves with it and no longer requires a
separate --demo prerequisite.

Before: micasa --demo --years 10 /tmp/perf.db
After:  micasa demo --years 10 /tmp/perf.db

The TUI launch logic is split into runTUI (normal path) and launchTUI
(shared core), with runDemo handling the demo-specific DB path
defaulting to :memory:.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mantics

Extract path resolution from runDemo into a testable resolveDBPath
method on demoOpts, matching the runOpts pattern. Rewrite demo tests
to call actual production code instead of inlining logic. Add doc
comment on seedOpts clarifying nil-vs-zero semantics.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 55.55556% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.53%. Comparing base (e085133) to head (5662362).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/micasa/main.go 55.55% 15 Missing and 1 partial ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
cmd/micasa/main.go 48.74% <55.55%> (+1.09%) ⬆️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cpcloud cpcloud merged commit a22724f into main Mar 17, 2026
25 checks passed
@cpcloud cpcloud deleted the demo-subcommand branch March 17, 2026 13:30
cpcloud added a commit that referenced this pull request Mar 17, 2026
Cover #788 (Charm TUI v2 migration) and #787 (--demo promoted to
demo subcommand). Fix "Try it" section to use new `micasa demo`
syntax.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cpcloud added a commit that referenced this pull request Mar 19, 2026
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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