Skip to content

ref(cmdk): Remove cmd-k feature flags from backend#114439

Merged
JonasBa merged 3 commits intomasterfrom
jb/cmdk/supercharged-backend
Apr 30, 2026
Merged

ref(cmdk): Remove cmd-k feature flags from backend#114439
JonasBa merged 3 commits intomasterfrom
jb/cmdk/supercharged-backend

Conversation

@JonasBa
Copy link
Copy Markdown
Member

@JonasBa JonasBa commented Apr 30, 2026

Summary

  • Remove cmd-k-supercharged and cmd-k-dsn-lookup feature flag registrations from temporary.py
  • Remove the cmd-k-dsn-lookup feature gate in the DSN lookup endpoint
  • Remove feature flag context managers from DSN lookup tests and drop the test_feature_flag_disabled_returns_404 test

The command palette is now GA — these flags are no longer needed.

Test plan

  • Existing DSN lookup tests pass without feature flag wrappers

Remove the `cmd-k-supercharged` and `cmd-k-dsn-lookup` feature flag
registrations and the feature gate in the DSN lookup endpoint. The
command palette is now GA.
@JonasBa JonasBa requested review from a team as code owners April 30, 2026 16:16
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 30, 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 2 potential issues.

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 72b396c. Configure here.

manager.add("organizations:traces-overlay-charts-ui", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable feature flag to cache detectors by data source
manager.add("organizations:cache-detectors-by-data-source", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enables CMD+K supercharged (omni search)
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.

Removing flag registration breaks frontend DSN lookup feature

High Severity

The cmd-k-dsn-lookup flag registration is removed from temporary.py, but the frontend still gates on this flag in commandPaletteGlobalActions.tsx (line 286) and dsnLookupSource.tsx (line 19). Since the flag is no longer registered, it will never appear in the organization's feature list, so hasDsnLookup will always be false. This silently disables the entire DSN lookup feature in the command palette — the backend endpoint is now ungated and functional, but no frontend code will ever call it.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 72b396c. Configure here.

Comment thread tests/sentry/api/endpoints/test_dsn_lookup.py
Comment on lines 517 to 518
manager.add("organizations:gen-ai-conversations", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
manager.add("organizations:on-demand-gen-metrics-deprecation-prefill", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
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: Removing the cmd-k-dsn-lookup feature flag registration in the backend will cause the frontend check to always fail, disabling the DSN lookup feature.
Severity: HIGH

Suggested Fix

Either re-instate the feature flag registration in temporary.py with api_expose=True until the frontend code is updated, or remove the feature flag checks organization.features.includes('cmd-k-dsn-lookup') from the frontend files (commandPaletteGlobalActions.tsx and dsnLookupSource.tsx) as part of this PR to permanently enable the feature.

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: src/sentry/features/temporary.py#L517-L518

Potential issue: The removal of the `cmd-k-dsn-lookup` feature flag registration from
`temporary.py` means it will no longer be exposed to the API with `api_expose=True`.
Consequently, the flag will not be included in the `organization.features` list sent to
the frontend. However, frontend components like `commandPaletteGlobalActions.tsx` and
`dsnLookupSource.tsx` still gate the DSN lookup functionality on
`organization.features.includes('cmd-k-dsn-lookup')`. This check will now always return
`false`, effectively disabling the DSN lookup feature for all users, which is contrary
to the goal of making it generally available.

Also affects:

  • static/app/components/commandPalette/ui/commandPaletteGlobalActions.tsx:286
  • static/app/components/search/sources/dsnLookupSource.tsx:19

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

Remove the feature flag context manager from test_user_without_project_access_returns_404 test that was missed in the initial cleanup.

Co-authored-by: Jonas <JonasBa@users.noreply.github.com>
Comment thread src/sentry/features/temporary.py
@JonasBa JonasBa merged commit 5ae7a3a into master Apr 30, 2026
80 checks passed
@JonasBa JonasBa deleted the jb/cmdk/supercharged-backend branch April 30, 2026 18:26
cleptric pushed a commit that referenced this pull request May 5, 2026
## Summary
- Remove `cmd-k-supercharged` and `cmd-k-dsn-lookup` feature flag
registrations from `temporary.py`
- Remove the `cmd-k-dsn-lookup` feature gate in the DSN lookup endpoint
- Remove feature flag context managers from DSN lookup tests and drop
the `test_feature_flag_disabled_returns_404` test

The command palette is now GA — these flags are no longer needed.

## Test plan
- [x] Existing DSN lookup tests pass without feature flag wrappers

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Jonas <JonasBa@users.noreply.github.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.

4 participants