setShowSidebarOverlay(true)}
- />
- )}
-
- {/* Sidebar overlay when hidden and hovering */}
- {!isSidebarOpen && showSidebarOverlay && workspaces && (
-
setShowSidebarOverlay(false)}
- >
-
- {
- setShowSidebarOverlay(false);
- }}
- onShowDiff={handleShowDiff}
- />
-
-
- )}
-
-
-
- {/* Worktree tabs at the top - each tab represents a worktree */}
-
{
- // Don't allow selecting pending worktrees
- if (worktreeId.startsWith("pending-")) return;
-
- setSelectedWorktreeId(worktreeId);
- // Select first tab in the worktree
- const worktree = currentWorkspace?.worktrees?.find(
- (wt) => wt.id === worktreeId,
- );
- if (worktree && worktree.tabs && worktree.tabs.length > 0) {
- handleTabSelect(worktreeId, worktree.tabs[0].id);
- }
- }}
- mode={mode}
- onModeChange={setMode}
- />
-
- {/* Main content area - conditionally render based on mode */}
-
- {mode === "plan" ? (
- // Plan mode - show kanban board
-
- ) : (
- // Edit mode - show workspace/terminal view
-
- {/* Sidebar panel with full workspace/worktree management */}
- setIsSidebarOpen(false)}
- onExpand={() => setIsSidebarOpen(true)}
- >
- {isSidebarOpen && workspaces && (
- {
- const panel = sidebarPanelRef.current;
- if (panel && !panel.isCollapsed()) {
- panel.collapse();
- }
- }}
- onShowDiff={handleShowDiff}
- />
- )}
-
-
-
-
- {/* Main content panel */}
-
- {loading ||
- error ||
- !currentWorkspace ||
- !selectedTab ||
- !selectedWorktree ? (
-
- ) : parentGroupTab ? (
- // Selected tab is a sub-tab of a group → display the parent group's mosaic
-
- ) : selectedTab.type === "group" ? (
- // Selected tab is a group tab → display its mosaic layout
-
- ) : selectedTab.type === "diff" ? (
- // Diff tab → display diff view
-
-
-
- ) : (
- // Base level tab (terminal, preview, etc.) → display full width/height
-
-
-
- )}
-
-
- )}
-
-
-
-
- {/* Open Task Modal */}
-
- >
- );
-};
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/StatusIndicator.tsx b/apps/desktop/src/renderer/screens/main/components/StatusIndicator.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/StatusIndicator.tsx
rename to apps/desktop/src/renderer/screens/main/components/StatusIndicator.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskAssignee.tsx b/apps/desktop/src/renderer/screens/main/components/TaskAssignee.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskAssignee.tsx
rename to apps/desktop/src/renderer/screens/main/components/TaskAssignee.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskListItem.tsx b/apps/desktop/src/renderer/screens/main/components/TaskListItem.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskListItem.tsx
rename to apps/desktop/src/renderer/screens/main/components/TaskListItem.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskPreview.tsx b/apps/desktop/src/renderer/screens/main/components/TaskPreview.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskPreview.tsx
rename to apps/desktop/src/renderer/screens/main/components/TaskPreview.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/AddTaskButton.tsx b/apps/desktop/src/renderer/screens/main/components/TaskTabs/AddTaskButton.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/AddTaskButton.tsx
rename to apps/desktop/src/renderer/screens/main/components/TaskTabs/AddTaskButton.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/BasicWorktreeContent.tsx b/apps/desktop/src/renderer/screens/main/components/TaskTabs/BasicWorktreeContent.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/BasicWorktreeContent.tsx
rename to apps/desktop/src/renderer/screens/main/components/TaskTabs/BasicWorktreeContent.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/ModeToggle.tsx b/apps/desktop/src/renderer/screens/main/components/TaskTabs/ModeToggle.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/ModeToggle.tsx
rename to apps/desktop/src/renderer/screens/main/components/TaskTabs/ModeToggle.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/PRActions.tsx b/apps/desktop/src/renderer/screens/main/components/TaskTabs/PRActions.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/PRActions.tsx
rename to apps/desktop/src/renderer/screens/main/components/TaskTabs/PRActions.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/PendingWorktreeContent.tsx b/apps/desktop/src/renderer/screens/main/components/TaskTabs/PendingWorktreeContent.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/PendingWorktreeContent.tsx
rename to apps/desktop/src/renderer/screens/main/components/TaskTabs/PendingWorktreeContent.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/SidebarToggle.tsx b/apps/desktop/src/renderer/screens/main/components/TaskTabs/SidebarToggle.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/SidebarToggle.tsx
rename to apps/desktop/src/renderer/screens/main/components/TaskTabs/SidebarToggle.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/TaskTabs.tsx b/apps/desktop/src/renderer/screens/main/components/TaskTabs/TaskTabs.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/TaskTabs.tsx
rename to apps/desktop/src/renderer/screens/main/components/TaskTabs/TaskTabs.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/TaskWorktreeContent.tsx b/apps/desktop/src/renderer/screens/main/components/TaskTabs/TaskWorktreeContent.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/TaskWorktreeContent.tsx
rename to apps/desktop/src/renderer/screens/main/components/TaskTabs/TaskWorktreeContent.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/WorktreeTab.tsx b/apps/desktop/src/renderer/screens/main/components/TaskTabs/WorktreeTab.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/WorktreeTab.tsx
rename to apps/desktop/src/renderer/screens/main/components/TaskTabs/WorktreeTab.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/WorktreeTabButton.tsx b/apps/desktop/src/renderer/screens/main/components/TaskTabs/WorktreeTabButton.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/WorktreeTabButton.tsx
rename to apps/desktop/src/renderer/screens/main/components/TaskTabs/WorktreeTabButton.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/index.ts b/apps/desktop/src/renderer/screens/main/components/TaskTabs/index.ts
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/index.ts
rename to apps/desktop/src/renderer/screens/main/components/TaskTabs/index.ts
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/types.ts b/apps/desktop/src/renderer/screens/main/components/TaskTabs/types.ts
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/types.ts
rename to apps/desktop/src/renderer/screens/main/components/TaskTabs/types.ts
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/utils.ts b/apps/desktop/src/renderer/screens/main/components/TaskTabs/utils.ts
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/TaskTabs/utils.ts
rename to apps/desktop/src/renderer/screens/main/components/TaskTabs/utils.ts
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/WorktreeTabView.tsx b/apps/desktop/src/renderer/screens/main/components/WorktreeTabView.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/WorktreeTabView.tsx
rename to apps/desktop/src/renderer/screens/main/components/WorktreeTabView.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/mock-data.ts b/apps/desktop/src/renderer/screens/main/components/mock-data.ts
new file mode 100644
index 00000000000..57a3202c08f
--- /dev/null
+++ b/apps/desktop/src/renderer/screens/main/components/mock-data.ts
@@ -0,0 +1,179 @@
+import type { UITask } from "./types";
+
+// Mock tasks data - TODO: Replace with actual task data from backend
+export const MOCK_TASKS: UITask[] = [
+ {
+ id: "1",
+ slug: "SSET-1",
+ name: "Homepage Redesign",
+ status: "working",
+ branch: "feature/homepage-redesign",
+ description: "Redesigning the homepage with new branding and improved UX",
+ assignee: "Alice",
+ assigneeAvatarUrl: "https://i.pravatar.cc/150?img=1",
+ lastUpdated: "2 hours ago",
+ },
+ {
+ id: "2",
+ slug: "SSET-2",
+ name: "API Integration",
+ status: "needs-feedback",
+ branch: "feature/api-integration",
+ description: "Integrate new REST API endpoints for user management",
+ assignee: "Bob",
+ assigneeAvatarUrl: "https://i.pravatar.cc/150?img=12",
+ lastUpdated: "1 day ago",
+ },
+ {
+ id: "3",
+ slug: "SSET-3",
+ name: "Bug Fixes",
+ status: "planning",
+ branch: "fix/various-bugs",
+ description: "Collection of bug fixes reported by users",
+ assignee: "Charlie",
+ assigneeAvatarUrl: "https://i.pravatar.cc/150?img=33",
+ lastUpdated: "3 days ago",
+ },
+ {
+ id: "4",
+ slug: "SSET-4",
+ name: "Performance Optimization",
+ status: "ready-to-merge",
+ branch: "perf/optimize-queries",
+ description: "Optimize database queries for faster page loads",
+ assignee: "Diana",
+ assigneeAvatarUrl: "https://i.pravatar.cc/150?img=9",
+ lastUpdated: "5 minutes ago",
+ },
+ {
+ id: "5",
+ slug: "SSET-5",
+ name: "User Authentication System",
+ status: "working",
+ branch: "feature/auth-system",
+ description:
+ "Implement OAuth2 and JWT-based authentication system with refresh tokens",
+ assignee: "Eve",
+ assigneeAvatarUrl: "https://i.pravatar.cc/150?img=5",
+ lastUpdated: "3 hours ago",
+ },
+ {
+ id: "6",
+ slug: "SSET-6",
+ name: "Dark Mode Support",
+ status: "planning",
+ branch: "feature/dark-mode",
+ description: "Add dark mode theme support across the entire application",
+ assignee: "Frank",
+ assigneeAvatarUrl: "https://i.pravatar.cc/150?img=13",
+ lastUpdated: "2 days ago",
+ },
+ {
+ id: "7",
+ slug: "SSET-7",
+ name: "Database Migration Scripts",
+ status: "ready-to-merge",
+ branch: "db/migration-scripts",
+ description:
+ "Create automated migration scripts for production database updates",
+ assignee: "Grace",
+ assigneeAvatarUrl: "https://i.pravatar.cc/150?img=20",
+ lastUpdated: "1 hour ago",
+ },
+ {
+ id: "8",
+ slug: "SSET-8",
+ name: "Email Notification Service",
+ status: "needs-feedback",
+ branch: "feature/email-notifications",
+ description:
+ "Build email notification service using SendGrid for transactional emails",
+ assignee: "Henry",
+ assigneeAvatarUrl: "https://i.pravatar.cc/150?img=8",
+ lastUpdated: "4 hours ago",
+ },
+ {
+ id: "9",
+ slug: "SSET-9",
+ name: "Mobile Responsive Design",
+ status: "working",
+ branch: "feature/mobile-responsive",
+ description:
+ "Make the application fully responsive for mobile and tablet devices",
+ assignee: "Iris",
+ assigneeAvatarUrl: "https://i.pravatar.cc/150?img=16",
+ lastUpdated: "6 hours ago",
+ },
+ {
+ id: "10",
+ slug: "SSET-10",
+ name: "Analytics Dashboard",
+ status: "planning",
+ branch: "feature/analytics-dashboard",
+ description:
+ "Create admin dashboard with charts and metrics for user analytics",
+ assignee: "Jack",
+ assigneeAvatarUrl: "https://i.pravatar.cc/150?img=11",
+ lastUpdated: "1 week ago",
+ },
+ {
+ id: "11",
+ slug: "SSET-11",
+ name: "CI/CD Pipeline",
+ status: "ready-to-merge",
+ branch: "devops/ci-cd-pipeline",
+ description:
+ "Set up automated CI/CD pipeline with GitHub Actions and Docker",
+ assignee: "Kate",
+ assigneeAvatarUrl: "https://i.pravatar.cc/150?img=25",
+ lastUpdated: "30 minutes ago",
+ },
+ {
+ id: "12",
+ slug: "SSET-12",
+ name: "Search Functionality",
+ status: "working",
+ branch: "feature/search",
+ description: "Implement full-text search with Elasticsearch integration",
+ assignee: "Liam",
+ assigneeAvatarUrl: "https://i.pravatar.cc/150?img=14",
+ lastUpdated: "5 hours ago",
+ },
+ {
+ id: "13",
+ slug: "SSET-13",
+ name: "File Upload System",
+ status: "needs-feedback",
+ branch: "feature/file-uploads",
+ description:
+ "Build secure file upload system with S3 storage and virus scanning",
+ assignee: "Mia",
+ assigneeAvatarUrl: "https://i.pravatar.cc/150?img=27",
+ lastUpdated: "2 hours ago",
+ },
+ {
+ id: "14",
+ slug: "SSET-14",
+ name: "API Rate Limiting",
+ status: "planning",
+ branch: "feature/rate-limiting",
+ description: "Implement rate limiting and throttling for API endpoints",
+ assignee: "Noah",
+ assigneeAvatarUrl: "https://i.pravatar.cc/150?img=17",
+ lastUpdated: "4 days ago",
+ },
+ {
+ id: "15",
+ slug: "SSET-15",
+ name: "Internationalization",
+ status: "working",
+ branch: "feature/i18n",
+ description:
+ "Add multi-language support with i18next for English, Spanish, and French",
+ assignee: "Olivia",
+ assigneeAvatarUrl: "https://i.pravatar.cc/150?img=32",
+ lastUpdated: "8 hours ago",
+ },
+];
+
diff --git a/apps/desktop/src/renderer/screens/main/components/types.ts b/apps/desktop/src/renderer/screens/main/components/types.ts
new file mode 100644
index 00000000000..b7f8973e4be
--- /dev/null
+++ b/apps/desktop/src/renderer/screens/main/components/types.ts
@@ -0,0 +1,29 @@
+import type { TaskStatus } from "./StatusIndicator";
+
+// Type alias for task data used in UI
+export type UITask = {
+ id: string;
+ slug: string;
+ name: string;
+ status: TaskStatus;
+ branch: string;
+ description: string;
+ assignee: string;
+ assigneeAvatarUrl: string;
+ lastUpdated: string;
+};
+
+// Type for pending worktrees (optimistic updates)
+export type PendingWorktree = {
+ id: string;
+ isPending: true;
+ title: string;
+ branch: string;
+ description?: string;
+ taskData?: {
+ slug: string;
+ name: string;
+ status: TaskStatus;
+ };
+};
+
diff --git a/apps/desktop/src/renderer/screens/main/components/utils.ts b/apps/desktop/src/renderer/screens/main/components/utils.ts
new file mode 100644
index 00000000000..85d1b55189c
--- /dev/null
+++ b/apps/desktop/src/renderer/screens/main/components/utils.ts
@@ -0,0 +1,67 @@
+import type { Worktree } from "shared/types";
+import type { PendingWorktree } from "./types";
+import { MOCK_TASKS } from "./mock-data";
+import type { WorktreeWithTask } from "./TaskTabs";
+
+/**
+ * Helper function to enrich worktrees with task metadata
+ */
+export function enrichWorktreesWithTasks(
+ worktrees: Worktree[],
+ pendingWorktrees: PendingWorktree[],
+): WorktreeWithTask[] {
+ // First, convert pending worktrees to WorktreeWithTask format
+ const pendingAsWorktrees: WorktreeWithTask[] = pendingWorktrees.map(
+ (pending) => ({
+ id: pending.id,
+ branch: pending.branch,
+ path: "", // Pending worktrees don't have a path yet
+ tabs: [],
+ createdAt: new Date().toISOString(),
+ isPending: true, // Mark as pending for UI
+ task: pending.taskData
+ ? {
+ id: pending.id,
+ slug: pending.taskData.slug,
+ title: pending.taskData.name,
+ status: pending.taskData.status,
+ description: pending.description || "",
+ }
+ : undefined,
+ }),
+ );
+
+ // Then, enrich real worktrees with task metadata
+ const enrichedWorktrees = worktrees.map((worktree) => {
+ // Try to find a matching task by branch name
+ const matchingTask = MOCK_TASKS.find(
+ (task) => task.branch === worktree.branch,
+ );
+
+ if (matchingTask) {
+ // Worktree has an associated task - add task metadata
+ return {
+ ...worktree,
+ task: {
+ id: matchingTask.id,
+ slug: matchingTask.slug,
+ title: matchingTask.name,
+ status: matchingTask.status,
+ description: matchingTask.description,
+ assignee: {
+ name: matchingTask.assignee,
+ avatarUrl: matchingTask.assigneeAvatarUrl,
+ },
+ lastUpdated: matchingTask.lastUpdated,
+ },
+ };
+ }
+
+ // Worktree without task - return as-is
+ return worktree;
+ });
+
+ // Merge pending and real worktrees
+ return [...pendingAsWorktrees, ...enrichedWorktrees];
+}
+
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/views/BrowserView.tsx b/apps/desktop/src/renderer/screens/main/components/views/BrowserView.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/views/BrowserView.tsx
rename to apps/desktop/src/renderer/screens/main/components/views/BrowserView.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/views/GitView.tsx b/apps/desktop/src/renderer/screens/main/components/views/GitView.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/views/GitView.tsx
rename to apps/desktop/src/renderer/screens/main/components/views/GitView.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/views/SummaryView.tsx b/apps/desktop/src/renderer/screens/main/components/views/SummaryView.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/views/SummaryView.tsx
rename to apps/desktop/src/renderer/screens/main/components/views/SummaryView.tsx
diff --git a/apps/desktop/src/renderer/screens/main/components/NewLayout/views/TerminalsView.tsx b/apps/desktop/src/renderer/screens/main/components/views/TerminalsView.tsx
similarity index 100%
rename from apps/desktop/src/renderer/screens/main/components/NewLayout/views/TerminalsView.tsx
rename to apps/desktop/src/renderer/screens/main/components/views/TerminalsView.tsx