Skip to content

feat(cmdk): route NEXT_PUBLIC_SENTRY_DSN search to Client Keys (DSN)#117677

Merged
JoshFerge merged 1 commit into
masterfrom
claude/optimistic-dijkstra-wf7qoy
Jun 15, 2026
Merged

feat(cmdk): route NEXT_PUBLIC_SENTRY_DSN search to Client Keys (DSN)#117677
JoshFerge merged 1 commit into
masterfrom
claude/optimistic-dijkstra-wf7qoy

Conversation

@JoshFerge

Copy link
Copy Markdown
Contributor

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_DSN is the environment variable name Next.js apps use to hold the Sentry DSN — the NEXT_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

dsn_env_name = "NEXT_PUBLIC_SENTRY_DSN" if is_next_js else "SENTRY_DSN"

The command palette already routes SENTRY_DSN and Sentry DSN to 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 query NEXT_PUBLIC_SENTRY_DSN can't match the shorter SENTRY_DSN keyword — 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_DSN as a keyword in the two places that already list SENTRY_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_DSN recall test.

Testing

  • pnpm test-ci static/app/components/commandPalette/ui/commandPaletteGlobalActions.spec.tsx → 20 passed (incl. new NEXT_PUBLIC_SENTRY_DSN case)
  • pnpm run lint:js on the changed files → clean

https://claude.ai/code/session_01VZEHfyf5DnG5og2siYoRKG


Generated by Claude Code

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
@JoshFerge JoshFerge requested a review from a team as a code owner June 15, 2026 14:24
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 15, 2026
@JoshFerge JoshFerge enabled auto-merge (squash) June 15, 2026 14:29
@JoshFerge JoshFerge requested a review from a team June 15, 2026 14:36
@JoshFerge JoshFerge merged commit c286801 into master Jun 15, 2026
72 checks passed
@JoshFerge JoshFerge deleted the claude/optimistic-dijkstra-wf7qoy branch June 15, 2026 15:51
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>
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.

3 participants