[Feat] Create the Slack app from a pasted app configuration token#417
Merged
Conversation
Slack setup previously opened a prefilled manifest in Slack's UI and made the user copy three secrets back by hand. The setup and settings surfaces now take a Slack app configuration token instead: an admin-gated tRPC command (plus a setup-token-gated bootstrap variant) builds the existing manifest, POSTs it to apps.manifest.create, persists R_SLACK_CLIENT_ID, R_SLACK_CLIENT_SECRET, and R_SLACK_SIGNING_SECRET in one transaction, and the UI advances straight to the Connect to Slack install step. The config token is used once and never stored. Enter values manually and the prefilled-manifest link remain as fallback paths. The mock Slack harness gains an apps.manifest.create route with a separate config-token allowlist so the whole flow is testable without a real workspace.
Contributor
|
No new code issues found. See task
Reviewed bed1a9d |
brunobergher
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this PR exists
What changed
Slack setup used to open a prefilled manifest in Slack's UI and then flip into manual mode so the user could copy three secrets across. From the user's chair, setup goes from "create app in one tab, hunt through Slack settings, three copy-pastes, save, connect" to "click Generate on one Slack page, paste one token, approve the install."
slack.createAppFromManifest, plus a setup-token-gatedsetupBootstrap.createSlackAppFromManifestvariant for the bootstrap wizard) builds the manifest with the existingbuildSlackAppManifest({ publicOrigin }), POSTs it to Slack'sapps.manifest.create, and on success upsertsR_SLACK_CLIENT_ID,R_SLACK_CLIENT_SECRET, andR_SLACK_SIGNING_SECRETin one transaction (same pattern as the GitHub App manifest flow). The config token is used once and never stored.invalid_auth/expired-token errors get an actionable "generate a fresh token" message, and manifest problems surface Slack's structurederrorsarray with pointers.POST apps.manifest.createroute with its ownacceptedConfigTokensallowlist (config tokens are a different token space than bot tokens), optionalmanifestCredentialsoverrides, and created manifests recorded in/mock/state, so the whole flow is testable without a real workspace. The route is reachable via the existingSLACK_API_BASE_URLrouting.How it was tested
invalid_authfor unknown config tokens (HTTP 200 +ok: false, matching real Slack), andinvalid_manifestfor malformed manifests.pnpm lint,pnpm check-types, andpnpm knipare clean.Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locallypnpm changeset