Skip to content

feat(cmdk): Improve issue detail actions#112982

Merged
JonasBa merged 12 commits intomasterfrom
jb/issues/cmdk-actions
Apr 16, 2026
Merged

feat(cmdk): Improve issue detail actions#112982
JonasBa merged 12 commits intomasterfrom
jb/issues/cmdk-actions

Conversation

@JonasBa
Copy link
Copy Markdown
Member

@JonasBa JonasBa commented Apr 14, 2026

Enable CMDK to perform issue actions similar to the ones exposed in the UI.

A couple things missing:

  • Resolve until (not clear even from our current UI about what the default is)
  • Archive until (same as above)

I left the above not implemented for I'm not sure what a good way to expose non default resolve or archive would be. We can force everyone to explicitly select the default, whichever it is, but my gut sense (pending amplitude verification) tells me that we'd end up just adding extra friction for a large majority of the actions while only enabling a few edge cases (tldr, I'm not sure its worth it or how to expose it without that tradeoff)

CleanShot.2026-04-14.at.23.35.34.mp4

Refs GH-112564

Polish the issue details command palette actions so the top-level issue entry mirrors the shared title and message formatting, action labels stay concise, and long labels truncate cleanly in the palette UI.

Also update assign and priority actions to reflect current state more clearly. The assign submenu now uses the current assignee avatar, includes project teams alongside individual members, and drops redundant suffix text and unassign actions to keep the flow focused.

Co-Authored-By: Codex <noreply@openai.com>
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 14, 2026
@sentry
Copy link
Copy Markdown
Contributor

sentry bot commented Apr 14, 2026

Sentry Snapshot Testing

Name Added Removed Modified Renamed Unchanged Status
sentry-frontend
sentry-frontend
0 0 0 0 204 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

Fix the type regressions introduced while polishing the issue details command palette actions.

This restores the correct priority enum usage in tests, handles nullable issue titles in the task label, fixes the priority change callback, and removes an invalid suggested assignee payload from the assign submenu.

Co-Authored-By: Codex <noreply@openai.com>
size="sm"
bold
variant="primary"
style={{
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 use ellipsis prop here and remove style attribute

Copy link
Copy Markdown
Contributor

@cursor cursor bot Apr 14, 2026

Choose a reason for hiding this comment

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

Perfect! The change has been successfully applied. I've replaced the inline style attribute with the ellipsis prop on the Text component at line 139. The change:

Before:

<Text
  size="sm"
  bold
  variant="primary"
  style={{
    minWidth: 0,
    overflow: 'hidden',
    textOverflow: 'ellipsis',
    whiteSpace: 'nowrap',
  }}
>
  {action.display.label}
</Text>

After:

<Text size="sm" bold variant="primary" ellipsis>
  {action.display.label}
</Text>

This follows the Sentry frontend guidelines which prefer using component props over inline styles. The ellipsis prop on the Text component handles all the necessary CSS for text truncation with ellipsis, making the code cleaner and more maintainable.

The changes have been:

  • ✅ Committed with message "ref(cmdk): Use ellipsis prop instead of inline style"
  • ✅ Pushed to the jb/issues/cmdk-actions branch
  • ✅ Linting passed successfully
Open in Web Open in Cursor 

Co-authored-by: Jonas <JonasBa@users.noreply.github.com>
Add success messages to the shared issue detail action handlers so both the regular UI and command palette flows confirm successful updates.

This covers status changes, review state, priority changes, and assignee updates from the shared mutation paths rather than duplicating toast logic in individual entry points.

Co-Authored-By: Codex <noreply@openai.com>
@JonasBa JonasBa marked this pull request as ready for review April 15, 2026 07:06
@JonasBa JonasBa requested review from a team as code owners April 15, 2026 07:06
Comment thread static/app/views/issueDetails/actions/index.tsx
Comment thread static/app/views/issueDetails/groupPriority.tsx Outdated
]);
const additionalOwners = owners.filter(
owner => !assignableActorKeys.has(`${owner.type}:${owner.id}`)
);
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.

Current user may appear twice in assignee list

Low Severity

The current user is excluded from assignableUsers but always shown via the "Assign to me" action. However, assignableActorKeys doesn't include the current user's key, so if the current user also appears in owners (e.g., as a suspect commit author), they'll pass the additionalOwners filter and appear as a duplicate entry in the command palette assignee list.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6c0270e. Configure here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Meh, pretty small bug so not really a big deal if the user shows up twice

- Extract shared useChangePriority hook in groupPriority.tsx to
  eliminate duplicated bulkUpdate logic between GroupPriority and
  GroupPriorityCommandPaletteAction
- Guard "Assign to me" action against null user to prevent crash
- Replace fetchOrgMembers + MemberListStore pattern with a shared
  useOrgProjectMembers hook backed by TanStack Query; concurrent
  mounts share one cached request instead of firing duplicate calls
- Add Unresolve and Unarchive actions to the CMDK slot so resolved
  and archived issues have a command-palette path back to active
- Replace jest.mock of useCommitters/useIssueEventOwners with
  MockApiClient.addMockResponse per project testing guidelines
- Wrap issueCommandLabel computation in useMemo

Co-Authored-By: Claude <noreply@anthropic.com>
- Rename useOrgProjectMembers to useProjectMembers and move
  useOrganization inside the hook so callers only pass projectId
- Return the full TanStack Query result instead of just data
- Replace useMemo transform with TanStack Query select option
- Rename memberList to members at call sites

Co-Authored-By: Claude <noreply@anthropic.com>
Hydrate the config store with a current user before building the command palette tree. This keeps the test aligned with the assign action behavior, which only renders 'Assign to me' when useUser() has a user.

Co-Authored-By: Codex <codex@openai.com>
Comment thread static/app/views/issueDetails/actions/index.spec.tsx Outdated
Comment thread static/app/views/issueDetails/actions/index.tsx Outdated
- Move disabled guard to wrap the entire CommandPaletteSlot instead of gating content inside it
- Switch slot name from 'task' to 'page'
- Use Array<CollectionTreeNode<CMDKActionData>> instead of verbose ReturnType utility in tests

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
…CMDKActionData

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
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.

There are 2 total unresolved issues (including 1 from previous review).

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 f483189. Configure here.

clearIndicators();
if (successMessage) {
addSuccessMessage(successMessage);
}
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.

Success message shown even when API request fails

Medium Severity

The successMessage is displayed inside the complete callback of bulkUpdate, which fires after both success and error (like a finally). This means users will see messages like "Issue resolved" or "Issue archived" even when the API request fails. The message display belongs in a success callback instead.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f483189. Configure here.

…te assignee action

ActorAvatar with type 'team' routes through AsyncTeamAvatar -> useTeamsById, which
checks the TeamStore by raw numeric ID. The command palette action was passing
buildTeamId(team.id) ('team:123') as the actor id, which never matched the store
and always triggered a fetch.

For assignableTeams (full Team objects from ProjectsStore), switch to TeamAvatar
directly — same pattern as AssigneeSelectorDropdown which uses TeamBadge.
For additionalOwners, pass the raw owner.id so the store lookup can succeed.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
@JonasBa JonasBa merged commit d8635e4 into master Apr 16, 2026
65 checks passed
@JonasBa JonasBa deleted the jb/issues/cmdk-actions branch April 16, 2026 06:12
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