feat(dashboard): make built-in workflows read-only in the node editor

Built-in (builtin:*) workflows are read-only at the store layer; reflect
that in the editor so users aren't misled into editing changes that can't
save. For a built-in: the node palette is disabled, the inspector fields are
wrapped in a disabled fieldset, Save/Delete are replaced by a "Read-only
built-in" label, and a "Duplicate to edit" action clones it into an editable
user workflow. handleSave/handleDeleteWorkflow also early-return for built-ins
as defense-in-depth.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-06-03 15:19:27 -07:00
parent 0435fefd86
commit bd8f0fd23c
2 changed files with 74 additions and 8 deletions

View File

@@ -159,9 +159,26 @@
.wf-editor-actions {
display: flex;
align-items: center;
gap: var(--space-xs);
}
.wf-editor-readonly-note {
font-size: 0.75rem;
color: var(--text-tertiary);
text-transform: uppercase;
letter-spacing: 0.04em;
}
/* Neutralize the fieldset wrapper so it only gates interactivity, not layout. */
.wf-inspector-fields {
display: contents;
border: none;
margin: 0;
padding: 0;
min-inline-size: 0;
}
.wf-editor-save {
background: var(--todo);
border-color: var(--todo);