fix: address code review issues in flow-to-library sync

- Fix sync trigger: only fire on publish transition, not every PUT
- Add TestSyncOnPublish integration tests (2 tests, 16 total passing)
- Add group_label to frontend StepContent interface
- Guard Library Visibility select to procedure_step nodes only
- Block API edits to flow-synced steps (400 read-only guard)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-02-25 14:01:10 -05:00
parent 09b8f07e1e
commit 8f32e7c667
5 changed files with 88 additions and 5 deletions

View File

@@ -255,8 +255,8 @@ export function StepEditor({ step, stepNumber, onUpdate, onCollapse, availableVa
</div>
</div>
{/* Library Visibility */}
<div>
{/* Library Visibility — procedure_step nodes only */}
{step.type === 'procedure_step' && <div>
<label htmlFor="library-visibility" className="mb-1.5 block text-xs font-medium text-muted-foreground">
Library Visibility
</label>
@@ -275,7 +275,7 @@ export function StepEditor({ step, stepNumber, onUpdate, onCollapse, availableVa
<p className="mt-1 text-[10px] text-muted-foreground">
Controls visibility in the step library. Defaults to the flow's own visibility setting.
</p>
</div>
</div>}
</div>
)}
</div>

View File

@@ -10,6 +10,7 @@ export interface StepContent {
instructions: string
help_text?: string
commands?: StepCommand[]
group_label?: string
}
export interface Step {