Repository navigation
feat(jira): pick the assignee when creating an issue — Automatic, me, or anyone - #24376
Conversation
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughJira issue creation now includes an assignee picker when Jira create fields include an assignee field. The picker searches assignable users for the selected project and can offer Automatic and Assign to me options. The selected assignee is scoped to the provider and project. Submission sends populated user fields and the selected assignee account ID. The Jira API, IPC handlers, and runtime client add project-scoped user search, with tests for the search paths, identity selection, picker state, and submission payload. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The assignee picker changes appear ready to merge after normal checks; no actionable merge-blocking issue is established. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Assignee selection uses the existing Jira connection and issue-creation permissions. No authorization bypass was established. Remaining uncertainty concerns remote search eligibility and account changes while a selection is retained. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 31.03% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 27 files. (1 skipped: 1 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: d2e31708-863a-4dc9-a7ff-d20c06c3c7dc
📒 Files selected for processing (12)
src/preload/api/jira-bridge.tssrc/renderer/src/components/jira-self-user.test.tssrc/renderer/src/components/jira-self-user.tssrc/renderer/src/components/jira-user-picker.tsxsrc/renderer/src/components/task-page-jira-create-fields.test.tssrc/renderer/src/components/task-page-jira-create-fields.tssrc/renderer/src/components/task-page/jira/IssueAssigneeField.tsxsrc/renderer/src/components/task-page/jira/IssueDialog.tsxsrc/renderer/src/components/use-task-page-jira-creation-metadata.tssrc/renderer/src/components/use-task-page-jira-creation-state.tssrc/renderer/src/components/use-task-page-jira-issue-creation.tssrc/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes
- Create-time assignee picker — new
IssueAssigneeFieldwired intoIssueDialog, offeringAutomatic/Assign to me/ user search viaJiraUserPicker.fixedOptions. buildJiraCreateSubmission— merges the picked assignee intocustomFieldsand names user-typed keys inuserFieldKeysonly when a value is present, keeping Automatic creates compatible with older remote hosts.getJiraSelfUser— site-scoped "me" resolution (stored site identity wins; viewer only stands in for the active/single site), with unit coverage.- State & reset plumbing —
newJiraIssueAssigneeadded and reset on provider change, project/issue-type switch, create, and dialog close;assigneetreated as a system create field;userFieldKeysadded to the preload arg type; en locale keys synced.
ℹ️ Nitpicks
- The
JiraUserPickerdoc comment now sits above the newJiraUserPickerFixedOptiontype (src/renderer/src/components/jira-user-picker.tsx:41-50), so it documents the type alias rather than the component. Move the type above the comment (or repeat the doc on the component). - On a remote host without the
jira.user-fields.v1capability the picker still offers "Assign to me" (self resolution reads connection status, not search) and it only fails at create with the update-required message.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes
- Create-time assignee picker — new
IssueAssigneeFieldwired intoIssueDialog, offeringAutomatic/Assign to me/ user search viaJiraUserPicker.fixedOptions. buildJiraCreateSubmission— merges the picked assignee intocustomFieldsand names user-typed keys inuserFieldKeysonly when a value is present, keeping Automatic creates compatible with older remote hosts.getJiraSelfUser— site-scoped "me" resolution (stored site identity wins; viewer only stands in for the active/single site), with unit coverage.- State & reset plumbing —
newJiraIssueAssigneeadded and reset on provider change, project/issue-type switch, create, and dialog close;assigneetreated as a system create field;userFieldKeysadded to the preload arg type; en locale keys synced.
ℹ️ Nitpicks
- The
JiraUserPickerdoc comment now sits above the newJiraUserPickerFixedOptiontype (src/renderer/src/components/jira-user-picker.tsx:41-50), so it documents the type alias rather than the component. Move the type above the comment (or repeat the doc on the component). - On a remote host without the
jira.user-fields.v1capability the picker still offers "Assign to me" (self resolution reads connection status, not search) and it only fails at create with the update-required message.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
… or anyone
The new-issue dialog gains an Assignee picker: Automatic (Jira applies the
project's default assignee), one-click "Assign to me" resolved from the
target site's stored identity, or any user via search. The selection resets
with the custom field values on project/type switches, since account ids
are site-scoped.
Creates now also send userFieldKeys, so the host shapes user-typed values
into the {accountId}/{name} refs Jira requires — previously the dialog
never passed them and user create fields were sent as bare strings. Keys
are only named when a value is present, keeping older remote hosts without
the user-fields capability working for assignee-less creates.
Co-Authored-By: Claude Fable 5 <[email protected]>
3f22893 to
2a6661e
Compare
…, per-site picker remount, keep assignee across type changes - Search the create dialog's assignee picker against /user/assignable/search?project=… (new listAssignableUsersForProject, IPC split into jira-user-search.ts for the max-lines budget); remote environment targets fall back to the existing site-wide search since older hosts have no such RPC - Remount the picker per target project so cached results from the previous project or site cannot be selected after a switch - Reset the picked assignee on project selection (account ids are site-scoped) instead of on every create-fields reload, so issue-type changes keep it - Hide the assignee field and omit it from the payload when the target create screen does not accept an assignee — Jira rejects fields absent from the screen Co-Authored-By: Claude Fable 5 <[email protected]>
|
Addressed the review in 139e54b:
Note: "Assign to me" can still name a user who is not assignable in rare project configurations; Jira's create error surfaces through the existing toast, same as other server-side validation. 🤖 Generated with Claude Code |
There was a problem hiding this comment.
Important
The create-time assignee picker sends the numeric project id as Jira's project query parameter. Jira Cloud accepts a project id or key there, but Jira Server/Data Center documents project as the project key only, so the assignee search degrades on Server/DC.
Reviewed changes
- Extracted the
jira:*user-search IPC handlers intojira-user-search.tsand threaded a newlistAssignableUsersForProjectthrough main, preload, and the runtime client (environment targets fall back to the site-wide search). - Added a
searchUsersoverride toJiraUserPickerso the create dialog can use the project-scoped assignable search while other callers keep/user/search. - Added
hasJiraAssigneeCreateFieldandbuildJiraCreateSubmission, hiding the picker and omitting the assignee when the create screen does not accept the field. - Moved the assignee reset from the create-fields effect to the explicit project-select handler (issue-type changes now keep the pick) and remount the picker per project to drop stale search results.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
@greptileai review @coderabbitai full review |
✅ Action performedFull review finished. |
|
Visual proof for Captured on macOS in a hidden Electron renderer via Playwright CDP, using the real dialog, picker, and selection hook with fixture Jira users. These are component interaction checks; no live Jira issue was created and full application/backend integration is not claimed. Playwright exercised Assign to me, searching for Grace Hopper, choosing that user, and returning to Automatic; each resulting trigger label was asserted. |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
2651343b-26c7-4323-9bd8-0ebc739d2526
📒 Files selected for processing (12)
src/main/jira/jira-issue-create-metadata.tssrc/renderer/src/components/jira-self-user.test.tssrc/renderer/src/components/jira-self-user.tssrc/renderer/src/components/task-page-jira-create-fields.tssrc/renderer/src/components/task-page/jira/IssueAssigneeField.test.tsxsrc/renderer/src/components/task-page/jira/IssueAssigneeField.tsxsrc/renderer/src/components/use-jira-create-assignee.test.tsxsrc/renderer/src/components/use-jira-create-assignee.tssrc/renderer/src/components/use-task-page-jira-creation-projects.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/runtime/runtime-jira-client.test.tssrc/renderer/src/runtime/runtime-jira-user-fields-client.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review (139e54b), three commits landed:
- Project-key assignable search — the create-time picker now sends the Jira project key (
newJiraIssueTargetProject.key), which both Cloud and Server/Data Center accept, instead of the numeric project id. This resolves the prior Server/DC degradation finding, and the test now asserts the key reachesjiraListAssignableUsersForProject. - Provider-scoped "Assign to me" — the option is hidden unless the loaded status belongs to the current provider (
jiraStatusCurrent), andhasJiraStatusChangednow deep-compares the viewer and each site (viashallow) plusactiveSiteIdandcredentialProtection.checkJiraConnectionnow takes thejiraStatusUpdatepath whenever the context key changes, so a provider switch replaces the status snapshot instead of reusing the previous host's viewer. This also clears the open coderabbit finding on the same line. - Hook-confirmation rename — the local callback in
worktree-creation-hook-preparation.tsis renamedconfirm→confirmHook(inherited-main CI repair for the localization scanner; behavior unchanged).
The assignee state reset, project-keyed picker remount, and submission gating all interact correctly with the new current-provider gate: a stale viewer can no longer be selected, and the new jira-connection-identity tests fail against the previous detection logic.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
Preserve the six qualified metadata changes and include the existing localization repair from #24376.
…25579) The paired web client has no Jira preload, so window.api.jira.status() resolves undefined from the fallback proxy. Since #24376 the first status check stored that undefined and the sidebar crashed reading `.connected`. Parse the status reply at the runtime-client boundary so every reader gets a well-formed JiraConnectionStatus.





ELI5
Choose the assignee while creating a Jira issue: use the project default, assign it to yourself, or search for another user.
What Changed
The create dialog now reuses the Jira user picker and sends selected user IDs through the existing Cloud/Server user-field conversion. The picker only appears when Jira's create screen accepts an assignee. Local search requests users assignable to the target project using its key, as required by Jira Server/Data Center.
Selections belong to the effective project, site, and provider. Changing a site filter or provider clears them before submission, including when the dialog was closed; changing only the issue type retains the selection. Unknown sites never borrow another site's signed-in identity. Provider changes also remount the picker so cached candidates cannot be selected under a different host. Assign to me stays hidden until connection status belongs to the current host, and status refreshes retain changed account identities even when the email and site count match.
Why
Previously assignment required a second step after creation. Reusing the existing picker and user-field conversion avoids a separate assignment path. Automatic omits the field so Jira applies its project default, including when Jira marks assignee required.
Linked Issue
N/A — no tracking issue was supplied; this review was explicitly requested by a maintainer.
Visual Proof
Captured on macOS in a hidden Electron renderer via Playwright CDP, using the real dialog, picker, and selection hook with fixture Jira users. These are component interaction checks; no live Jira issue was created and full application/backend integration is not claimed.
Before (main):

After (Automatic):

Picker and selected user:


Playwright exercised Assign to me, searching for Grace Hopper, choosing that user, and returning to Automatic; each resulting trigger label was asserted.
Testing
At
cbda843ae78df3dbcc2beac1134c12116c8cd59f, on macOS:pnpm tcpassed after the identity fix; the final commit only renames a local confirmation helper.142 focused Jira/localization tests and 8 hook-preparation tests passed across Jira issue operations, self-user resolution, create payloads, assignee state, and runtime routing. Regressions cover implicit cross-site changes, stale callbacks, disconnected/unknown identities, query bounds, and remote hosts without user-field support.
pnpm run check:code-quality:changedpassed, including React Doctor, type-aware checks, and design-system checks.Localization catalogs, extraction, required runtime catalog, and coverage checks passed.
Main/preload development bundles built. Full app renderer startup encountered local disk exhaustion; the component proof above completed in an isolated hidden renderer.
PR Checks passed at
cbda843ae78df3dbcc2beac1134c12116c8cd59f, including static analysis/typecheck, all five unit-test shards, both packaging checks, relay integration, and final verification. Node persistence and test LoC checks also passed.Rendered interactions tested locally through Playwright CDP with fixture Jira data
Automated tests added/updated
AI Disclosure
Original implementation: Claude Code (Claude Fable 5). Maintainer review and follow-up fixes: Codex.
Review
Adversarial review fixed two remaining cross-site hazards: implicit project changes retained the previous assignee, and an explicitly unknown site could inherit a single configured site's viewer. The state now resets synchronously on effective target changes. A follow-up review also found cached candidates could survive a provider change with identical project/site IDs; the picker now remounts per provider and a rendered regression verifies old candidates disappear while the new search is pending.
Agent skill upstream boundary
Notes
Includes one inherited-main CI repair: rename the local hook-confirmation callback from
confirmtoconfirmHookso the localization scanner does not mistake it for the browser API. The behavior is unchanged and 8 focused hook tests pass.The existing remote user-field capability protects mixed-version hosts. Automatic creation still works without it; explicit user fields produce an update-required error. Remote hosts use their existing site-wide search because they have no project-scoped search RPC, so Jira may reject a remote selection that is not assignable. Native Cloud/Server search and payload differences are tested, including that the renderer sends a project key even when its numeric ID differs. No filesystem, platform shortcut, or git-worktree assumptions were added. Linux/Windows and live SSH/Jira were not manually exercised.
Checklist