Skip to content

Commit b29f30d

Browse files
joewinkeclaude
andcommitted
bug(jat-fq7dx): Fix Change Project submenu showing only tasks-derived projects
Derive project list from projectColors (all configured projects) plus visible tasks, so the submenu shows all available projects regardless of which tasks are currently displayed or active. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 865c142 commit b29f30d

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

ide/src/lib/components/sessions/TasksActive.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,6 +1181,9 @@
11811181
11821182
const ctxAllProjectNames = $derived.by(() => {
11831183
const set = new Set<string>();
1184+
// Include all known projects from projectColors (covers all configured projects)
1185+
for (const key of Object.keys(projectColors)) set.add(key);
1186+
// Also include any projects from active tasks
11841187
for (const [, task] of agentTasks) set.add(task.id.split('-')[0]);
11851188
return [...set].sort();
11861189
});

ide/src/lib/components/sessions/TasksOpen.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,6 +1393,9 @@
13931393
// All unique project names for "Change Project" submenu
13941394
const allProjectNames = $derived.by(() => {
13951395
const set = new Set<string>();
1396+
// Include all known projects from projectColors (covers all configured projects)
1397+
for (const key of Object.keys(projectColors)) set.add(key);
1398+
// Also include any projects visible in the current task list
13961399
for (const t of tasks) set.add(getProjectFromTaskId(t.id));
13971400
return [...set].sort();
13981401
});

ide/src/routes/open-tasks/+page.svelte

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,17 @@
388388
...t,
389389
project: t.project || extractProject(t.id),
390390
}));
391-
// Extract unique projects
391+
// Extract unique projects from tasks
392392
const projectSet = new Set(tasks.map(t => t.project).filter(Boolean));
393+
// Also fetch all configured projects so Change Project submenu shows all options
394+
try {
395+
const projRes = await fetch('/api/projects?visible=true');
396+
if (projRes.ok) {
397+
const projData = await projRes.json();
398+
const configuredProjects: string[] = (projData.projects || []).map((p: any) => p.name || p.human_key || p.slug);
399+
for (const p of configuredProjects) if (p) projectSet.add(p);
400+
}
401+
} catch { /* ignore */ }
393402
projects = [...projectSet].sort();
394403
395404
if (loading) {

0 commit comments

Comments
 (0)