Skip to content

feat(cmd-k): Add 'superuser' keyword to admin actions#112298

Merged
JonasBa merged 5 commits intomasterfrom
cursor/cmd-k-superuser-keyword-a315
Apr 6, 2026
Merged

feat(cmd-k): Add 'superuser' keyword to admin actions#112298
JonasBa merged 5 commits intomasterfrom
cursor/cmd-k-superuser-keyword-a315

Conversation

@JonasBa
Copy link
Copy Markdown
Member

@JonasBa JonasBa commented Apr 6, 2026

Description

Adds the superuser keyword to all admin CMD-K actions and restores the "Open Superuser Modal" action from the old command palette to match the old workflow and improve discoverability. Also updates the organization admin URL to use the correct customers endpoint.

This addresses the issue where users were trying to search for "superuser" in the new CMD-K but couldn't find the admin actions or the superuser escalation modal.

Changes

  • Added keywords: [t('superuser')] to "Open _admin" action
  • Added keywords: [t('superuser')] to "Open org in _admin" action
  • Added keywords: [t('superuser')] to "Exit Superuser" action
  • Added "Open Superuser Modal" action - allows staff users to escalate to superuser mode (only shown when not already a superuser)
  • Changed organization admin URL from /_admin/organizations/${organization.slug}/ to /_admin/customers/${organization.slug}/

Testing

Users can now type "superuser" in CMD-K and see:

  • "Open _admin" - opens the Django admin interface
  • "Open org in _admin" - opens the organization's customer page in Django admin
  • "Open Superuser Modal" - opens the authentication modal to escalate to superuser (only shown when not already superuser)
  • "Exit Superuser" - exits superuser mode (only shown when already superuser)

Slack Thread

Open in Web Open in Cursor 

Add 'superuser' keyword to both 'Open _admin' and 'Open org in _admin'
CMD-K actions to match the old workflow and improve discoverability.

Co-authored-by: Jonas <JonasBa@users.noreply.github.com>
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 6, 2026
label: t('Open %s in _admin', organization.name),
icon: <IconOpen />,
},
keywords: [t('superuser')],
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@cursoragent modify the line below to use /_admin/customers/$organization.slug and add the superuser keyword and make sure the superuser keyword is added to all admin entries

Copy link
Copy Markdown
Contributor

@cursor cursor bot Apr 6, 2026

Choose a reason for hiding this comment

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

Perfect! I've successfully completed all the requested changes:

Summary

I've updated the CMD-K admin actions with the following changes:

  1. Changed the URL from /_admin/organizations/${organization.slug}/ to /_admin/customers/${organization.slug}/ for the "Open org in _admin" action
  2. Added superuser keyword to ALL admin entries, including:
    • "Open _admin" ✓ (already had it)
    • "Open org in _admin" ✓ (already had it)
    • "Exit Superuser" ✓ (newly added)

All admin actions are now searchable via the "superuser" keyword, and the organization admin link now correctly points to the customers endpoint. The changes passed all linting checks and have been pushed to the PR.

Open in Web Open in Cursor 

…o all admin actions

- Changed URL from /_admin/organizations/ to /_admin/customers/
- Added 'superuser' keyword to 'Exit Superuser' action
- Ensures all admin entries are searchable via 'superuser' keyword

Co-authored-by: Jonas <JonasBa@users.noreply.github.com>
cursoragent and others added 2 commits April 6, 2026 21:47
Add the old superuser modal action from the deprecated command palette
to the new CMD-K implementation. This action allows staff users to
escalate to superuser mode by opening the superuser authentication modal.

The action is only shown when the user is NOT already a superuser, and
is searchable via the 'superuser' keyword.

Co-authored-by: Jonas <JonasBa@users.noreply.github.com>
@JonasBa JonasBa marked this pull request as ready for review April 6, 2026 22:16
@JonasBa JonasBa requested a review from a team as a code owner April 6, 2026 22:16
@JonasBa JonasBa merged commit 51e21dc into master Apr 6, 2026
67 of 68 checks passed
@JonasBa JonasBa deleted the cursor/cmd-k-superuser-keyword-a315 branch April 6, 2026 22:23
george-sentry pushed a commit that referenced this pull request Apr 9, 2026
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## Description

Adds the `superuser` keyword to all admin CMD-K actions and restores the
"Open Superuser Modal" action from the old command palette to match the
old workflow and improve discoverability. Also updates the organization
admin URL to use the correct customers endpoint.

This addresses the issue where users were trying to search for
"superuser" in the new CMD-K but couldn't find the admin actions or the
superuser escalation modal.

## Changes

- Added `keywords: [t('superuser')]` to "Open _admin" action
- Added `keywords: [t('superuser')]` to "Open org in _admin" action
- Added `keywords: [t('superuser')]` to "Exit Superuser" action
- **Added "Open Superuser Modal" action** - allows staff users to
escalate to superuser mode (only shown when not already a superuser)
- Changed organization admin URL from
`/_admin/organizations/${organization.slug}/` to
`/_admin/customers/${organization.slug}/`

## Testing

Users can now type "superuser" in CMD-K and see:
- "Open _admin" - opens the Django admin interface
- "Open org in _admin" - opens the organization's customer page in
Django admin
- "Open Superuser Modal" - opens the authentication modal to escalate to
superuser (only shown when not already superuser)
- "Exit Superuser" - exits superuser mode (only shown when already
superuser)
<!-- CURSOR_AGENT_PR_BODY_END -->

[Slack
Thread](https://sentry.slack.com/archives/C08QLT0PYQK/p1775510843648239?thread_ts=1775510843.648239&cid=C08QLT0PYQK)

<div><a
href="https://cursor.com/agents/bc-3faa6305-783b-5a27-be62-31d6ae10d612"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-3faa6305-783b-5a27-be62-31d6ae10d612"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

---------

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: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants