diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx
index 3362622b7efd15aa91b80a67fc08b2867934f6ac..52085daa459321a900664bd6cb7c591a48355695 100644
--- a/apps/web/src/components/ChatView.tsx
+++ b/apps/web/src/components/ChatView.tsx
@@ -3468,7 +3468,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
onDismiss={() => setThreadError(activeThread.id, null)}
/>
{/* Main content area with optional plan sidebar */}
-
+
{/* Chat column */}
@@ -3953,6 +3953,15 @@ export default function ChatView({ threadId }: ChatViewProps) {
+ {isGitRepo && (
+
+ )}
+
{/* end chat column */}
{/* Plan sidebar */}
@@ -3974,15 +3983,6 @@ export default function ChatView({ threadId }: ChatViewProps) {
) : null}
{/* end horizontal flex container */}
- {isGitRepo && (
-
- )}
-
{(() => {
if (!terminalState.terminalOpen || !activeProject) {
return null;
diff --git a/apps/web/src/components/ui/sidebar.logic.ts b/apps/web/src/components/ui/sidebar.logic.ts
new file mode 100644
index 0000000000000000000000000000000000000000..c9e4b4c1d8cfba537f101c00f3fe7886f8037197
--- /dev/null
+++ b/apps/web/src/components/ui/sidebar.logic.ts
@@ -0,0 +1,2 @@
+export const SIDEBAR_INSET_BASE_CLASSNAME =
+ "relative flex min-w-0 w-full flex-1 flex-col bg-background";
diff --git a/apps/web/src/components/ui/sidebar.test.tsx b/apps/web/src/components/ui/sidebar.test.tsx
new file mode 100644
index 0000000000000000000000000000000000000000..99bf2d0179f7b979e11043ee4624eac589a2c4b2
--- /dev/null
+++ b/apps/web/src/components/ui/sidebar.test.tsx
@@ -0,0 +1,9 @@
+import { describe, expect, it } from "vitest";
+
+import { SIDEBAR_INSET_BASE_CLASSNAME } from "./sidebar.logic";
+
+describe("SidebarInset", () => {
+ it("stays shrinkable inside flex layouts", () => {
+ expect(SIDEBAR_INSET_BASE_CLASSNAME).toContain("min-w-0");
+ });
+});
diff --git a/apps/web/src/components/ui/sidebar.tsx b/apps/web/src/components/ui/sidebar.tsx
index ba77bddc279895af5ba2515279c97a73356486c7..ef79926ef226790d18923b8dc481a246ea1878bf 100644
--- a/apps/web/src/components/ui/sidebar.tsx
+++ b/apps/web/src/components/ui/sidebar.tsx
@@ -18,6 +18,7 @@ import {
import { Skeleton } from "~/components/ui/skeleton";
import { Tooltip, TooltipPopup, TooltipTrigger } from "~/components/ui/tooltip";
import { useMediaQuery } from "~/hooks/useMediaQuery";
+import { SIDEBAR_INSET_BASE_CLASSNAME } from "./sidebar.logic";
const SIDEBAR_COOKIE_NAME = "sidebar_state";
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
@@ -595,7 +596,7 @@ function SidebarInset({ className, ...props }: React.ComponentProps<"main">) {
return (