Skip to content

refactor: remove survey package and permanently enable huh prompts#425

Draft
srtaalej wants to merge 6 commits intomainfrom
ale-remove-survey
Draft

refactor: remove survey package and permanently enable huh prompts#425
srtaalej wants to merge 6 commits intomainfrom
ale-remove-survey

Conversation

@srtaalej
Copy link
Contributor

Changelog

The internal/iostreams/survey.go file has been deleted, removing all survey-based prompt implementations, custom templates, color helpers, and the SurveyOptions configuration function. The five prompt methods in prompts.go (ConfirmPrompt, InputPrompt, MultiSelectPrompt, PasswordPrompt, SelectPrompt) no longer check experiment.Huh and instead call their huh form counterparts directly.

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

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 74.50980% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.31%. Comparing base (1065713) to head (d1e7e59).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
internal/iostreams/prompts.go 0.00% 12 Missing ⚠️
cmd/project/create_samples.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #425      +/-   ##
==========================================
+ Coverage   69.72%   70.31%   +0.58%     
==========================================
  Files         220      219       -1     
  Lines       18446    18335     -111     
==========================================
+ Hits        12862    12892      +30     
+ Misses       4410     4275     -135     
+ Partials     1174     1168       -6     

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

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

Labels

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.

1 participant