Prompt override and reconcile (#49) #101
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!101
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-49-prompt-override"
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 #49.
A filmmaker can hand-tune a Shot's prompt. The composer never overwrites the edit and never nags (User Stories 105–107, decisions in #9).
What changed
Override storage (schema v21). Three new
shotcolumns:prompt_override: the edited text.prompt_fork_base: the composed text the override was forked from, or last reconciled with.prompt_fork_slots: a JSON map from each slot tag to the Slot list key it named at fork time.ShotRowcarries all three, so deleting a Shot and undoing the delete brings the override back. A split leaves the override on the first part.prompt_override.rs.shot_promptnow returns:text: what a Take is sent.composed: the preview.overridden.composer_changed: true when the fork base ≠ the composed text now.broken_tags.set_shot_prompt_override: the first edit forks the preview and later edits keep the fork base.Noneresets. Saving the composed text unchanged is not an override.shot_prompt_reconcile: the three-way merge.rebase_shot_prompt_override: ends a reconcile, or keeps reassigned tags as they now point.queueable_prompt: the gate that the queue (#51) will call. It refuses an override with a broken tag. This follows the same pattern asrequire_queueable_length.Broken tags. A
<Picture N>/<Audio N>tag is broken in two cases:#9 says "a tag pointing at an empty or reassigned slot blocks queuing". Detecting reassignment is why the fork-time slot map is stored. This goes one column beyond #24's "plain text plus its fork-base".
three_way.rs. A line-by-line three-way merge built on an LCS diff, with no new dependency.Adapter. New commands
set_shot_prompt_override,shot_prompt_reconcileandrebase_shot_prompt_override.shot_promptnow returnsShotPromptDto, and the bindings are regenerated.UI (
ShotPrompt.svelte).EditedandComposer changed. A redBroken tagbadge appears when queuing is blocked. The panel now loads while collapsed so these badges are visible.CONTEXT.md defines Prompt override, fork base, reconcile and broken tag.
Screenshots
Editing a copy of the composed preview:
The saved override after the Scene's Ambience changed. The quiet
Composer changedmarker shows, and a tag naming an empty slot blocks queuing:The on-demand reconcile, where the composer's new soundscape line is offered:
After applying it, the marker is gone and the edit is kept with the composer's new line:
Tests
tests/prompt_override.rshas 16 tests throughProjectSession. They cover:queueable_promptthree_way.rsunit tests cover:promptReconcile.test.tscovers the default choices and the resolved text.cargo test --workspace --all-features,bun test srcandbun run checkall pass. I also checked the flow in the running app, including undo and redo of a reconcile.