-
-
+
+ }
+ />
{/* Task details */}
diff --git a/components/task-page-header.tsx b/components/task-page-header.tsx
deleted file mode 100644
index 6363c030..00000000
--- a/components/task-page-header.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-'use client'
-
-import { Task } from '@/lib/db/schema'
-import { PageHeader } from '@/components/page-header'
-import { TaskActions } from '@/components/task-actions'
-import { useTasks } from '@/components/app-layout'
-import { User } from '@/components/auth/user'
-import { Button } from '@/components/ui/button'
-import { VERCEL_DEPLOY_URL } from '@/lib/constants'
-import type { Session } from '@/lib/session/types'
-import { GitHubStarsButton } from '@/components/github-stars-button'
-
-interface TaskPageHeaderProps {
- task: Task
- user: Session['user'] | null
- authProvider: Session['authProvider'] | null
- initialStars?: number
-}
-
-export function TaskPageHeader({ task, user, authProvider, initialStars = 1200 }: TaskPageHeaderProps) {
- const { toggleSidebar } = useTasks()
-
- return (
-
-
- {/* Deploy to Vercel Button */}
-
-
-
-
- }
- />
- )
-}
diff --git a/components/tasks-list-client.tsx b/components/tasks-list-client.tsx
index f03df4d2..6af6477e 100644
--- a/components/tasks-list-client.tsx
+++ b/components/tasks-list-client.tsx
@@ -2,7 +2,7 @@
import { useState, useEffect, useMemo } from 'react'
import { Task } from '@/lib/db/schema'
-import { PageHeader } from '@/components/page-header'
+import { SharedHeader } from '@/components/shared-header'
import { useTasks } from '@/components/app-layout'
import { Button } from '@/components/ui/button'
import { Card, CardContent } from '@/components/ui/card'
@@ -19,13 +19,10 @@ import {
} from '@/components/ui/alert-dialog'
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'
import { AlertCircle, Trash2, Square, StopCircle, CheckSquare, X, Clock } from 'lucide-react'
-import { GitHubStarsButton } from '@/components/github-stars-button'
-import { User } from '@/components/auth/user'
import { toast } from 'sonner'
import { useRouter } from 'next/navigation'
import { cn } from '@/lib/utils'
import type { Session } from '@/lib/session/types'
-import { VERCEL_DEPLOY_URL } from '@/lib/constants'
import { Claude, Codex, Copilot, Cursor, Gemini, OpenCode } from '@/components/logos'
import { PRStatusIcon } from '@/components/pr-status-icon'
import { PRCheckStatus } from '@/components/pr-check-status'
@@ -274,35 +271,7 @@ export function TasksListClient({ user, authProvider, initialStars = 1200 }: Tas
return (
diff --git a/lib/utils/cookies.ts b/lib/utils/cookies.ts
index e940986b..712e8db8 100644
--- a/lib/utils/cookies.ts
+++ b/lib/utils/cookies.ts
@@ -402,3 +402,102 @@ export function setEnableBrowser(enable: boolean): void {
sameSite: 'strict',
})
}
+
+// Pane width cookies
+const FILES_PANE_WIDTH_COOKIE = 'files_pane_width'
+const CODE_PANE_WIDTH_COOKIE = 'code_pane_width'
+const PREVIEW_PANE_WIDTH_COOKIE = 'preview_pane_width'
+const CHAT_PANE_WIDTH_COOKIE = 'chat_pane_width'
+
+const DEFAULT_FILES_WIDTH = 250
+const DEFAULT_CODE_WIDTH = 0 // 0 means flex
+const DEFAULT_PREVIEW_WIDTH = 0 // 0 means flex
+const DEFAULT_CHAT_WIDTH = 300
+
+export function getFilesPaneWidth(): number {
+ if (typeof window === 'undefined') return DEFAULT_FILES_WIDTH
+
+ const savedWidth = Cookies.get(FILES_PANE_WIDTH_COOKIE)
+ if (savedWidth) {
+ const width = parseInt(savedWidth, 10)
+ if (!isNaN(width) && width >= 150 && width <= 600) {
+ return width
+ }
+ }
+ return DEFAULT_FILES_WIDTH
+}
+
+export function setFilesPaneWidth(width: number): void {
+ if (typeof window === 'undefined') return
+
+ Cookies.set(FILES_PANE_WIDTH_COOKIE, width.toString(), {
+ expires: 365,
+ sameSite: 'strict',
+ })
+}
+
+export function getCodePaneWidth(): number {
+ if (typeof window === 'undefined') return DEFAULT_CODE_WIDTH
+
+ const savedWidth = Cookies.get(CODE_PANE_WIDTH_COOKIE)
+ if (savedWidth) {
+ const width = parseInt(savedWidth, 10)
+ if (!isNaN(width) && width >= 0) {
+ return width
+ }
+ }
+ return DEFAULT_CODE_WIDTH
+}
+
+export function setCodePaneWidth(width: number): void {
+ if (typeof window === 'undefined') return
+
+ Cookies.set(CODE_PANE_WIDTH_COOKIE, width.toString(), {
+ expires: 365,
+ sameSite: 'strict',
+ })
+}
+
+export function getPreviewPaneWidth(): number {
+ if (typeof window === 'undefined') return DEFAULT_PREVIEW_WIDTH
+
+ const savedWidth = Cookies.get(PREVIEW_PANE_WIDTH_COOKIE)
+ if (savedWidth) {
+ const width = parseInt(savedWidth, 10)
+ if (!isNaN(width) && width >= 0) {
+ return width
+ }
+ }
+ return DEFAULT_PREVIEW_WIDTH
+}
+
+export function setPreviewPaneWidth(width: number): void {
+ if (typeof window === 'undefined') return
+
+ Cookies.set(PREVIEW_PANE_WIDTH_COOKIE, width.toString(), {
+ expires: 365,
+ sameSite: 'strict',
+ })
+}
+
+export function getChatPaneWidth(): number {
+ if (typeof window === 'undefined') return DEFAULT_CHAT_WIDTH
+
+ const savedWidth = Cookies.get(CHAT_PANE_WIDTH_COOKIE)
+ if (savedWidth) {
+ const width = parseInt(savedWidth, 10)
+ if (!isNaN(width) && width >= 200 && width <= 600) {
+ return width
+ }
+ }
+ return DEFAULT_CHAT_WIDTH
+}
+
+export function setChatPaneWidth(width: number): void {
+ if (typeof window === 'undefined') return
+
+ Cookies.set(CHAT_PANE_WIDTH_COOKIE, width.toString(), {
+ expires: 365,
+ sameSite: 'strict',
+ })
+}