feat(cinema): shot variations strip (g-cinema-per-shot Part B) - #16
Merged
Conversation
JustinPerea
added a commit
that referenced
this pull request
Jun 22, 2026
…or review; log iter 9 Co-Authored-By: Claude Opus 4.8 <[email protected]>
JustinPerea
force-pushed
the
feat/cinema-shot-variations
branch
from
July 22, 2026 13:51
4468ba1 to
0a172c9
Compare
JustinPerea
force-pushed
the
feat/cinema-per-shot-generate
branch
from
July 22, 2026 13:51
66599b7 to
d4421a8
Compare
JustinPerea
force-pushed
the
feat/cinema-per-shot-generate
branch
from
July 22, 2026 22:40
d4421a8 to
d7c8c56
Compare
Builds on Part A. A 1-4 stepper generates N seeded candidates per shot; the strip renders them and clicking one promotes it to canonical. Backend (backend/): - GenerateShotRequest.variations (count). When > 1 the route runs N single-shot passes at distinct seeds (cache OFF so each truly regenerates) and stores them via _merge_shot_variations — first promoted canonical (output + port), siblings untouched, per-node lock as in Part A. - Seed now applied via the shot's _seedOverride, which the cinema handler honors LAST so a variation seed wins even over a Character bundle seed (fixes the Part A precedence note). Frontend (frontend/): - CinemaShot.variations[] + selectedVariation on the scene spec (persists w/ save). - graphStore.executeShot(..., variations?) + promoteShotVariation (canonical-only via updateScene; documented: the dynamic port keeps the batch's first variation until regenerated — Send-to-motion follows the promote since it reads output). - CinemaShotPanel: count stepper + "Generate N" + promotable strip + CSS. Tests: backend +3 (variations merge, empty no-op, _seedOverride precedence over bundle); 1062 backend green; frontend tsc/eslint/vitest(389)/build green. Browser store-check: promote updates selected+output; batch shows optimistic running. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Independent-verify (Part B) flagged two: 1. GenerateShotRequest.variations was unbounded server-side — a raw POST could queue 1000 real base-model passes. Clamped to 1–4 (Field ge/le), matching the panel stepper. +test asserting 0/5/1000 → 422. 2. A variations batch broadcast N graphComplete events → N spurious "pipeline complete" notifications. Per-shot regen runs outside the global run lifecycle, so _emit_scoped now suppresses graphComplete; the finally graphSync reconciles. 1063 backend green. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Persist variation promotion through the backend under the per-node Cinema lock, update the dynamic shot output, and broadcast graph state. Mirror scene and port state in the frontend and cover endpoint, frontend-only, and concurrent sibling behavior.
JustinPerea
force-pushed
the
feat/cinema-shot-variations
branch
from
July 22, 2026 22:43
0a172c9 to
4b25f3b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a per-shot variations strip. A 1 to 4 stepper generates seeded candidates, stores them on the scene, and lets the user promote any thumbnail to the canonical shot image.
How
POST /api/cinema/generate-shotaccepts a boundedvariationscount and runs distinct uncached seeds._seedOverrideis applied after connected Character data so explicit variation seeds still vary.shot.variations,selectedVariation, canonical output, andshot_<id>under the same per-node lock as Part A. Per-passgraphCompleteevents are suppressed, leaving one final graph sync.POST /api/cinema/promote-shot-variationatomically updatesselectedVariation, canonical shot output, and the dynamicshot_<id>port, then broadcasts graph state.Restack and retarget evidence
4b25f3b15a59112adab44ffeffc4fecc4ac2d2b6.mainat6f0681de065211d4bc00c6557267fc05e95b257f.range-diffmaps all three commits; only the expected inherited import union and updated implementation note differ.Validation
Remaining note
Variation batches still re-resolve the Cinema subgraph for each candidate. Optimizing repeated upstream work remains a separate performance follow-up.