Skip to content

chore(dashboards): remove text widget flag references frontend#116210

Merged
nikkikapadia merged 1 commit into
masterfrom
nikki/remove-text-widget-flag-frontend
May 26, 2026
Merged

chore(dashboards): remove text widget flag references frontend#116210
nikkikapadia merged 1 commit into
masterfrom
nikki/remove-text-widget-flag-frontend

Conversation

@nikkikapadia
Copy link
Copy Markdown
Member

more text widgets for everyone YAY

should be merged after #116207

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.56%

@nikkikapadia nikkikapadia marked this pull request as ready for review May 26, 2026 18:01
@nikkikapadia nikkikapadia requested a review from a team as a code owner May 26, 2026 18:01
Comment on lines +86 to +90
{
type: DisplayType.TEXT,
label: t('Text (Markdown)'),
details: t('Display rich text and formatted markdown.'),
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-473
  • chart.tsx:494-498

Did we get this right? 👍 / 👎 to inform future reviews.

@nikkikapadia nikkikapadia merged commit 65b7262 into master May 26, 2026
72 checks passed
@nikkikapadia nikkikapadia deleted the nikki/remove-text-widget-flag-frontend branch May 26, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants