Repository navigation
Pick Jira users for required Reporter and custom user fields - #31972
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments: 1
src/renderer/src/components/task-page/jira/IssueUserField.test.tsx: 1
1-102: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftExercise the production Jira dialog path.
The Server case does cover
customfield_9; it is not Reporter-only. However, the test uses a localForm, callsbuildJiraCreateSubmissiondirectly, and imports the main-processcreateIssuedirectly. It does not exerciseIssueDialogstate updates orhandleCreateNewJiraIssue, which calls the renderer'sjiraCreateIssue. A regression in that dialog-to-host wiring can therefore pass this test. RenderTaskPageJiraIssueDialogwith a Server custom user field, or test its real creation hook with a model, and retain thecustomfield_9payload assertion. The existing builder and host tests cover these lower-level pieces separately, not this production path.
ℹ️ Review info
⚙️ Run configuration
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
cf7ad929-985a-4e4c-ba52-a3e3a914172a
📒 Files selected for processing: 4
src/renderer/src/components/task-page-jira-create-fields.tssrc/renderer/src/components/task-page/jira/IssueDialog.tsxsrc/renderer/src/components/task-page/jira/IssueUserField.test.tsxsrc/renderer/src/components/task-page/jira/IssueUserField.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
…1-jira-reporter-picker
|
Jira issue creation showed a plain text box for required Reporter fields and treated a typed person's name as their user identity. The shipping dialog now uses the existing user picker and submits the selected identity. Supplied metadata choices remain available, and a deliberate known-ID action still works when directory search is empty, denied or pending. Per Brennan's October 23 ruling, matching people now appear first and the “Use known user ID” action comes last. Typing a search alone still leaves the required field empty. Full review rounds 1–2 and the narrow ordering/merge checks are complete. The review fixed the lookup dependency that blocked known identities and discarded supplied choices. No new state, provider request or saved field was added. The field's display label remains local while the existing draft owns the identity; that difference is intended because no other consumer needs the label. Validation: Head Earlier bounded shipping-app fixture evidence at The outdated project-reset review thread was refuted and resolved: the existing metadata reload clears custom-field values, and rendered project/type/cross-site reset checks confirmed the required Reporter becomes empty again. The lane owner accepted the earlier bounded shipping-dialog evidence. Live Jira directory search and creation were not exercised: the isolated profile had no Jira site, and the provider request is unchanged. Existing host tests cover Cloud accountId and Server name shaping. Remote coverage uses the real runtime client with a mocked transport; a paired-host renderer/network was not exercised. The fixtures demonstrate renderer behavior and submitted identities, not live provider acceptance. Deferred: the existing close-during-search spinner is cosmetic; Title Ctrl+Enter double dispatch was reproduced on baseline and branch and is tracked in STA-11751. For Brennan's review
Final people-first results: The baseline and selected-person images use constructed Jira responses in the running shipping dialog at the earlier QA head. The final results image is explicitly static renderer proof on the final head; it covers the only later renderer change. Judgment points: schema-directed control, people before explicit known ID, and shipping-dialog regression. |



