feat(cmdk): route NEXT_PUBLIC_SENTRY_DSN search to Client Keys (DSN)#117677
Merged
Conversation
Next.js apps store the Sentry DSN in the NEXT_PUBLIC_SENTRY_DSN environment variable (the NEXT_PUBLIC_ prefix exposes it to the browser SDK), and Sentry's Vercel integration sets exactly this variable for Next.js projects. The command palette already routes "SENTRY_DSN" and "Sentry DSN" to the Client Keys (DSN) settings page via keywords, but the longer Next.js-prefixed name can't match the shorter keyword under the palette's subsequence search, so searching it surfaced nothing. Add NEXT_PUBLIC_SENTRY_DSN as a keyword wherever SENTRY_DSN is already listed so developers can jump straight to the page where they manage their DSN. https://claude.ai/code/session_01VZEHfyf5DnG5og2siYoRKG
cvxluo
approved these changes
Jun 15, 2026
This was referenced Jun 15, 2026
JoshFerge
added a commit
that referenced
this pull request
Jun 15, 2026
) ## What Make the Command+K palette surface the auth-token settings pages when a user searches for **"api key"** / **"api keys"**. ## Why Sentry's legacy org-level **API Keys** page is deprecated and explicitly hidden from both the settings nav and the command palette: ```ts // userOrgNavigationConfiguration.tsx { path: `${organizationSettingsPathPrefix}/api-keys/`, title: t('API Keys'), show: false, // deprecated: hide from settings nav and cmd+k (SEC-551) id: 'api-keys', }, ``` So a user searching "api key" in cmd+k currently finds nothing useful. The modern equivalent of an API key in Sentry is an auth token, and the palette matches by subsequence, so "api key" doesn't match the existing `api token` keyword either. This mirrors the recently-merged change that routes `NEXT_PUBLIC_SENTRY_DSN` to Client Keys (DSN) (#117677) — same pattern, keyword-based routing. ## What changed Added `api key` / `api keys` as keywords to the same three settings pages that `SENTRY_AUTH_TOKEN` already surfaces, so "api key" lands where users actually manage API credentials today: - **Organization Tokens** (`/settings/:orgId/auth-tokens/`) - **Personal Tokens** (`/settings/account/api/auth-tokens/`) - **Custom Integrations** (`/settings/:orgId/developer-settings/`) All three live in `static/app/views/settings/organization/userOrgNavigationConfiguration.tsx`. Added a test case mirroring the existing `SENTRY_AUTH_TOKEN` recall test. ## Testing - `pnpm test-ci static/app/components/commandPalette/ui/commandPaletteGlobalActions.spec.tsx` → 21 passed (incl. new `api key` case) - `pnpm run lint:js` on the changed files → clean https://claude.ai/code/session_01VZEHfyf5DnG5og2siYoRKG --- _Generated by [Claude Code](https://claude.ai/code/session_01VZEHfyf5DnG5og2siYoRKG)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
3 tasks
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.
What
Make the Command+K palette surface the Client Keys (DSN) project settings action when a user searches for
NEXT_PUBLIC_SENTRY_DSN.Why
NEXT_PUBLIC_SENTRY_DSNis the environment variable name Next.js apps use to hold the Sentry DSN — theNEXT_PUBLIC_prefix is Next.js's convention for exposing a value to client-side/browser code, which the browser SDK needs. Sentry's own Vercel integration sets exactly this variable for Next.js projects:https://github.com/getsentry/sentry/blob/master/src/sentry/integrations/vercel/integration.py#L166
The command palette already routes
SENTRY_DSNandSentry DSNto the Client Keys (DSN) settings page (/settings/:orgId/projects/:projectId/keys/) via keywords. But the palette uses subsequence matching, so the longer Next.js-prefixed queryNEXT_PUBLIC_SENTRY_DSNcan't match the shorterSENTRY_DSNkeyword — searching it surfaced nothing. Next.js is one of the most common Sentry SDK setups, so this is a real gap for developers trying to find where to grab/manage their DSN.What changed
Added
NEXT_PUBLIC_SENTRY_DSNas a keyword in the two places that already listSENTRY_DSN:static/app/views/settings/project/navigationConfiguration.tsx— the canonical "Client Keys (DSN)" nav item (surfaces under Project Settings in cmd+k).static/app/components/commandPalette/ui/commandPaletteGlobalActions.tsx— the current-project "Client Keys (DSN)" shortcut.Added a test case mirroring the existing
SENTRY_DSNrecall test.Testing
pnpm test-ci static/app/components/commandPalette/ui/commandPaletteGlobalActions.spec.tsx→ 20 passed (incl. newNEXT_PUBLIC_SENTRY_DSNcase)pnpm run lint:json the changed files → cleanhttps://claude.ai/code/session_01VZEHfyf5DnG5og2siYoRKG
Generated by Claude Code