diff --git a/.changeset/fn-7260-done-actions-menu.md b/.changeset/fn-7260-done-actions-menu.md new file mode 100644 index 0000000000..5f4709408a --- /dev/null +++ b/.changeset/fn-7260-done-actions-menu.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Group Done column sort and archive actions in one accessible actions menu. +category: fix +dev: Updates dashboard Done/complete column headers to use the shared column actions dropdown. diff --git a/docs/dashboard-guide.md b/docs/dashboard-guide.md index 0073476764..a0b38db25f 100644 --- a/docs/dashboard-guide.md +++ b/docs/dashboard-guide.md @@ -145,8 +145,9 @@ FNXC:BoardCardActions 2026-06-30-13:12: Card context menus must not label an act -- Column ordering semantics: `todo` mirrors scheduler pickup order (priority descending, then oldest `createdAt`, then task ID); `triage`, `in-progress`, `in-review`, and `archived` remain priority-first with task-ID tie-breaks; `done` defaults to most recent completion first (`columnMovedAt`, then `updatedAt`, then `createdAt` fallback) and can be switched from the Done column header to descending task ID. In workflow mode, non-archived columns marked with the `complete` flag use the same Done ordering even when their column ID or label is customized. -- Done-column sorting has two descending modes: **Completion date (newest first)** keeps the default completion-time order, while **Task ID (newest first)** places the highest numeric task IDs first. The selector is only shown on Done/complete columns, including custom workflow completion lanes. + +- Column ordering semantics: `todo` mirrors scheduler pickup order (priority descending, then oldest `createdAt`, then task ID); `triage`, `in-progress`, `in-review`, and `archived` remain priority-first with task-ID tie-breaks; `done` defaults to most recent completion first (`columnMovedAt`, then `updatedAt`, then `createdAt` fallback) and can be switched from the Done/complete column actions dropdown to descending task ID. In workflow mode, non-archived columns marked with the `complete` flag use the same Done menu items even when their column ID or label is customized. +- Done-column sorting has two descending modes: **Completion date (newest first)** keeps the default completion-time order, while **Task ID (newest first)** places the highest numeric task IDs first. The sort actions are only shown in Done/complete column action menus, including custom workflow completion lanes; Archive All Done lives in the same menu when available. - On mobile, both default and workflow-mode boards fill the project viewport while the column strip remains the internal horizontal scroller with contained edge overscroll. diff --git a/packages/dashboard/app/components/Column.tsx b/packages/dashboard/app/components/Column.tsx index ca51bcf780..42e4c7b7df 100644 --- a/packages/dashboard/app/components/Column.tsx +++ b/packages/dashboard/app/components/Column.tsx @@ -12,7 +12,7 @@ import { PluginSlot } from "./PluginSlot"; import { groupByWorktree } from "../utils/worktreeGrouping"; import type { ToastType } from "../hooks/useToast"; import type { TaskContextMenuColumnMetadata } from "./TaskContextMenu"; -import { ChevronDown, ChevronUp, Archive, MoreVertical } from "lucide-react"; +import { ChevronDown, ChevronUp, MoreVertical } from "lucide-react"; import type { ModelInfo, BoardWorkflowColumnFlags } from "../api"; import type { BlockerFanoutEntry } from "../hooks/useBlockerFanout"; import type { DoneColumnSortMode } from "./taskSorting"; @@ -565,9 +565,22 @@ function ColumnComponent({ column, tasks, projectId, maxConcurrent, showWorktree */ const isDoneSortColumn = workflowMode ? columnFlags?.complete === true && columnFlags?.archived !== true : column === "done"; const showDoneSortControl = isDoneSortColumn && doneSortMode !== undefined && !!onDoneSortModeChange; + const showDoneArchiveAction = isDoneSortColumn && !!onArchiveAllDone; + const hasDoneMenuActions = showDoneSortControl || showDoneArchiveAction; + const hasColumnMenu = hasColumnBulkActions || hasDoneMenuActions; const doneSortControlLabel = t("column.doneSortControlLabel", "Sort Done tasks"); + const doneSortOptions: Array<{ mode: DoneColumnSortMode; label: string }> = [ + { mode: "completion-date-desc", label: t("column.doneSortCompletionDateDesc", "Completion date (newest first)") }, + { mode: "task-id-desc", label: t("column.doneSortTaskIdDesc", "Task ID (newest first)") }, + ]; + + const handleDoneSortModeSelect = useCallback((mode: DoneColumnSortMode) => { + onDoneSortModeChange?.(mode); + setIsMenuOpen(false); + }, [onDoneSortModeChange]); const handleArchiveAll = useCallback(async () => { + setIsMenuOpen(false); if (!onArchiveAllDone) return; if (tasks.length === 0) return; @@ -614,35 +627,7 @@ function ColumnComponent({ column, tasks, projectId, maxConcurrent, showWorktree + {t("column.newTask", "New Task")} )} - {showDoneSortControl && ( - - )} - {column === "done" && onArchiveAllDone && ( - - )} + {isArchived && onToggleCollapse && ( )} - {hasColumnBulkActions && ( + {hasColumnMenu && (
+ {/** + FNXC:DoneColumnActions 2026-06-30-00:00: + Done and workflow complete-column archive/sort affordances must share this column actions dropdown with existing bulk actions, preventing duplicate header controls on desktop and mobile while preserving the original sort modes and archive confirmation path. + */} {isMenuOpen && (
+ {showDoneSortControl && ( +
+ {doneSortOptions.map((option) => ( + + ))} +
+ )} + {showDoneArchiveAction && ( + + )} {isTodoLikeColumn && (