feat(cmdk): Add bulk issue actions to command palette#114278
Conversation
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>
handleUpdate and handleBulkUpdate were nearly identical. Extract the shared logic into performBulkUpdate with an optional success callback.
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>
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>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
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.
| failSilently: true, | ||
| ...projectConstraints, | ||
| ...selection.datetime, |
There was a problem hiding this comment.
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

Summary
taskslot so it renders above the existing "Issues Feed" actionsCloses #65088
Closes #61935