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): align every titlebar control cluster on one shared inset (#6592)
Julius Marminge038560e58036
diff --git a/apps/web/src/components/AppSidebarLayout.tsx b/apps/web/src/components/AppSidebarLayout.tsxindex 5138e84d2..a3ba76679 100644--- a/apps/web/src/components/AppSidebarLayout.tsx+++ b/apps/web/src/components/AppSidebarLayout.tsx@@ -96,8 +96,11 @@ function SidebarControl() {}, [keybindings, toggleSidebar]);return (+ // The right-side layout controls carry mr-px (border compensation inside+ // the panel), so the trigger mirrors it: both clusters sit one extra pixel+ // off their edge and the titlebar reads symmetric.<div- className="pointer-events-none fixed left-[var(--workspace-controls-left)] top-[var(--workspace-controls-top)] z-50 flex h-[var(--workspace-topbar-height)] items-center"+ className="pointer-events-none fixed left-[var(--workspace-controls-left)] top-[var(--workspace-controls-top)] z-50 ml-px flex h-[var(--workspace-topbar-height)] items-center"data-sidebar-control=""><Tooltip>diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsxindex e459d6d09..3da816618 100644--- a/apps/web/src/components/ChatView.tsx+++ b/apps/web/src/components/ChatView.tsx@@ -6583,7 +6583,11 @@ function ChatViewContent(props: ChatViewProps) {<RightPanelSheet open onClose={closePreviewPanel}><RightPanelTabsmode="sheet"- layoutControls={panelToggleControls}+ // Same effective inset as the closed-state titlebar controls+ // (pr-3 in the tab bar plus this pixel equals the absolute+ // right inset plus mr-px), so the cluster does not creep when+ // the sheet opens.+ layoutControls={<div className="mr-px flex items-center">{panelToggleControls}</div>}surfaces={rightPanelState.surfaces}activeSurfaceId={activeRightPanelSurface?.id ?? null}pendingSurfaceIds={pendingFileSurfaceIds}diff --git a/apps/web/src/components/RightPanelTabs.tsx b/apps/web/src/components/RightPanelTabs.tsxindex 21abd873c..df65aa60d 100644--- a/apps/web/src/components/RightPanelTabs.tsx+++ b/apps/web/src/components/RightPanelTabs.tsx@@ -604,7 +604,9 @@ export function RightPanelTabs(props: RightPanelTabsProps) {<divclassName={cn("workspace-topbar gap-1 pl-2",- props.mode !== "inline" && "[--workspace-topbar-height:--spacing(11)]",+ // The sheet overlays from the viewport top, so its tab bar keeps+ // the titlebar's height: a compact row re-centers the layout+ // controls a few pixels higher and the cluster jumps on open.props.mode === "inline" && !props.layoutControls ? "pr-28" : "pr-3",ownsDesktopTitleBar && "wco:pr-[calc(var(--workspace-native-controls-inset)+6rem)]",props.mode === "inline" && props.maximized && COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS,diff --git a/apps/web/src/components/chat/PanelLayoutControls.tsx b/apps/web/src/components/chat/PanelLayoutControls.tsxindex e0bfecab0..6f281558f 100644--- a/apps/web/src/components/chat/PanelLayoutControls.tsx+++ b/apps/web/src/components/chat/PanelLayoutControls.tsx@@ -48,7 +48,7 @@ export const PanelLayoutControls = memo(function PanelLayoutControls({size="sm"disabled={!terminalAvailable}>- <PanelBottomIcon className="size-3.5" />+ <PanelBottomIcon className="size-4" /></Toggle>}/>@@ -75,7 +75,7 @@ export const PanelLayoutControls = memo(function PanelLayoutControls({size="sm"disabled={!rightPanelAvailable}>- <PanelRightIcon className="size-3.5" />+ <PanelRightIcon className="size-4" />{liveAgentCount > 0 ? (<spanaria-hidden@@ -122,9 +122,9 @@ export const RightPanelMaximizeControl = memo(function RightPanelMaximizeControlsize="sm">{maximized ? (- <Minimize2Icon className="size-3.5" />+ <Minimize2Icon className="size-4" />) : (- <Maximize2Icon className="size-3.5" />+ <Maximize2Icon className="size-4" />)}</Toggle>}diff --git a/apps/web/src/routes/_chat.pull-requests.tsx b/apps/web/src/routes/_chat.pull-requests.tsxindex f3ccf54be..aee41fb69 100644--- a/apps/web/src/routes/_chat.pull-requests.tsx+++ b/apps/web/src/routes/_chat.pull-requests.tsx@@ -1303,7 +1303,13 @@ function PullRequestsRouteView() {/>);const openPanelControls = (- <div className="workspace-titlebar-controls right-2 z-50 gap-1 [-webkit-app-region:no-drag] wco:right-[var(--workspace-controls-right)]">+ <div+ // The bare workspace-titlebar-controls inset plus mr-px: the same+ // anchor the thread view's controls and the sidebar trigger use, so+ // every titlebar cluster in the app sits one shared inset from its+ // edge.+ className="workspace-titlebar-controls z-50 mr-px gap-1 [-webkit-app-region:no-drag]"+ >{panelToggleControls}</div>);@@ -1484,7 +1490,13 @@ function PullRequestsRouteView() {searchInput,filtersMenu,rightPanelControl:- !pullRequestsSupported || rightPanelState.isOpen ? null : panelToggleControls,+ // Footprint reserve while the panel is closed: the toggle itself stays+ // mounted at the fixed titlebar inset in both states so it cannot move+ // on toggle, and this spacer keeps refresh from sliding underneath it+ // (sized per header padding so refresh ends a normal gap short of it).+ !pullRequestsSupported || rightPanelState.isOpen ? null : (+ <span aria-hidden className="w-7 shrink-0 sm:w-5" />+ ),rightPanelOpen: rightPanelState.isOpen,listBody,};@@ -1526,7 +1538,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 && rightPanelState.isOpen ? openPanelControls : null}+ {pullRequestsSupported ? openPanelControls : null}<PullRequestsColumn {...columnProps} />{rightPanelState.isOpen && activePullRequestSurface && panelEnvironmentId !== null ? (