Skip to content

INS-51: Support PostHog A/B testing in new onboarding#61

Merged
CarmenDou merged 1 commit intomainfrom
feat/add-todo
Apr 12, 2026
Merged

INS-51: Support PostHog A/B testing in new onboarding#61
CarmenDou merged 1 commit intomainfrom
feat/add-todo

Conversation

@CarmenDou
Copy link
Copy Markdown
Contributor

@CarmenDou CarmenDou commented Apr 12, 2026

Add 'todo' template to create and link commands

  • Adds todo to the valid templates list in both create.ts and link.ts, including CLI help text and interactive selection menus.
  • The todo template is fetched via the existing downloadGitHubTemplate path, consistent with other GitHub-hosted templates.
  • Bumps package version from 0.1.44 to 0.1.45.

Macroscope summarized d319579.

Summary by CodeRabbit

  • New Features

    • Added "Todo app with Next.js" as a new template option.
  • Chores

    • Bumped version to 0.1.45.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 12, 2026

Walkthrough

Version bump from 0.1.44 to 0.1.45 with addition of a new todo template option across create and link commands, including help text updates and validation logic modifications.

Changes

Cohort / File(s) Summary
Version Bump
package.json
Updated @insforge/cli version from 0.1.44 to 0.1.45.
Template Addition
src/commands/create.ts, src/commands/projects/link.ts
Added todo template support across both commands with updated help text, validation logic to include todo, and routing to downloadGitHubTemplate for this new template option.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • jwfing
  • tonychang04

Poem

🐰 A todo template hops into view,
Version climbs upward, point-four-five's new!
Commands now guide with the freshest delight,
Templates expanding—validation done right! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title references PostHog A/B testing and onboarding, but the actual changes only add a 'todo' template to CLI commands and bump the version number. Update the title to reflect the actual changes, such as 'Add todo template support to create and link commands' or 'INS-51: Add todo template option to CLI commands'.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-todo

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/commands/create.ts (1)

159-160: Consider centralizing template constants to prevent future drift.

todo had to be added in multiple places; a shared constant map would reduce maintenance risk.

♻️ Suggested consolidation approach
+const GITHUB_TEMPLATES = ['react', 'nextjs', 'chatbot', 'crm', 'e-commerce', 'todo'] as const;
+const VALID_TEMPLATES = [...GITHUB_TEMPLATES, 'empty'] as const;
+type TemplateName = (typeof VALID_TEMPLATES)[number];
+
-const validTemplates = ['react', 'nextjs', 'chatbot', 'crm', 'e-commerce', 'todo', 'empty'];
+const validTemplates = [...VALID_TEMPLATES];

-const githubTemplates = ['chatbot', 'crm', 'e-commerce', 'nextjs', 'react', 'todo'];
+const githubTemplates = [...GITHUB_TEMPLATES];

Also applies to: 222-223, 335-336

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commands/create.ts` around lines 159 - 160, Multiple template names
(e.g., 'todo') are duplicated across the create command; extract a single source
of truth like a TEMPLATE_OPTIONS or TEMPLATE_MAP constant and use it everywhere
instead of hardcoded strings. Update the .option('--template <template>', ...)
usage and any validation/lookup logic (references in the create command
functions such as the template parsing/validation code and any template-driven
scaffolding functions) to import and reference that constant, and replace all
hardcoded template lists with references to TEMPLATE_OPTIONS/TEMPLATE_MAP so
adding/removing templates is done in one place.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/commands/create.ts`:
- Around line 159-160: Multiple template names (e.g., 'todo') are duplicated
across the create command; extract a single source of truth like a
TEMPLATE_OPTIONS or TEMPLATE_MAP constant and use it everywhere instead of
hardcoded strings. Update the .option('--template <template>', ...) usage and
any validation/lookup logic (references in the create command functions such as
the template parsing/validation code and any template-driven scaffolding
functions) to import and reference that constant, and replace all hardcoded
template lists with references to TEMPLATE_OPTIONS/TEMPLATE_MAP so
adding/removing templates is done in one place.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 00be01ea-6758-4f9a-938b-731937fa0e0c

📥 Commits

Reviewing files that changed from the base of the PR and between 704bf57 and d319579.

📒 Files selected for processing (3)
  • package.json
  • src/commands/create.ts
  • src/commands/projects/link.ts

@CarmenDou CarmenDou merged commit ccc5fe8 into main Apr 12, 2026
3 checks passed
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.

2 participants