ref(cmdk): Remove cmd-k feature flags from backend#114439
Conversation
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.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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) |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit 72b396c. Configure here.
| 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) |
There was a problem hiding this comment.
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:286static/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>
## 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>


Summary
cmd-k-superchargedandcmd-k-dsn-lookupfeature flag registrations fromtemporary.pycmd-k-dsn-lookupfeature gate in the DSN lookup endpointtest_feature_flag_disabled_returns_404testThe command palette is now GA — these flags are no longer needed.
Test plan