botkube icon indicating copy to clipboard operation
botkube copied to clipboard

Show interactive help command to the user

Open mszostok opened this issue 3 years ago • 3 comments

Overview

Currently, when an invalid command is executed or when only @BotKube is typed, you get:

Screen Shot 2022-08-09 at 12 44 52

In the response, you get at least info that /botkubehelp will tell you more about possible commands.

Cons about such approach:

  • you need to type one more thing
  • you get the response in a plain text. The best what you can do, is to copy-paste that command. Screen Shot 2022-08-09 at 12 46 49

Desing

Slack design: https://www.figma.com/proto/iGGgUG9vn6C9WvDAFwKS9G/Botkube-Help---Slack?page-id=209%3A1337&node-id=269%3A1038&viewport=282%2C271%2C0.38&scaling=min-zoom&starting-point-node-id=269%3A1038

Outdated design

Acceptance criteria

  • Help is shown when BotKube is installed and links to a Slack channel (first connection)
    • save state to not show it per app restart
    • public message shown for everyone only once, right after installation for configured channels (initial config)
    • if the bot is invited to other channel, the message won't be printed
  • A user runs @BotKube help
  • The help dialog shows the dialog as per the design
  • The buttons run the appropriate commands

Out of scope

  • A new user joins a BotKube channel (shown only to that user)
    • Reason: BotKube can be configured for multiple channels
  • Notification presets configuration

Notes

  • Unknown: whether we can write E2E tests that check if the interactive buttons work
    • if Slack Go client doesn't have such method, skip that part - test the @BotKube test command only
  • All messages are visible for everyone
  • Assume #631 is resolved (merged into main)
  • Initial focus on Slack
  • Follow-up in future releases
  • Ensure telemetry is in place
  • it's ok that if you have multiple cluster on the same channel, then all return helper message

mszostok avatar Aug 10 '22 07:08 mszostok

Related:

  • https://github.com/kubeshop/botkube/issues/681

mszostok avatar Aug 10 '22 08:08 mszostok

To discuss

UX

  • When this help button should be printed?
    • For each invalid command
    • Directly via @BotKube help
    • Attached to the initial message ...and now my watch begins for cluster 'local'!

Implementation specific

  • Can we test that e2e? It's it possible to “programmatically” click the button?
  • Do we need to change the Bot scopes?
  • Does it work both with RTM and socket mode? Yes, see notes to learn more.

Notes

To enable interactivity, we would need to have:

  • socket mode
  • or dedicated Request URL - the URL we'll send the request payload to when interactive components or shortcuts are used. This request URL needs to be an HTTPS URL (note: self-signed certificates are not allowed.

mszostok avatar Aug 31 '22 09:08 mszostok

PRs:

  • https://github.com/kubeshop/botkube/pull/725
  • https://github.com/kubeshop/botkube/pull/727
  • https://github.com/kubeshop/botkube/pull/738
  • https://github.com/kubeshop/botkube-docs/pull/142
  • https://github.com/kubeshop/botkube/pull/761 - Update the message for kubectl commands based on Paweł's and Lacho's feedback

mszostok avatar Sep 19 '22 12:09 mszostok