diff --git a/.changeset/fn-7218-task-sidebar-active-list.md b/.changeset/fn-7218-task-sidebar-active-list.md new file mode 100644 index 0000000000..be82f83fa0 --- /dev/null +++ b/.changeset/fn-7218-task-sidebar-active-list.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Show active tasks by default in the right sidebar and fix its task-detail back button. +category: fix +dev: Filters the right-dock Tasks list to active tasks by default, adds a Show Done toggle, keeps archived tasks hidden, and wires the header back arrow to the existing dock task close path. diff --git a/docs/dashboard-guide.md b/docs/dashboard-guide.md index 547970ea14..38f1276844 100644 --- a/docs/dashboard-guide.md +++ b/docs/dashboard-guide.md @@ -56,14 +56,15 @@ If **Settings → Appearance → Open tasks in the right sidebar** is enabled, b -The dock toolbar has built-in inline tool panels for **Tasks**, **Files**, **Chat**, **Activity Log**, **Git Manager**, **Dev Server** when enabled, **Secrets**, **Todos** when enabled, and **Pull Requests**. These tools render in embedded mode inside the dock instead of opening fixed popup overlays; **Files** opens by default and is the fallback when browser storage points at a removed dock key. The **Tasks** tab shows the last task opened in the dock; when no dock task is active, it shows a compact clickable task list, and the task-detail back button returns to that list. Inline dock views have an expand button that opens the same view in a resizable modal for more room. The right-dock **Files** viewer and its expanded pop-out match the Files modal for browser-previewable file types: image, video/movie, audio, and PDF selections render as native browser previews, while editable text files keep the editor and save flow. Plugin overflow views may add additional right-dock tool tabs, except plugin destinations that explicitly belong in the left sidebar. + +The dock toolbar has built-in inline tool panels for **Tasks**, **Files**, **Chat**, **Activity Log**, **Git Manager**, **Dev Server** when enabled, **Secrets**, **Todos** when enabled, and **Pull Requests**. These tools render in embedded mode inside the dock instead of opening fixed popup overlays; **Files** opens by default and is the fallback when browser storage points at a removed dock key. The **Tasks** tab shows the last task opened in the dock; when no dock task is active, it shows a compact clickable active-task list. Use **Show Done** to include completed tasks in that compact list; archived tasks stay hidden there. Either task-detail back button returns to the Tasks list. Inline dock views have an expand button that opens the same view in a resizable modal for more room. The right-dock **Files** viewer and its expanded pop-out match the Files modal for browser-previewable file types: image, video/movie, audio, and PDF selections render as native browser previews, while editable text files keep the editor and save flow. Plugin overflow views may add additional right-dock tool tabs, except plugin destinations that explicitly belong in the left sidebar. Use the desktop/tablet right dock this way: 1. Open a project screen with **Right Dock Panel** enabled. Expected outcome: the dock appears on the far right with **Files** selected unless a valid previous dock view is stored. 2. Select **Tasks**, **Chat**, **Activity Log**, **Git Manager**, **Files**, or another available tool in the dock toolbar. - Expected outcome: the selected tool renders inline inside the dock body and the toolbar tab becomes active; **Tasks** either restores the last-viewed dock task or shows the compact task list. + Expected outcome: the selected tool renders inline inside the dock body and the toolbar tab becomes active; **Tasks** either restores the last-viewed dock task or shows the compact active-task list with optional **Show Done** completed-task visibility. 3. Drag the dock's left-edge resize handle, or focus the separator and use the arrow keys. Expected outcome: the dock width changes within its min/max bounds and is saved for future reloads. 4. Select the dock expand action. diff --git a/packages/dashboard/app/components/DockTaskList.css b/packages/dashboard/app/components/DockTaskList.css index 77124e3f85..dc613db28f 100644 --- a/packages/dashboard/app/components/DockTaskList.css +++ b/packages/dashboard/app/components/DockTaskList.css @@ -8,6 +8,17 @@ padding: var(--space-sm); } +.dock-task-list__controls { + display: flex; + flex-shrink: 0; + justify-content: flex-end; + min-width: 0; +} + +.dock-task-list__toggle-done { + flex-shrink: 0; +} + .dock-task-list__row { min-width: 0; } @@ -20,6 +31,18 @@ padding: var(--space-lg); } +.dock-task-list--empty .dock-task-list__controls { + justify-content: center; + width: 100%; +} + +.dock-task-list__empty { + display: flex; + flex-direction: column; + align-items: center; + gap: var(--space-xs); +} + .dock-task-list__empty-title, .dock-task-list__empty-copy { margin: 0; @@ -34,3 +57,17 @@ max-width: calc(var(--space-xl) * 12); font-size: var(--font-size-sm); } + +@media (max-width: 768px) { + .dock-task-list { + padding: var(--space-sm); + } + + .dock-task-list__controls { + justify-content: stretch; + } + + .dock-task-list__toggle-done { + width: 100%; + } +} diff --git a/packages/dashboard/app/components/DockTaskList.tsx b/packages/dashboard/app/components/DockTaskList.tsx index 92567f1daf..c6cf84bf5b 100644 --- a/packages/dashboard/app/components/DockTaskList.tsx +++ b/packages/dashboard/app/components/DockTaskList.tsx @@ -1,4 +1,4 @@ -import { useCallback } from "react"; +import { useCallback, useMemo, useState } from "react"; import type { Task, TaskDetail } from "@fusion/core"; import type { ToastType } from "../hooks/useToast"; import { TaskCard } from "./TaskCard"; @@ -16,6 +16,9 @@ export interface DockTaskListProps { /* FNXC:RightDockTasks 2026-06-28-16:50: The Tasks tab empty state is a real compact task list, not a blank placeholder. TaskCard's own open callback is routed directly to `onOpenTask` so clicking the card opens the dock Tasks detail with the back button; no wrapper click handler competes with TaskCard or the full-panel detail modal. + +FNXC:RightDockTasks 2026-06-28-18:25: +The compact right-dock Tasks list is an active-work queue by default. It hides completed work until the local Show Done toggle is enabled and never renders archived tasks, including in the expanded dock modal that reuses this component. */ export function DockTaskList({ tasks, @@ -25,23 +28,49 @@ export function DockTaskList({ prAuthAvailable = false, autoMergeEnabled = false, }: DockTaskListProps) { + const [showDone, setShowDone] = useState(false); + const handleOpenTask = useCallback((task: Task | TaskDetail) => { onOpenTask?.(task); }, [onOpenTask]); - if (tasks.length === 0) { - return ( -
No tasks yet
-Tasks you create or import will appear here for quick right-sidebar review.
-{emptyTitle}
+{emptyCopy}
+