Skip to content

feat(charm): adds 'huh' dynamic forms to create command#362

Open
srtaalej wants to merge 2 commits intomainfrom
charm-dynamic-forms
Open

feat(charm): adds 'huh' dynamic forms to create command#362
srtaalej wants to merge 2 commits intomainfrom
charm-dynamic-forms

Conversation

@srtaalej
Copy link
Contributor

@srtaalej srtaalej commented Mar 3, 2026

Changelog

When the charm experiment is enabled, slack create now presents a single interactive form for selecting both the app category and language template, with options that update dynamically as you navigate. 🦋

Summary

This PR replaces the survey-based two-step category/template prompt with a single-screen 'huh' form when the charm experiment is enabled. Category and language selects render together; changing the category dynamically updates the template options via OptionsFunc.

Screen.Recording.2026-03-03.at.1.18.47.PM.mov

Testing

  • make build — 0 issues
  • make test — all tests pass
  • ./bin/slack create --experiment=charm — form renders with category and template on one screen; changing category updates template options; "View more samples" shows browse option

Requirements

@srtaalej srtaalej added this to the Next Release milestone Mar 3, 2026
@srtaalej srtaalej self-assigned this Mar 3, 2026
@srtaalej srtaalej requested a review from a team as a code owner March 3, 2026 18:22
@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 3, 2026
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.05%. Comparing base (c449532) to head (bbba8d6).

Files with missing lines Patch % Lines
cmd/project/create_template_charm.go 52.27% 21 Missing ⚠️
cmd/project/create_template.go 37.50% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #362      +/-   ##
==========================================
- Coverage   65.06%   65.05%   -0.02%     
==========================================
  Files         215      216       +1     
  Lines       18179    18231      +52     
==========================================
+ Hits        11829    11860      +31     
- Misses       5254     5273      +19     
- Partials     1096     1098       +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.

Copy link
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.

🎉 Love the video and this is looking good!

🧪 I'll manually test this shortly, but wanted to share some quick feedback. I noticed that the patch test coverage is 50%. It would be nice to get that around 70% to keep our code coverage increasing slightly. I've left one comment that might allow us to boost the test coverage.

Comment on lines +34 to +35
// charmPromptTemplateSelectionFunc is a package-level function variable for test overriding.
var charmPromptTemplateSelectionFunc = charmPromptTemplateSelection
Copy link
Member

Choose a reason for hiding this comment

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

question: Do we need this testing override? We are trying to remove this pattern and a glance at charmPromptTemplateSelection looks like we can test this function safely since clients and clients.IO have mocks available. 🤞🏻

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.

2 participants