Shot action text and summary (#46) #97
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
needs-info
needs-triage
question
ready-for-agent
ready-for-human
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/ai-studio!97
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-46-shot-action-text"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #46.
A filmmaker can describe each Shot's beat in their own words, with exact dialogue (User Stories 99–101 and 104). The prompt composer (#48) will read these documents.
What changed
Schema v18.
shotgainsaction_textandsummary. Each is a JSON node document oftext,mention{kind,id}anddialogue{line_id}nodes. NULL means the Shot follows the pre-fill. A newshot_mention(shot_id, kind, entity_id)table is rewritten from both documents on every save. Shot and Setup deletes take the rows along, and undo restores them.Pre-fill. The action text is pre-filled from the Shot's countable Lines, one Line per line of text. These become mentions:
Dialogue chips. Each dialogue Line is one
dialoguenode. A save is refused unless the chips are the Shot's dialogue Lines, once each, in script order.Parentheticals that name a Character move out of the quote into a sentence before the chip, without brackets (
@MARY to @MARK.). The chip records the moved parentheticals (moved) and is flaggedreworduntil the user clears it. A parenthetical that comes to name a Character later, such as one naming a Character created after the save, moves and is flagged the same way the next time the text is read.Reconcile on read. A saved action text is fitted to the Shot's current Lines when it is read:
Moving or splitting a Shot never loses its text.
Summary. Pre-filled from the first sentence of the action text, chips skipped. It holds text and mentions only.
Undo.
set_shot_action_text/set_shot_summaryare undoable, andNonereturns to the pre-fill. Saving the pre-fill unchanged records nothing.Merges. Character and Location merges rewrite the documents and
shot_mentioninside the merge transaction, from a snapshot that undo restores.Deletes. A Character, Location or Prop that a saved document mentions can't be deleted (
require_not_mentioned).Scenes view. Each Shot gets an Action block:
@opens a Bits Popover picker anchored at the caretCONTEXT.mdgains an Action text entry.Decisions worth a look
<Environment>.dialoguecarriesrewordandmovedbesidesline_id.movedmakes the quote stable: the quote no longer depends on which names exist when it is read.Tests
crates/studio-core/tests/action_text.rshas 15 tests:src/lib/scenes/actionText.test.tscovers runs, mention queries and choices, chip captions and plain text.cargo test --workspace --all-features(506 passed),bun test src(109 passed) andbun run checkpass. Clippy adds no new warnings.@picker: arrow keys, Enter, and saving on blurA filmmaker can describe each Shot's beat in their own words, with exact dialogue. - Schema v18: action_text and summary on shot, each a JSON node document (text, mention{kind,id}, dialogue{line_id}), plus a shot_mention table rewritten from them on every save. NULL follows the pre-fill. - The action text is pre-filled from the Shot's Lines. Character names and aliases in capitals or title case, and Prop names in any case, become mentions. Dialogue Lines are chips, once each in script order; saving a text whose chips are missing, repeated or reordered is refused. - A parenthetical that names a Character moves out of the quote into an action sentence before its chip. The chip records it as moved and is flagged for rewording until cleared. One that comes to name a Character later moves the same way. - A saved text is fitted to the Shot's Lines as it is read, so moving or splitting a Shot drops and adds chips without losing the text. - The summary is pre-filled from the action text's first sentence. - Saving either is undoable. Character and Location merges rewrite the documents and mention table in the merge transaction, and undo restores them. An entity a saved text mentions cannot be deleted. - Each Shot in the Scenes view gets an Action block: runs of text between fixed dialogue chips, @-mentions picked from a Bits popover, Reset to lines, and the summary.