Repository navigation
Conversation
…nkFlowLab#121) A video configuration that used a pinned asset as its first or last frame showed only a prompt label: the frame slot stayed empty, clearing it changed nothing, and a reference-mode round trip left the image as a context-only reference. Frame slots can now hold a pinned reference by ID (firstFrameReferenceId / lastFrameReferenceId) alongside the existing node IDs. The projection restores them, the persisted role follows the slot, the composer lists fixed images as slot choices with thumbnails, swap and clear cover both kinds, and entering first-last fills empty slots with fixed images after connected ones.
|
Reviewed the change against 1. Clearing a slot relies on JSON dropping 2. 3. Two things I checked on purpose because they are easy to get wrong, and both are correct:
|
…hinkFlowLab#121) Frame slot patches use explicit empty strings and changeGenerationSettings drops those fields, so a serialized partial patch cannot leave a stale node or reference id. Switching projects clears pinned thumbnails, and the preview effect depends on a memoized asset-id list instead of JSON.parse.
Summary
A video configuration that uses a fixed (pinned) asset as its first or last frame now shows and edits that frame in the slot, and slot edits change the stored reference role.
Before this change (reproduced on
main3e1fc08, see Test plan):firstFrameNodeIdis the only slot field, and the projection only restoredfollow_currentframes);role: reference, so the backend resolved it ascontext_onlyinstead of a first-framecontentinput.Changes:
GenerationSettingsgainsfirstFrameReferenceId/lastFrameReferenceId: a slot holds either a canvas node (existing fields) or a pinned reference by ID, never both. Stored canvas documents accept and copy them (dataBoundary.ts).CreationProjection.readfills those fields from active pinned references with a frame role; afollow_currentframe in the same slot keeps precedence, as before.canvasReferenceRoledecides a pinned reference's role from the slot that names it rather than from the stored role, so clear / choose / swap persist asreference.updateand the reference itself is kept.mediaUrl; swap and clear work for both kinds. Removing the fixed image from the prompt empties its slot (pruneFrameReferences).backendBlockerrejects a fixed last frame on a model withoutlast_frame, as it already does for a node; the local blocker counts a fixed first frame for "last needs first" / "prompt or first frame".generation.frame.pinnedTag(zh-CN + en-US).Review follow-up
Addresses the review on 2026-11-17 (Asia/Shanghai) by Probiotics5333 (nothing blocking; these three smaller points):
frameSlotPatchnow writes an empty string for the field being cleared, which survivesJSON.stringify.changeGenerationSettingsthen drops empty frame-slot keys so stored settings stay omit-empty (compatible withisGenerationSettings). A unit test applies aJSON.parse(JSON.stringify(patch))partial merge and checks the previous node id is gone.projectIdis missing, the preview effect callssetPinnedPreviews({})before returning, so switching projects cannot keep the previous project's thumbnails.useMemoof the sorted unique asset ids instead ofJSON.parse(JSON.stringify(...)).Also merged current
origin/main(58b6a96d) with a regular merge (no force-push).Linked issue
Labels
type: bug,area: canvas.Test plan
Original local results (tip
57913be5)Local (Linux, Node v24.22.1, Python 3.12; isolated
creation_server.pyon :8121 and Vite on :5221, no real provider calls):node --test tests/pinnedFrameSlots.test.ts→ 14/14 pass on the original tip, including failing-on-main reproductions for empty slots, clear/choose/swap, and the mode round trip.first_last_frame_connections.mjs,minimax_h3.mjs,kling_video.mjs,generation_parameters.mjs,canvas_generation_reference.mjs.npm testthen: 810 pass / 1 fail (browserHost.test.tsambient Node PATH; also fails onmainhere).Follow-up (tip
47afebdd, mergedorigin/main58b6a96d, Asia/Shanghai)Browser re-run of the official workflow, isolated fixture only (no user project, no paid generation):
Python / pre-commit were not re-run for this follow-up: the change is TypeScript composer/settings-merge only.
Left to CI
Official Release checks on this updated branch, including browser lanes.
Not verified: Agent-created pinned frames were checked only through the same projection path (unit tests build the snapshot directly). No real paid generation was submitted.
Evidence that it works
naturalWidth > 0and the stored roles.Provider verification
https://fixture.invalid/v2) and nothing was submitted.Bilingual UI
generation.frame.pinnedTagadded to zh-CN and en-US. This follow-up adds no new strings.