Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
fix(web): restore right panel toggle clicks after closing on desktop (#8016)
Utkarsh Patil09df91f729c1
diff --git a/apps/web/src/routes/_chat.pull-requests.tsx b/apps/web/src/routes/_chat.pull-requests.tsxindex 91fc4f778..f8894ea57 100644--- a/apps/web/src/routes/_chat.pull-requests.tsx+++ b/apps/web/src/routes/_chat.pull-requests.tsx@@ -1502,6 +1502,13 @@ function PullRequestsRouteView() {!pullRequestsSupported || rightPanelState.isOpen ? null : (<span aria-hidden className="w-7 shrink-0 sm:w-5" />),+ titlebarControls:+ // While the panel is closed the strip lives inside the header: a no-drag+ // descendant beats the header's desktop drag-region, where a floating+ // sibling loses (app-region hit-testing ignores z-index). Open, it moves+ // back out to the route container, which spans the panel too, so the+ // toggle keeps one fixed top-right anchor and never jumps sideways.+ pullRequestsSupported && !rightPanelState.isOpen ? openPanelControls : null,rightPanelOpen: rightPanelState.isOpen,listBody,};@@ -1543,7 +1550,7 @@ function PullRequestsRouteView() {return (<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground"><div className="relative flex min-h-0 flex-1">- {pullRequestsSupported ? openPanelControls : null}+ {pullRequestsSupported && rightPanelState.isOpen ? openPanelControls : null}<PullRequestsColumn {...columnProps} />{rightPanelState.isOpen && activePullRequestSurface && panelEnvironmentId !== null ? (@@ -1759,6 +1766,7 @@ function PullRequestsColumn({searchInput,filtersMenu,rightPanelControl,+ titlebarControls,rightPanelOpen,listBody,}: {@@ -1775,6 +1783,7 @@ function PullRequestsColumn({searchInput: ReactNode;filtersMenu: ReactNode;rightPanelControl: ReactNode;+ titlebarControls: ReactNode;rightPanelOpen: boolean;listBody: ReactNode;}) {@@ -1838,9 +1847,18 @@ function PullRequestsColumn({// content surface that lets it show reads as a different background than every thread.<div className="flex min-h-0 min-w-0 flex-1 flex-col bg-background">{/* A closed right panel leaves this column full-width, so the shared header- reserves native window controls. While the panel is open, the column ends- at the panel and the absolute controls strip owns the top-right corner. */}- <WorkspacePageHeader electron={isElectron} reserveNativeControls={!rightPanelOpen}>+ reserves native window controls and hosts the controls strip itself: on+ desktop the header is a drag-region, and only a no-drag descendant wins+ clicks from it - a floating sibling loses to app-region hit-testing no+ matter its z-index. While the panel is open, the strip mounts back at+ the route level, whose box spans the panel too, so the toggle keeps one+ fixed top-right anchor. */}+ <WorkspacePageHeader+ electron={isElectron}+ reserveNativeControls={!rightPanelOpen}+ className="relative bg-background"+ >+ {titlebarControls}{condensed ? (<WorkspaceBreadcrumb ariaLabel="Pull request scope">{/* The page name remains the foreground anchor in both states; the live filters are