feat: update 'app link' to not change the app manifest source#396
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## mwbrooks-default-bolt-manifest-source-local #396 +/- ##
============================================================================
Coverage 67.88% 67.89%
============================================================================
Files 218 218
Lines 18090 18055 -35
============================================================================
- Hits 12280 12258 -22
+ Misses 4655 4642 -13
Partials 1155 1155 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mwbrooks
left a comment
There was a problem hiding this comment.
Some words for the kind reviewers!
| // App Manifest section | ||
| manifestSource, _ := clients.Config.ProjectConfig.GetManifestSource(ctx) | ||
| if !manifestSource.Exists() { | ||
| manifestSource = config.ManifestSourceLocal |
There was a problem hiding this comment.
note(out-of-scope): We should have the default manifest source return by a common method instead of manually setting it in each spot.
| ExpectedError: slackerror.New(slackerror.ErrAppNotFound), | ||
| }, | ||
| "accepting manifest source prompt should save information about the provided deployed app": { | ||
| "links app when manifest source is local": { |
There was a problem hiding this comment.
note: Test linking an app when the manifest source is local (manifest file).
| }, | ||
| }, | ||
| "manifest source prompt should display for GBP apps with local manifest source": { | ||
| "links app when manifest source is remote": { |
There was a problem hiding this comment.
note: Test linking an app when the manifest source is remote (app settings).
| notice = "Manifest values for this app are overwritten on reinstall" | ||
| default: | ||
| notice = "The manifest on app settings has been changed since last update!" | ||
| notice = style.Yellow("The manifest on app settings has been changed since last update") |
There was a problem hiding this comment.
note: I'm open to other formatting (Red?) but I think we should make this pop and stand out in some way.
Changelog
Summary
This pull request is a little spicy 🌶️ because remove speed bumps and reduces friction for developers to allows apps from App setting to be managed by the Slack CLI.
See Changelog section for a detailed breakdown of the changes.
Motivation
The motivation for these changes is 💬 developer feedback. A consistent theme of questions from developers is how to have the Slack CLI manage and use the
manifest.jsonthat ships with all of our sample apps (sensible question). We often need to explain how to manually update.slack/config.json → manifest.source: "local"for developers to get the experience they want.Our concern for embracing the project's manifest file is that it can overwrite the manifest on App Settings. This could be a shocking and difficult experience, if it happens unexpectedly. Thankfully, the Slack CLI's overwrite protection has been reliable for the past year and this change leans more heavily on it.
Preview
Linking an App ID from App Setting
Currently, when Linking an App ID from App Setting, the developer is forced to switch the manifest source to be App Setting (remote). If they decline the confirmation prompt, then they cannot link the app. A workaround that developers have taken is to accept the confirmation and then manually change the manifest source back to the manifest file:
.slack/config → manifest.source: "local".Now, the manifest source is not changed - it can remain local (manifest file) or remote (app settings). We rely on the manifest overwrite protection to warn developers when there are changes on App Settings that are not in the manifest file.
Expand to see a video of the current behaviour
2026-03-13-app-link-current.mov
2026-03-13-app-link-new.mov
Overwriting App Settings Warning
We made minor wording and appearance changes to clarify that the app settings manifest will be overwritten by the manifest file.
2026-03-13-overwrite-manifest-current.mov
2026-03-13-overwrite-manifest-new.mov
Test Steps
Requirements