Skip to content

fix(create): prefill project name from directory#45

Merged
tonychang04 merged 1 commit intomainfrom
fix/prefill-project-name
Apr 1, 2026
Merged

fix(create): prefill project name from directory#45
tonychang04 merged 1 commit intomainfrom
fix/prefill-project-name

Conversation

@tonychang04
Copy link
Copy Markdown
Contributor

@tonychang04 tonychang04 commented Mar 31, 2026

Summary

  • Use initialValue instead of defaultValue + placeholder for the project name prompt so the directory name is pre-filled in the input field, ready to edit or accept immediately (no Tab required).

Test plan

  • Run insforge create inside a named directory and confirm the project name input is pre-filled (not greyed out)
  • Confirm backspace/editing the pre-filled value works
  • Confirm pressing Enter accepts the pre-filled value

🤖 Generated with Claude Code

Note

Prefill project name prompt with directory name in create command

Changes the project name prompt in create.ts to use initialValue instead of defaultValue and placeholder. The directory name now appears as a pre-filled editable value rather than greyed-out placeholder text.

Macroscope summarized 6d2a5b0.

Summary by CodeRabbit

  • Bug Fixes
    • Refined the project creation prompt's handling of default project names to provide a more streamlined user experience.

Use initialValue instead of defaultValue+placeholder so the directory
name appears directly in the text input, ready to edit or accept.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

Walkthrough

The PR modifies how default values are passed to the interactive project-name prompt in the create command, replacing the dual defaultValue and placeholder approach with a single initialValue when a computed default name exists.

Changes

Cohort / File(s) Summary
Interactive Prompt Configuration
src/commands/create.ts
Changed project-name prompt defaulting from providing both defaultValue and placeholder to using only initialValue when a computed default name exists.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • jwfing
  • CarmenDou
  • Fermionic-Lyu

Poem

🐰 A prompt asks for a name with care,
Once two defaults floated there,
Now just one initial will do,
Simpler paths make code more true! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(create): prefill project name from directory' clearly and concisely summarizes the main change: modifying the project name prompt to pre-fill from the current directory.
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 fix/prefill-project-name

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

@tonychang04 tonychang04 enabled auto-merge (squash) April 1, 2026 00:18
@tonychang04 tonychang04 merged commit 068c0ac into main Apr 1, 2026
3 checks passed
@tonychang04 tonychang04 mentioned this pull request Apr 1, 2026
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