You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(jira): show the site host next to each Jira site name - #37719
With two Jira sites connected, both showed the same name: yours. Now each one also shows its web address.
What Changed
Before: each Jira site was labeled with the profile's display name, e.g. Ada Lovelace twice.
After: Ada Lovelace (acme.atlassian.net). Server/DC sites keep their context path, e.g. jira.example.com/jira.
New helper getJiraSiteLabel(site) in src/shared/jira/jira-site-label.ts, built from the stored JiraSite.siteUrl.
Used for issue/project siteName in jira-issue-mapping.ts, the Tasks site picker, the source summary, new-workspace Jira rows, and the settings Disconnect aria-label.
If the name is blank or equals the host, the label is just the host.
Why
Jira's API gives no separate site name, but siteUrl is already stored and normalized.
The host is always shown, not only on collisions. siteName is built in main per issue, where other sites are unknown. Labels also stay stable when sites are added or removed.
Taken from the real Electron app (Windows, electron-vite build --mode e2e) driven by a throwaway Playwright script, before = main at 312ce09. Two Jira sites are seeded into the store, both on a profile named "Ada Lovelace".
Before
After
The source chip at the top also gains the host.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
vitest: new jira-site-label.test.ts (same-name sites, Server/DC path, blank or host-equal name) plus updated source-display and a11y tests. Wider run over src/main/jira, src/cli/jira, task-page, new-workspace and settings/jira: 1039 tests pass.
Full typecheck (run-typecheck-projects-in-parallel.mjs): pass.
check:changed on Windows: 28/30 pass. The 2 failures are not from this diff. Unit tests failed in orchestration, ai-vault and terminal-recovery files this PR doesn't touch (EBUSY locks on Windows). protected-copy-keys.json is stale is only CRLF line endings on a Windows checkout; regenerating it gives no content change.
Tested on Windows only.
Risk
Level: Low
The site / KEY context on board and list rows gets longer. It sits in truncating containers.
An older remote host still sends the name-only siteName. The task-page list and board relabel it from the stored site, and the picker and summary build the label locally, so all of them show the host.
Not changed: the mobile jiraSiteLabel chip. Happy to add it here or in a follow-up.
Back out: plain revert. No saved data changes.
AI Disclosure
Written with Claude Code (Claude Opus 5.5). I reviewed the diff and the test results.
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.
No actionable comments were generated in the recent review.
Walkthrough
The change adds getJiraSiteLabel to normalize Jira site hosts and combine them with display names when needed. Jira mappings and renderer labels now use this function. withJiraSiteLabel updates issue and project site names from matching Jira sites. Tests cover duplicate site names, host-based labels, relabeling, and accessible names.
Severity of issue fixed: Low
Merge Risk: Minimal · previous review 46b90
No merge-blocking risk is established from the available evidence.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title "fix(jira): show the site host next to each Jira site name" matches the main change. The PR adds a getJiraSiteLabel helper that appends each Jira site's host to its displayed name, so two si…
Linked Issues check
Issue #37435 requires distinct Jira site names when sites share a profile name. getJiraSiteLabel builds labels with the normalized host and preserves Server/Data Center context paths. The helper is …
Out of Scope Changes check
The changed files implement or test the Jira site-label requirement in issue #37435. The task-page projection and creation-project changes support consistent labels for older name-only values. The sou…
Description check
The description covers the required sections, including before-and-after images, testing, risks, and rollback. It reports Windows-only testing and two failed checks. The visual-proof checklist item re…
Full details: Title check
Explanation
The title "fix(jira): show the site host next to each Jira site name" matches the main change. The PR adds a getJiraSiteLabel helper that appends each Jira site's host to its displayed name, so two sites on the same profile name become distinguishable. The title is specific, short, and clearly describes the primary change.
Full details: Linked Issues check
Explanation
Issue #37435 requires distinct Jira site names when sites share a profile name. getJiraSiteLabel builds labels with the normalized host and preserves Server/Data Center context paths. The helper is used for issue and project mappings, task-page site labels, source display, new-workspace rows, and the settings Disconnect label. withJiraSiteLabel also relabels older name-only values from stored site data. Tests cover duplicate names, context paths, fallback names, and projection and creation-project behavior.
Full details: Out of Scope Changes check
Explanation
The changed files implement or test the Jira site-label requirement in issue #37435. The task-page projection and creation-project changes support consistent labels for older name-only values. The source, picker, workspace, settings, mapping, and accessibility updates are related display changes. No unrelated product behavior is identified. The unchanged mobile chip is not required by the linked issue.
Full details: Description check
Explanation
The description covers the required sections, including before-and-after images, testing, risks, and rollback. It reports Windows-only testing and two failed checks. The visual-proof checklist item remains unchecked.
Full details: Docstring Coverage
Explanation
Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 10 functions across 13 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
The trigger is fixed at 220px, and SelectTrigger clips its value. Long profile names can hide the host after a site is selected. Allow more space or provide the full label in a tooltip. (raw.githubusercontent.com)
The reason will be displayed to describe this comment to others. Learn more.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Minor · Normalize Jira site labels at the task-page… · use-task-page-jira-list-projection.ts:58-71
src/renderer/src/components/task-page/jira/use-task-page-jira-list-projection.ts:58-71 Minor · Functional Correctness · Quick win
Normalize Jira site labels at the task-page projection boundary.
A task-page request can read issues from an older runtime that includes siteId but only the display name in siteName. The matching site in jiraStatus.sites includes siteUrl, but this projection preserves the name-only value. The all-sites issue list and board therefore keep same-name sites indistinguishable.
Map each projected issue through getJiraSiteLabel after the cache fallback. This shared projection supplies the corrected label to both surfaces.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
@coderabbitai Fixed the outside-diff finding (use-task-page-jira-list-projection.ts) in 28981fa. The task-page projection now relabels each issue from its stored site via a small withJiraSiteLabel helper in jira-site-label.ts, so name-only siteName values from older remote hosts show the host in the all-sites list and board. It returns the same issue object when the label already matches. Unit tests added; Jira suites (1050 tests) and full typecheck pass.
Add a projection-level test for the site-label relabel.
The helper tests cover withJiraSiteLabel in isolation. They do not detect removal of the relabel call in useTaskPageJiraListProjection. The status-order session test uses an empty jiraStatus.sites and an issue with no siteName, so it never reaches the relabel branch.
A focused test can render the projection with:
an issue that has siteId: 'acme' and siteName: 'Ada Lovelace', with no cache entry for that issue,
It should assert that displayedJiraIssues[0].siteName is 'Ada Lovelace (acme.atlassian.net)'. Adding a case with a cached issue would also cover the findTaskPageJiraIssue fallback 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: 9dabba29-ec98-403f-9b11-c0c4b0736476
Commits
Reviewing files that changed from the base of the PR and between 050e800 and 28981fa.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
@coderabbitai Added the projection-level test in 0e67842 (use-task-page-jira-list-projection.site-label.test.tsx). It renders useTaskPageJiraListProjection with a name-only siteName, no cache entry, and the stored acme site, and expects 'Ada Lovelace (acme.atlassian.net)'. It fails when the withJiraSiteLabel call is removed.
The reason will be displayed to describe this comment to others. Learn more.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Minor · Add the host label to projects from name-only remote responses. · jira-issue-mapping.ts:86
src/main/jira/jira-issue-mapping.ts:86 Minor · Functional Correctness · Quick win
Add the host label to projects from name-only remote responses.
For a connected older remote, the picker can show two projects as identical. The mapper change formats siteName only in the main process, so the old remote keeps the bare display name. JiraProjectPicker renders ${project.key} · ${project.name} with the raw project.siteName as the description, so two sites with the same display name produce the same visible option text. The user cannot tell which site a project belongs to. The selection value still carries siteId, so the failure is in the displayed text.
The issue list is relabeled in use-task-page-jira-list-projection.ts with withJiraSiteLabel(..., jiraStatus.sites ?? []). The project list from use-task-page-provider-metadata.ts has no equivalent step. Apply the same host label to projects from the current runtime's jiraStatus.sites before the picker receives them.
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: 31748c0b-d963-4523-93e6-e190f7af95e2
Commits
Reviewing files that changed from the base of the PR and between 28981fa and 0e67842.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
For best results, initiate chat on the files or code changes.
Analysis chain
Script executed:
#!/bin/bashset -euo pipefail
fd -t f '^use-task-page-jira-list-projection(\.site-label\.test\.tsx|\.ts)$'forfilein src/renderer/src/components/task-page/jira/use-task-page-jira-list-projection.site-label.test.tsx src/renderer/src/components/task-page/jira/use-task-page-jira-list-projection.ts;do
ast-grep outline "$file"printf'\n--- %s ---\n'"$file"
sed -n '1,240p'"$file"done
Length of output: 8508
@Mahdi-Hasan Thanks. I inspected the added test. It exercises useTaskPageJiraListProjection with a name-only siteName, empty caches, and the stored acme site. It asserts that the projected label is Ada Lovelace (acme.atlassian.net).
This covers the projection-level regression, not just the helper. I did not run the test or verify the reported failure when withJiraSiteLabel is removed.
Project picker labels (jira-issue-mapping.ts:86): useTaskPageJiraCreationProjects now runs each project through withJiraSiteLabel(project, jiraSites) before sorting. Older remotes' name-only siteName shows the host in the picker, its search, and its sort. New test use-task-page-jira-creation-projects.site-label.test.tsx fails without the relabel.
Clipped site select (SourceBar.tsx:213): the trigger keeps its 220px width and gets the full getJiraSiteLabel(selectedJiraSite) as its title, so a clipped host is still readable on hover.
oxlint, oxfmt, full typecheck, and the task-page + jira suites (671 tests) pass.
For best results, initiate chat on the files or code changes.
Analysis chain
Script executed:
#!/bin/bashset -euo pipefail
fd -t f '^(use-task-page-jira-creation-projects\.ts|use-task-page-jira-creation-projects\.site-label\.test\.tsx|SourceBar\.tsx|jira-issue-mapping\.ts)$'forfilein src/renderer/src/components/task-page/jira/use-task-page-jira-creation-projects.ts src/renderer/src/components/task-page/jira/use-task-page-jira-creation-projects.site-label.test.tsx src/renderer/src/components/task-page/SourceBar.tsx;do
ast-grep outline "$file"printf'\n--- %s ---\n'"$file"
sed -n '1,260p'"$file"done
Length of output: 21190
@Mahdi-Hasan Thanks. I inspected the code and regression test. Both Minor findings are addressed.
useTaskPageJiraCreationProjects relabels projects before sorting and filtering. Its memo dependencies include jiraSites. The new hook test checks that a name-only label becomes Ada Lovelace (acme.atlassian.net).
SourceBar.tsx keeps the 220px selector width and sets its title to the full selected-site label.
I did not run the checks or tests. The passing results and the test’s failure without relabeling remain based on your report.
A Jira site's name is the connected user's profile name, so several
sites with the same account read the same. Label sites as
"Name (host)" in the Tasks site picker, source summary, issue and
project site context, new-workspace rows and the disconnect action.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
An older remote host still sends siteName as the profile name only, so
same-name sites looked alike in the all-sites list and board. The task-page
projection now relabels each issue from its stored site with
getJiraSiteLabel, via a small withJiraSiteLabel helper that returns the
same issue when the label already matches.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Renders useTaskPageJiraListProjection with a name-only siteName and a
stored site, so removing the relabel call fails a test.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Older remote hosts send a name-only siteName for projects too. The task-page
project list now relabels each project from its stored site, so same-name
sites stay apart in the create-issue picker. The site select trigger also
gets the full label as a title, since its fixed width can clip the host.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
With two Jira sites connected, both showed the same name: yours. Now each one also shows its web address.
What Changed
Ada Lovelacetwice.Ada Lovelace (acme.atlassian.net). Server/DC sites keep their context path, e.g.jira.example.com/jira.getJiraSiteLabel(site)insrc/shared/jira/jira-site-label.ts, built from the storedJiraSite.siteUrl.siteNameinjira-issue-mapping.ts, the Tasks site picker, the source summary, new-workspace Jira rows, and the settings Disconnect aria-label.Why
siteUrlis already stored and normalized.siteNameis built in main per issue, where other sites are unknown. Labels also stay stable when sites are added or removed.Linked Issue
Fixes #37435
Visual Proof
Taken from the real Electron app (Windows,
electron-vite build --mode e2e) driven by a throwaway Playwright script, before =mainat 312ce09. Two Jira sites are seeded into the store, both on a profile named "Ada Lovelace".The source chip at the top also gains the host.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
vitest: newjira-site-label.test.ts(same-name sites, Server/DC path, blank or host-equal name) plus updated source-display and a11y tests. Wider run oversrc/main/jira,src/cli/jira, task-page, new-workspace and settings/jira: 1039 tests pass.Full typecheck (
run-typecheck-projects-in-parallel.mjs): pass.check:changedon Windows: 28/30 pass. The 2 failures are not from this diff. Unit tests failed in orchestration, ai-vault and terminal-recovery files this PR doesn't touch (EBUSY locks on Windows).protected-copy-keys.json is staleis only CRLF line endings on a Windows checkout; regenerating it gives no content change.Tested on Windows only.
Risk
Level: Low
site / KEYcontext on board and list rows gets longer. It sits in truncating containers.siteName. The task-page list and board relabel it from the stored site, and the picker and summary build the label locally, so all of them show the host.jiraSiteLabelchip. Happy to add it here or in a follow-up.AI Disclosure
Written with Claude Code (Claude Opus 5.5). I reviewed the diff and the test results.
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)