FN-7242: add all-workflows board view and workflow badges

Adds an aggregate workflow board mode with workflow-name context on mixed-workflow task surfaces.

- Add a dashboard-only All workflows switcher option that unions visible workflow columns without persisting the sentinel as a real workflow selection.
- Thread workflow metadata into board cards, worktree groups, and task detail headers so mixed workflow views show the task workflow name.
- Update workflow status counts, quick-create targeting, docs, changesets, and regression coverage for aggregate board and badge behavior.

Files changed:
 .changeset/fn-7242-all-workflows-board.md          |   7 +
 .changeset/fn-7242-task-detail-workflow-badge.md   |   7 +
 .changeset/fn-7242-workflow-badges.md              |   7 +
 docs/dashboard-guide.md                            |   8 +-
 .../workflow-selection-cross-surface.test.tsx      |   6 +-
 packages/dashboard/app/components/Board.tsx        | 295 +++++++++++++++++++--
 packages/dashboard/app/components/Column.tsx       |   6 +-
 packages/dashboard/app/components/TaskCard.css     |  16 +-
 packages/dashboard/app/components/TaskCard.tsx     |  23 +-
 .../dashboard/app/components/TaskDetailModal.css   |  14 +-
 .../dashboard/app/components/TaskDetailModal.tsx   |  43 ++-
 .../dashboard/app/components/WorkflowSwitcher.tsx  |  38 ++-
 .../dashboard/app/components/WorktreeGroup.tsx     |   5 +
 .../app/components/__tests__/Board.test.tsx        | 192 +++++++++++++-
 .../__tests__/TaskCard.badge-wrap.test.tsx         |   2 +
 .../app/components/__tests__/TaskCard.test.tsx     |  38 +++
 .../__tests__/TaskDetailModal.rendering.test.tsx   | 161 ++++++++++-
 .../components/__tests__/WorkflowSwitcher.test.tsx |  50 ++++
 .../__tests__/workflowStatusCounts.test.ts         |  26 +-
 .../app/components/workflowStatusCounts.ts         |  16 +-
 20 files changed, 887 insertions(+), 73 deletions(-)

Fusion-Task-Id: FN-7242
Fusion-Task-Lineage: 7ff9d35a-83ef-406c-88f4-a8846edad381
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
gsxdsm
2026-06-29 18:54:28 -07:00
parent 9fd286b1d3
commit 797b30ce5d
20 changed files with 887 additions and 73 deletions

View File

@@ -139,7 +139,10 @@ Features:
- 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.
- 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.
<!-- FNXC:WorkflowSelection 2026-06-29-13:34: Board, List, Header, and Graph workflow selectors now share a durable per-project selection so operators return to the same lane after remounts, task refreshes, or respecification flows; stale saved workflow ids must fall back to a valid default/first workflow instead of hiding all tasks. -->
- 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) refresh each time the dropdown opens and appear while the dropdown is expanded, including on each workflow option. Built-in lanes with synthesized trait-less lifecycle columns fall back to canonical column ids (`todo`, `in-progress`, `done`, and `archived`) for those counts. Each option row also exposes an inline edit action, and a persistent **New workflow** footer stays visible below the scrollable option list. The open listbox grows from the longest workflow name plus its count/edit decorations while remaining viewport-bounded; the closed trigger stays narrow and ellipsized. Those inline count badges intentionally use the same board column color tokens as cards: `--todo`, `--in-progress`, and `--done`.
<!-- FNXC:WorkflowSelection 2026-06-29-18:37: The Board-only All workflows option renders an aggregate column set across workflows while keeping workflow-specific creates, edits, and durable selection scoped to real workflow ids. -->
<!-- FNXC:WorkflowSelection 2026-06-29-23:58: All workflows quick-create must use a real workflow intake/default column rather than a synthesized lifecycle column, so custom-default boards do not create tasks into invalid or disappearing columns. -->
<!-- FNXC:WorkflowSelection 2026-06-29-23:59: Workflow counts and All workflows grouping resolve each task's effective workflow before evaluating column visibility, so a shared column id hidden in one workflow does not leak that workflow's hidden tasks into another workflow's visible aggregate lane. -->
- 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 and board-hidden columns) refresh each time the dropdown opens and appear while the dropdown is expanded, including on each workflow option. Built-in lanes with synthesized trait-less lifecycle columns fall back to canonical column ids (`todo`, `in-progress`, `done`, and `archived`) for those counts. Board also shows **All workflows** before real workflows as a dashboard-only aggregate view with combined counts and a deterministic union of visible workflow columns; shared column ids use the default workflow label/flags when available, otherwise the first workflow definition that declares the column. That option is not editable and is not saved as the durable selected workflow, and its quick-create affordance appears only on the chosen real workflow intake/default column so task creation still sends a real workflow id and column. Each real workflow option row also exposes an inline edit action, and a persistent **New workflow** footer stays visible below the scrollable option list. The open listbox grows from the longest workflow name plus its count/edit decorations while remaining viewport-bounded; the closed trigger stays narrow and ellipsized. Those inline count badges intentionally use the same board column color tokens as cards: `--todo`, `--in-progress`, and `--done`.
- 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. The selected workflow is remembered per project in durable browser storage and restored when returning to Board/List after task refreshes, route changes, or respecification flows; if that saved workflow is later deleted, Fusion falls back to a valid default/first workflow so tasks remain visible.
![Board view](./screenshots/dashboard-overview.png)
@@ -998,7 +1001,8 @@ Inspect task definition, logs, review feedback, comments, artifacts, workflow ou
- The priority chip in task metadata is an inline picker: you can change priority directly without entering full edit mode.
- Execution mode has a read-mode inline lightning-bolt toggle for Fast mode on/off without opening the full edit form.
- These two metadata controls share matched sizing/alignment in read mode (including mobile wrapping) so they behave like a single polished control group.
- Task metadata keeps priority, execution mode, provenance, optional PR context, and compact `Created` / `Updated` timestamps in one wrapping row across desktop and mobile widths; recent timestamps render as relative time (`just now`, `Xm`, `Xh`, `Xd`) and older values switch to short month/day dates.
<!-- FNXC:TaskDetailWorkflowBadge 2026-06-29-18:45: Task Detail header metadata shows the resolved workflow name when board-workflows metadata is available, but omits the chip entirely for missing or stale workflow payloads so embedded, modal, and mobile headers do not render empty badge shells. -->
- Task metadata keeps priority, execution mode, provenance, optional workflow name, optional PR context, and compact `Created` / `Updated` timestamps in one wrapping row across desktop and mobile widths; recent timestamps render as relative time (`just now`, `Xm`, `Xh`, `Xd`) and older values switch to short month/day dates.
- The **Actions** menu exposes **Pause** / **Unpause** for eligible non-terminal tasks, including tasks assigned to agents. If a task was paused by an agent, the **Paused by agent** note is informational; users can still unpause it manually from the same menu.
- After delete confirmations are complete, Task Detail closes immediately while the delete request finishes in the background; success and error outcomes still appear as toasts.
- Eligible existing tasks (triage, todo, in-progress, in-review) expose a **GitHub tracking** section directly in Task Detail, even when tracking is currently disabled.