Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/ui/src/features/sidebar/components/TaskListView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,13 @@ export function TaskListView({
);
const groupFolderId =
folder?.id ?? group.tasks.find((t) => t.folderId)?.folderId;
// Cloud-only repository groups have no registered local folder.
// Their group id is the normalized `owner/repo` key; detect them
// via a parsed repository (which carries an organization) so we
// can preselect the cloud repo instead of opening a blank input.
const cloudRepository = group.tasks.find(
(t) => t.repository?.organization,
)?.repository?.fullPath;
return (
<DraggableFolder key={group.id} id={group.id} index={index}>
<SidebarSection
Expand All @@ -293,6 +300,10 @@ export function TaskListView({
onNewTask={() => {
if (groupFolderId) {
openTaskInput(groupFolderId);
} else if (cloudRepository) {
openTaskInput({
initialCloudRepository: cloudRepository,
});
} else {
openTaskInput();
}
Expand Down
Loading