@@ -1502,6 +1502,13 @@ function PullRequestsRouteView() {
15021502 ! pullRequestsSupported || rightPanelState . isOpen ? null : (
15031503 < span aria-hidden className = "w-7 shrink-0 sm:w-5" />
15041504 ) ,
1505+ titlebarControls :
1506+ // While the panel is closed the strip lives inside the header: a no-drag
1507+ // descendant beats the header's desktop drag-region, where a floating
1508+ // sibling loses (app-region hit-testing ignores z-index). Open, it moves
1509+ // back out to the route container, which spans the panel too, so the
1510+ // toggle keeps one fixed top-right anchor and never jumps sideways.
1511+ pullRequestsSupported && ! rightPanelState . isOpen ? openPanelControls : null ,
15051512 rightPanelOpen : rightPanelState . isOpen ,
15061513 listBody,
15071514 } ;
@@ -1543,7 +1550,7 @@ function PullRequestsRouteView() {
15431550 return (
15441551 < SidebarInset className = "h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground" >
15451552 < div className = "relative flex min-h-0 flex-1" >
1546- { pullRequestsSupported ? openPanelControls : null }
1553+ { pullRequestsSupported && rightPanelState . isOpen ? openPanelControls : null }
15471554 < PullRequestsColumn { ...columnProps } />
15481555
15491556 { rightPanelState . isOpen && activePullRequestSurface && panelEnvironmentId !== null ? (
@@ -1759,6 +1766,7 @@ function PullRequestsColumn({
17591766 searchInput,
17601767 filtersMenu,
17611768 rightPanelControl,
1769+ titlebarControls,
17621770 rightPanelOpen,
17631771 listBody,
17641772} : {
@@ -1775,6 +1783,7 @@ function PullRequestsColumn({
17751783 searchInput : ReactNode ;
17761784 filtersMenu : ReactNode ;
17771785 rightPanelControl : ReactNode ;
1786+ titlebarControls : ReactNode ;
17781787 rightPanelOpen : boolean ;
17791788 listBody : ReactNode ;
17801789} ) {
@@ -1838,9 +1847,18 @@ function PullRequestsColumn({
18381847 // content surface that lets it show reads as a different background than every thread.
18391848 < div className = "flex min-h-0 min-w-0 flex-1 flex-col bg-background" >
18401849 { /* A closed right panel leaves this column full-width, so the shared header
1841- reserves native window controls. While the panel is open, the column ends
1842- at the panel and the absolute controls strip owns the top-right corner. */ }
1843- < WorkspacePageHeader electron = { isElectron } reserveNativeControls = { ! rightPanelOpen } >
1850+ reserves native window controls and hosts the controls strip itself: on
1851+ desktop the header is a drag-region, and only a no-drag descendant wins
1852+ clicks from it - a floating sibling loses to app-region hit-testing no
1853+ matter its z-index. While the panel is open, the strip mounts back at
1854+ the route level, whose box spans the panel too, so the toggle keeps one
1855+ fixed top-right anchor. */ }
1856+ < WorkspacePageHeader
1857+ electron = { isElectron }
1858+ reserveNativeControls = { ! rightPanelOpen }
1859+ className = "relative bg-background"
1860+ >
1861+ { titlebarControls }
18441862 { condensed ? (
18451863 < WorkspaceBreadcrumb ariaLabel = "Pull request scope" >
18461864 { /* The page name remains the foreground anchor in both states; the live filters are
0 commit comments