Skip to content

feat: add missing rich_previews fields to the manifest type - #719

Merged
mwbrooks merged 2 commits into
slackapi:mainfrom
lucasingels:feat-rich-previews-embed-settings
Oct 26, 2026
Merged

mwbrooks merged 2 commits into
slackapi:mainfrom
lucasingels:feat-rich-previews-embed-settings

Conversation

@lucasingels

@lucasingels lucasingels commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Changelog

slack app install and slack deploy no longer clear an app's Work Object embed settings (domain_allowlist, allow_same_origin, slug.hide_display_id).

Summary

RichPreviews only had entity_types and is_active, so any other rich_previews keys in manifest.json got dropped when the CLI read it. The manifest update then replaced the app's settings without them, which emptied the embed domain allow list and turned off allow-same-origin and hide ID in slug every time we installed. Our Work Object embeds stopped showing until someone set them again on the app's Work Object Previews page.

slack manifest diff didn't catch it either, since it reads both sides through the same type.

The two booleans are pointers like the other optional ones in this file, so an explicit false is kept.

Fixes #718

Preview

slack manifest info --source remote on our app (domain swapped for example.com).

v4.11.0:

"rich_previews": {
  "entity_types": ["slack#/entities/task"],
  "is_active": true
}

This branch:

"rich_previews": {
  "entity_types": ["slack#/entities/task"],
  "is_active": true,
  "domain_allowlist": ["example.com"],
  "allow_same_origin": true,
  "slug": {
    "hide_display_id": true
  }
}

Testing

  • go test ./... and go tool golangci-lint run
  • Added test cases that read and write a manifest with the new fields, including explicit false
  • Ran slack manifest info --source remote with a build of this branch against our app, output above

Notes

These fields aren't in the manifest reference docs yet, but Slack includes them in the exported manifest once they're set on the Work Object Previews page.

Requirements

domain_allowlist, allow_same_origin and slug.hide_display_id weren't in
RichPreviews, so they were dropped when the manifest was read and every
`slack app install` wiped them on the app.

Fixes slackapi#718
@lucasingels
lucasingels requested a review from a team as a code owner October 26, 2026 13:41
@salesforce-cla salesforce-cla Bot added the cla:missing The CLA was not signed label Oct 26, 2026
@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! Before we can merge this, we need @lucasingels to sign the Salesforce Inc. Contributor License Agreement.

@salesforce-cla salesforce-cla Bot added cla:signed The CLA was signed by the pull request author and removed cla:missing The CLA was not signed labels Oct 26, 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 Oct 26, 2026
@mwbrooks mwbrooks self-assigned this Oct 26, 2026
@mwbrooks mwbrooks added this to the Next Release milestone Oct 26, 2026
EntityTypes []string `json:"entity_types,omitempty" yaml:"entity_types,flow,omitempty"`
IsActive bool `json:"is_active,omitempty" yaml:"is_active,flow,omitempty"`
DomainAllowlist []string `json:"domain_allowlist,omitempty" yaml:"domain_allowlist,flow,omitempty"`
AllowSameOrigin *bool `json:"allow_same_origin,omitempty" yaml:"allow_same_origin,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: πŸ‘ŒπŸ» Thanks for using pointers and omitempty for both booleans so an explicit false survives, matching the other optional fields in this file.

@mwbrooks

Copy link
Copy Markdown
Member

The PR changes look safe and tight, so I'm going to approve our CI/CD workflow to run. πŸ§ͺ

@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 78.08%. Comparing base (164fda5) to head (b9fe13d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #719      +/-   ##
==========================================
- Coverage   78.10%   78.08%   -0.03%     
==========================================
  Files         238      238              
  Lines       18096    18096              
==========================================
- Hits        14134    14130       -4     
- Misses       3962     3966       +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.

@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 for the improvement @lucasingels and congrats on your first-time contribution to the project! πŸŽ‰

@mwbrooks
mwbrooks merged commit 848d649 into slackapi:main Oct 26, 2026
10 checks passed
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 cla:signed The CLA was signed by the pull request author 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.

rich_previews domain_allowlist, allow_same_origin and slug are dropped on install

2 participants