Skip to content

fix(slack): Prompt unlinked users to link identity for dashboards URLs#113590

Merged
DominikB2014 merged 6 commits intomasterfrom
dominikbuszowiecki/dain-1569-ensure-link-your-identity-message-shows-up
Apr 29, 2026
Merged

fix(slack): Prompt unlinked users to link identity for dashboards URLs#113590
DominikB2014 merged 6 commits intomasterfrom
dominikbuszowiecki/dain-1569-ensure-link-your-identity-message-shows-up

Conversation

@DominikB2014
Copy link
Copy Markdown
Contributor

@DominikB2014 DominikB2014 commented Apr 21, 2026

Resolves dashboard identity for link_shared events and prompts unlinked users to link, matching discover/explore behavior.

Refs DAIN-1569

Add LinkType.DASHBOARDS to the identity-prompt feature_flag map so
users without a linked Slack identity get the "Link your Slack identity
to Sentry" prompt when they paste a dashboard widget URL — matching
the existing behavior for discover and explore URLs. The prompt
continues to gate on the associated feature flag
(organizations:dashboards-widget-unfurl), so orgs without the feature
see no prompt.

Also make the halt message generic instead of hardcoded to "Discover
link".

Refs DAIN-1569
Co-Authored-By: Claude <noreply@anthropic.com>
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 21, 2026

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 21, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ee67e28. Configure here.

Comment thread src/sentry/integrations/slack/webhooks/event.py
The prompt text hardcoded "unfurl Discover charts" but the same
prompt now fires for explore and dashboards URLs too. Drop the
Discover-specific wording.

Co-Authored-By: Claude <noreply@anthropic.com>
Without this, `_validate_identity()` is gated on discover/explore links
in `SlackEventRequest.validate_integration`, so dashboards-only events
never resolve `slack_request.user`. The identity-prompt branch added
for dashboards in the previous commit would then fire for every share
(linked or not), since `has_identity` stays `False`.

Adds `has_dashboard_links` and includes it in the gate so the linked
user's identity is resolved and the unfurl proceeds with their access.
@DominikB2014 DominikB2014 requested a review from a team April 29, 2026 17:59
@DominikB2014 DominikB2014 marked this pull request as ready for review April 29, 2026 17:59
@DominikB2014 DominikB2014 requested review from a team as code owners April 29, 2026 17:59
@DominikB2014 DominikB2014 merged commit 7bcdd99 into master Apr 29, 2026
60 checks passed
@DominikB2014 DominikB2014 deleted the dominikbuszowiecki/dain-1569-ensure-link-your-identity-message-shows-up branch April 29, 2026 18:36
cleptric pushed a commit that referenced this pull request May 5, 2026
#113590)

Resolves dashboard identity for `link_shared` events and prompts
unlinked users to link, matching discover/explore behavior.

Refs DAIN-1569

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants