Skip to content

Open source CapCut alternative.

TypeScript

fix(site): mock chat panel spans the full editor frame like the real app

David Le592d00662167
diff --git a/site/src/app/cut/_components/landing/editor-mock/EditorMock.tsx b/site/src/app/cut/_components/landing/editor-mock/EditorMock.tsx
index 60159acc..1041dcda 100644
--- a/site/src/app/cut/_components/landing/editor-mock/EditorMock.tsx
+++ b/site/src/app/cut/_components/landing/editor-mock/EditorMock.tsx
@@ -49,17 +49,21 @@ export function EditorMock() {
<div
key={project.id}
className={cn(
- "absolute inset-0 grid grid-rows-[46px_minmax(0,1fr)_auto] bg-card transition-opacity duration-300",
+ // Same frame as the real editor: the chat panel is a
+ // full-height column beside the top-bar/preview/timeline grid.
+ "absolute inset-0 flex bg-card transition-opacity duration-300",
i === active ? "opacity-100" : "opacity-0",
)}
>
- <MockTopBar project={project} />
- <div className="grid min-h-0 grid-cols-[auto_minmax(0,1fr)_340px]">
- <MockSidePanel project={project} />
- <MockPreview project={project} active={i === active} />
- <MockAiPanel project={project} />
+ <div className="grid min-w-0 flex-1 grid-rows-[46px_minmax(0,1fr)_auto]">
+ <MockTopBar project={project} />
+ <div className="grid min-h-0 grid-cols-[auto_minmax(0,1fr)]">
+ <MockSidePanel project={project} />
+ <MockPreview project={project} active={i === active} />
+ </div>
+ <MockTimeline project={project} />
</div>
- <MockTimeline project={project} />
+ <MockAiPanel project={project} />
</div>
))}
</div>
diff --git a/site/src/app/cut/_components/landing/editor-mock/MockPreview.tsx b/site/src/app/cut/_components/landing/editor-mock/MockPreview.tsx
index 3996fa67..823d3b65 100644
--- a/site/src/app/cut/_components/landing/editor-mock/MockPreview.tsx
+++ b/site/src/app/cut/_components/landing/editor-mock/MockPreview.tsx
@@ -25,7 +25,7 @@ export function MockPreview({ project, active }: { project: MockProject; active:
const stage =
project.aspect === "9:16"
? { width: 250, height: 444 }
- : { width: 528, height: 297 };
+ : { width: 480, height: 270 };
return (
<div className="flex min-w-0 items-center justify-center bg-muted/40 px-6">
diff --git a/site/src/app/cut/_components/landing/editor-mock/MockTimeline.tsx b/site/src/app/cut/_components/landing/editor-mock/MockTimeline.tsx
index 7e85f134..7368783d 100644
--- a/site/src/app/cut/_components/landing/editor-mock/MockTimeline.tsx
+++ b/site/src/app/cut/_components/landing/editor-mock/MockTimeline.tsx
@@ -7,7 +7,9 @@ import type { CSSProperties } from "react";
import { cn } from "@/lib/utils";
import type { MockProject } from "@/app/cut/_components/landing/editor-mock/mockData";
-const TRACK_W = 1000;
+// The timeline column sits left of the full-height chat panel (340px), so its
+// usable track width is the frame minus that column and some gutter.
+const TRACK_W = 800;
const CLIP_GAP = 4;
const RULER_H = 26;
const VIDEO_H = 56;