From 5d9162e138785a8cf18602cd970e699ba2858472 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Sat, 20 Jun 2026 19:36:01 -0700 Subject: [PATCH] FN-6806: show workflow counts only when expanded Keep workflow dropdown triggers compact until the menu opens. - Hide Todo, In Progress, and Done count badges from the collapsed workflow switcher trigger. - Preserve active-workflow and option counts while the dropdown is expanded for comparison. - Update Board, List, switcher tests, and dashboard docs for the expanded-only count behavior. Files changed: docs/dashboard-guide.md | 2 +- .../dashboard/app/components/WorkflowSwitcher.tsx | 8 +++-- .../app/components/__tests__/Board.test.tsx | 3 +- .../app/components/__tests__/ListView.test.tsx | 5 ++- .../components/__tests__/WorkflowSwitcher.test.tsx | 36 +++++++++++++++++----- 5 files changed, 41 insertions(+), 13 deletions(-) Fusion-Task-Id: FN-6806 Fusion-Task-Lineage: a3c2db33-fe08-4207-9aae-548b292d98bd --- docs/dashboard-guide.md | 2 +- .../app/components/WorkflowSwitcher.tsx | 8 +++-- .../app/components/__tests__/Board.test.tsx | 3 +- .../components/__tests__/ListView.test.tsx | 5 ++- .../__tests__/WorkflowSwitcher.test.tsx | 36 ++++++++++++++----- 5 files changed, 41 insertions(+), 13 deletions(-) diff --git a/docs/dashboard-guide.md b/docs/dashboard-guide.md index d27613b07e..08715b2f21 100644 --- a/docs/dashboard-guide.md +++ b/docs/dashboard-guide.md @@ -77,7 +77,7 @@ Features: - Task card header meta badges group priority, fast mode, agent-created provenance, and elapsed/created-time chips into one wrapping row; agent labels prefer `sourceMetadata.agentName` over raw agent IDs - 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` is ordered by most recent completion first (`columnMovedAt`, then `updatedAt`, then `createdAt` fallback) - 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. -- Board and List workflow switchers use a themed dropdown instead of a native select. The closed trigger and each workflow option show compact Todo / In Progress / Done counts derived from workflow column flags, excluding archived columns. +- Board and List workflow switchers use a themed dropdown instead of a native select. The closed trigger shows the workflow name and chevron only; compact Todo / In Progress / Done counts derived from workflow column flags (excluding archived columns) appear while the dropdown is expanded, including on each workflow option. - When workflow columns are enabled, Board and List hydrate the last successful workflow-lane payload from a per-project session cache; cold loads show a neutral skeleton until settings and workflow metadata are known, avoiding a legacy single-lane flash. ![Board view](./screenshots/dashboard-overview.png) diff --git a/packages/dashboard/app/components/WorkflowSwitcher.tsx b/packages/dashboard/app/components/WorkflowSwitcher.tsx index c9ad913202..bbb281c5f5 100644 --- a/packages/dashboard/app/components/WorkflowSwitcher.tsx +++ b/packages/dashboard/app/components/WorkflowSwitcher.tsx @@ -32,6 +32,10 @@ function getCounts(counts: Map, workflowId: string * FNXC:WorkflowSwitcher 2026-06-20-00:09: * The board/list workflow switcher must be a fully rendered themed dropdown rather than a native select so each workflow option can include compact inline Todo, In Progress, and Done counts. * The component owns only presentation and accessible dropdown behavior; all status-bucket semantics stay in computeWorkflowStatusCounts so Board and ListView cannot drift. + * + * FNXC:WorkflowSwitcher 2026-06-20-00:31: + * Counts are contextual detail, so the collapsed trigger must stay visually and accessibly scoped to the active workflow name plus chevron. + * Render Todo, In Progress, and Done counts only while the dropdown is expanded; option rows keep their count text because the listbox is the comparison surface. */ export function WorkflowSwitcher({ workflows, value, onChange, counts, label: labelProp }: WorkflowSwitcherProps) { const { t } = useTranslation("app"); @@ -259,8 +263,8 @@ export function WorkflowSwitcher({ workflows, value, onChange, counts, label: la > {selectedWorkflow.name} - {renderCountBadges(selectedCounts, "trigger")} - {renderAccessibleCounts(selectedCounts)} + {isOpen ? renderCountBadges(selectedCounts, "trigger") : null} + {isOpen ? renderAccessibleCounts(selectedCounts) : null}