authorgravatar for 73941998+UtkarshUsername@users.noreply.github.comUtkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com> 2026-08-24 00:16:12+05:30
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-08-23 14:46:12-04:00
log09df91f729c1c61e637e7dd0ef22827cfc8a6cb1
tree1711d22d21518ffaba5963021fc0fea9e2bba370
parent9da0fab08e0ee444affdfb4916e294c579158bb6
signature Signed by PGP key B5690EEEBB952194

fix(web): restore right panel toggle clicks after closing on desktop (#8016)


1 files changed, 22 insertions(+), 4 deletions(-)

apps/web/src/routes/_chat.pull-requests.tsx+22-4
...@@ -1502,6 +1502,13 @@ function PullRequestsRouteView() {...@@ -1502,6 +1502,13 @@ function PullRequestsRouteView() {
1502 !pullRequestsSupported || rightPanelState.isOpen ? null : (1502 !pullRequestsSupported || rightPanelState.isOpen ? null : (
1503 <span aria-hidden className="w-7 shrink-0 sm:w-5" />1503 <span aria-hidden className="w-7 shrink-0 sm:w-5" />
1504 ),1504 ),
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,
1505 rightPanelOpen: rightPanelState.isOpen,1512 rightPanelOpen: rightPanelState.isOpen,
1506 listBody,1513 listBody,
1507 };1514 };
...@@ -1543,7 +1550,7 @@ function PullRequestsRouteView() {...@@ -1543,7 +1550,7 @@ function PullRequestsRouteView() {
1543 return (1550 return (
1544 <SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground">1551 <SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground">
1545 <div className="relative flex min-h-0 flex-1">1552 <div className="relative flex min-h-0 flex-1">
1546 {pullRequestsSupported ? openPanelControls : null}1553 {pullRequestsSupported && rightPanelState.isOpen ? openPanelControls : null}
1547 <PullRequestsColumn {...columnProps} />1554 <PullRequestsColumn {...columnProps} />
15481555
1549 {rightPanelState.isOpen && activePullRequestSurface && panelEnvironmentId !== null ? (1556 {rightPanelState.isOpen && activePullRequestSurface && panelEnvironmentId !== null ? (
...@@ -1759,6 +1766,7 @@ function PullRequestsColumn({...@@ -1759,6 +1766,7 @@ function PullRequestsColumn({
1759 searchInput,1766 searchInput,
1760 filtersMenu,1767 filtersMenu,
1761 rightPanelControl,1768 rightPanelControl,
1769 titlebarControls,
1762 rightPanelOpen,1770 rightPanelOpen,
1763 listBody,1771 listBody,
1764}: {1772}: {
...@@ -1775,6 +1783,7 @@ function PullRequestsColumn({...@@ -1775,6 +1783,7 @@ function PullRequestsColumn({
1775 searchInput: ReactNode;1783 searchInput: ReactNode;
1776 filtersMenu: ReactNode;1784 filtersMenu: ReactNode;
1777 rightPanelControl: ReactNode;1785 rightPanelControl: ReactNode;
1786 titlebarControls: ReactNode;
1778 rightPanelOpen: boolean;1787 rightPanelOpen: boolean;
1779 listBody: ReactNode;1788 listBody: ReactNode;
1780}) {1789}) {
...@@ -1838,9 +1847,18 @@ function PullRequestsColumn({...@@ -1838,9 +1847,18 @@ function PullRequestsColumn({
1838 // content surface that lets it show reads as a different background than every thread.1847 // content surface that lets it show reads as a different background than every thread.
1839 <div className="flex min-h-0 min-w-0 flex-1 flex-col bg-background">1848 <div className="flex min-h-0 min-w-0 flex-1 flex-col bg-background">
1840 {/* A closed right panel leaves this column full-width, so the shared header1849 {/* 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 ends1850 reserves native window controls and hosts the controls strip itself: on
1842 at the panel and the absolute controls strip owns the top-right corner. */}1851 desktop the header is a drag-region, and only a no-drag descendant wins
1843 <WorkspacePageHeader electron={isElectron} reserveNativeControls={!rightPanelOpen}>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}
1844 {condensed ? (1862 {condensed ? (
1845 <WorkspaceBreadcrumb ariaLabel="Pull request scope">1863 <WorkspaceBreadcrumb ariaLabel="Pull request scope">
1846 {/* The page name remains the foreground anchor in both states; the live filters are1864 {/* The page name remains the foreground anchor in both states; the live filters are