Skip to content

feat(cmdk): Add settings field search to command palette on settings pages#114274

Open
JonasBa wants to merge 2 commits intomasterfrom
jonasbadalic/cmdk-settings-field-search
Open

feat(cmdk): Add settings field search to command palette on settings pages#114274
JonasBa wants to merge 2 commits intomasterfrom
jonasbadalic/cmdk-settings-field-search

Conversation

@JonasBa
Copy link
Copy Markdown
Member

@JonasBa JonasBa commented Apr 29, 2026

Wires up settings search form source to CMDK on settings pages

Refs DE-720

…pages

Adds page-scoped CMDK actions that surface individual settings form fields
when navigating settings pages. This reuses the existing FormSource data
(both the generated FORM_FIELD_REGISTRY and legacy data/forms files) so
the command palette can search across all registered settings fields and
navigate directly to the matching page with a hash anchor to the field.

Actions are grouped by settings page, sorted alphabetically, and only
rendered when the user is on org or account settings pages.

Refs DE-720
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 29, 2026

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 29, 2026
@JonasBa JonasBa marked this pull request as ready for review April 29, 2026 03:42
@JonasBa JonasBa requested a review from a team as a code owner April 29, 2026 03:42
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 1 potential issue.

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 0f35347. Configure here.

}

export function SettingsCommandPaletteActions() {
const organization = useOrganization();
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.

Missing allowNull crashes account settings for org-less users

High Severity

SettingsCommandPaletteActions calls useOrganization() without {allowNull: true}, but it's rendered inside AccountSettingsLayout, which is reachable by users who don't belong to any organization. In that scenario, useOrganization() throws, crashing the entire account settings page. Other settings components like settingsIndex.tsx explicitly use allowNull: true with a comment noting that organization may be null for org-less users — and that component redirects those users directly to /settings/account/.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0f35347. Configure here.

return (
<AnalyticsArea name="organization">
<SettingsLayout>
<SettingsCommandPaletteActions />
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

since this component is rendered as a shared layout for all /settings pages, shouldn’t we just add it there?

export function SettingsWrapper() {

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