Repository navigation
Choose Jira key casing and keep canonical Jira keys in review titles - #28596
Conversation
📝 Walkthrough
Priority: ➖ Normal Merge Risk: 🔵 Low · up to
|
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:
f7371c94-c098-4b1d-b830-7edadd85f972
📒 Files selected for processing: 40
src/renderer/src/components/jira-issue-workspace-actions.test.tssrc/renderer/src/components/jira-issue-workspace-actions.tssrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-composer-state.tsxsrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-generation.tsxsrc/renderer/src/components/right-sidebar/create-pull-request-dialog-field-model.tssrc/renderer/src/components/right-sidebar/create-review-draft-title.test.tssrc/renderer/src/components/right-sidebar/create-review-draft-title.tssrc/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-jira-title.test.tsxsrc/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-review.tssrc/renderer/src/components/right-sidebar/source-control/review/use-create-review-composer.tssrc/renderer/src/components/right-sidebar/source-control/review/use-pull-request-generation.test.tsxsrc/renderer/src/components/right-sidebar/source-control/review/use-pull-request-generation.tssrc/renderer/src/components/right-sidebar/source-control/review/use-review-flows.tssrc/renderer/src/components/right-sidebar/use-create-jira-review-title.test.tsxsrc/renderer/src/components/right-sidebar/use-create-pull-request-field-seeding.tssrc/renderer/src/components/right-sidebar/useCreatePullRequestDialogFields.tssrc/renderer/src/components/settings/GitPane.tsxsrc/renderer/src/components/settings/JiraIssueKeyCasingSetting.tsxsrc/renderer/src/components/settings/git-search.tssrc/renderer/src/components/task-page-source-context.tsxsrc/renderer/src/hooks/composer-state/async-composer-state.tssrc/renderer/src/hooks/composer-state/composer-decisions.tssrc/renderer/src/hooks/composer-state/composer-name-ownership.test.tssrc/renderer/src/hooks/composer-state/issue-source-actions.tssrc/renderer/src/hooks/composer-state/quick-submit-source-preparation.tssrc/renderer/src/hooks/useComposerState-host-context-boundaries.test.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/jira-issue-key-casing.tssrc/renderer/src/store/slices/pull-request-generation-auto-submit.tssrc/renderer/src/store/slices/pull-request-generation-jira-title.test.tssrc/renderer/src/store/slices/pull-request-generation.tssrc/shared/default-global-settings.tssrc/shared/global-settings-types.tssrc/shared/jira-issue-url.test.tssrc/shared/jira-issue-url.tssrc/shared/jira-review-title.test.tssrc/shared/jira-review-title.tssrc/shared/ui-chrome-types.tssrc/shared/workspace-name.test.tssrc/shared/workspace-name.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
ELI5
Jira branches can now keep the issue key in uppercase. New GitHub pull requests and GitLab merge requests also start with the real Jira key, even when AI writes the title. Anything you type yourself stays yours.
What Changed
Settings → Git → Jira Key Casing chooses lowercase (the existing default) or uppercase issue keys for newly suggested workspace directories, branches, and “Copy suggested branch name.” The Jira key is validated independently of the title slug, with no project allowlist. The composer keeps its generated-name ownership through submission; explicit names and existing directories/branches are untouched.
Both review forms use the linked Jira source to seed
<KEY> <title>. Their generation paths, background generation records, automatic submission, and unattended prepare-branch creation keep one canonical key. Both review forms retain edits made during automatic generation in the existing request record. They compare field revisions with the request-start seed, restore those edits after branch switches or remounts, and publish them only after the composer fields belong to the selected branch. Title, base, body, and draft edits survive generation; canceled and superseded runs remain fenced. Existing lowercase branches work because the key comes from structured Jira metadata, rather than guessing from the branch. Other issue providers and review providers retain their behavior.Adapted the naming policy and tests from #28557 by @chucoding (
chucoding <56211193+chucoding@users.noreply.github.com>). This finishes the review-title portion that the original PR explicitly left for follow-up, and tightens provider isolation and reuse of the existing Jira key parser.Why
Renaming a branch afterward leaves the directory wrong, while a Git naming preference cannot control AI output. Applying the policy at generation time keeps directory and branch suggestions consistent. Normalizing review titles at the owned draft and generation boundaries preserves user edits and works for both GitHub and GitLab without new provider-specific API behavior.
Linked Issue
Fixes #18183. Source reference: #28557; no existing contributor PR or issue was closed.
Visual Proof
Hidden Electron renderer on macOS, exact worktree identity verified through Playwright CDP. The real setting, review composer, and field hook were exercised with a clearly labeled controlled fixture. The suggested-name display uses the shared naming function; the review-generation response is controlled. No live Jira/AI request or Git worktree creation is claimed.
Manual title stays unchanged after Generate:
Testing
Regression reproduction against main: the uppercase policy returned a lowercase workspace seed; GitHub/GitLab review seeds lacked the key. Both failures were captured before implementation.
Focused and nearby checks pass at published head
6cd1941133d1: 166 tests across 18 suites, seven changed-code quality scans over 45 code files, a dedicated React Doctor pass, focus-read guard, English runtime catalog, localization extraction/coverage, and diff check. Coverage includes default/manual names, both GitHub and GitLab, copied branches, source-owned Jira metadata, generation records, unattended creation, and canceled/superseded requests.Four delayed-generation regressions through the actual Source Control and Checks consumers failed before the correction. Independent review also exposed returning to the same branch, composer remounts, and publication of old fields before another branch finished seeding. The final correction reuses the existing request record and initialized-owner guard; all 33 actual-consumer and real-field lifecycle tests pass, including the reproduced cross-branch failure. The independent final review found no concrete blocker.
The reviewed manual-revision sources remain unchanged after composing current main
4731172bd863. The merge retains the shared clipboard success/failure result and prompt template from main alongside the naming policy; provider and protocol unions match main. The adjacent quick-copy/template tests pass.Exact-head renderer compilation is coordinated separately; earlier renderer compilation passed before this correction. Existing hidden rendered proof still covers the unchanged setting and review form layout. No packaging build was run. Local verification used macOS; live Jira/AI and Linux/Windows/SSH end-to-end execution are not claimed.
AI Disclosure
Maintainer-requested implementation and validation with Codex. Original naming work by @chucoding used Claude Code; their author credit is retained.
Review
The source review and focused checks support low merge risk once exact-head renderer compilation passes. Default naming, manual ownership, GitHub/GitLab isolation, returning to a branch, remounts, and two concurrent branch generations are covered. Exact-head GitHub CI results remain separate from the local evidence.
Agent skill upstream boundary
Notes
Pure string transforms; no new commands, paths, shortcuts, Git-version requirements, or process launches. The setting is optional on the wire and missing/unknown values retain lowercase behavior. Generation source identity is captured for the owning workspace and host before async work; focus changes cannot retarget it. Folder metadata uses the existing attachment reader, and folder display names are unaffected. Mobile and older peers remain compatible; no RPC shape/opcode changes. Multiple unrelated Jira attachments without a selected primary task do not invent a review owner. No security-sensitive inputs or credentials added.
Checklist