Skip to content

feat: replace existing survey prompts with beautiful charm forms#425

Merged
srtaalej merged 18 commits intomainfrom
ale-remove-survey
Apr 1, 2026
Merged

feat: replace existing survey prompts with beautiful charm forms#425
srtaalej merged 18 commits intomainfrom
ale-remove-survey

Conversation

@srtaalej
Copy link
Copy Markdown
Contributor

@srtaalej srtaalej commented Mar 20, 2026

Changelog

The interactive prompts asking for input had a huge overhaul and now these selections and other inputs are collected in beautiful forms built with the huh package.

Huge thanks to the @charmbracelet team for help and kind encouragement in these improvements! 🍀 ✨

Summary

This PR completes the migration from the survey library to Charm's huh package for interactive prompts.
The experiment.Huh flag and all survey-based prompt code have been removed, making huh the permanent and only prompt implementation.
The ThemeSurvey() theme (introduced in the parent PR) ensures visual continuity by matching the legacy survey styling when the Lipgloss experiment is off.

Test Steps

make test testdir=internal/iostreams   # and verify all prompt form tests pass including the ThemeSurvey and ThemeSlack theme assertions
make test testdir=internal/style   # and confirm TestThemeSlack, TestThemeSurvey, and TestChevron pass without the removed TestSurveyIcons
make test testdir=internal/experiment    # and confirm the Test_Includes assertion no longer expects "huh" to be a registered experiment
make test testdir=cmd/project    # to verify the sample selection flow works without experiment gating
make lint     # to confirm zero issues
slack create    # interactively and verify prompts render with the expected cursor, selection indicators, and color scheme
slack env add MY_VAR    # without a --value flag and verify the mimicked input line still appears before the password prompt

Requirements

@srtaalej srtaalej self-assigned this Mar 20, 2026
@srtaalej srtaalej added enhancement M-T: A feature request for new functionality experiment Experimental feature accessed behind the --experiment flag or toggle semver:patch Use on pull requests to describe the release version increment labels Mar 20, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 14.28571% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.91%. Comparing base (8241c8d) to head (ab8b617).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/iostreams/prompts.go 0.00% 5 Missing ⚠️
cmd/project/create_samples.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #425      +/-   ##
==========================================
+ Coverage   70.43%   70.91%   +0.48%     
==========================================
  Files         221      220       -1     
  Lines       18607    18450     -157     
==========================================
- Hits        13106    13084      -22     
+ Misses       4322     4185     -137     
- Partials     1179     1181       +2     

☔ 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.

@srtaalej srtaalej marked this pull request as ready for review March 23, 2026 20:29
@srtaalej srtaalej requested a review from a team as a code owner March 23, 2026 20:29
Copy link
Copy Markdown
Member

@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.

👍🏻 The code changes are looking good!

🧪 I haven't taken this for a test run yet.

❓ Should this PR be set to Draft until we're ready to merge it. Before merging, we'll want to test the new prompts thoroughly as a team.

@srtaalej srtaalej marked this pull request as draft March 24, 2026 13:56
Copy link
Copy Markdown
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

🌈 Awesome awesome awesome! Thank you for getting this started @srtaalej!

I'm leaving comments from some adjacent bug hunts with findings and ideas toward this PR. Those checks make this so promising I think! 🍀

cfg.Description("", 0)
}
}).Return(tc.mockSelection, nil)
clients := shared.NewClientFactory(clientsMock.MockClientFactory())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👁️‍🗨️ question: Can this be checked within iostreams.MatchPromptConfig or does this assert something about the orderings?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is going by order!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@srtaalej Forgive my confusion, but can you explain what L134 is doing? I haven't seen this mock pattern before...

Copy link
Copy Markdown
Contributor Author

@srtaalej srtaalej Apr 1, 2026

Choose a reason for hiding this comment

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

ah i see its calling Description so that codecov doesnt flag it as uncovered. i can remove it!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🪬 praise: Kind thanks to the good survey package-

@srtaalej srtaalej marked this pull request as ready for review March 31, 2026 15:34
@srtaalej srtaalej requested review from mwbrooks and zimeg March 31, 2026 19:53
Copy link
Copy Markdown
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

@srtaalej This is looking fantastic! 🍀 ✨

Before merging let's note that the huh experiment is concluding in docs:

📚 https://docs.slack.dev/tools/slack-cli/reference/experiments

Also I'd like to address the comment I left earlier about testing mocks. Adding this pattern feels odd to me as part of these changes since I understand this to be a clean replacement in otherwise?

@zimeg zimeg changed the title refactor: remove survey package and permanently enable huh prompts feat: replace existing survey prompts with beautiful charm forms Apr 1, 2026
@zimeg zimeg added the changelog Use on updates to be included in the release notes label Apr 1, 2026
@srtaalej srtaalej requested a review from a team as a code owner April 1, 2026 17:27
@zimeg zimeg added this to the Next Release milestone Apr 1, 2026
Copy link
Copy Markdown
Member

@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.

Yay! 🚀

@srtaalej srtaalej merged commit 6958c8a into main Apr 1, 2026
8 checks passed
@srtaalej srtaalej deleted the ale-remove-survey branch April 1, 2026 18:04
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 experiment Experimental feature accessed behind the --experiment flag or toggle semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants