Adds workflow icon metadata while preserving readable workflow names without built-in suffixes. - Store and validate compact plain-text workflow icons across core APIs, imports, exports, tools, and analytics. - Render Fusion marks for built-in workflows and custom text icons beside existing workflow labels on board, switcher, detail, and editor surfaces. - Update workflow editor creation/copy flows, docs, release notes, and tests for icon metadata and shorter built-in names. Files changed: .changeset/fn-7285-workflow-icons.md | 7 ++ docs/dashboard-guide.md | 12 +-- .../cli/skill/fusion/references/extension-tools.md | 2 + .../core/src/__tests__/builtin-workflows.test.ts | 8 +- packages/core/src/__tests__/db-migrate.test.ts | 7 +- .../core/src/__tests__/workflow-analytics.test.ts | 15 +-- .../__tests__/workflow-definition-store.test.ts | 31 ++++++ packages/core/src/builtin-workflows.ts | 20 ++-- packages/core/src/db.ts | 11 +- packages/core/src/index.ts | 4 + packages/core/src/store.ts | 24 ++++- packages/core/src/workflow-analytics.ts | 7 +- packages/core/src/workflow-definition-types.ts | 31 ++++++ packages/dashboard/app/api/legacy.ts | 2 + packages/dashboard/app/components/Board.tsx | 18 ++-- packages/dashboard/app/components/Column.tsx | 2 +- packages/dashboard/app/components/TaskCard.tsx | 7 +- .../dashboard/app/components/TaskDetailModal.tsx | 20 ++-- packages/dashboard/app/components/WorkflowIcon.css | 42 ++++++++ packages/dashboard/app/components/WorkflowIcon.tsx | 49 +++++++++ .../app/components/WorkflowNodeEditor.css | 32 ++++++ .../app/components/WorkflowNodeEditor.tsx | 113 ++++++++++++++++----- .../dashboard/app/components/WorkflowSwitcher.css | 9 ++ .../dashboard/app/components/WorkflowSwitcher.tsx | 15 ++- .../dashboard/app/components/WorktreeGroup.tsx | 2 +- .../app/components/__tests__/Board.test.tsx | 12 +-- .../app/components/__tests__/Lane.test.tsx | 6 +- .../__tests__/WorkflowNodeEditor.test.tsx | 57 +++++++++-- .../components/__tests__/WorkflowSwitcher.test.tsx | 68 ++++++++----- .../__tests__/board-mobile-initial-render.test.tsx | 2 +- .../__tests__/CommandCenter.test.tsx | 4 +- .../command-center/areas/WorkflowArea.tsx | 2 + .../areas/__tests__/WorkflowArea.test.tsx | 6 +- .../settings/sections/GeneralSection.tsx | 6 +- .../register-command-center-routes.test.ts | 2 +- .../__tests__/workflow-import-export.test.ts | 32 +++++- packages/dashboard/src/routes/board-workflows.ts | 6 +- .../src/routes/register-workflow-routes.ts | 32 +++++- packages/engine/src/__tests__/agent-tools.test.ts | 4 +- packages/engine/src/agent-tools.ts | 6 +- 40 files changed, 590 insertions(+), 145 deletions(-) Fusion-Task-Id: FN-7285 Fusion-Task-Lineage: 0fa689a2-f19d-4d1b-9a40-cc0b2181200a Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
330 lines
8.3 KiB
CSS
330 lines
8.3 KiB
CSS
.workflow-switcher {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
min-width: 0;
|
|
color: var(--text-muted);
|
|
font-size: calc(var(--space-sm) + var(--space-xs) * 0.75);
|
|
}
|
|
|
|
.workflow-switcher-label {
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
/*
|
|
FNXC:WorkflowSwitcher 2026-06-22-00:00:
|
|
The board/list workflow dropdown sits beside the project selector in header and toolbar surfaces, so its collapsed trigger must use the same transparent ProjectSelector chrome while preserving bounded, ellipsized workflow names.
|
|
*/
|
|
.workflow-switcher-trigger {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--space-xs);
|
|
min-width: 0;
|
|
max-width: calc(var(--space-xl) * 12);
|
|
padding: calc(var(--space-xs) + var(--space-xs) / 2) calc(var(--space-xs) + var(--space-xs) / 2);
|
|
background: transparent;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-md);
|
|
color: var(--text-muted);
|
|
font: inherit;
|
|
/*
|
|
FNXC:WorkflowSwitcher 2026-06-22-00:10:
|
|
Match the project selector trigger height and font size: the project label uses 13px / line-height 1, so set the same here (the parent .workflow-switcher font-size is smaller). With identical padding + font-size + line-height the two triggers render the same height.
|
|
*/
|
|
font-size: 13px;
|
|
line-height: 1;
|
|
text-align: left;
|
|
transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
|
|
}
|
|
|
|
.workflow-switcher-trigger:hover {
|
|
background: var(--card-hover);
|
|
color: var(--text);
|
|
border-color: var(--text-dim);
|
|
}
|
|
|
|
.workflow-switcher-trigger[aria-expanded="true"] {
|
|
color: var(--text);
|
|
border-color: var(--text-dim);
|
|
}
|
|
|
|
.workflow-switcher-trigger:focus-visible {
|
|
outline: none;
|
|
box-shadow: var(--focus-ring);
|
|
}
|
|
|
|
.workflow-switcher-trigger-main {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
min-width: 0;
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
.workflow-switcher-current-label,
|
|
.workflow-switcher-option-label {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
min-width: 0;
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
.workflow-switcher-current-name,
|
|
.workflow-switcher-option-name {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.workflow-switcher-current-name {
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
.workflow-switcher-chevron {
|
|
flex: 0 0 auto;
|
|
color: var(--text-muted);
|
|
transition: transform var(--transition-fast);
|
|
}
|
|
|
|
.workflow-switcher-trigger[aria-expanded="true"] .workflow-switcher-chevron {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
.workflow-switcher-counts {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: calc(var(--space-xs) / 2);
|
|
flex: 0 0 auto;
|
|
font-variant-numeric: tabular-nums;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.workflow-switcher-count {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: calc(var(--space-md) + var(--space-xs));
|
|
padding: 0 var(--space-xs);
|
|
border-radius: var(--radius-pill);
|
|
border: 1px solid var(--border);
|
|
background: var(--surface);
|
|
color: var(--text);
|
|
line-height: calc(var(--space-md) / var(--space-sm));
|
|
}
|
|
|
|
/*
|
|
FNXC:WorkflowSwitcher 2026-06-22-20:30:
|
|
Active merges on a workflow should be visible from the dropdown without requiring users to open each board lane. Render a compact pulsing indicator before the counts in both trigger and option rows when that workflow has merging tasks.
|
|
*/
|
|
.workflow-switcher-merging-indicator {
|
|
display: inline-block;
|
|
width: var(--space-sm);
|
|
height: var(--space-sm);
|
|
border-radius: var(--radius-pill);
|
|
background: var(--color-warning);
|
|
box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-warning) 45%, transparent);
|
|
animation: workflow-switcher-merging-pulse 1.1s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes workflow-switcher-merging-pulse {
|
|
0%, 100% {
|
|
opacity: 0.45;
|
|
transform: scale(0.86);
|
|
box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-warning) 40%, transparent);
|
|
}
|
|
|
|
50% {
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
box-shadow: 0 0 0 var(--space-xs) color-mix(in srgb, var(--color-warning) 0%, transparent);
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.workflow-switcher-merging-indicator {
|
|
animation: none;
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/*
|
|
FNXC:WorkflowSwitcher 2026-06-20-00:00:
|
|
The switcher's inline Todo, In Progress, and Done count badges intentionally mirror the board column color tokens so each count reads as the same color as the column it summarizes.
|
|
*/
|
|
.workflow-switcher-count--todo {
|
|
color: var(--todo);
|
|
}
|
|
|
|
.workflow-switcher-count--in-progress {
|
|
color: var(--in-progress);
|
|
}
|
|
|
|
.workflow-switcher-count--done {
|
|
color: var(--done);
|
|
}
|
|
|
|
.workflow-switcher-count-separator {
|
|
color: var(--text-dim);
|
|
}
|
|
|
|
/*
|
|
FNXC:WorkflowSwitcher 2026-06-22-00:00:
|
|
The workflow listbox is portaled but visually remains the ProjectSelector sibling menu; keep the same rounded surface, shadow, inner padding, and thin token scrollbar while preserving the non-scrolling create footer and row-level edit buttons.
|
|
*/
|
|
.workflow-switcher-menu {
|
|
position: fixed;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
padding: var(--space-sm);
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-lg);
|
|
z-index: 1200;
|
|
}
|
|
|
|
.workflow-switcher-options {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: calc(var(--space-xs) / 2);
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
padding: 0;
|
|
scrollbar-width: thin;
|
|
scrollbar-color: var(--text-dim) transparent;
|
|
}
|
|
|
|
.workflow-switcher-options::-webkit-scrollbar {
|
|
width: calc(var(--space-xs) + var(--space-xs) / 2);
|
|
}
|
|
|
|
.workflow-switcher-options::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
.workflow-switcher-options::-webkit-scrollbar-thumb {
|
|
background-color: var(--text-dim);
|
|
border-radius: var(--radius-pill);
|
|
}
|
|
|
|
.workflow-switcher-option-row {
|
|
display: flex;
|
|
align-items: stretch;
|
|
gap: var(--space-xs);
|
|
padding: 0;
|
|
background: transparent;
|
|
border-radius: var(--radius-md);
|
|
transition: background var(--transition-fast);
|
|
}
|
|
|
|
.workflow-switcher-option-row:hover,
|
|
.workflow-switcher-option-row--highlighted {
|
|
background: var(--card-hover);
|
|
}
|
|
|
|
.workflow-switcher-option-row--selected {
|
|
background: color-mix(in srgb, var(--todo) 15%, transparent);
|
|
}
|
|
|
|
.workflow-switcher-option-row--selected:hover,
|
|
.workflow-switcher-option-row--selected.workflow-switcher-option-row--highlighted {
|
|
background: color-mix(in srgb, var(--todo) 25%, transparent);
|
|
}
|
|
|
|
.workflow-switcher-option {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--space-sm);
|
|
min-width: 0;
|
|
flex: 1 1 auto;
|
|
padding: var(--space-sm) calc(var(--space-sm) + var(--space-xs));
|
|
border: 0;
|
|
border-radius: var(--radius-md);
|
|
background: transparent;
|
|
color: var(--text);
|
|
font: inherit;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
transition: background var(--transition-fast);
|
|
}
|
|
|
|
.workflow-switcher-option:focus-visible,
|
|
.workflow-switcher-edit:focus-visible,
|
|
.workflow-switcher-create:focus-visible {
|
|
outline: none;
|
|
box-shadow: var(--focus-ring);
|
|
}
|
|
|
|
.workflow-switcher-edit {
|
|
flex: 0 0 auto;
|
|
align-self: center;
|
|
color: var(--text-muted);
|
|
transition: background var(--transition-fast), color var(--transition-fast);
|
|
}
|
|
|
|
.workflow-switcher-edit:hover {
|
|
background: var(--card-hover);
|
|
color: var(--text);
|
|
}
|
|
|
|
.workflow-switcher-option-name {
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
.workflow-switcher-counts--option {
|
|
margin-left: auto;
|
|
}
|
|
|
|
.workflow-switcher-footer {
|
|
flex: 0 0 auto;
|
|
margin-top: var(--space-xs);
|
|
padding-top: var(--space-xs);
|
|
border-top: 1px solid var(--border);
|
|
background: var(--surface);
|
|
}
|
|
|
|
.workflow-switcher-create {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--space-sm);
|
|
width: 100%;
|
|
min-height: calc(var(--space-lg) + var(--space-sm));
|
|
border-radius: var(--radius-md);
|
|
}
|
|
|
|
[data-theme="light"] .workflow-switcher-option-row--selected {
|
|
background: color-mix(in srgb, var(--todo) 10%, transparent);
|
|
}
|
|
|
|
[data-theme="light"] .workflow-switcher-menu,
|
|
[data-theme="light"] .workflow-switcher-footer {
|
|
background: var(--surface);
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.workflow-switcher {
|
|
flex: 1 1 auto;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.workflow-switcher-label {
|
|
align-self: center;
|
|
}
|
|
|
|
.workflow-switcher-trigger {
|
|
min-width: 0;
|
|
max-width: none;
|
|
width: 100%;
|
|
}
|
|
|
|
.workflow-switcher-menu {
|
|
max-width: calc(100vw - var(--space-xl));
|
|
}
|
|
}
|