refactor(cli): promote --demo flag to demo subcommand#787
Merged
Conversation
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 Report❌ Patch coverage is
Additional details and impacted files
🚀 New features to boost your workflow:
|
cpcloud
added a commit
that referenced
this pull request
Mar 19, 2026
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--demofrom a root-level flag to ademosubcommand--yearsto thedemosubcommand (no longer requires a separate--demoprerequisite)runTUI(normal) andlaunchTUI(shared core) withrunDemohandling demo-specific:memory:defaultmicasa demosyntaxBefore:
micasa --demo --years 10 /tmp/perf.dbAfter:
micasa demo --years 10 /tmp/perf.db