Expand description
The Dialogue sub-tab and the Timeline’s dialogue-edit modal: read,
search and edit one dialogue line’s speaker and text in
parsed/{slug}/parsed_{tag}.json.
Both surfaces call save_entry — there is exactly one place that
mutates a dialogue line. Scope is deliberately narrow: only entries with
"type": "dialogue" can be edited here; sound cues, scene headers and
everything else stay the Raw JSON tab’s job.
Structs§
- Dialogue
Row - One dialogue row, as surfaced to either editor.
Functions§
- backup_
path 🔒 {name}.bakbeside the file, matchingcrate::parsed::save’s scheme.- get_
entry - One dialogue entry’s current speaker/text, or why not (unknown seq, or the seq is not a dialogue line).
- is_
dialogue 🔒 - keep_
latest 🔒 - The most recent value per key, comparing later entries as they arrive.
ts/generated_atare both%Y-%m-%dT%H:%M:%S+00:00, fixed-width and always UTC, so plain string comparison sorts them chronologically — no need to parse them as dates. - list_
dialogue - Dialogue rows matching
q(a case-insensitive substring of speaker or text), paginated.(this page's rows, total matches).(empty, 0)when the episode has no parsed file yet. - load_
entries 🔒 - path_
for (slug, tag)→ the parsed JSON path, jailed — the slug/tag-keyed sibling ofcrate::parsed::parsed_path, for callers that already have(slug, tag)(the Timeline’s JS globals) instead of an Episode-dropdown label.- pending_
reprocess - Sequence numbers whose dialogue was edited after that seq’s stem was last produced — “changed since last produce”. Empty when nothing is pending, the episode has never been produced (no stem manifest yet), or no dialogue journal exists.
- row_of 🔒
- save_
entry - Validate, mutate, recompute
stats, back up and write — the one save both the dashboard’s Dialogue tab and the Timeline’s dialogue modal call. - speaker_
choices configs/<slug>/speakers.json(legacy fallback: the workspace root), as dropdown-ready(label, key)pairs in the file’s own order. Empty when no speakers file exists yet for this show — callers then accept any speaker key rather than blocking the editor on a file that hasn’t been authored.