feat: update 'feedback' command to include feedback about the Slack CLI#66
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #66 +/- ##
==========================================
- Coverage 63.12% 63.03% -0.10%
==========================================
Files 210 210
Lines 22159 22186 +27
==========================================
- Hits 13987 13984 -3
- Misses 7086 7114 +28
- Partials 1086 1088 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mwbrooks
left a comment
There was a problem hiding this comment.
🤟🏻 Some notes to guide the reviewer through my thoughts! 💭
| // SkipQueryParams is a flag to skip adding query params to the survey URL (optional, default false) | ||
| SkipQueryParams bool |
There was a problem hiding this comment.
note: Added a new, optional param to skip the query string params. This produces a clean URL for the GitHub Issues, which don't use our query string data.
| Always Frequency = iota // We always want to ask | ||
| Once // Ask user to complete the survey only once | ||
| Monthly // Ask user to complete the survey once a month | ||
| Never // Do not ask the user to complete the survey |
There was a problem hiding this comment.
note: Added a new frequency option to Never ask the user to complete a survey.
| SlackCLIFeedback = "slack-cli-feedback" | ||
| SlackPlatformFeedback = "platform-improvements" |
There was a problem hiding this comment.
note: We can't rename the platform-improvements ID without some migration logic, but how does the slack-cli-feedback ID look? We'll follow this pattern for the Bolt Frameworks, so let's make sure we're happy with it. 🕹️
There was a problem hiding this comment.
QQ: For my own understanding, would Bolt feedback follow this pattern as:
bolt-feedback
Or were you thinking that this might be runtime specific?
There was a problem hiding this comment.
Edit: At a glance I think the current slack-cli-feedback is solid too!
Before settling on it I am also wondering if this might be extended more, but I like that we can have different types of issues after the "CLI" option is selected, on GitHub Issues.
There was a problem hiding this comment.
Good question! My thought is that we'd like to add a link for each framework that the CLI supports, so that developers can learn where to ask question. So:
- Bolt for JavaScript (
bolt-js-feedback) - Bolt for Python (
bolt-python-feedback) - Deno SDK (
deno-slack-sdk-feedback) - Slack CLI (
slack-cli-feedback)
There was a problem hiding this comment.
For the ID, we could also go with (-github), which would be more accurate:
- Slack CLI (
slack-cli-github)
Or, we could drop the post-fix entirely and follow the GitHub repo names:
- Bolt for JavaScript (
bolt-js) - Bolt for Python (
bolt-python) - Deno SDK (
deno-slack-sdk) - Slack CLI (
slack-cli)
There was a problem hiding this comment.
| SlackCLIFeedback = "slack-cli-feedback" | |
| SlackPlatformFeedback = "platform-improvements" | |
| SlackCLIFeedback = "slack-cli" | |
| SlackPlatformFeedback = "platform-improvements" |
🪓 Removing the "-feedback" suffix to leave the specifics to a GitHub issue! This also makes flag options more intuitive IMO:
- $ slack feedback --name slack-cli-feedback
+ $ slack feedback --name slack-cliThere was a problem hiding this comment.
| // SlackCLIFeedback asks for Slack CLI feedback using GitHub Issues | ||
| SlackCLIFeedback: { |
There was a problem hiding this comment.
🔍 I am so biased to compressed outputs with sections so was expecting something perhaps more as:
$ slack feedback
💌 Feedback
Thanks for taking a moment to share your thoughts!
? What type of feedback would you like to give?
> Slack CLI
Questions, issues, and feature requests about the Slack CLI
Slack Platform
Developer support for the Slack Platform, Slack API, Block Kit, and more
But perhaps with secondary text for the descriptions? This is more opinion than suggestion, but I'm also curious what you think! I do like the wording here 📚 ✨
There was a problem hiding this comment.
I share you feeling that I'd like to see the prompts condensed. Unfortunately, I don't think we jump into doing it. 😢
The reason is that this prompt is rendered by clients.IO.SelectPrompt and it adds the extra space when a description is provided. The same look & feel exists for slack samples. So, I think we would want to apply this change everywhere, consistently.
I think it's better to wait for the BubbleTea refactor. Thoughts?
There was a problem hiding this comment.
Ahha! I didn't think to check this in implementation, but I agree BubbleTea will be a super great improvement for prompts 🫧 ✨
| style.Secondary(style.Highlight("https://github.com/slackapi/slack-cli/issues")), | ||
| )) | ||
| }, | ||
| Trace: slacktrace.FeedbackMessage, |
There was a problem hiding this comment.
note: In the future, we could make the trace optional or removed entirely. I think it's better to have 1 trace for all feedback options (slacktrace.FeedbackMessage) then include the selected feedback name as trace data.
There was a problem hiding this comment.
Heh I missed this in a quick review earlier! But I so agree! Thanks for opening #68 🙏 ✨
| Ask: func(ctx context.Context, clients *shared.ClientFactory) (bool, error) { | ||
| clients.IO.PrintInfo(ctx, false, style.Sectionf(style.TextSection{ | ||
| Emoji: "love_letter", | ||
| Text: "We would love to know how things are going", | ||
| Secondary: []string{ | ||
| "Share your experience with " + style.Commandf("feedback --name slack-cli-feedback", false), | ||
| }, | ||
| })) | ||
| return false, nil | ||
| }, |
There was a problem hiding this comment.
note: Since we Never randomly ask about this survey, this function is never actually executed. But it's a required field.
There was a problem hiding this comment.
🤔 No blocker for this PR, but it might be interesting to replace the Ask parameter with a "string" for style.TextSection inputs instead.
IMO it's somewhat confusing to keep this prompt with the "Never" option otherwise 🔍
There was a problem hiding this comment.
This is a great suggestion. I agree, the Ask with Never is unnecessary. The style.TextSection also simplifies the implementation while keeping the prompt more consistent.
I've made a note and we can follow-up in a future PR!
Honestly, I don't see us using the Ask in the originally intended way. If we don't leverage it in the future, we could also replace it with a single "ask" for feedback.
| // SlackPlatformFeedback asks for general developer experience feedback | ||
| SlackPlatformFeedback: { | ||
| Name: SlackPlatformFeedback, | ||
| PromptDisplayText: "Slack Platform", | ||
| PromptDescription: "Developer support for the Slack Platform, Slack API, Block Kit, and more", |
There was a problem hiding this comment.
note: Renamed this to be focused on Slack Platform features - API, Block Kit, etc. Is the distinction clear enough?
| "%s\n%s\n", | ||
| style.Secondary("You can send us a message at "+style.Highlight(email)), | ||
| style.Secondary("Or, survey your experiences at "+style.Highlight("https://docs.slack.dev/developer-support")), | ||
| style.Secondary("Or, share your experiences at "+style.Highlight("https://docs.slack.dev/developer-support")), |
There was a problem hiding this comment.
note: Throughout, I remove the "survey" reference for terms around sharing feedback, since we don't actually link to any surveys now.
zimeg
left a comment
There was a problem hiding this comment.
💌 Super quick notes before I wanted to drop before popping offline for a few minutes but this is super great!
| SlackCLIFeedback = "slack-cli-feedback" | ||
| SlackPlatformFeedback = "platform-improvements" |
There was a problem hiding this comment.
QQ: For my own understanding, would Bolt feedback follow this pattern as:
bolt-feedback
Or were you thinking that this might be runtime specific?
| surveyNames, surveyPromptOptions := initSurveyOpts(ctx, clients, SurveyStore) | ||
|
|
||
| if _, ok := SurveyStore[surveyNameFlag]; !ok && surveyNameFlag != "" { | ||
| return slackerror.New("invalid_survey_name"). |
There was a problem hiding this comment.
| return slackerror.New("invalid_survey_name"). | |
| return slackerror.New(slackerror.ErrInvalidSurveyName). |
I'm not sure if this is a coded error at the moment, but this can help match formats for quick lookups later:
- 🚫 Please provide a feedback name or remove the --no-prompt flag
+ 🚫 Please provide a feedback name or remove the --no-prompt flag (invalid_survey_name)There was a problem hiding this comment.
Great suggestion! I'd like to keep this PR focused on adding the Slack CLI feedback option, but I agree that we should improve the feedback's implementation a bit!
I've pull this suggestion into PR #68, which adds slackerror.ErrFeedbackNameInvalid and slackerror.ErrFeedbackNameRequired!
| if surveyNameFlag == "" && noPromptFlag { | ||
| return slackerror.New("survey_name_required"). | ||
| WithMessage("Please provide a survey name or remove the --no-prompt flag"). | ||
| WithRemediation("View survey options with %s", style.Commandf("feedback --help", false)) | ||
| WithMessage("Please provide a feedback name or remove the --no-prompt flag"). | ||
| WithRemediation("View feedback options with %s", style.Commandf("feedback --help", false)) | ||
| } |
There was a problem hiding this comment.
🤔 This was a confusing message for me and I tried to remediate it with:
$ slack feedback --no-prompt slack-cli-feedbackI realize now the --help command demonstrates the --name flag, but I was more stumped than I'd like to admit 😉
| s.Info(ctx, clients) | ||
| } | ||
| clients.IO.PrintTrace(ctx, s.Trace) | ||
| clients.IO.PrintTrace(ctx, s.Trace, s.Name) |
There was a problem hiding this comment.
| clients.IO.PrintTrace(ctx, s.Trace, s.Name) | |
| clients.IO.PrintTrace(ctx, slacktrace.FeedbackMessage, s.Name) |
🪓 Since the same trace argument is used it might be more clear to hardcode that here? No blocker at all though!
There was a problem hiding this comment.
I'm all for axing it! 🪓
I've pulled this work out to PR #68, which:
- Removes the
Tracefield from theSurveystruct - Always uses
slacktrace.FeedbackMessage - Adds tests to check that the trace is printed
| // SlackCLIFeedback asks for Slack CLI feedback using GitHub Issues | ||
| SlackCLIFeedback: { |
There was a problem hiding this comment.
🔍 I am so biased to compressed outputs with sections so was expecting something perhaps more as:
$ slack feedback
💌 Feedback
Thanks for taking a moment to share your thoughts!
? What type of feedback would you like to give?
> Slack CLI
Questions, issues, and feature requests about the Slack CLI
Slack Platform
Developer support for the Slack Platform, Slack API, Block Kit, and more
But perhaps with secondary text for the descriptions? This is more opinion than suggestion, but I'm also curious what you think! I do like the wording here 📚 ✨
| SlackCLIFeedback = "slack-cli-feedback" | ||
| SlackPlatformFeedback = "platform-improvements" |
There was a problem hiding this comment.
Edit: At a glance I think the current slack-cli-feedback is solid too!
Before settling on it I am also wondering if this might be extended more, but I like that we can have different types of issues after the "CLI" option is selected, on GitHub Issues.
|
@zimeg Thanks for the quick feedback on Friday! 🙇🏻 💌 I'd like to keep this PR focused on adding Slack CLI to the I think I've addressed your feedback - except the condensed prompt, which would be a wider change - so let me know how it looks on your end! |
zimeg
left a comment
There was a problem hiding this comment.
LGTM! Thanks for making a follow up PR with the unrelated changes noted in prior comments 🤖 ✨
I left a few more comments about formatting outputs that might be worth revisiting later, and a few more comments about the feedback name that we can settle on before merging. Once these all look good please feel free to merge 🚢
I'm looking forward to feedback and reports to come 💌 ✨
| SlackCLIFeedback = "slack-cli-feedback" | ||
| SlackPlatformFeedback = "platform-improvements" |
There was a problem hiding this comment.
| SlackCLIFeedback = "slack-cli-feedback" | |
| SlackPlatformFeedback = "platform-improvements" | |
| SlackCLIFeedback = "slack-cli" | |
| SlackPlatformFeedback = "platform-improvements" |
🪓 Removing the "-feedback" suffix to leave the specifics to a GitHub issue! This also makes flag options more intuitive IMO:
- $ slack feedback --name slack-cli-feedback
+ $ slack feedback --name slack-cli| Ask: func(ctx context.Context, clients *shared.ClientFactory) (bool, error) { | ||
| clients.IO.PrintInfo(ctx, false, style.Sectionf(style.TextSection{ | ||
| Emoji: "love_letter", | ||
| Text: "We would love to know how things are going", | ||
| Secondary: []string{ | ||
| "Share your experience with " + style.Commandf("feedback --name slack-cli-feedback", false), | ||
| }, | ||
| })) | ||
| return false, nil | ||
| }, |
There was a problem hiding this comment.
🤔 No blocker for this PR, but it might be interesting to replace the Ask parameter with a "string" for style.TextSection inputs instead.
IMO it's somewhat confusing to keep this prompt with the "Never" option otherwise 🔍
| clients.Browser().OpenURL(url) | ||
| } else { // Print survey URL | ||
| clients.IO.PrintInfo(ctx, false, fmt.Sprint("Survey URL: \n", style.Secondary(u))) | ||
| clients.IO.PrintInfo(ctx, false, fmt.Sprint("Feedback URL: \n", style.Secondary(url))) |
There was a problem hiding this comment.
📝 No blocker but this might be another section to revisit formatting for:
💌 Feedback
Share thoughts or ideas or findings at the following URL:
https://github.com/slackapi/slack-cli/issues
There was a problem hiding this comment.
This looks so much better than the raw "Feedback URL:" that exists right now. I'll add a note and iterate on this in future PR!
| Emoji: "love_letter", | ||
| Text: "We would love to know how things are going", | ||
| Secondary: []string{ | ||
| "Share your experience with " + style.Commandf("feedback --name slack-cli-feedback", false), |
There was a problem hiding this comment.
| "Share your experience with " + style.Commandf("feedback --name slack-cli-feedback", false), | |
| "Share your experience with " + style.Commandf("feedback --name slack-cli", false), |
| Example: style.ExampleCommandsf([]style.ExampleCommand{ | ||
| {Command: "feedback", Meaning: "Open a feedback survey in your browser"}, | ||
| {Command: "feedback", Meaning: "Choose to give feedback on part of the Slack Platform"}, | ||
| {Command: "feedback --name slack-cli-feedback", Meaning: "Give feedback on the Slack CLI"}, |
There was a problem hiding this comment.
| {Command: "feedback --name slack-cli-feedback", Meaning: "Give feedback on the Slack CLI"}, | |
| {Command: "feedback --name slack-cli", Meaning: "Give feedback on the Slack CLI"}, |
AFAICT the suggested changes in comments above catch all changes from "slack-cli-feedback" to "slack-cli" if this is a change we're wanting to make!

CHANGELOG
Summary
This pull request updates the
feedbackcommand to display a prompt with 2 choices:While expanding
feedbackto display multiple options, there are a lot of improvements that we can make. However, I've tried to scope this PR to only adding the 2nd option and tweaking things to look & feel alright.The main changes are:
NeverfrequencySkipQueryParamsfield (optional)system_id,project_id, and other query string params are not included in the https://github.com/slackapi/slack-cli/issues URLfalse, so the Slack Platform Feedback URL continues to have the query string paramsslacktrace.FeedbackMessageto include the feedback option chosenSLACK_TRACE_FEEDBACK_MESSAGE=slack-cli-feedbackPreview
2025-04-25-feedback.mov
Reviewers
Requirements