Problem
Creating a Jira issue fails when its create screen requires Reporter or another single-user field: Orca shows a text box, then treats a typed display name as a user identity. The task-page refactor lost the scalar-user schema branch while the earlier form and its tests remained outside the shipping path. The existing host mapping expects an actual user identity. Tracked in STA-11541.
User-facing change
Required single-user fields without supplied choices now use the existing Jira user picker. Search for a person and select their name; Orca submits their identity. If directory search is empty, denied, or still pending, a separate “Use known user ID” action lets someone deliberately choose an identity they already know. Typing a search alone never fills the required field. Per Brennan’s October 23 ruling, matching directory people appear first and the “Use known user ID” action comes last. Supplied metadata choices keep the existing Select and remain usable without directory search.
The chosen identity stays in the existing string draft, with only its display label held in the field component. Scalar identities pass through the existing submission builder and site-aware host mapping: accountId for Jira Cloud, normalized username/key in the existing name reference for Server and Data Center. No new saved field, wire operation, or host fallback is added. Assignee and multi-user comma-separated input keep their existing behavior, and Reporter still starts blank. Existing older-host capability checks continue to explain unsupported user-field creation after explicit identity selection.
Plan and review classification: FULL
Restore schema-directed selection in the shipping dialog, preserve supplied choices and explicit known identities, and retain the existing source, selection callback, draft, and host conversion mechanism. The new action is opt-in for the scalar-field caller only; other shared picker callers keep their behavior.
The field-local display label intentionally differs from the earlier parent map because it has no consumer outside its field. Existing source/project/site/type keys and metadata reloads scope its lifetime; the parent draft remains authoritative.
Validation
The replacement regression mounts the shipping TaskPageJiraIssueDialog and calls the real issue-creation hook and submission builder through to a mocked Jira runtime boundary. It covers directory selection, explicit identity selection with empty/denied/pending search, and a supplied-metadata selection contract. The metadata fixture is constructed contract coverage, not an observed live Jira response. Removing the shipping scalar schema branch prevents the main regression from finding its picker.
Existing host mutation tests cover Cloud accountId and Server name shaping; this change reuses those tests rather than adding a provider matrix.
Current head is 422e66b. The final sync merged main 6ed9382 without conflicts; the Reporter picker, field, dialog, regression and submission helper were unchanged by the merge. The full selected CI workflow passed on this head, including static analysis/typecheck, all five unit shards and both platform packages. A targeted local run of the shipping-dialog renderer regression also passed all five cases on this head, including actual people-first row order and selected-identity submission. The previously admitted Windows QA machine passed four explicitly named test files, 69 tests, including Cloud accountId/Server name shaping and runtime routing contracts.
The shipping Tasks → Jira → New Jira issue dialog was exercised on baseline and the previously QA’d head with the same constructed required-Reporter schema. At the previously QA’d head 0b82113, baseline submitted the display name Alex Rivera literally and choosing the person on the branch submitted cloud-alex. That broader evidence carries; the only later renderer change moves the explicit known-ID action below the people. Rendered checks also covered known identities with empty/denied search, supplied choices, custom-user replacement, nearby Assignee/Priority/multi-user fields, project/type/site resets, and synthetic success/failure/retry. The real renderer, draft, submission builder and preload/runtime dispatch ran; main Jira status/catalog/directory/create handlers returned fixtures. Supplied metadata choices were constructed contract coverage. Remote checks used the real runtime client with a mocked transport, rather than a paired host.
The lane owner accepted the bounded rendered-dialog and payload evidence for this renderer change. As the stated limit of the unchanged provider path, live Jira directory search and issue creation were not exercised: no Jira site is signed in on the QA machines, and this PR doesn't change the host request. The exercised isolated Windows profile had disconnected status, no viewer and no sites. Provider authorization/writes and rendered remote-host/network acceptance were not exercised; the existing host tests and real runtime-client transport contracts provide the separately described coverage.
The people-first ruling is implemented and independently reviewed, including a narrow check of the final main merge. Two full review rounds and the bounded ordering/merge checks are complete. The final Light UI check pairs the passing shipping-dialog renderer regression with the static renderer screenshot below; it is not a second full app QA round.
QA also reproduced a pre-existing double create dispatch when pressing Ctrl+Enter in Title on both baseline and branch; a button click dispatched once. This is tracked separately in STA-11751. No live duplicate Jira tickets were created during QA. In that earlier Windows run, test copies and drivers were stopped, assigned ports were clear, and readable real configuration hashes were unchanged; unreadable configuration paths do not establish hash parity. The final static-browser capture was also cleaned up and its CDP port released.
Rendered proof
These full-window screenshots show the shipping dialog against constructed Jira responses. They demonstrate the renderer behavior and submitted-identity flow described above, not acceptance by a live Jira site.
Baseline: a typed display name enables Create.
Final head: the matching directory person appears above the explicit known-ID action. Searching alone leaves Create disabled. This is static proof of the exact shipping-dialog regression DOM with production styles, not a new running-app or live-provider check. Input values and popover geometry are restored for the static capture; the interactive renderer test separately verifies row order, selection and submission.
Branch: selecting the person displays Alex Rivera and submits cloud-alex.