Three reported issues:
#66: the Video stage workflow picker was keyed by scene id, so choosing a
workflow for one clip overwrote every sibling clip. It is now keyed by clip
id, hydrates each clip's persisted choice, autosaves both
clips.workflow_id and form_workflow_id, and Generate One / Generate All
resolve the workflow per clip (a scene can mix image->video and
video->video extend across its clips).
#64: a 30-second ask could produce a 1:51 script - prompts carried no
per-scene scale and the duration rescale could only grow. Prompts now
state the total seconds and a per-scene budget, and the rescale may shrink
(floor 0.5) so over-written boards pull toward the target; content itself
is never edited.
#67: a hand-written directory path (e.g. ComfyUI's input dir) reached
ComfyUI and died as an opaque Errno 21. prepare_media_inputs now rejects
directory / missing local files before queueing with a node-naming error,
and the agent's run_workflow validates media input_values at call time.
Bare Comfy-side names pass untouched.
534 backend tests pass; svelte-check clean.
Long-form generation asked the LLM for the whole board in one response —
a 50-beat story or 20-scene script is a multi-thousand-token JSON answer
that small/local models take minutes to stream, often under-deliver, and
then a single short chunk retried the ENTIRE thing. That is the "Draft
Storyline / Regenerate Script hangs" bug.
Both generators now write incrementally:
- Script: SCRIPT_CHUNK (4) scenes per call, each fed the full context plus
the last two written scenes for continuity.
- Story: STORY_CHUNK (12) beats per call — a brief call (title, logline,
cast, opening beats) then continuations given the established cast and
recent beats.
Both renumber order_index gaplessly, retry only a short chunk, publish
agent.thinking progress per chunk, and keep single-call behavior for small
boards. The generate_story/generate_script agent tools route through the
same code, so the agent loop benefits too.