Skip to content

feat: support the user_connections manifest feature - #688

Merged
WilliamBergamin merged 6 commits into
mainfrom
manifest-user-connections
Oct 15, 2026
Merged

WilliamBergamin merged 6 commits into
mainfrom
manifest-user-connections

Conversation

@WilliamBergamin

@WilliamBergamin WilliamBergamin commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Changelog

The features.user_connections app manifest property (is_enabled, auth_hosts) is now supported, so it is kept by run, deploy, and manifest sync.

Summary

The CLI decodes manifest.json (or the get-manifest hook output) into typed manifest structs, so any property it does not model is silently dropped before the manifest is sent to Slack. This adds features.user_connections to AppFeatures so apps that opt into the standardized user connection flow keep that setting.

is_enabled is a pointer, like code_channels.enabled, so an explicit false is kept and a missing value is left for Slack to reject.

Preview

slack manifest info --source local with features.user_connections in manifest.json:

Before (main): the property is stripped

"features": {
  "app_home": {},
  "bot_user": { "display_name": "connector" }
}

After (this branch): the property round-trips

"features": {
  "app_home": {},
  "bot_user": { "display_name": "connector" },
  "user_connections": {
    "is_enabled": true,
    "auth_hosts": ["example.com", "auth.example.com"]
  }
}

Testing

  • New cases in Test_AppManifest_AppFeatures for enabled and explicitly disabled user_connections.
  • New Test_AppManifest_AppFeatures_UserConnections decodes manifest JSON, asserts the typed value, and checks it re-marshals unchanged (undefined, enabled, disabled with hosts, omitted fields).
  • make test passes (lint: 0 issues).
  • Manual: built main and this branch, ran slack manifest info --source local on a sample project with the property (output above).

Notes

  • Follow-up: add user_connections to slackapi/manifest-schema so editors stop flagging it.
  • Host format and item limits are validated by Slack's manifest API, like other manifest properties.

Requirements

🤖 Generated with Claude Code

Add features.user_connections (is_enabled, auth_hosts) to the app
manifest types so the field round-trips through run, deploy, and
manifest sync instead of being dropped when the manifest is decoded.

Both fields are required by the manifest schema, so neither is omitted
when empty: a disabled feature keeps its auth hosts.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@codecov

codecov Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.14%. Comparing base (06c2fd4) to head (51916c6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #688      +/-   ##
==========================================
+ Coverage   78.11%   78.14%   +0.02%     
==========================================
  Files         239      239              
  Lines       18135    18135              
==========================================
+ Hits        14167    14171       +4     
+ Misses       3968     3964       -4     

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

@WilliamBergamin WilliamBergamin self-assigned this Oct 8, 2026
@WilliamBergamin WilliamBergamin added enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment labels Oct 8, 2026
@WilliamBergamin WilliamBergamin added this to the Next Release milestone Oct 8, 2026
@slack-cli-releaser slack-cli-releaser Bot modified the milestones: v4.10.0, Next Release Oct 13, 2026
@WilliamBergamin
WilliamBergamin marked this pull request as ready for review October 14, 2026 14:29
@WilliamBergamin
WilliamBergamin requested a review from a team as a code owner October 14, 2026 14:29
A plain bool without omitempty turned a missing is_enabled into false,
so Slack's required-field check never fired and the feature was
silently disabled. IsEnabled is now a pointer, like CodeChannels.Enabled:
an explicit false (with its auth_hosts) still round-trips, while an
omitted field reaches Slack as missing and is rejected.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@mwbrooks mwbrooks 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.

Thanks @WilliamBergamin - this matches the code_channels pattern and looks good.

❓ Question: I checked the shape against the manifest schema in the Slack API: is_enabled and auth_hosts both look to be required whenever user_connections is declared. Are you certain that it's safe to is_enabled a pointer and leave validation to Slack?

Search *Search `json:"search,omitempty" yaml:"search,flow,omitempty"`
RichPreviews *RichPreviews `json:"rich_previews,omitempty" yaml:"rich_previews,flow,omitempty"`
CodeChannels *CodeChannels `json:"code_channels,omitempty" yaml:"code_channels,flow,omitempty"`
UserConnections *UserConnections `json:"user_connections,omitempty" yaml:"user_connections,flow,omitempty"`

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.

praise: 👌🏻 omitempty looking good

// connection flow. IsEnabled is a pointer so an explicit `false` (feature turned
// off) is distinguishable from an unset field, which Slack rejects as missing.
type UserConnections struct {
IsEnabled *bool `json:"is_enabled,omitempty" yaml:"is_enabled,omitempty"`

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.

note: Thanks for calling out that the is_enabled bool is intentionally a pointer because it's an optional param that can fallback on the Slack API default value.

@WilliamBergamin

Copy link
Copy Markdown
Contributor Author

@mwbrooks Good question, I checked the schema too: both are required, with no default. That's why is_enabled is a pointer. A plain bool with omitempty would drop an explicit false, and one without it would quietly send false when the field is missing. With *bool, the CLI passes through exactly what the user wrote, and Slack rejects a missing field with missing_field pointing at /features/user_connections 🤔

@mwbrooks

mwbrooks commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

@mwbrooks Good question, I checked the schema too: both are required, with no default. That's why is_enabled is a pointer. A plain bool with omitempty would drop an explicit false, and one without it would quietly send false when the field is missing. With *bool, the CLI passes through exactly what the user wrote, and Slack rejects a missing field with missing_field pointing at /features/user_connections 🤔

@WilliamBergamin Good point that the manifest validation will enforce it and explain that it's required. I prefer that we keep it as-is with the omitempty so that the JSON is passed through to the API exactly as the user wrote it.

@WilliamBergamin
WilliamBergamin enabled auto-merge (squash) October 15, 2026 19:07
@WilliamBergamin
WilliamBergamin merged commit 7d00c62 into main Oct 15, 2026
13 checks passed
@WilliamBergamin
WilliamBergamin deleted the manifest-user-connections branch October 15, 2026 19:22
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 semver:minor 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