Context
During the #211 pilot, the agent generated a custom plot-01.cuts.json schema. The current API correctly rejects invalid cut files through validateCutsFile, but the user-facing cartoon workspace needs to make this failure obvious and actionable instead of leaving the user with an empty or confusing preview/editor state.
Parent epic: #197. Blocks #211 pilot approval.
Task
Improve UI/API handling for invalid cartoon plot-NN.cuts.json files.
Files to inspect/update:
app/routes/stories.ts
app/lib/cuts.ts
app/web/components/CutListPanel.tsx
app/web/components/PreviewPanel.tsx
- relevant tests under
app/routes/*.test.ts and app/web/components/*.test.tsx
Requirements
- When a cartoon plot has an invalid cuts file, surface the exact validation error in the UI.
- Do not silently treat invalid
cuts.json as “no cuts found”.
- The error should tell the user/agent that
plot-NN.cuts.json must follow the OWS v1 schema.
- If there is a natural existing recovery action, expose it safely. Acceptable MVP recovery options:
- show “Regenerate cuts.json using the v1 schema” guidance text, or
- provide a guarded reset/recreate action only if it does not delete existing user-created assets or text without confirmation.
- Keep fiction preview behavior unchanged.
Acceptance Criteria
- Invalid
plot-NN.cuts.json produces a visible, actionable error in the cartoon workspace.
- Tests cover invalid JSON and wrong-schema JSON.
- Existing valid cartoon cut flows still work.
- Existing fiction flows still pass.
npm run typecheck and relevant tests pass.
Public Safety
Do not include private story content, secrets, wallet data, auth tokens, local absolute user paths, or Claude session IDs in tests/docs/issues.
Context
During the #211 pilot, the agent generated a custom
plot-01.cuts.jsonschema. The current API correctly rejects invalid cut files throughvalidateCutsFile, but the user-facing cartoon workspace needs to make this failure obvious and actionable instead of leaving the user with an empty or confusing preview/editor state.Parent epic: #197. Blocks #211 pilot approval.
Task
Improve UI/API handling for invalid cartoon
plot-NN.cuts.jsonfiles.Files to inspect/update:
app/routes/stories.tsapp/lib/cuts.tsapp/web/components/CutListPanel.tsxapp/web/components/PreviewPanel.tsxapp/routes/*.test.tsandapp/web/components/*.test.tsxRequirements
cuts.jsonas “no cuts found”.plot-NN.cuts.jsonmust follow the OWS v1 schema.Acceptance Criteria
plot-NN.cuts.jsonproduces a visible, actionable error in the cartoon workspace.npm run typecheckand relevant tests pass.Public Safety
Do not include private story content, secrets, wallet data, auth tokens, local absolute user paths, or Claude session IDs in tests/docs/issues.