The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 25, 08:45 UTC
Inline SidebarInset base classes and remove dead sidebar logic
- Replace `SIDEBAR_INSET_BASE_CLASSNAME` with an inline class string in `sidebar.tsx` - Delete the now-unused `sidebar.logic.ts` helper and its focused unit test
Julius Marminge committed
Mar 9, 2026 at 10:56 UTC
47117a7d85b6696e3ad3ae7d59303b3a60e9eea5
3 files changed
+1
-13
apps/web/src/components/ui/sidebar.logic.ts
deleted
-2
@@ -1,2 +0,0 @@
1
-export const SIDEBAR_INSET_BASE_CLASSNAME =
2
- "relative flex min-w-0 w-full flex-1 flex-col bg-background";
apps/web/src/components/ui/sidebar.test.tsx
deleted
-9
@@ -1,9 +0,0 @@
1
-import { describe, expect, it } from "vitest";
2
-
3
-import { SIDEBAR_INSET_BASE_CLASSNAME } from "./sidebar.logic";
4
-
5
-describe("SidebarInset", () => {
6
- it("stays shrinkable inside flex layouts", () => {
7
- expect(SIDEBAR_INSET_BASE_CLASSNAME).toContain("min-w-0");
8
- });
9
-});
apps/web/src/components/ui/sidebar.tsx
+1
-2
@@ -18,7 +18,6 @@ import {
18
import { Skeleton } from "~/components/ui/skeleton";
19
import { Tooltip, TooltipPopup, TooltipTrigger } from "~/components/ui/tooltip";
20
import { useMediaQuery } from "~/hooks/useMediaQuery";
21
-import { SIDEBAR_INSET_BASE_CLASSNAME } from "./sidebar.logic";
21
22
const SIDEBAR_COOKIE_NAME = "sidebar_state";
23
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
@@ -596,7 +595,7 @@ function SidebarInset({ className, ...props }: React.ComponentProps<"main">) {
595
return (
596
<main
597
className={cn(
599
- SIDEBAR_INSET_BASE_CLASSNAME,
598
+ "relative flex min-w-0 w-full flex-1 flex-col bg-background",
599
"md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2 md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm/5",
600
className,
601
)}