Skip to content

UI: Update template editor for sequence/branch model #614

@b-at-neu

Description

@b-at-neu

Summary

Update the process template editor (/processes/[id]) to render and manage the new sequence/branch step model. Supersedes #597.

UI Behavior

Rendering

  • Root sequence: render as a vertical list of step cards
  • Branch sublists: for each step that has branches, render each branch as an indented vertical sublist below the step
  • Each branch is visually distinct (e.g. labeled "Branch 1", "Branch 2", or by first step name)

Actions

  • "Add Step": appends to the root sequence (or to the current sequence context)
  • "Add Branch": opens a form that starts a new parallel sequence branching off the clicked step — no header/container step required
  • Move up/down: reorders within the same sequence only
  • Delete: re-links the sequence (predecessor → successor)

Local State

type LocalStepNode = {
  id: string
  name: string
  description: string | null
  previousStepId: string | null
  branches: LocalStepSequence[]
}
type LocalStepSequence = LocalStepNode[]

type AddFormState =
  | { type: 'root' }
  | { type: 'branch'; parentStepId: string }
  | null

Blocked By

Blocked by #613 (service layer)

Supersedes #597

Part of #530

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions