fix: Custom step navigation bugs - go-back, descendants, redundant checkbox

- Show previously-created custom steps as clickable options on decision
  nodes so they remain accessible after going back
- Fix breadcrumb to show custom step titles instead of raw UUIDs
- Fix ContinuationModal to show grandchildren (two levels deep) instead
  of immediate children that duplicate option labels
- Remove redundant "Save to Library" checkbox from StepForm since
  PostStepActionModal now handles that decision

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Michael Chihlas
2026-02-03 21:17:54 -05:00
parent 6bd21d7efc
commit 27624fbe55
5 changed files with 234 additions and 34 deletions

View File

@@ -36,9 +36,7 @@ export function CustomStepModal({ isOpen, onClose, onInsertStep }: CustomStepMod
if (!isOpen) return null
const handleFormSubmit = async (data: StepCreate, _saveToLibrary: boolean) => {
// Note: saveToLibrary preference is no longer used here - the PostStepActionModal
// handles the decision of whether to save to library, use now, or both
const handleFormSubmit = async (data: StepCreate) => {
setIsSubmitting(true)
setError(null)

View File

@@ -5,7 +5,7 @@ import { stepCategoriesApi } from '@/api'
import type { StepCreate, StepCategory, StepCommand } from '@/types/step'
interface StepFormProps {
onSubmit: (data: StepCreate, saveToLibrary: boolean) => void
onSubmit: (data: StepCreate) => void
onCancel: () => void
initialData?: Partial<StepCreate>
}
@@ -31,8 +31,6 @@ export function StepForm({ onSubmit, onCancel, initialData }: StepFormProps) {
const [visibility, setVisibility] = useState<'private' | 'team' | 'public'>(
initialData?.visibility || 'private'
)
const [saveToLibrary, setSaveToLibrary] = useState(true)
// Categories
const [categories, setCategories] = useState<StepCategory[]>([])
@@ -131,7 +129,7 @@ export function StepForm({ onSubmit, onCancel, initialData }: StepFormProps) {
tags: tags.length > 0 ? tags : undefined
}
onSubmit(data, saveToLibrary)
onSubmit(data)
}
return (
@@ -367,20 +365,6 @@ export function StepForm({ onSubmit, onCancel, initialData }: StepFormProps) {
</select>
</div>
{/* Save to Library Checkbox */}
<div className="flex items-center gap-2">
<input
type="checkbox"
id="saveToLibrary"
checked={saveToLibrary}
onChange={(e) => setSaveToLibrary(e.target.checked)}
className="h-4 w-4 rounded border-input"
/>
<label htmlFor="saveToLibrary" className="text-sm">
Save to My Step Library for reuse
</label>
</div>
{/* Actions */}
<div className="flex gap-2 pt-4">
<button