fix(web): move workflow approval beside checks (#9465)

Co-authored-by: maria-rcks <[email protected]>
This commit is contained in:
mariaandmaria-rcks authored and GitHub committed 2026-09-03 17:44:05 -04:00
1 parent 03728361aa
commit 373be93e68
1 file changed
+50 -47
@@ -1478,41 +1478,6 @@ export function PullRequestDetailPanel({
</MenuPopup>
</Menu>
) : null}
{workflowApprovalsRequired > 0 && can("approve-workflows") ? (
<Tooltip>
<TooltipTrigger
render={
<span className="inline-flex shrink-0">
<Button
size="xs"
variant="warning-outline"
disabled={actionPending}
onClick={() =>
setConfirmation({ open: true, action: "approve-workflows" })
}
aria-label={
pendingAction === "approve-workflows"
? "Approving..."
: "Approve workflows to run"
}
>
<PlayIcon aria-hidden className="size-3.5" />
<span className="@max-[40rem]/pr-header:hidden">
{pendingAction === "approve-workflows"
? "Approving..."
: "Approve workflows to run"}
</span>
</Button>
</span>
}
/>
<TooltipPopup side="top">
{pendingAction === "approve-workflows"
? "Approving..."
: "Approve workflows to run"}
</TooltipPopup>
</Tooltip>
) : null}
{/* Said where the Merge button is, because it is the answer to why nobody has
pressed it: the merge is already asked for, and the host is holding it. */}
{autoMergeArmed && primaryAction !== "auto-merge-armed" ? (
@@ -2165,20 +2130,58 @@ export function PullRequestDetailPanel({
))}
</ToggleGroup>
{tab === "summary" ? (
<span
className="ml-auto inline-flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground"
aria-label={checksSummary ? `Checks: ${checksSummary}` : "Checks"}
>
{checksState !== null ? (
<PullRequestChecksPopover
checks={detail.checks}
checksState={checksState}
threadRef={threadRef}
/>
<span className="ml-auto inline-flex shrink-0 items-center">
{workflowApprovalsRequired > 0 && can("approve-workflows") ? (
<Tooltip>
<TooltipTrigger
render={
<span className="inline-flex shrink-0">
<Button
size="xs"
variant="warning-outline"
disabled={actionPending}
onClick={() =>
setConfirmation({ open: true, action: "approve-workflows" })
}
aria-label={
pendingAction === "approve-workflows"
? "Approving..."
: "Approve workflows to run"
}
>
<PlayIcon aria-hidden className="size-3.5" />
<span>
{pendingAction === "approve-workflows"
? "Approving..."
: "Approve workflows to run"}
</span>
</Button>
</span>
}
/>
<TooltipPopup side="top">
{pendingAction === "approve-workflows"
? "Approving..."
: "Approve workflows to run"}
</TooltipPopup>
</Tooltip>
) : (
<CircleDotIcon aria-hidden className="size-3.5" />
<span
className="inline-flex items-center gap-1.5 text-xs text-muted-foreground"
aria-label={checksSummary ? `Checks: ${checksSummary}` : "Checks"}
>
{checksState !== null ? (
<PullRequestChecksPopover
checks={detail.checks}
checksState={checksState}
threadRef={threadRef}
/>
) : (
<CircleDotIcon aria-hidden className="size-3.5" />
)}
{checksSummary}
</span>
)}
{checksSummary}
</span>
) : tab === "timeline" ? (
<div className="ml-auto flex shrink-0 items-center gap-2 text-xs text-muted-foreground">