fix(web): select pull request on review surface (#1857)

* fix(web): select pull request on review surface

* fix(web): address review feedback

* test(web): stabilize tablet review target assertion

* fix(web): address late review feedback

* test(web): cover PR review boundary branches
This commit is contained in:
José Almeida
2026-07-22 17:52:58 +01:00
committed by GitHub
parent 04899e1d78
commit d5da5d0022
65 changed files with 3021 additions and 569 deletions
@@ -17,7 +17,7 @@ import { ScrollArea } from "@kandev/ui/scroll-area";
import { Tooltip, TooltipContent, TooltipTrigger } from "@kandev/ui/tooltip";
import { useAppStore } from "@/components/state-provider";
import { useActiveTaskPR, useTaskPR } from "@/hooks/domains/github/use-task-pr";
import { prPanelLabel } from "@/components/github/pr-utils";
import { prPanelLabel, prTaskKey } from "@/components/github/pr-utils";
import { usePRFeedback } from "@/hooks/domains/github/use-pr-feedback";
import { useGitHubStatus } from "@/hooks/domains/github/use-github-status";
import { useCommentsStore, isPRFeedbackComment } from "@/lib/state/slices/comments";
@@ -78,11 +78,6 @@ export function PRDetailPanelComponent({ panelId, params }: PRDetailPanelProps)
);
}
/** Stable per-PR key used by addPRPanel and the multi-PR topbar buttons. */
export function prTaskKey(pr: TaskPR): string {
return `${pr.owner}/${pr.repo}/${pr.pr_number}`;
}
// --- Add PR feedback as chat context ---
function useAddPRFeedbackAsContext(sessionId: string, prNumber: number) {
@@ -34,8 +34,7 @@ import {
isPRReadyToMerge,
isPRWaitingOnBranchProtection,
} from "@/components/github/pr-task-icon";
import { prTaskKey } from "@/components/github/pr-detail-panel";
import { prIdentitySlug } from "@/components/github/pr-utils";
import { prIdentitySlug, prTaskKey } from "@/components/github/pr-utils";
import { PR_CI_DESKTOP_POPOVER_SCROLL_CLASS, PRCIPopover } from "@/components/github/pr-ci-popover";
import { MultiPRCIPopover } from "@/components/github/multi-pr-ci-popover";
import { useAppStore } from "@/components/state-provider";
+5
View File
@@ -13,3 +13,8 @@ export function prPanelLabel(prNumber: number): string {
export function prIdentitySlug(pr: TaskPR): string {
return `${pr.owner}-${pr.repo}-${pr.pr_number}`;
}
/** Stable per-PR key used by task-scoped state and dockview panels. */
export function prTaskKey(pr: TaskPR): string {
return `${pr.owner}/${pr.repo}/${pr.pr_number}`;
}