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(tasks): let single-host multi-repo projects pick an individual task source - #43609
Sometimes a project has more than one copy of the same code on one computer, like the original repo and your own fork. The Tasks project picker only let you choose between copies when they were on different computers, so the fork could never be picked and its issues never showed up. Now, whenever a project has more than one copy, a small arrow opens a menu where you pick the one you want. Each copy is labelled with its repo name.
What Changed
Before: In Tasks, a project group whose sources are all on one host showed up as a single flat row. One example is a fork that upstream folds under its upstream project. The row had no "Choose task source" chevron or flyout, so you could not select the fork, list its issues, or reach the Origin/Upstream issue-source selector.
After: A chevron appears on any project group with more than one source. Hovering it opens the existing source flyout, and picking a source selects that repo.
The flyout gate changed from hasMultipleTaskProjectHostsInGroup(group) to group.sources.length > 1.
Flyout rows still show host labels when the group spans more than one host, so multi-host groups look the same as before. In single-host groups, rows show source.displayName instead. Otherwise every row would read "This computer".
Why
The control is labelled "Choose task source", not "Choose host". The flyout already lists every source, and the downstream selection logic (selectProjectSource, getTaskProjectPickerGroups, normalizeTaskRepoSelection) already handles a non-primary source on the same host. Only the gate was wrong. This is a 7-line fix that reuses the existing flyout instead of adding new UI. The original PR also moved helpers, added a label heuristic, and changed the chevron's click handling. We dropped those to keep the scope tight and leave multi-host behavior exactly as it was.
The fixture is a single-host project group (bun_root plus the fork earepo and dak-luy-datenpflege, all on this computer). The proof shows the picker opened and the bun_root row hovered.
Before
After
Before: bun_root has no chevron and no flyout, so the fork can't be selected. After: the chevron opens a flyout that lists every source by repo name.
Testing
New regression test task-project-source-combobox.test.tsx covers an upstream and a fork on one host. It opens the combobox, hovers "Choose task source", clicks earepo, and expects onChange to receive {earepo}. It fails on main with Unable to find an element by [title="Choose task source"] and passes with this change.
We ran a scratch test that is not committed. It passes on both main and this branch. It checks that a local+SSH group still opens on hover, stays open when the chevron is clicked, and titles its rows by host. It also checks that a single-source group shows no chevron.
Targeted vitest, oxlint, oxfmt, the anti-slop and native-plugin oxlint gates, ast-grep, and check-changed-code-quality all came back clean.
Platforms: tested on macOS with component tests and a fixture screenshot. The change is pure renderer logic, with no paths and nothing specific to a platform or SSH.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Risk
Single-host multi-checkout project rows now show a hover chevron and flyout. Picking a source replaces the current selection for that project, the same way multi-host groups already behave. Multi-host groups keep their host-labelled rows. Nothing is persisted in a new format and nothing crosses the SSH or mobile boundary. A plain revert backs it out.
Level: Low
Review
Reviewed by two agent reviews and a verify pass, with nothing blocking. Known limitation from before this PR: the flyout opens on hover only, not from a click or the keyboard.
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
Original fix by @YannVanneth in #43609 (authorship preserved via Co-authored-by).
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)
The source menu now appears when a project group contains more than one source, including when all sources are on one host. For single-host groups, the combobox displays each source’s display name. A test verifies that selecting a fork calls onChange with a set containing only that fork’s ID.
Severity of issue fixed: Medium
Merge Risk: Moderate · up to f80cc
The source flyout now appears for single-host multi-repo projects, but keyboard users may not be able to open it. Selecting a fork may still show and act on the upstream repository's issues unless the target is resolved from the selected source. Address both before merging.
Pre-merge checks: 4
Check name
Status
Explanation
Linked Issues check
Issue #43565 asks that individual repos of a multi-repo project be selectable as task sources on a single host. Its preferred outcome is that the 'Choose task source' flyout depends on sources.length …
Out of Scope Changes check
The changed code connects to the flyout behavior requested by #43565. The sources.length gate, the selected-source trigger label and group badge, the source label helper, and the chevron click handlin…
Title check
The title names the main change: single-host multi-repo projects can now pick an individual task source. It matches the gate change in the combobox. It follows the conventional-commit form and is spec…
Description check
The description follows the template: ELI5, What Changed, Why, Linked Issue (Fixes #43565), Visual Proof with before/after images, Testing, Risk with level, AI Disclosure section, Review, Agent skill …
Full details: Linked Issues check
Explanation
Issue #43565 asks that individual repos of a multi-repo project be selectable as task sources on a single host. Its preferred outcome is that the 'Choose task source' flyout depends on sources.length > 1, not on distinct hosts. At head, the file src/renderer/src/components/task-page/source-selection/task-project-source-combobox.tsx sets hasSourceMenu = group.sources.length > 1, so the flyout renders for single-host multi-repo groups. The flyout maps group.sources to selectable rows, and selectProjectSource stores the chosen source id. renderTriggerLabel and the group row read getSelectedTaskProjectSource(group, selected), so the chosen fork repo name appears. The flyout opens on row hover through setSourceMenuHover. Correction to the previous assessment: at head, the chevron onClick still calls event.preventDefault() unconditionally, as well as event.stopPropagation(). Radix PopoverTrigger skips its toggle when the click default is prevented, so clicking the chevron does not toggle the flyout. The PR description states that preventDefault was removed, and that statement is inaccurate for head. The issue requirement (selectability of the fork repo on a single host) is still met through the hover path. The click-to-open gap is not an issue requirement, so it does not change this verdict. Also, the PR description cites paths under src/renderer/src/components/, but the head files are under components/task-page/source-selection/. The test file was not read; its coverage is taken from the author's report.
Full details: Out of Scope Changes check
Explanation
The changed code connects to the flyout behavior requested by #43565. The sources.length gate, the selected-source trigger label and group badge, the source label helper, and the chevron click handling all serve single-host source selection. Moving TaskProjectSourceStatus, getTaskProjectDetail, and getTaskProjectSourceDetail into the model file supports reuse by the new helpers. The added component tests cover the new behavior. No unrelated functional change was found in the inspected head file. The unconditional preventDefault on the chevron is part of the same click behavior and does not create scope drift. The raw summary's line counts and the PR description's file paths do not match the head layout, but this mismatch is a documentation inaccuracy and not an out-of-scope change.
Full details: Title check
Explanation
The title names the main change: single-host multi-repo projects can now pick an individual task source. It matches the gate change in the combobox. It follows the conventional-commit form and is specific enough for a scanning teammate.
Full details: Description check
Explanation
The description follows the template: ELI5, What Changed, Why, Linked Issue (Fixes #43565), Visual Proof with before/after images, Testing, Risk with level, AI Disclosure section, Review, Agent skill boundary, Notes, and Checklist. It explains the mechanism (the flyout gate changed to group.sources.length > 1) and the reason for the approach. Minor gap: the AI Disclosure section is left empty, which the template permits for maintainers but may need a filled entry for outside contributors. The final pnpm checklist item is unchecked, with a note that CI covers it.
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; 9 remain after this review.
…sk source
When a project grouped several repos (e.g. an upstream and its fork) on one
host, the task source flyout was hidden because it only opened for groups
spanning multiple hosts. Open it whenever the group has more than one
source, and show host labels only when sources live on different hosts.
Fixesstablyai#43565
Co-authored-by: Yann Vanneth <[email protected]>
nwparker
changed the title
fix(tasks): allow selecting individual sources in single-host multi-repo projects (#43565)
fix(tasks): let single-host multi-repo projects pick an individual task source
Nov 17, 2026
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Major · The chevron click handler blocks the Radix toggle that… · task-project-source-combobox.tsx:342
src/renderer/src/components/task-page/source-selection/task-project-source-combobox.tsx:342 Major · Functional Correctness · Quick win
The chevron click handler blocks the Radix toggle that opens the source menu.
The chevron button at lines 341-344 is the PopoverTrigger child. Its onClick calls event.preventDefault(). Radix skips its composed open toggle when the consumer's click handler has prevented the default action. The menu's open state changes only through that toggle. For a keyboard user, activating the chevron fires a click, so the toggle does not run and the menu stays closed. Hover can still open the menu, so mouse users are not affected.
Remove event.preventDefault() from the chevron handler and keep event.stopPropagation(). Confirm that a keyboard-only test opens the menu without a mouse-enter event.
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 reason will be displayed to describe this comment to others. Learn more.
Major · Data Integrity & Integration · Heavy lift
Selecting a fork does not make it the issue target by default.
With no issueSourcePreference set, the selected fork's repo path reaches getOwnerRepo. That function prefers the upstream remote when one exists. Issue updates, label lookups, and work-item queries therefore target the upstream repository, not the fork. The linked issue requires the fork as the target. Either this change must resolve the target from the selected source's own remote, or the flyout must make the 'origin' preference a visible requirement for forks.
Confirm the create path uses the same resolver before deciding the fix scope.
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
Sometimes a project has more than one copy of the same code on one computer, like the original repo and your own fork. The Tasks project picker only let you choose between copies when they were on different computers, so the fork could never be picked and its issues never showed up. Now, whenever a project has more than one copy, a small arrow opens a menu where you pick the one you want. Each copy is labelled with its repo name.
What Changed
upstreamfolds under its upstream project. The row had no "Choose task source" chevron or flyout, so you could not select the fork, list its issues, or reach the Origin/Upstream issue-source selector.task-page/source-selection/task-project-source-combobox.tsx):hasMultipleTaskProjectHostsInGroup(group)togroup.sources.length > 1.source.displayNameinstead. Otherwise every row would read "This computer".Why
The control is labelled "Choose task source", not "Choose host". The flyout already lists every source, and the downstream selection logic (
selectProjectSource,getTaskProjectPickerGroups,normalizeTaskRepoSelection) already handles a non-primary source on the same host. Only the gate was wrong. This is a 7-line fix that reuses the existing flyout instead of adding new UI. The original PR also moved helpers, added a label heuristic, and changed the chevron's click handling. We dropped those to keep the scope tight and leave multi-host behavior exactly as it was.Linked Issue
Fixes #43565
Visual Proof
The fixture is a single-host project group (bun_root plus the fork earepo and dak-luy-datenpflege, all on this computer). The proof shows the picker opened and the bun_root row hovered.
Before: bun_root has no chevron and no flyout, so the fork can't be selected. After: the chevron opens a flyout that lists every source by repo name.
Testing
New regression test
task-project-source-combobox.test.tsxcovers an upstream and a fork on one host. It opens the combobox, hovers "Choose task source", clicksearepo, and expectsonChangeto receive{earepo}. It fails on main withUnable to find an element by [title="Choose task source"]and passes with this change.We ran a scratch test that is not committed. It passes on both main and this branch. It checks that a local+SSH group still opens on hover, stays open when the chevron is clicked, and titles its rows by host. It also checks that a single-source group shows no chevron.
Targeted vitest, oxlint, oxfmt, the anti-slop and native-plugin oxlint gates, ast-grep, and
check-changed-code-qualityall came back clean.Platforms: tested on macOS with component tests and a fixture screenshot. The change is pure renderer logic, with no paths and nothing specific to a platform or SSH.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Risk
Single-host multi-checkout project rows now show a hover chevron and flyout. Picking a source replaces the current selection for that project, the same way multi-host groups already behave. Multi-host groups keep their host-labelled rows. Nothing is persisted in a new format and nothing crosses the SSH or mobile boundary. A plain revert backs it out.
Level: Low
Review
Reviewed by two agent reviews and a verify pass, with nothing blocking. Known limitation from before this PR: the flyout opens on hover only, not from a click or the keyboard.
Agent skill upstream boundary
Notes
Original fix by @YannVanneth in #43609 (authorship preserved via
Co-authored-by).Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)