Allow workflows to define default-on optional steps and expose browser verification as a togglable workflow option. - Add core optional-step helpers, IR metadata, compiler support, exports, and regression coverage. - Mark browser verification optional in the built-in coding workflow and document optional workflow-step behavior. - Add dashboard/API support for optional step defaults and enabled-state presentation with localized label cleanup. - Add a patch changeset for the published Fusion package. Files changed: .changeset/fn-6304-optional-workflow-steps.md | 5 ++ docs/task-management.md | 2 +- docs/workflow-steps.md | 8 ++ packages/core/src/__tests__/workflow-ir.test.ts | 45 +++++++++++ .../src/__tests__/workflow-optional-steps.test.ts | 88 ++++++++++++++++++++++ packages/core/src/builtin-coding-workflow-ir.ts | 1 + packages/core/src/index.ts | 3 + packages/core/src/store.ts | 3 + packages/core/src/workflow-compiler.ts | 30 +++++++- packages/core/src/workflow-ir-types.ts | 11 +++ packages/core/src/workflow-ir.ts | 32 +++++++- packages/core/src/workflow-optional-steps.ts | 46 +++++++++++ packages/dashboard/app/api/legacy.ts | 10 +++ .../dashboard/app/components/InlineCreateCard.css | 20 +++++ .../dashboard/app/components/InlineCreateCard.tsx | 87 ++++++++++++++++----- .../app/components/WorkflowResultsTab.tsx | 44 +++++++++-- .../components/__tests__/InlineCreateCard.test.tsx | 41 +++++++++- .../__tests__/WorkflowResultsTab.test.tsx | 58 +++++++++++++- .../src/__tests__/workflow-routes.test.ts | 22 ++++++ .../src/routes/register-workflow-routes.ts | 16 +++- packages/i18n/locales/en/app.json | 6 +- packages/i18n/locales/es/app.json | 3 - packages/i18n/locales/fr/app.json | 3 - packages/i18n/locales/ko/app.json | 3 - packages/i18n/locales/zh-CN/app.json | 3 - packages/i18n/locales/zh-TW/app.json | 3 - packages/i18n/src/resources.d.ts | 6 +- 27 files changed, 543 insertions(+), 56 deletions(-) Fusion-Task-Id: FN-6304 Fusion-Task-Lineage: 385f8ae1-494f-4e2b-a6e9-3a2d2bbe7f71
329 lines
6.0 KiB
CSS
329 lines
6.0 KiB
CSS
/* === Inline Create Card === */
|
|
.inline-create-card {
|
|
background: var(--card);
|
|
border: 1px solid var(--todo);
|
|
border-left: 3px solid var(--todo);
|
|
border-radius: var(--radius-md);
|
|
padding: 10px 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.inline-create-input {
|
|
width: 100%;
|
|
padding: 6px 8px;
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--text);
|
|
font-size: 13px;
|
|
font-family: inherit;
|
|
outline: none;
|
|
resize: none;
|
|
overflow: hidden;
|
|
line-height: 1.4;
|
|
}
|
|
.inline-create-input:focus {
|
|
border-bottom: 1px solid var(--todo);
|
|
box-shadow: 0 1px 0 0 var(--todo);
|
|
}
|
|
|
|
.inline-create-input::placeholder {
|
|
color: var(--text-dim);
|
|
}
|
|
|
|
/* Inline Create Card textarea wrap for expand button positioning */
|
|
.inline-create-textarea-wrap {
|
|
position: relative;
|
|
flex: 1;
|
|
min-width: 0;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Inline Create Card expand button - bottom-right of textarea */
|
|
.inline-create-expand-btn {
|
|
position: absolute;
|
|
bottom: 6px;
|
|
right: 32px;
|
|
padding: 4px;
|
|
opacity: 0.6;
|
|
transition: opacity var(--transition-fast);
|
|
z-index: 1;
|
|
}
|
|
|
|
.inline-create-expand-btn:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* Inline Create Card fullscreen mode */
|
|
.inline-create-input--fullscreen {
|
|
flex: 1;
|
|
padding-right: 70px;
|
|
min-height: unset;
|
|
resize: none;
|
|
border-radius: var(--radius-md);
|
|
font-size: 15px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* Inline Create Card Toggle Button */
|
|
.inline-create-toggle {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: var(--space-xs);
|
|
height: 28px;
|
|
width: 28px;
|
|
flex-shrink: 0;
|
|
background: transparent;
|
|
border: 1px solid transparent;
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-muted);
|
|
cursor: pointer;
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.inline-create-toggle:hover {
|
|
background: var(--card-hover);
|
|
border-color: var(--border);
|
|
color: var(--text);
|
|
}
|
|
|
|
.inline-create-toggle:focus-visible {
|
|
outline: 2px solid var(--focus-ring);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* Inline Create Card Main Row */
|
|
.inline-create-main-row {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.inline-create-main-row .inline-create-input {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* Collapsed state */
|
|
.inline-create-card--collapsed {
|
|
padding: 8px 10px;
|
|
}
|
|
|
|
.inline-create-card--collapsed .inline-create-input {
|
|
min-height: 28px;
|
|
}
|
|
|
|
/* Expanded state */
|
|
.inline-create-card--expanded {
|
|
padding: 10px 12px;
|
|
}
|
|
|
|
.inline-create-card--expanded .inline-create-input {
|
|
min-height: 32px;
|
|
}
|
|
|
|
.inline-create-footer {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: var(--space-sm);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.inline-create-controls {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
flex: 1 1 auto;
|
|
flex-wrap: wrap;
|
|
min-width: 0;
|
|
}
|
|
|
|
.inline-create-controls .workflow-selector {
|
|
flex: 0 1 auto;
|
|
min-width: 0;
|
|
}
|
|
|
|
.inline-create-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
margin-left: auto;
|
|
}
|
|
|
|
.inline-create-optional-steps {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.inline-create-optional-step[aria-pressed="true"] {
|
|
border-color: var(--accent);
|
|
color: var(--accent);
|
|
}
|
|
|
|
.inline-create-hint {
|
|
font-size: 11px;
|
|
color: var(--text-dim);
|
|
margin-left: auto;
|
|
}
|
|
|
|
.inline-create-previews {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-sm);
|
|
margin-bottom: var(--space-md);
|
|
max-height: 120px;
|
|
overflow-y: auto;
|
|
padding: 2px;
|
|
}
|
|
|
|
.inline-create-preview {
|
|
position: relative;
|
|
width: 48px;
|
|
height: 48px;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
overflow: hidden;
|
|
background: var(--card);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.inline-create-preview img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
display: block;
|
|
}
|
|
|
|
.inline-create-preview-remove {
|
|
position: absolute;
|
|
top: 2px;
|
|
right: 2px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: color-mix(in srgb, var(--bg) 60%, transparent);
|
|
color: var(--text);
|
|
border: none;
|
|
border-radius: 50%;
|
|
width: 16px;
|
|
height: 16px;
|
|
cursor: pointer;
|
|
font-size: 10px;
|
|
line-height: 1;
|
|
padding: 0;
|
|
transition: background var(--transition-fast);
|
|
}
|
|
|
|
.inline-create-preview-remove:hover {
|
|
background: color-mix(in srgb, var(--color-error) 90%, transparent);
|
|
}
|
|
|
|
.inline-create-model-wrap {
|
|
position: relative;
|
|
}
|
|
|
|
.inline-create-priority-wrap {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.node-trigger-wrap {
|
|
position: relative;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.node-picker-dropdown {
|
|
width: max-content;
|
|
min-width: calc(var(--space-2xl) * 8);
|
|
}
|
|
|
|
.node-picker-item {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
text-align: left;
|
|
border: none;
|
|
background: transparent;
|
|
color: inherit;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.node-picker-status-label {
|
|
margin-left: auto;
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.inline-create-priority-select {
|
|
max-width: 180px;
|
|
}
|
|
|
|
/* === Mobile Responsive Overrides === */
|
|
@media (max-width: 768px) {
|
|
/* Dropdown items touch target */
|
|
.dep-dropdown-item {
|
|
min-height: 36px;
|
|
}
|
|
|
|
/* Inline create toggle touch target */
|
|
.inline-create-toggle {
|
|
min-width: 36px;
|
|
min-height: 36px;
|
|
}
|
|
|
|
/* Inline create: fit within 280px column */
|
|
.inline-create-card {
|
|
max-width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.inline-create-main-row {
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.inline-create-input {
|
|
font-size: 16px;
|
|
}
|
|
|
|
/* Inline create: mobile-friendly touch sizing */
|
|
.inline-create-toggle {
|
|
min-width: 36px;
|
|
min-height: 36px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Inline create: wrap footer controls at 280px */
|
|
.inline-create-controls {
|
|
flex-wrap: wrap;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.inline-create-controls .workflow-selector {
|
|
width: 100%;
|
|
}
|
|
|
|
.inline-create-controls .btn {
|
|
min-height: 36px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.inline-create-optional-steps {
|
|
width: 100%;
|
|
}
|
|
|
|
.inline-create-optional-step {
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
.inline-create-priority-select {
|
|
min-height: 36px;
|
|
}
|
|
}
|