Skip to content

[feat] stage: Director Stage editor, camera rigs, and agent publishing - #434

Draft
MrDongsls wants to merge 225 commits into
ThinkFlowLab:mainfrom
MrDongsls:feat/director-stage-core
Draft

MrDongsls wants to merge 225 commits into
ThinkFlowLab:mainfrom
MrDongsls:feat/director-stage-core

Conversation

@MrDongsls

@MrDongsls MrDongsls commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR delivers the Director Stage as one reviewable capability. It has three parts that build on each other:

  1. The Director Stage editor — the fullscreen editing surface: asset import and preview, object placement, transform Gizmos, persistence, and dialog/focus isolation.
  2. The camera-rig system and the Director View — a director's own viewport, scene cameras that are real rigs with a body and a viewpoint, two-step preset placement, a preview-source drop-down on the camera-preview frame, and per-camera framing.
  3. Agent publishing — the built-in agent can publish Director Stage outputs (stills and Director videos) through the same shared commands the browser uses.

The camera-rig system and agent publishing are capabilities that operate on the Director Stage; they are not sub-features of the editor shell.

main
  └─ feat/stage-output-assets   (#433)
       └─ feat/director-stage-core   (this PR, head 4b1bd893)

The former sibling branches feat/stage-camera-rigs (#435) and feat/stage-agent-publish (#436) are folded into this branch and closed.

Merge order

  1. Merge [feat] media: publish Director Stage outputs as project assets #433 (feat/stage-output-assets) into main.
  2. Merge [feat] stage: Director Stage editor, camera rigs, and agent publishing #434 after [feat] media: publish Director Stage outputs as project assets #433. It now carries the camera-rig and agent-publishing work as well.

GitHub base note

The upstream repository grants this account read-only access, so GitHub cannot use the fork-only Output branch as the formal base of an upstream PR. This draft targets upstream main; review it after the output PR using the intended delta feat/stage-output-assets..feat/director-stage-core (head 4b1bd893), then merge it after that prerequisite.

Scope

Director Stage editor

  • Open the Director Stage in its fullscreen editor shell and preserve unsaved state.
  • Import and preview stage assets, with recoverable project-asset identity.
  • Place characters and objects from the preview workflow on the stage grid.
  • Provide mutually exclusive translate, rotate, and scale Gizmo modes.
  • Persist stage documents, view state, thumbnails, and editor changes across save/reopen.
  • Keep nested dialogs and keyboard focus isolated from the stage editor.

Camera rigs and the Director View

  • The main viewport is the director's own view of the stage. Dragging it changes only the viewing angle: it moves no camera and adds nothing to undo. Reset view returns to the opening position.
  • Every camera is a rig in the scene with two ends, its body and its viewpoint. Click either end in the viewport or the object tree to select it, then drag it with the move tool. Dragging the viewpoint changes where that camera looks. A selected camera can be moved, but not rotated or scaled.
  • Add a camera in two steps: click a preset on the Cameras tab, then click a character or an object. The new camera is placed beside it with the preset's framing, is selected, and the preview switches to it. Esc cancels; clicking empty space places nothing. Presets are unavailable until the stage has a character or an object.
  • The camera-preview frame carries a drop-down that chooses the Storyboard or one camera. Drag the frame by its handle and collapse it with its switch. The viewfinder shows the same choice full size, and the right pane of a split view has tabs of its own. Selecting a camera in the object tree does not change what the preview shows.
  • The camera-preview frame takes the camera's own aspect ratio, and the stage's when it shows the Storyboard.
  • Camera helpers never appear in any output path: the picture-in-picture and viewfinder, the split-view pane, storyboard thumbnails, captured stills, and the exported MP4.

Agent publishing

  • The built-in agent publishes Director Stage outputs through the same shared commands the browser uses.
  • It registers a file as an agent_written asset, then publishes a still and a Director video. Provenance is recorded, and the Director video's directorRender.acceptedProjectCursor is set to the project event cursor at publish time.
  • Replaying the same operation ID returns the original receipt and creates no duplicate.
  • Invalid publishes are rejected with bilingual messages.

Historical references

Director Stage features and their tests

This branch delivers 12 Director Stage features. Each one lists the tests that verify it at three layers, frontend unit tests, Python tests and browser journeys. The layers check different boundaries and none replaces another. Run every command from the repository root. Browser journeys need the isolated fixture services first, each in its own terminal:

  • .venv/bin/python tests/browser/creation_server.py --port 8019
  • OPENDIRECTOR_API_URL=http://127.0.0.1:8019 npm run dev -- --port 5179 --strictPort
  • Journeys default to the English UI. Prefix a command with DIRECTOR_STAGE_LOCALE=zh-CN to run the Chinese UI.

Feature list:

  1. Stage shell and layout: the full-screen console with its controls cheat sheet, split live preview and transform sliders. The left and right panel separators and the timeline top edge resize by pointer or keyboard, the layout lives in the session only, and every value with a physical unit shows the unit after its number.
    • Frontend: node --test tests/stageUnits.test.ts tests/directorStageViewState.test.ts
    • Browser:
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_layout.mjs
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_units.mjs
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_console.mjs
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_visual_v1.mjs
  2. Director View and view state: dragging the view changes only the director's own angle, edits no camera and writes no undo history. The viewfinder is an exclusive interaction mode, the split view owns its ratio and camera, and selection, preview source and split ratio are session view state that never enters the document. The Storyboard journey covers the preview source.
    • Frontend: node --test tests/directorStageViewState.test.ts
    • Browser:
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_interaction.mjs
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_storyboard.mjs
  3. Model import and asset registration: importing a GLB or GLTF model validates asset identity, animation metadata and file integrity, captures a thumbnail and registers it as a project asset, and a stage object can reference registered assets only.
    • Python: .venv/bin/python -m pytest tests/test_director_stage_assets.py -q
    • Frontend: node --test tests/directorStageAssets.test.ts
    • Browser: CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_entry.mjs
  4. Placement and transform gizmo: a subject is placed from its preview card in two steps, dragging the gizmo rewrites only the base transform and authors no keyframe, and one drag is one undo step. Fractional ground placement, selection, gizmo rendering and viewport projection stay consistent at any device pixel ratio.
    • Frontend: node --test tests/canvasStage.test.ts tests/directorStageViewState.test.ts
    • Browser:
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_gizmo.mjs
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_pointer_alignment.mjs
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_interaction.mjs
  5. Timeline editing: shots, independent camera channels and object transform and motion tracks project onto the timeline, which provides a ruler, snapping to frames, keyframes and shot boundaries, and per-channel keyframe and clip editing.
    • Frontend: node --test tests/stageTimeline.test.ts tests/canvasStage.test.ts
    • Browser:
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_entry.mjs
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_animation.mjs
  6. Environment, ground and elevation readout: environment and light presets project onto deterministic scene roles, the ground fade is injected before tone mapping, the infinite grid follows the rendering camera, and a subject shows its height only while it stands above the ground.
    • Python: .venv/bin/python -m pytest tests/test_creation_director.py -q -k environment
    • Frontend: node --test tests/stageEnvironment.test.ts tests/stageGroundFade.test.ts tests/stageInfiniteGrid.test.ts tests/stageElevation.test.ts tests/canvasStage.test.ts
  7. Cameras and camera presets: every camera is a rig with a body and a viewpoint and can be moved only. A preset on the Cameras tab followed by a click on a character or an object places a new camera with that framing, and presets stay unavailable until the stage holds a subject.
    • Python: .venv/bin/python -m pytest tests/test_creation_director.py -q -k camera_channels
    • Frontend: node --test tests/canvasStage.test.ts tests/directorStageViewState.test.ts
    • Browser: CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_camera_preset.mjs
  8. Storyboard: blocks lay end to end from zero and support append, drag reorder, dragging a cut, ripple delete, camera cascade delete, undo, redo, save and reopen. A discontinuous track is refused on write and on open, and block thumbnails are keyed by scene content and made in idle time.
    • Python:
      • .venv/bin/python -m pytest tests/test_creation_director.py -q -k "storyboard or append or reorder or resize or duration_clamp or camera_delete or deleting_last or block or shots"
      • .venv/bin/python -m pytest tests/test_localization.py -q -k storyboard
    • Frontend: node --test tests/canvasStage.test.ts tests/stageStoryboardThumbnail.test.ts
    • Browser:
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_storyboard.mjs
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_storyboard_mp4.mjs
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_storyboard_acceptance.mjs
  9. Camera moves: 13 presets, Push in, Pull out, Lateral, Rise, Descend, Orbit, Half arc, Spiral rise, Pan left, Pan right, Tilt, Roll and Dolly zoom. A recipe persists and undoes, supports retiming and conversion into editable ordinary keys, and discloses its impact before it replaces a reviewed recipe.
    • Python: .venv/bin/python -m pytest tests/test_creation_director.py -q -k "camera_move or translation or orbit or spiral or angular or roll_ or dolly_zoom or conversion or orientation or duration_rejection or related_camera_edits or camera_deletion or neighbor_alignment or manual_suffix or slow_up or replacement or reviewed_recipe"
    • Frontend: node --test tests/stageCameraMoves.test.ts tests/stageCameraUpRendering.test.ts
    • Browser:
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_camera_moves.mjs
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_camera_moves_output.mjs
      • PYTHON=.venv/bin/python CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_camera_up_rendering.mjs
  10. Output assets and publication: captured stills and preview MP4s are registered as project assets that the timeline can reference. Rendering freezes a stage snapshot first, and an accepted Director video validates against its historical source without requiring the current editor revision.
    • Python: .venv/bin/python -m pytest tests/test_director_stage_assets.py tests/test_creation_media_publication.py -q
    • Frontend: node --test tests/directorStageAssets.test.ts tests/mediaPublication.test.ts tests/stagePreviewVideoTools.test.ts
    • Browser:
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_output.mjs
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_camera_moves_output.mjs
  11. Agent collaboration: the agent walks the Director chain under user rules and shares the director.* commands with the UI, with identical receipts, versions, locks and undo identity.
    • Python: .venv/bin/python -m pytest tests/test_director_agent_chain.py tests/test_creation_director.py -q -k agent
    • Browser:
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_camera_moves.mjs
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_camera_moves_output.mjs
  12. Persistence, undo and redo, versions and locks: the document identity survives save, undo, redo and reopen, and director.apply is Director-only, atomic and replayable. Commands carry identity, version and lock checks, and a lost response is reconciled against its original receipt.
    • Python: .venv/bin/python -m pytest tests/test_creation_director.py -q -k "identity or idempotent or lock or replay or receipt or lost_response"
    • Frontend: node --test tests/creationClient.test.ts
    • Browser:
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_entry.mjs
      • CREATION_WEB_URL=http://127.0.0.1:5179 CREATION_API_URL=http://127.0.0.1:8019 node tests/browser/director_stage_delivery.mjs

Browser lanes are owned by tests/browser/manifest.json:

  • Gate lane: director_stage_entry.mjs, director_stage_gizmo.mjs, director_stage_pointer_alignment.mjs, director_stage_storyboard.mjs and director_stage_camera_preset.mjs run through npm run test:browser, each in both UI languages except director_stage_pointer_alignment.mjs, which runs in English only.
  • Production lane: director_stage_storyboard_acceptance.mjs, director_stage_camera_moves_output.mjs and director_stage_camera_up_rendering.mjs need npm run build first and run against OPENDIRECTOR_API_URL=http://127.0.0.1:8019 npm run preview -- --port 5179 --strictPort instead of the dev server.
  • Extended, perf and manual lanes: the remaining journeys run by hand, namely director_stage_units.mjs, director_stage_storyboard_mp4.mjs, director_stage_layout.mjs, director_stage_console.mjs, director_stage_visual_v1.mjs, director_stage_interaction.mjs, director_stage_animation.mjs, director_stage_output.mjs, director_stage_delivery.mjs and director_stage_camera_moves.mjs.
  • The journeys need an importable Playwright module and Chromium, set through PLAYWRIGHT_MODULE and CHROMIUM_PATH when they are not discovered automatically. Every journey that decodes an MP4 also needs ffmpeg and ffprobe.

Run the complete Director Stage modules:

  • .venv/bin/python -m pytest tests/test_creation_director.py tests/test_director_stage_assets.py tests/test_director_agent_chain.py tests/test_creation_media_publication.py tests/test_localization.py -q
  • node --test tests/canvasStage.test.ts tests/directorStageAssets.test.ts tests/directorStageViewState.test.ts tests/mediaPublication.test.ts tests/stageCameraMoves.test.ts tests/stageCameraUpRendering.test.ts tests/stageElevation.test.ts tests/stageEnvironment.test.ts tests/stageGroundFade.test.ts tests/stageInfiniteGrid.test.ts tests/stagePreviewVideoTools.test.ts tests/stageStoryboardThumbnail.test.ts tests/stageTimeline.test.ts tests/stageUnits.test.ts tests/creationClient.test.ts
  • npm run test:browser

Evidence

  • Before: the Director Stage creation/import work was split across overlapping historical branches, and the camera-rig and agent-publishing work lived on separate sibling drafts.
    After: the editor, the camera-rig/Director-View system, and agent publishing form one integrated capability with focused tests.
  • npm run build passes.
  • npm test — 890 passed, 0 failed.
  • npm run check:i18n — 3210 keys, 0 problems.
  • Integrated gates on head 4ec7bdbc: pre-commit, static and frontend unit checks, the full backend suite, the isolated/assistant/voice browser jobs, and the wheel-install verification all pass; the isolated journey is 31/31.

Merge Danger

Door: two-way

Blast Radius: Editor

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
- Take over the whole screen for the director stage instead of a
  centered card, so the editor shell matches the target console layout
  from the first slice onward.
- Move the tool actions (undo, redo, stage JSON import and export,
  still download, MP4 render) from the modal footer into a toolbar row
  under the header; the footer keeps cancel and apply.
- Guard closing with unsaved stage changes through the shared stage
  equality: keep editing, discard and close, or save and close.

- npm run build, npm test (679 passing), npm run check:i18n (2892
  keys, 0 problems).
- node tests/browser/director_stage_entry.mjs in en-US and zh-CN
  against the isolated creation_server.py fixture on this tree.

Refs: ThinkFlowLab#241
(cherry picked from commit 58e1ce20d9cfe3da0ad76f0de8fbf88f0f55901f)
- Rebuild the editor body as a console layout: a left scene panel, a
  center viewport that fills the available frame, a right inspector,
  and a bottom timeline strip holding playback, duration, the playhead,
  keyframe chips, and storyboard editing.
- Let the preview renderer fill its panel instead of a letterboxed
  aspect box; the stage aspect now governs the captured still and the
  MP4, not the free-form preview frame.

- npm run build, npm test (679 passing), npm run check:i18n.
- node tests/browser/director_stage_entry.mjs in en-US and zh-CN
  against the isolated creation_server.py fixture; viewport measured at
  1144x643 inside the 1700x1000 frame, with a comparison screenshot
  saved beside the reference captures.

Refs: ThinkFlowLab#241
(cherry picked from commit 985fac622c29c8b7d67eec940f8a3567be7f4129)
- Rebuild the editor root: the 3D frame is now the base layer covering
  the whole console (measured 1700x956 in a 1700x1000 frame), replacing
  the grid cell that left dead bands above and below the viewport.
- Float every panel over the frame the way the reference console does:
  a top bar carrying identity, tool actions, cancel, apply, and close;
  translucent left scene and right inspector panels; a bottom timeline
  strip; render status and errors as floating overlays.
- Drop the shared modal chrome for the stage and own the dialog
  semantics directly: focus trap, Escape, backdrop close, body scroll
  lock, and the unsaved guard all live in the console.

- npm run build, npm test (679 passing), npm run check:i18n.
- node tests/browser/director_stage_entry.mjs in en-US and zh-CN
  against the isolated creation_server.py fixture; comparison
  screenshot refreshed beside the reference captures.

Refs: ThinkFlowLab#241
(cherry picked from commit ea7b9ec15a6fd7e83e8d5e38197ee13b68fcd49c)
…ave chip

- Pin the preview canvas to its CSS box so a HiDPI display keeps a
  sharp 1:1 frame instead of the zoomed, blurry crop the unstyled
  canvas produced.
- Split the left panel into Characters, Objects, Cameras, and
  Background tabs: imports preset their role from the active tab,
  camera rigs list and add inline, and scene settings move to their
  own page.
- Draw a camera-preview picture-in-picture with a scissored second
  render pass framed exactly as the still and the MP4 capture, plus a
  toggleable aspect mask that letterboxes the shot frame over the
  free-form preview.
- Show a saved/unsaved chip in the top bar next to the toggles.

- npm run build, npm test (679 passing), npm run check:i18n (2902
  keys, 0 problems).
- node tests/browser/director_stage_entry.mjs in en-US and zh-CN on
  the isolated fixture; tabs, chip, camera add, preview frame, and
  mask verified in a live probe with zero page errors; comparison
  screenshot refreshed beside the reference captures.

Refs: ThinkFlowLab#241
(cherry picked from commit 6e690e6fcf1a9536c360c1bcf770515f35e50c59)
The fullscreen console layout rebuild moved the editor away from the
dialog-era markup; this lands the batch-2 drawer as a floating layer
over the 3D scene, between the aspect overlays and the console panels.
The top-bar capture, materials and export entries, the drawer draft
state and the unsaved-close guard (which now also tracks still edits)
ride along from the merged main.

Refs: ThinkFlowLab#241
(cherry picked from commit 4103029e2dea141d5120eff7c85dd06bf4341e31)
- The shot-materials drawer floats above the console panels and sits
  left of the right inspector instead of hiding underneath it.
- The unsaved-close guard compares against the committed baselines that
  mid-session prepares advance, so an exported stage with committed
  stills no longer shows a false Unsaved chip or nags on Escape.

Refs: ThinkFlowLab#241
(cherry picked from commit a3864a27d335a2af41f34435d3eca039dc741a5b)
The top bar gains a shortcuts entry and the first object added in this
browser opens the same panel once (localStorage marker): mouse bindings
for orbit/pan/zoom plus the Escape and Tab behaviour of the console.
The panel grows as placement and gizmo shortcuts land.

Refs: ThinkFlowLab#241
(cherry picked from commit 5e18458f4e1c3a97bbf0340b9675bf8b813dc904)
- Each camera row gains a live-preview entry that splits the scene: the
  orbit working view keeps the left share, the chosen rig (or the
  storyboard sample once shots exist) fills the right pane. A draggable
  divider adjusts the ratio with keyboard equivalents, camera tabs
  switch the pane source, and Exit returns to the single view.
- Every axis in the position, rotation and scale groups pairs a bounded
  slider with the exact number input, so common adjustments come from a
  drag with immediate viewport feedback while out-of-band values stay
  typable.

Refs: ThinkFlowLab#241
(cherry picked from commit d4e1116237ed417d5d9a960171b6f2b8a7665a94)
The workspace root handles keydown in the capture phase and its Escape
branch closes the open editor; the dialog-era stage was exempt through
the .cw-domain-dialog wrapper class, but the fullscreen console dropped
that wrapper without joining the exemption list, so every Escape inside
the console force-closed the editor and bypassed the unsaved-close
guard. The console joins the exemption list, the help panel focuses its
close button so Escape dismisses it first, and a browser check covers
the cheat-sheet, the split live preview (tabs, keyboard ratio nudges,
exit) and transform sliders. Comparison shots land as od-batch4-*.png.

Refs: ThinkFlowLab#241
(cherry picked from commit f2c66df72430cd80d9a55e51e0ef7e89f3d51237)
Context-creation failures lose their multisample retry (some drivers
refuse antialiasing buffers under pressure; a plain context keeps the
editor usable), both renderer cleanups force-context-loss before
disposing so browsers free the slot immediately instead of waiting for
garbage collection, and the failure message now carries recovery steps
(hardware acceleration, chrome://gpu, close competing WebGL tabs).

A 20-cycle open/close probe survives on a fresh context, so the
immediate failure is environmental; these changes make the app degrade
gracefully and diagnosable either way.

Refs: ThinkFlowLab#241
(cherry picked from commit 3a5b372d8b0a6b71c83d7ae3b3790d44b2a1fc13)
Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
(cherry picked from commit 14e6c7807fcc5cd786f3e25d76e5904e39236eb7)
## summary

- Extend Director Stage object contracts with primitive geometry kinds.
- Persist and validate camera roll across the frontend, backend,
  schema, generated types, and fixtures.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Add the asset rail preview modes and object cards used by the Director Stage.
- Render thumbnails from zero-transform objects, crop them from the centered view,
  and persist them as image asset references.
- Validate projected thumbnails across the frontend, backend, schema, and tests.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Remove renderer-only visibility fields from transient thumbnail objects.
- Keep thumbnail generation within the existing StageObject transform contract.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Persist the editable stage document, environment, camera channels, and timeline contracts.
- Add preview-card placement, mutually exclusive Gizmo modes, viewport state, object tree, and inspector editing.
- Cover the core interactions with browser scenarios and unit/contract validation.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Persist prepared output slots and stable upload handles before media
  publication begins.
- Resume unfinished output imports after reload without duplicating
  completed assets.
- Require rendered video duration to match the frozen camera plan and
  localize the pending-preparation error.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Capture missing object thumbnails after model loading and report failures
  without hiding the imported object.
- Preserve the stage poster only when a usable preview URL exists.
- Treat thumbnail assets as registered stage dependencies and cover the
  validation path in TypeScript tests.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Persist prepared output slots and stable upload handles before media
  publication begins.
- Resume unfinished output imports after reload without duplicating
  completed assets.
- Require rendered video duration to match the frozen camera plan and
  localize the pending-preparation error.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Capture missing object thumbnails after model loading and report failures
  without hiding the imported object.
- Preserve the stage poster only when a usable preview URL exists.
- Treat thumbnail assets as registered stage dependencies and cover the
  validation path in TypeScript tests.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Keep focus inside help, export, preview, and close-confirm dialogs.
- Restore the previously focused control after each nested dialog closes.
- Keep Escape scoped to the active dialog instead of the stage editor.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
…ment

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Add pointer and keyboard resizing for the left and right panels and dynamic timeline.
- Keep layout dimensions in ephemeral view state with bounded values and bilingual separator labels.
- Limit panel highlight lines to the timeline top while dynamic preview is visible.

## validation

- npm test
- npm run build
- npm run check:i18n
- npm run check:browser-manifest
- CREATION_API_URL=http://127.0.0.1:37901 CREATION_WEB_URL=http://127.0.0.1:4173 node tests/browser/director_stage_layout.mjs
## summary

- Add a mutually exclusive Select tool and a disabled-aware Drop to ground action to the Director Stage toolbar.
- Reuse the existing pose editor for keyboard and button ground placement, including locked-object protection.
- Keep the preview WebGL buffer aligned with its full panel so transform picking follows the visible viewport.
- Extend bilingual browser coverage for the new toolbar actions and preserve the existing gizmo journey.

## validation

- npm test
- npm run build
- npm run check:i18n
- npm run check:browser-manifest
- CREATION_API_URL=http://127.0.0.1:37901 CREATION_WEB_URL=http://127.0.0.1:4173 node tests/browser/director_stage_gizmo.mjs
- DIRECTOR_STAGE_LOCALE=zh-CN CREATION_API_URL=http://127.0.0.1:37901 CREATION_WEB_URL=http://127.0.0.1:4173 node tests/browser/director_stage_gizmo.mjs
## summary
- group dynamic timeline tracks by shots, cameras, and current scene objects
- render source group rows while preserving property track and keyframe editing
- cover grouping, object removal, and bilingual browser acceptance

## validation
- npm test
- npm run build
- npm run check:i18n
- npm run check:browser-manifest
- director_stage_entry.mjs in en-US and zh-CN
## summary
- add expandable source group rows to the dynamic Director Stage timeline
- preserve property track editing while hiding collapsed child rows
- add bilingual accessible labels and browser coverage

## validation
- node --test tests/stageTimeline.test.ts
- npm run build
- npm run check:i18n
- director_stage_entry.mjs in en-US and zh-CN
- Disclose effective camera animation, per-channel safe boundaries and
  endpoint holds through the shared side-effect-free preview query.
- Bind explicit replacement to the reviewed document and complete input
  basis; preserve earlier samples and reject stale or altered batches.
- Add bilingual wizard review, retained stale drafts, atomic UI/Agent
  replacement and undo that preserves intervening Agent content.
- Guard whole-document saves and document the replacement workflow.

- Director and Agent command suites: 237 passed.
- Camera sampling, timeline and view-state suites: 96 passed.
- English and Chinese replacement browser journeys passed.
- Production build, generated contracts, i18n and browser checks passed.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Disclose seam time, owned channel and expected values through shared
  preview and bilingual editing controls. Explicitly selected neighboring
  recipes save atomically with the edited clip and remain undoable.
- Preserve exact eased endpoints and yield holds to continuous authored
  manual suffixes. Reject crossing curves and retain reviewed replacement
  for mismatching anchors without hiding small authored up changes.
- Document per-channel tolerance with real WebGL readback measurements,
  representative scene bounds and a discontinuity sensitivity control.

## validation

- Python Director and Agent suites: 244 passed.
- Camera movement, timeline, thumbnail and view-state tests: 103 passed.
- Build, i18n, generated contracts and browser manifest/locale checks pass.
- Serial English/Chinese seam fixtures and English replacement fixture
  cover authoritative state, Agent diagnostics and atomic undo.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

Share the angular join comparison mode between admission and seam
proposals. The first angular clip at time zero compares the absolute
target, so accepted inputs have no false alignment and rejected inputs
receive a proposal that can be saved. Document this rule in both guides.

## validation

- Public preview/put and sampler regressions cover both directions.
- Director and Agent Python suites: 246 passed.
- Movement, timeline, thumbnail and view-state tests: 104 passed.
- Build and i18n checks pass.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
- Add shared versioned conversion for all camera-move presets, with
  adaptive sampling, owned-channel keys and atomic recipe removal.
- Preserve incoming curves, pre-roll, per-channel holds and manual
  resumption through explicit ordinary-key ownership boundaries.
- Expose bilingual saved-movement conversion and receipt-based undo/redo,
  retaining replacement review and companion transaction scope.
- Document measured geometric, orientation and screen-space tolerances.

- Director command and Agent suites: 271 passed.
- Camera, timeline, preview, view-state and editor-session suites: 117 passed.
- Production build, i18n, browser manifest/locale and contracts passed.
- Bilingual browser conversion/edit/undo/redo journeys passed.
- All 13 presets checked at every supported FPS output timestamp;
  representative 1920x1080 renderer comparisons met documented limits.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
- Show translated Storyboard coverage in movement lanes and timing
  inspectors, including repeated camera selections and absolute time.
- Return all invalid camera and movement identities when duration writes
  reject, with bounded localized messages and complete structured facts.
- Verify shared UI and Agent camera rename, cut edits, explicit duration
  companions, deletion dependencies, undo, reopening, and sampling.

- 280 focused backend tests and 169 frontend tests passed.
- Production build, bilingual catalogs, browser checks, and generated
  contracts passed.
- Complete English and Chinese Storyboard lifecycle browser journeys
  passed against local fixtures without model service calls.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
- Retain camera operation identities across unresolved delivery and
  reconcile the original payload before submitting changed drafts.
- Refuse stale receipt and history installation over newer Agent edits
  or local gestures, keeping an explicit downloadable draft.
- Preserve delivery errors during preview refresh and provide bilingual
  recovery guidance with an explicit discard and inspection path.
- Cover notification gaps, stable receipts, disk reopening, thumbnail
  invalidation and controlled UI/Agent recovery interleavings.

- Python Director and Agent suites: 272 passed.
- TypeScript client, session, queue, movement and timeline suites: 165 passed.
- Serial Chinese and English recovery, conversion, review and refresh flows.
- Production build, i18n, browser manifests/locales and contracts checks.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

Return a complete typed applied receipt in the confirmed-save regression,
using the prepared operation identity and the acknowledged revision.
This allows the fixture to pass production TypeScript validation.

## validation

- 169 focused frontend tests passed.
- Production TypeScript validation and Vite build passed on this tree.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Publish accepted Director video against its exact historical source
  while retaining current target versions, binding and lock checks.
- Paint camera preview controls before bounded GPU captures and pause
  covered viewport rendering while the movement dialog is open.
- Verify bilingual production workflows with decoded moving landmarks,
  frozen provenance, editable conversion and comparable latency samples.
- Deliver bilingual output guidance and reproducible validation records.

## validation

- 405 focused Python tests and 179 TypeScript tests passed.
- Production EN/ZH journeys decoded and published four real MP4 files.
- Measured feedback and readiness meet the unchanged UI budgets.
- StrictMode preview smoke, i18n, browser checks, generated contracts
  and the final TypeScript/Vite production build passed.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Use deterministic world up when an ordinary camera samples zero or
  non-finite up, without changing its authored keys.
- Scale finite up before normalization to retain huge-vector direction.
- Cover public parsing, sampling and posing, plus UI save, disk reopen,
  bilingual previews, thumbnails and decoded Storyboard MP4 output.
- Document the shared render fallback and reproduction commands.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Generate browser metadata and preset IDs from the domain catalog and
  include both artifacts in the existing contract drift gate.
- Derive movement defaults, numeric limits, choices, units and immediate
  metadata validation from the same contract used by agent discovery.
- Cover public catalog parity and bilingual preset editing/save/reopen.

## validation

- 356 focused Python tests and 55 camera movement TypeScript tests passed.
- Production build, generated contracts and bilingual checks passed.
- Real browser catalog journeys passed in Chinese and English.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
…paths

## summary

- Apply analytic up-vector admission to every orbit family and prove
  straight sightline/up hull separation, including endpoint holds.
- Normalize cone generators so up magnitude cannot conceal singular
  orientations while preserving valid positive scales and explicit roll.
- Keep preview, Agent commands and full-document saves consistent and
  atomic, with bilingual diagnostics and reproducible browser coverage.

## validation

- 292 public Director command tests and 59 camera movement tests passed.
- English and Chinese real browser orientation journeys passed; the
  English production preview run also passed with no page errors.
- TypeScript/Vite build, i18n and browser manifest/locale checks passed.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
…tracts

- Merge the integration branch's shared preset metadata and ordinary
  camera up rendering protection into the orientation validation branch.
- Retain whole-path proofs, both browser regression modes and bilingual
  guidance while resolving shared catalog admission and document edits.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Add world-axis camera and target handles with numeric and keyboard
  alternatives, shared camera posing and temporary draft semantics.
- Keep the pointer surface stable during validation changes and restore
  cancelled gestures without creating project edits or undo entries.
- Preserve endpoint choice across steps and scene fitting, retain invalid
  preview context, and release only the overlay renderer's context.
- Add bilingual guidance and browser checks for persisted geometry,
  decoded MP4 landmarks and measured production interaction latency.

## validation

- 63 camera movement and camera-up Node cases passed.
- 293 shared director command Python cases passed.
- Both production language journeys passed, including rolled-source
  correction, real pointer/focus cancellation, disk reopening and MP4.
- Production pointer and keyboard latency passed 100/500/1000 ms budgets;
  all 24 raw samples and exact source/bundle hashes are retained.
- Production build, i18n, browser locale/manifest and diff checks passed.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Exercise real draft geometry, shared preset metadata, orientation
  rejection and same-recipe Agent conflicts in the production journey.
- Verify independent disk reopening and converted camera samples while
  retaining frozen-source MP4 motion and publication checks.
- Preserve historical evidence and record bilingual media, serial
  baseline comparisons and added geometry latency with exact hashes.
- Document ordinary camera up fallback without changing authored keys.

## validation

- 422 focused Python tests and 187 Node tests passed.
- Bilingual production journeys passed both MP4 output strategies;
  decoded landmarks stayed below the unchanged 3 px bound.
- Final production interaction budgets passed in both languages.
- Ordinary-up video and seven focused browser regressions passed.
- Build, generated contracts, i18n and browser checks passed.

Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
Signed-off-by: MrDongsls <87852321+MrDongsls@users.noreply.github.com>
## summary

- Keep historical source validation on accepted Director videos and
  current editor version checks on motion publications.
- Read full publication history only for Director documents.
- Omit absent codec metadata in the shared project fixture.

## validation

- Focused frontend regressions: 134 passed.
- Focused Python regressions: 68 passed, 2 skipped.
- Staged file static checks passed.
);
}
writeFileSync(
`${out}/integrated-draft.json`,
"fresh Python store reopens exact persisted document",
);
writeFileSync(
`${out}/disk-reopened-${expected.revision}.json`,
);
await dialog.getByRole("button", { name: L.cancel, exact: true }).click();
writeFileSync(
`${out}/same-recipe-conflict.json`,
...(integratedGeometry ? { geometry: metric("geometry") } : {}),
};
writeFileSync(
`${out}/performance.json`,
assert.equal(invalid.issues[0].code, "camera_move_timing");
assert.equal(/[\u3400-\u9fff]/.test(invalid.issues[0].message), zh);
writeFileSync(
`${out}/backend-error.json`,
"huge up preserves horizontal authored up direction",
);
await writeFile(
join(evidence, "decoded.json"),
assert.equal(/[\u3400-\u9fff]/.test(invalid.issues[0].message), zh);
writeFileSync(
`${out}/backend-error.json`,
JSON.stringify(invalid, null, 2),
Comment on lines +898 to +910
JSON.stringify(
{
saved,
preserved,
changed,
current,
projection,
frozenCameraName,
commandTrace,
},
null,
2,
),
Comment on lines +1408 to +1425
JSON.stringify(
{
status: "passed",
locale,
projectId: pid,
documentId: did,
itemId: item,
saved,
preconvert,
converted,
renders,
performanceEvidence,
errors,
sourceRequests: requests,
},
null,
2,
),
Comment on lines +757 to +769
JSON.stringify(
{
before,
edited,
target,
response,
rejected,
mainTime,
catalog: contract,
},
null,
2,
),

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants