Skip to content

Commit 8eebb4f

Browse files
1 parent 0f3a1e9 commit 8eebb4f

File tree

5 files changed

+27
-16
lines changed

5 files changed

+27
-16
lines changed

site/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
"react-helmet-async": "2.0.5",
103103
"react-markdown": "9.0.3",
104104
"react-query": "npm:@tanstack/react-query@5.77.0",
105+
"react-resizable-panels": "3.0.3",
105106
"react-router-dom": "6.26.2",
106107
"react-syntax-highlighter": "15.6.1",
107108
"react-textarea-autosize": "8.5.9",

site/pnpm-lock.yaml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/pages/TaskPage/TaskApps.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const TaskApps: FC<TaskAppsProps> = ({ task }) => {
5757
}
5858

5959
return (
60-
<main className="flex-1 flex flex-col">
60+
<main className="flex flex-col">
6161
<div className="w-full flex items-center border-0 border-b border-border border-solid">
6262
<div className="p-2 pb-0 flex gap-2 items-center">
6363
{embeddedApps.map((app) => (

site/src/pages/TaskPage/TaskPage.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { AI_PROMPT_PARAMETER_NAME, type Task } from "modules/tasks/tasks";
1111
import type { ReactNode } from "react";
1212
import { Helmet } from "react-helmet-async";
1313
import { useQuery } from "react-query";
14+
import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels";
1415
import { useParams } from "react-router-dom";
1516
import { Link as RouterLink } from "react-router-dom";
1617
import { ellipsizeText } from "utils/ellipsizeText";
@@ -178,11 +179,15 @@ const TaskPage = () => {
178179
<Helmet>
179180
<title>{pageTitle(ellipsizeText(task.prompt, 64) ?? "Task")}</title>
180181
</Helmet>
181-
182-
<div className="h-full flex justify-stretch">
183-
<TaskSidebar task={task} />
184-
{content}
185-
</div>
182+
<PanelGroup autoSaveId="task" direction="horizontal">
183+
<Panel defaultSize={25} minSize={20}>
184+
<TaskSidebar task={task} />
185+
</Panel>
186+
<PanelResizeHandle>
187+
<div className="w-1 bg-border h-full hover:bg-border-hover transition-all relative" />
188+
</PanelResizeHandle>
189+
<Panel className="[&>*]:h-full">{content}</Panel>
190+
</PanelGroup>
186191
</>
187192
);
188193
};

site/src/pages/TaskPage/TaskSidebar.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { ArrowLeftIcon, EllipsisVerticalIcon } from "lucide-react";
1717
import type { Task } from "modules/tasks/tasks";
1818
import type { FC } from "react";
1919
import { Link as RouterLink } from "react-router-dom";
20-
import { cn } from "utils/cn";
2120
import { TaskAppIFrame } from "./TaskAppIframe";
2221
import { TaskStatusLink } from "./TaskStatusLink";
2322

@@ -82,15 +81,7 @@ export const TaskSidebar: FC<TaskSidebarProps> = ({ task }) => {
8281
const [sidebarApp, sidebarAppStatus] = getSidebarApp(task);
8382

8483
return (
85-
<aside
86-
className={cn([
87-
[
88-
"flex flex-col h-full shrink-0",
89-
"border-0 border-r border-solid border-border",
90-
],
91-
"w-[520px]",
92-
])}
93-
>
84+
<aside className="flex flex-col h-full shrink-0 w-full">
9485
<header className="border-0 border-b border-solid border-border p-4 pt-0">
9586
<div className="flex items-center justify-between py-1">
9687
<TooltipProvider>

0 commit comments

Comments
 (0)