Add isSaving as a prop so the save button properly shows disabled/spinner
state. Add a back arrow link to /dashboard for editor navigation.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ChoiceNode was passing incompatible props (optionId, optionLabel, onSave,
onRemove, onCancel) to OptionConditionEditor which expects (condition,
onChange, onClose). This caused a build failure preventing the component
tree from rendering.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Yjs map observers were calling notifyNodesChange/notifyEdgesChange
for local changes, creating a feedback loop that reset React Flow state
mid-drag. Remote notifications are already handled by the connectChannel
handler, so the observers only need to schedule persistence.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The merge at bcbad57 lost utility functions, type definitions, and
handlers from the developing branch. This restores: imports (useRef,
useEffect, ConditionalEdge, ContextMenu), constants (AUTOSAVE_DEBOUNCE_MS),
types (ContextMenuState, ConditionEditorState), utility functions
(fromReactFlowNodes, fromReactFlowEdges, saveDraft, loadDraft, clearDraft,
flowchartDataEquals, isValidFlowchartData, convertToRenpyFormat), context
menu handlers, proper FlowchartEditorProps (userId, userDisplayName,
isOwner), ReactFlow container height (h-screen), and fixes stale closure
dependency arrays for characters/variables.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use SECURITY DEFINER helper functions to break circular dependencies
between projects and project_collaborators table policies.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>