Skip to content

feat(cmdk): Add bulk issue actions to command palette#114278

Merged
JonasBa merged 8 commits intomasterfrom
jb/cmdk/issues-actions
Apr 29, 2026
Merged

feat(cmdk): Add bulk issue actions to command palette#114278
JonasBa merged 8 commits intomasterfrom
jb/cmdk/issues-actions

Conversation

@JonasBa
Copy link
Copy Markdown
Member

@JonasBa JonasBa commented Apr 29, 2026

Summary

  • When issues are selected on the Issues feed, a new "N Selected Issues" group appears in the command palette (Cmd+K) with bulk actions: Resolve, Archive, Set Priority (High/Medium/Low), and Assign to (me, teams, searchable org members)
  • The group uses the task slot so it renders above the existing "Issues Feed" actions
  • The label includes short IDs of selected issues (e.g. "2 Selected Issues (#PROJ-1, #PROJ-2)")
  • The assign action eagerly loads org members as static children, so all assignees surface as sub-results during search without requiring drill-in

Closes #65088
Closes #61935

When issues are selected on the Issues feed, a new "N Selected Issues"
group appears in the command palette with actions for resolve, archive,
set priority, and assign to. The assign action shows all org members
and teams as searchable sub-results.

Fixes #65088
Fixes #61935
Co-Authored-By: Claude <noreply@anthropic.com>
@JonasBa JonasBa requested a review from a team as a code owner April 29, 2026 03:42
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 29, 2026
Comment thread static/app/views/issueList/issueListBulkCommandPaletteActions.tsx
handleUpdate and handleBulkUpdate were nearly identical. Extract the
shared logic into performBulkUpdate with an optional success callback.
Comment thread static/app/views/issueList/issueListBulkCommandPaletteActions.tsx Outdated
Comment thread static/app/views/issueList/issueListBulkCommandPaletteActions.tsx Outdated
Comment thread static/app/views/issueList/issueListBulkCommandPaletteActions.tsx
Comment thread static/app/views/issueList/issueListBulkCommandPaletteActions.tsx
JonasBa and others added 2 commits April 29, 2026 09:47
Extract the duplicated issue list bulk update flow into shared helpers.

Keep project selection and issue query invalidation behavior aligned between the actions bar and command palette so fixes only land in one place.

Co-Authored-By: Codex <noreply@openai.com>
Pass the issue list query count through to the bulk command palette actions.

The bulk action label and capped search copy depend on the total query match count, so keep the parent wiring in sync with the extracted bulk update helpers.

Co-Authored-By: Codex <noreply@openai.com>
Comment thread static/app/views/issueList/actions/utils.tsx
Comment thread static/app/views/issueList/issueListBulkCommandPaletteActions.tsx Outdated
JonasBa and others added 2 commits April 29, 2026 10:14
Add issue feed command palette actions for bulk updates when no issues
are selected and keep the selected-issues actions available in the
existing task slot.

Reuse the shared bulk update path so command palette actions show a
loader, and gate the bulk update actions behind confirmation prompts
that explain the selected or query-wide scope before running.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
Comment thread static/app/views/issueList/issueListBulkCommandPaletteActions.tsx
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 7e75360. Configure here.

Comment thread static/app/views/issueList/issueListBulkCommandPaletteActions.tsx
The "mark all" command palette actions rendered when no issues were
individually selected, causing getSelectedIds() to return an empty
array. Since [] is truthy in JS, paramsToQueryArgs produced {id: []}
instead of falling through to the query-based branch, silently
updating zero issues.

Thread an allInQuery flag through the update handlers so the "mark all"
path forces itemIds to undefined, which makes the API use the search
query to match all issues.
Comment on lines +269 to +271
failSilently: true,
...projectConstraints,
...selection.datetime,
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.

Bug: Performing an "all-in-query" bulk action from the command palette results in a malformed success toast, like "Resolved ", because an empty itemIds array is passed to the notification handler.
Severity: LOW

Suggested Fix

The onActionTaken callback should differentiate between an empty selection and an all-in-query selection. Instead of passing itemIds ?? [], consider passing a special value or a flag to indicate an all-in-query action. Alternatively, update onIssueAction to check if the action was all-in-query and display a generic success message like "Resolved all issues in your query" instead of trying to list item IDs.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: static/app/views/issueList/actions/utils.tsx#L269-L271

Potential issue: When a user performs an "all-in-query" bulk update, such as "Mark all
issues as Resolved," from the command palette without any issues individually selected,
the `onActionTaken` callback is invoked with an empty array `[]` for `itemIds`. This
occurs because the `onSuccess` callback in `handleUpdate` defaults `undefined` `itemIds`
to an empty array. The `onIssueAction` handler is not designed for this scenario and
attempts to generate a success message by mapping over the empty `itemIds` array. This
results in an empty string for the issue's short ID, leading to a malformed toast
notification like "Resolved " with a trailing space and no issue identifier.

Also affects:

  • static/app/views/issueList/overview.tsx:949~951

@JonasBa JonasBa merged commit 0434118 into master Apr 29, 2026
67 checks passed
@JonasBa JonasBa deleted the jb/cmdk/issues-actions branch April 29, 2026 18:38
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.

Improve bulk actions for Issues Add mass assign feature for Issues to Sentry UI

2 participants