Skip to content

fix: always show the blocks command in help - #653

Merged
mwbrooks merged 1 commit into
mainfrom
mwbrooks-show-blocks-command
Aug 28, 2026
Merged

fix: always show the blocks command in help#653
mwbrooks merged 1 commit into
mainfrom
mwbrooks-show-blocks-command

Conversation

@mwbrooks

@mwbrooks mwbrooks commented Aug 28, 2026

Copy link
Copy Markdown
Member

Changelog

The blocks command is now listed in slack help for everyone, instead of only appearing when the CLI detects it is being run by an AI coding agent.

Summary

This pull request removes the AI-agent visibility gate from the blocks command so it behaves like every other command.

Agent detection is unchanged everywhere.

Preview

Root help with all agent environment variables stripped, which previously omitted blocks entirely:

    token       Collect a service token
  blocks
    preview     Preview blocks in Block Kit Builder
  collaborator
    add         Add a new collaborator to the app

Testing

# Confirm blocks command is visible
$ slack --help

Requirements

The blocks command was hidden from help unless the CLI detected it was
being run by an AI coding agent. Nothing about the command is
agent-specific: its descriptions are audience-neutral and its reference
docs already advertise it as a normal public command. Cobra's Hidden
only suppresses help listing and never blocks dispatch, so the gate hid
the command from humans who could already run it.

It also made generated docs depend on the environment. docgen skips
commands failing IsAvailableCommand(), which is false for hidden
commands, so `make rc` from a plain terminal would have deleted
slack_blocks.md and slack_blocks_preview.md and dropped blocks from
slack.md.

Agent detection is still used for the User-Agent header, telemetry, and
tracing; only the visibility gate is removed.
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.60%. Comparing base (69846ee) to head (351cf75).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #653      +/-   ##
==========================================
+ Coverage   72.58%   72.60%   +0.01%     
==========================================
  Files         239      239              
  Lines       20229    20228       -1     
==========================================
+ Hits        14684    14686       +2     
+ Misses       4274     4272       -2     
+ Partials     1271     1270       -1     

☔ View full report in Codecov by Harness.
📢 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.

@mwbrooks mwbrooks self-assigned this Aug 28, 2026
@mwbrooks mwbrooks added bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch Use on pull requests to describe the release version increment labels Aug 28, 2026
@mwbrooks mwbrooks added this to the Next Release milestone Aug 28, 2026
@mwbrooks
mwbrooks marked this pull request as ready for review August 28, 2026 22:16
@mwbrooks
mwbrooks requested a review from a team as a code owner August 28, 2026 22:16

@zimeg zimeg left a comment

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.

@mwbrooks Super sharp eye! Thanks for catching this for next release 👁️‍🗨️

@mwbrooks

Copy link
Copy Markdown
Member Author

Thanks @zimeg! Appreciate that you noticed this before we cut the next release! 🙇🏻

@mwbrooks
mwbrooks merged commit b589377 into main Aug 28, 2026
13 checks passed
@mwbrooks
mwbrooks deleted the mwbrooks-show-blocks-command branch August 28, 2026 22:18
@mwbrooks mwbrooks mentioned this pull request Aug 28, 2026
7 tasks
@zimeg zimeg added the changelog Use on updates to be included in the release notes label Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented changelog Use on updates to be included in the release notes 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