Skip to content

feat: add the user_connections feature to the app manifest types - #2775

Merged
WilliamBergamin merged 5 commits into
mainfrom
manifest-user-connections
Oct 23, 2026
Merged

WilliamBergamin merged 5 commits into
mainfrom
manifest-user-connections

Conversation

@WilliamBergamin

@WilliamBergamin WilliamBergamin commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This pull request adds the features.user_connections app manifest property (is_enabled, auth_hosts) to the manifest types, matching slackapi/slack-cli#688, so apps that opt into the standardized user connection flow can pass it to apps.manifest.create, update and validate without a type error.

It also adds the user_connection and user_connection_status_requested events to the manifest event types. Slack requires an app with user_connections enabled to subscribe to both, so without them a valid manifest didn't type-check.

Both user_connections fields are required, like Slack's manifest API, which rejects a user_connections object missing either one. auth_hosts stays required while is_enabled is false, since Slack keeps the hosts then. Host format and item limits are validated by Slack.

Testing

  • New tsd cases in the apps.manifest.create section of test/types/methods/apps.test-d.ts: missing is_enabled or auth_hosts is an error; enabled (subscribed to both events, with Socket Mode) and disabled with hosts are assignable. (npm run test:types --workspace=packages/web-api; the only failures are the existing files.upload and rtm.start cases, also failing on main.)
  • npm run lint and npm test --workspace=packages/web-api pass.
  • Against a sandbox org with the feature on, with a configuration token and this branch's build:
    1. apps.manifest.create with user_connections enabled, both events subscribed, and Socket Mode on succeeds; apps.manifest.export returns is_enabled: true with the hosts.
    2. apps.manifest.update with is_enabled: false succeeds; the export returns is_enabled: false with the hosts kept.
    3. apps.manifest.validate without user_connection in bot_events fails with user_connections_requires_user_connection_subscription.

Requirements

🤖 Generated with Claude Code

@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.41%. Comparing base (7c310ea) to head (f5463ea).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2775      +/-   ##
==========================================
+ Coverage   89.34%   89.41%   +0.06%     
==========================================
  Files          65       65              
  Lines       10548    10548              
  Branches      480      480              
==========================================
+ Hits         9424     9431       +7     
+ Misses       1091     1085       -6     
+ Partials       33       32       -1     
Flag Coverage Δ
cli-hooks 89.28% <ø> (ø)
cli-test 89.28% <ø> (ø)
logger 89.28% <ø> (ø)
oauth 89.28% <ø> (ø)
socket-mode 89.28% <ø> (ø)
web-api 89.28% <ø> (ø)
webhook 89.28% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Use the house style for manifest descriptions and the public feature name,
standardized app authentication, with a link to its docs page. Drop the
host count limit so the comment can't drift from what Slack validates.

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

changeset-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f5463ea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@slack/web-api Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@WilliamBergamin WilliamBergamin self-assigned this Oct 22, 2026
@WilliamBergamin WilliamBergamin added semver:minor pkg:types applies to `@slack/types` labels Oct 22, 2026
@WilliamBergamin
WilliamBergamin marked this pull request as ready for review October 22, 2026 21:40
@WilliamBergamin
WilliamBergamin requested a review from a team as a code owner October 22, 2026 21:40
@zimeg zimeg added enhancement M-T: A feature request for new functionality pkg:web-api applies to `@slack/web-api` labels Oct 22, 2026
@zimeg zimeg added this to the web-api@next milestone Oct 22, 2026

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

@WilliamBergamin LGTM for latest changes when the time is right or even before! 🚀 :crystal

WilliamBergamin and others added 2 commits October 23, 2026 09:47
…ypes

Slack now requires an app with features.user_connections enabled to
subscribe to user_connection and user_connection_status_requested, but
ManifestEvent listed neither, so a valid manifest failed to type-check.
The doc comments note that requirement and that auth_hosts are kept
while is_enabled is false.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Slack's manifest validation enforces the user_connection and
user_connection_status_requested subscriptions and the interactivity or
Socket Mode requirement, so restating them in the comment could drift.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@WilliamBergamin
WilliamBergamin merged commit 651c298 into main Oct 23, 2026
18 checks passed
@WilliamBergamin
WilliamBergamin deleted the manifest-user-connections branch October 23, 2026 14:04
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 pkg:types applies to `@slack/types` pkg:web-api applies to `@slack/web-api` semver:minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants