fix: session tab leak, PR icon crash, and PR review prompt scope (#897)
This commit is contained in:
@@ -44,7 +44,8 @@ function createTaskPRActions(set: ImmerSet): Pick<GitHubSlice, "setTaskPRs" | "s
|
||||
// Upsert by repository_id so multi-repo PRs coexist for the same task.
|
||||
// For legacy rows without a repository_id, match on the empty key (one
|
||||
// such row per task max), preserving prior single-PR semantics.
|
||||
const existing = draft.taskPRs.byTaskId[taskId] ?? [];
|
||||
const current = draft.taskPRs.byTaskId[taskId];
|
||||
const existing = Array.isArray(current) ? current : [];
|
||||
const repoKey = pr.repository_id ?? "";
|
||||
const idx = existing.findIndex((p) => (p.repository_id ?? "") === repoKey);
|
||||
if (idx >= 0) existing[idx] = pr;
|
||||
|
||||
Reference in New Issue
Block a user