refactor(web): stacked sidebar groups share one inset (#13037)

Co-authored-by: Claude Fable 5 <[email protected]>
This commit is contained in:
Julius MarmingeandClaude Fable 5 authored and GitHub committed 2026-09-22 12:22:17 -07:00
1 parent da89e102f8
commit 016cdb9622
5 files changed
+13 -11

No files matched your search

+4 -5
View File
@@ -2673,7 +2673,7 @@ function LocalSecondaryStatus() {
}
return (
<SidebarGroup className="px-2 pt-2 pb-0">
<SidebarGroup>
{connecting.length > 0 ? (
<Alert
variant="default"
@@ -2966,11 +2966,10 @@ const SidebarProjectsContent = memo(function SidebarProjectsContent(
return (
<SidebarContent
className="gap-0"
fixedHeader={
// Lifted above the stage backdrop, whose fade bleeds below the
// header and would otherwise paint across the search row's outline.
<SidebarGroup className="relative z-[1] px-2 pt-2 pb-1">
<SidebarGroup className="z-[1]">
<SidebarMenu>
<SidebarMenuItem>
<CommandDialogTrigger
@@ -2995,7 +2994,7 @@ const SidebarProjectsContent = memo(function SidebarProjectsContent(
}
>
{showArm64IntelBuildWarning && arm64IntelBuildWarningDescription ? (
<SidebarGroup className="px-2 pt-2 pb-0">
<SidebarGroup>
<Alert variant="warning" className="rounded-2xl border-warning/40 bg-warning/8">
<TriangleAlertIcon />
<AlertTitle>Intel build on Apple Silicon</AlertTitle>
@@ -3018,7 +3017,7 @@ const SidebarProjectsContent = memo(function SidebarProjectsContent(
</SidebarGroup>
) : null}
<LocalSecondaryStatus />
<SidebarGroup className="px-2 py-2">
<SidebarGroup>
<div className="mb-1 flex items-center justify-between pl-2 pr-1.5">
<span className="text-xs font-medium text-sidebar-muted-foreground/80">Projects</span>
<div className="flex items-center gap-1">
+3 -3
View File
@@ -4391,11 +4391,11 @@ export default function Sidebar() {
<>
<SidebarChromeHeader isElectron={isElectron} />
<SidebarContent
className="gap-0 min-h-full"
className="min-h-full"
fixedHeader={
// Lifted above the stage backdrop, whose fade bleeds below the
// header and would otherwise paint across the search row's outline.
<SidebarGroup className="relative z-[1] p-[var(--sidebar-content-inset)] pt-1">
<SidebarGroup className="z-[1]">
<SidebarThreadHeader
searchFieldRef={headerSearchRef}
hasProjects={projectGroups.length > 0}
@@ -4554,7 +4554,7 @@ export default function Sidebar() {
</SidebarGroup>
}
>
<SidebarGroup className="ps-[calc(var(--sidebar-content-inset)+1px)] pe-[var(--sidebar-content-inset)] pb-1 pt-0 flex-1">
<SidebarGroup className="flex-1 ps-[calc(var(--sidebar-content-inset)+1px)]">
{isSearchingThreads ? (
threadSearchResults.length > 0 ? (
<TooltipProvider
@@ -234,7 +234,7 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) {
return (
<>
<SidebarContent className="overflow-x-hidden">
<SidebarGroup className="gap-2 p-[var(--sidebar-content-inset)]">
<SidebarGroup className="gap-2">
<div className="flex h-8 items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-sidebar-muted-foreground hover:bg-sidebar-row-hover hover:text-sidebar-foreground">
<SearchIcon className="size-4 shrink-0 text-sidebar-muted-foreground/80" />
<SidebarInput
+4 -1
View File
@@ -602,7 +602,10 @@ function SidebarContent({
<div
// Reordered rows must not pull the viewport to their new position.
className={cn(
"flex w-full min-w-0 flex-col gap-2 [overflow-anchor:none] group-data-[collapsible=icon]:overflow-hidden",
// Stacked groups share one inset between them instead of doubling
// it, including across the fixed header's boundary.
"flex w-full min-w-0 flex-col [overflow-anchor:none] group-data-[collapsible=icon]:overflow-hidden [&>[data-sidebar=group]+[data-sidebar=group]]:pt-0",
fixedHeader && "[&>[data-sidebar=group]:first-child]:pt-0",
className,
)}
data-sidebar="content"
+1 -1
View File
@@ -8,7 +8,7 @@ import * as NodeURL from "node:url";
// components/ui exports are migrated to variants (see vite.config.ts). This gate keeps the
// count from growing: CI fails when findings exceed the ceiling. Lower the ceiling when you
// migrate a file, and delete this script when the rule becomes an error.
export const RESTYLE_CEILING = 812;
export const RESTYLE_CEILING = 793;
const RULE = "shadcn(no-restyle)";