Skip to content

Choose Jira key casing and keep canonical Jira keys in review titles - #28596

Merged
nwparker merged 5 commits into
mainfrom
nwparker/jira-key-naming
Oct 14, 2026
Merged

nwparker merged 5 commits into
mainfrom
nwparker/jira-key-naming

Conversation

@nwparker

@nwparker nwparker commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​933 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​929
Prod 32 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​500 $\color{#cf222e}{\Huge{\mathbf{−}}}$​51 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​449

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.

Default/lowercase and before-prefix behavior Uppercase choice and generated title
Before fixture After fixture

Manual title stays unchanged after Generate:

Manual title preserved

Testing

  • I manually tested these changes locally (automated hidden rendered interactions)
  • Automated tests added/updated, or explained why not below

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

  • Not applicable; no upstream skill-installer content copied.

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

  • This PR is small and focused around the complete issue
  • I explained what changed and why (ELI5, before/after, mechanism, alternatives)
  • Before/after screenshots attached, with fixture limitations stated
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered
  • Full lint/typecheck/test/build pass (focused checks pass; exact-head renderer compilation and platform builds recorded separately)

Adapt the selectable naming policy from #28557, then complete #18183
with canonical Jira prefixes across GitHub and GitLab review creation,
generation, background submission, and unattended preparation.

Co-authored-by: chucoding <56211193+chucoding@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

The change adds a Jira issue-key casing setting for generated Jira-linked workspace and branch names. It also adds Jira key extraction and canonical title prefixing to GitHub and GitLab review creation and generation flows. Manually edited review titles are preserved in the covered flows. Jira browse URL matching now accepts different casing.

Priority: ➖ Normal

Merge Risk: 🔵 Low · up to 86abe

Auto-submit may replace a manually edited review title if an edit can occur while generation completes. Confirm that edit path before merging, or accept the bounded risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 19.05% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 42 functions across 39 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Direct issue #18183 has coding requirements. The PR adds the lowercase default and the preserve Jira key-casing option for generated workspace and branch seeds. getLinkedWorkItemWorkspaceName appl…
Out of Scope Changes check Passed The changed production files implement the two coding objectives in #18183: configurable Jira key casing for new linked workspace and branch names, and canonical Jira prefixes for GitHub and GitLab re…
Title check Passed The title clearly and concisely describes the two main changes: configurable Jira key casing and canonical Jira keys in review titles.
Description check Passed The description is complete and follows the repository template. It explains the user-visible changes, rationale, linked issue, visual proof, testing, AI disclosure, compatibility considerations, and …
Full details: Docstring Coverage

Explanation

Docstring coverage is 19.05% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 42 functions across 39 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f7371c94-c098-4b1d-b830-7edadd85f972
📥 Commits

Reviewing files that changed from the base of the PR and between 9c0420f and 86abee6.

📒 Files selected for processing: 40
  • src/renderer/src/components/jira-issue-workspace-actions.test.ts
  • src/renderer/src/components/jira-issue-workspace-actions.ts
  • src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-composer-state.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-generation.tsx
  • src/renderer/src/components/right-sidebar/create-pull-request-dialog-field-model.ts
  • src/renderer/src/components/right-sidebar/create-review-draft-title.test.ts
  • src/renderer/src/components/right-sidebar/create-review-draft-title.ts
  • src/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-jira-title.test.tsx
  • src/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-review.ts
  • src/renderer/src/components/right-sidebar/source-control/review/use-create-review-composer.ts
  • src/renderer/src/components/right-sidebar/source-control/review/use-pull-request-generation.test.tsx
  • src/renderer/src/components/right-sidebar/source-control/review/use-pull-request-generation.ts
  • src/renderer/src/components/right-sidebar/source-control/review/use-review-flows.ts
  • src/renderer/src/components/right-sidebar/use-create-jira-review-title.test.tsx
  • src/renderer/src/components/right-sidebar/use-create-pull-request-field-seeding.ts
  • src/renderer/src/components/right-sidebar/useCreatePullRequestDialogFields.ts
  • src/renderer/src/components/settings/GitPane.tsx
  • src/renderer/src/components/settings/JiraIssueKeyCasingSetting.tsx
  • src/renderer/src/components/settings/git-search.ts
  • src/renderer/src/components/task-page-source-context.tsx
  • src/renderer/src/hooks/composer-state/async-composer-state.ts
  • src/renderer/src/hooks/composer-state/composer-decisions.ts
  • src/renderer/src/hooks/composer-state/composer-name-ownership.test.ts
  • src/renderer/src/hooks/composer-state/issue-source-actions.ts
  • src/renderer/src/hooks/composer-state/quick-submit-source-preparation.ts
  • src/renderer/src/hooks/useComposerState-host-context-boundaries.test.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/jira-issue-key-casing.ts
  • src/renderer/src/store/slices/pull-request-generation-auto-submit.ts
  • src/renderer/src/store/slices/pull-request-generation-jira-title.test.ts
  • src/renderer/src/store/slices/pull-request-generation.ts
  • src/shared/default-global-settings.ts
  • src/shared/global-settings-types.ts
  • src/shared/jira-issue-url.test.ts
  • src/shared/jira-issue-url.ts
  • src/shared/jira-review-title.test.ts
  • src/shared/jira-review-title.ts
  • src/shared/ui-chrome-types.ts
  • src/shared/workspace-name.test.ts
  • src/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.

@nwparker
nwparker merged commit d194712 into main Oct 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Choose Jira issue-key formatting for generated branches

1 participant