chore(dashboards): remove text widget flag references frontend#116210
Merged
Conversation
Contributor
📊 Type Coverage Diff✅ No new type safety issues introduced. Coverage: 93.56% |
Comment on lines
+86
to
+90
| { | ||
| type: DisplayType.TEXT, | ||
| label: t('Text (Markdown)'), | ||
| details: t('Display rich text and formatted markdown.'), | ||
| }, |
Contributor
There was a problem hiding this comment.
Bug: The frontend allows creating text widgets unconditionally, but the backend still rejects them for users without the dashboards-text-widgets feature flag, causing an error on save.
Severity: MEDIUM
Suggested Fix
To resolve the mismatch, either the backend validation for the dashboards-text-widgets feature flag should be removed to align with the frontend, or the frontend should be updated to conditionally render the text widget option based on the presence of the feature flag.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: static/app/views/dashboards/widgetBuilder/components/typeSelector.tsx#L86-L90
Potential issue: The frontend code in `typeSelector.tsx` was changed to unconditionally
show the "Text (Markdown)" widget option to all users. However, the backend still
enforces the `dashboards-text-widgets` feature flag. This mismatch means that users who
do not have the feature flag enabled will see the option to create a text widget,
configure it, but will receive a 400 validation error when they try to save it. The
backend rejects the request with the error "Text widgets are not enabled", leading to a
confusing and broken user experience.
Also affects:
src/sentry/api/serializers/rest_framework/dashboard.py:466-473chart.tsx:494-498
Did we get this right? 👍 / 👎 to inform future reviews.
narsaynorath
approved these changes
May 26, 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.
more text widgets for everyone YAY
should be merged after #116207