Part of #184 (Fountain import).
What
Wire the Rust Fountain parser into the frontend and add the user-facing entry points.
Surface area
Tauri commands (Rust → TS bridge)
import_fountain_as_film(path: String) -> Result<ScreenplayDocument, String>
import_fountain_as_episode(path: String, current_doc: ScreenplayDocument) -> Result<ScreenplayDocument, String> — returns the mutated Series document with the new episode appended, the active episode pointer updated.
- Both return alongside an import summary (counts of dropped boneyards, absorbed sections, etc.) so the frontend can show a toast.
Native menu
- File → Import Fountain... — always creates a new untitled Film. Goes through the dirty-state guard (
documentStore.confirmIfDirty()).
- File → Import Fountain as Episode... — only enabled when
document.type === \"series\". Appends new episode; switches active episode to it.
Open dialog
- Existing Open accepts
.screenplay. Extend to also accept .fountain and route to import_fountain_as_film based on extension.
- Same dirty-state guard applies.
Per-episode Fountain export (Series only)
- Add a "Per episode" toggle to the Export modal, visible only when format = Fountain (and plain text — same logic, smaller win) and project is a Series.
- When checked, the directory picker replaces the file picker. Output:
{NN}-{slug(episode.title)}.fountain for each episode.
Import summary toast
After a successful import, show a small toast: Imported \"Filename.fountain\" — 12 scenes, 3 boneyards dropped. Reuse the UpdateToast styling pattern.
Tasks
Out of scope
- Drag-and-drop a
.fountain file onto the window (separate small enhancement)
Part of #184 (Fountain import).
What
Wire the Rust Fountain parser into the frontend and add the user-facing entry points.
Surface area
Tauri commands (Rust → TS bridge)
import_fountain_as_film(path: String) -> Result<ScreenplayDocument, String>import_fountain_as_episode(path: String, current_doc: ScreenplayDocument) -> Result<ScreenplayDocument, String>— returns the mutated Series document with the new episode appended, the active episode pointer updated.Native menu
documentStore.confirmIfDirty()).document.type === \"series\". Appends new episode; switches active episode to it.Open dialog
.screenplay. Extend to also accept.fountainand route toimport_fountain_as_filmbased on extension.Per-episode Fountain export (Series only)
{NN}-{slug(episode.title)}.fountainfor each episode.Import summary toast
After a successful import, show a small toast:
Imported \"Filename.fountain\" — 12 scenes, 3 boneyards dropped. Reuse theUpdateToaststyling pattern.Tasks
src-tauri/src/commands/src-tauri/src/lib.rs(native menu) — mirroring the existing custom-quit patternsrc/routes/+page.svelteExportModal.svelte+ a per-episode export Tauri command.claude/CLAUDE.mdOut of scope
.fountainfile onto the window (separate small enhancement)