Skip to content

feat: add placeholder to app name prompt in create command#370

Open
mwbrooks wants to merge 2 commits intomainfrom
mwbrooks-create-name-prompt-placeholder
Open

feat: add placeholder to app name prompt in create command#370
mwbrooks wants to merge 2 commits intomainfrom
mwbrooks-create-name-prompt-placeholder

Conversation

@mwbrooks
Copy link
Member

@mwbrooks mwbrooks commented Mar 7, 2026

Changelog

Updated the create command's app name prompt to show the randomly generated app name as placeholder text. You can press Enter to accept the default name or type a new name.

Summary

This pull request updated the create command's app name prompt to show the randomly generated app name as placeholder text.

  • Introduces a placeholder text for Survey and Charm
  • Removes printing a separate hint line
  • Users can press enter to accept the placeholder (randomly generated name) or type a new name

Screenshots

Survey:

image

Charm:

image

Preview

Survey:

2026-03-06-create-placeholder-survey.mov

Charm:

2026-03-06-create-placeholder-charm.mov

Requirements

Show the randomly generated app name as placeholder text in the input
field instead of printing a separate hint line. This provides a cleaner
UX where users see the default name inline and can press Enter to accept.
@mwbrooks mwbrooks added this to the Next Release milestone Mar 7, 2026
@mwbrooks mwbrooks self-assigned this Mar 7, 2026
@mwbrooks mwbrooks added enhancement M-T: A feature request for new functionality changelog Use on updates to be included in the release notes semver:minor Use on pull requests to describe the release version increment labels Mar 7, 2026
@mwbrooks mwbrooks marked this pull request as ready for review March 7, 2026 01:05
@mwbrooks mwbrooks requested a review from a team as a code owner March 7, 2026 01:05
@codecov
Copy link

codecov bot commented Mar 7, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 65.09%. Comparing base (c449532) to head (c362c5a).

Files with missing lines Patch % Lines
internal/iostreams/survey.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #370      +/-   ##
==========================================
+ Coverage   65.06%   65.09%   +0.02%     
==========================================
  Files         215      215              
  Lines       18179    18182       +3     
==========================================
+ Hits        11829    11836       +7     
  Misses       5254     5254              
+ Partials     1096     1092       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member Author

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

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

Comments for the kinda reviewers!

Comment on lines 181 to +183
type InputPromptConfig struct {
Required bool // Whether the input must be non-empty
Required bool // Whether the input must be non-empty
Placeholder string // Placeholder text shown when input is empty
Copy link
Member Author

Choose a reason for hiding this comment

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

note: Using Survey's built-in placeholder option

func buildInputForm(message string, cfg InputPromptConfig, input *string) *huh.Form {
field := huh.NewInput().
Title(message).
Placeholder(cfg.Placeholder).
Copy link
Member Author

Choose a reason for hiding this comment

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

note: Using Charm's built-in placeholder option. I chose the Placeholder name to align with huh rather than survey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Use on updates to be included in the release notes enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant