Skip to content

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 plan composer layout and sidebar flex shrink behavior

Julius Marmingee9ffd5752bb5
diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx
index 3362622b7..52085daa4 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 */}
- <div className="flex min-h-0 flex-1">
+ <div className="flex min-h-0 min-w-0 flex-1">
{/* Chat column */}
<div className="flex min-h-0 min-w-0 flex-1 flex-col">
@@ -3953,6 +3953,15 @@ export default function ChatView({ threadId }: ChatViewProps) {
</form>
</div>
+ {isGitRepo && (
+ <BranchToolbar
+ threadId={activeThread.id}
+ onEnvModeChange={onEnvModeChange}
+ envLocked={envLocked}
+ onComposerFocusRequest={scheduleComposerFocus}
+ />
+ )}
+
</div>{/* end chat column */}
{/* Plan sidebar */}
@@ -3974,15 +3983,6 @@ export default function ChatView({ threadId }: ChatViewProps) {
) : null}
</div>{/* end horizontal flex container */}
- {isGitRepo && (
- <BranchToolbar
- threadId={activeThread.id}
- onEnvModeChange={onEnvModeChange}
- envLocked={envLocked}
- onComposerFocusRequest={scheduleComposerFocus}
- />
- )}
-
{(() => {
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 000000000..c9e4b4c1d
--- /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 000000000..99bf2d017
--- /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 ba77bddc2..ef79926ef 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 (
<main
className={cn(
- "relative flex w-full flex-1 flex-col bg-background",
+ SIDEBAR_INSET_BASE_CLASSNAME,
"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",
className,
)}