fix(app): improve tab handling (#30669)

This commit is contained in:
Brendan Allan
2026-06-05 11:41:30 +08:00
committed by GitHub
parent 3003867c25
commit 5426478e46
12 changed files with 238 additions and 203 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ export function getProjectAvatarSource(id?: string, icon?: { color?: string; url
export function projectForSession<T extends { id?: string; worktree: string; sandboxes?: string[] }>(
session: Session,
projects: T[],
byID: Map<string, T>,
byID: Map<string, T> = new Map(projects.flatMap((project) => (project.id ? [[project.id, project] as const] : []))),
) {
const direct = byID.get(session.projectID)
if (direct) return direct