Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
0939f90
[feat] output: establish Director Stage output asset pipeline
MrDongsls Nov 21, 2026
e37ef5b
[feat] web: open the director stage fullscreen with an unsaved guard
MrDongsls Nov 17, 2026
d321048
[feat] web: arrange the fullscreen stage into console-style panels
MrDongsls Nov 17, 2026
b036a93
[feat] web: float the stage panels over a full-bleed 3D console
MrDongsls Nov 17, 2026
88a86b6
[feat] web: tab the stage library, add camera preview, aspect mask, s…
MrDongsls Nov 17, 2026
6021265
[feat] web: collect the shot-materials drawer into the console
MrDongsls Nov 17, 2026
44b8061
[fix] web: settle the console drawer and its unsaved baselines
MrDongsls Nov 17, 2026
5cdc89c
[feat] web: add a console controls cheat-sheet
MrDongsls Nov 18, 2026
65896eb
[feat] web: split live preview and transform sliders in the console
MrDongsls Nov 18, 2026
e2632e0
[fix] web: give the console its keyboard ownership back
MrDongsls Nov 18, 2026
bdd7723
[fix] web: harden stage renderer creation and context release
MrDongsls Nov 18, 2026
b4a0d66
[feat] workbench: align the Director Stage shell
MrDongsls Nov 19, 2026
308cf6e
[feat] contracts: add stage geometry kinds and camera roll
MrDongsls Nov 21, 2026
31669c5
[feat] assets: add Director Stage object previews
MrDongsls Nov 21, 2026
0e41790
[bugfix] assets: align thumbnail objects with stage contracts
MrDongsls Nov 21, 2026
7e55fdf
[feat] web: establish the Director Stage editing core
MrDongsls Nov 21, 2026
95c345f
[bugfix] media: make stage publication recovery resumable
MrDongsls Nov 21, 2026
6348180
[bugfix] web: keep imported stage previews recoverable
MrDongsls Nov 21, 2026
1ded0ef
[bugfix] media: make stage publication recovery resumable
MrDongsls Nov 21, 2026
3b9e290
[bugfix] web: keep imported stage previews recoverable
MrDongsls Nov 21, 2026
c5bc033
[bugfix] web: isolate Director Stage nested dialogs
MrDongsls Nov 21, 2026
1b8538b
Merge branch 'feat/director-stage-assets' into feat/stage-gizmo-place…
MrDongsls Nov 21, 2026
32ca25f
[feat] web: resize Director Stage panels and timeline
MrDongsls Nov 22, 2026
91ae17b
[feat] web: add select and ground tools to Director Stage
MrDongsls Nov 22, 2026
1823a98
[feat] web: group Director Stage timeline by source
MrDongsls Nov 22, 2026
acacfa8
[feat] web: expand Director Stage timeline groups
MrDongsls Nov 22, 2026
6a5ce51
[fix] web: refine Director Stage timeline tree
MrDongsls Nov 22, 2026
c87e59d
[feat] web: resize Director Stage track area
MrDongsls Nov 22, 2026
c5b90e2
[bugfix] agent: validate semantic command examples
MrDongsls Nov 22, 2026
27dfe11
[feat] web: add Director Stage timeline ruler ticks
MrDongsls Nov 22, 2026
d566b67
[feat] web: restyle Director Stage timeline
MrDongsls Nov 22, 2026
c7fa1f4
[feat] web: add Director Stage track keyframes
MrDongsls Nov 22, 2026
1acd868
[bugfix] web: refine Director Stage timeline controls
MrDongsls Nov 23, 2026
68bfe66
[bugfix] web: match Director Stage playhead styling
MrDongsls Nov 23, 2026
0278634
[bugfix] web: center Director Stage keyframe glyph
MrDongsls Nov 23, 2026
fc6a82d
[feat] web: select Director Stage timeline intervals
MrDongsls Nov 23, 2026
5524ee1
[bugfix] web: slim Director Stage timeline intervals
MrDongsls Nov 23, 2026
4ed625b
[feature] web: edit Director Stage interval curves
MrDongsls Nov 23, 2026
22ca054
[bugfix] web: align Director Stage gizmo viewport
MrDongsls Nov 23, 2026
e0e751a
[bugfix] web: keep Director Stage panels above timeline
MrDongsls Nov 23, 2026
e99490f
[bugfix] web: remove legacy Director Stage timeline footer
MrDongsls Nov 23, 2026
04d0e03
[bugfix] web: soften Director Stage expand markers
MrDongsls Nov 23, 2026
a62f4b2
[bugfix] web: bind Director Stage properties to selection
MrDongsls Nov 23, 2026
a73615a
[feat] web: make director inspector collapsible
MrDongsls Nov 23, 2026
32be7e9
[bugfix] web: stabilize director drag values
MrDongsls Nov 23, 2026
f63ce19
[bugfix] web: contain director numeric values
MrDongsls Nov 23, 2026
6ea6ea0
[bugfix] web: bound director numeric drag rows
MrDongsls Nov 23, 2026
8bc76f5
[bugfix] web: align director inspector headers
MrDongsls Nov 23, 2026
f133da5
[feat] web: make director camera movement default
MrDongsls Nov 23, 2026
dc1011a
[bugfix] web: align director camera movement with world axes
MrDongsls Nov 23, 2026
f84010b
[bugfix] web: move director camera relative to view plane
MrDongsls Nov 23, 2026
aa8a21a
[feat] web: add Director Stage environment surface
MrDongsls Nov 24, 2026
3248a76
[feat] web: add anti-aliased Director Stage grid
MrDongsls Nov 24, 2026
b2b993a
[feat] web: adapt Director Stage grid clarity
MrDongsls Nov 24, 2026
ca852f2
[feat] web: add Director Stage environment inspector
MrDongsls Nov 24, 2026
d001bb1
[bugfix] web: unify Director Stage environment value controls
MrDongsls Nov 24, 2026
cb00d80
[bugfix] web: apply Director Stage review fixes across the stack
MrDongsls Nov 24, 2026
0abb556
[feat] web: add a Director Stage background library
MrDongsls Nov 25, 2026
48edfa6
[refactor] web: rebuild Director Stage panels on inspector primitives
MrDongsls Nov 25, 2026
5b626fb
[feat] web: start Director Stages empty with a migrated default label
MrDongsls Nov 25, 2026
08f0304
[refactor] web: project storyboard blocks as stable intervals
MrDongsls Nov 25, 2026
1f99b23
Merge branch 'codex/storyboard-ticket-01' into codex/director-stage-s…
MrDongsls Nov 25, 2026
1f54f58
[bugfix] web: ground Director Stage objects by their rendered bottom
MrDongsls Nov 25, 2026
2a8f8cd
[feat] core: add the continuous Storyboard rule and its stable biling…
MrDongsls Nov 25, 2026
d878d5f
[feat] core: enforce the continuous Storyboard at the Director Stage …
MrDongsls Nov 25, 2026
7970b13
[feat] core: append Storyboard blocks and read the Storyboard through…
MrDongsls Nov 25, 2026
d0bf849
[feat] web: read the continuous Storyboard and guard Director Stage w…
MrDongsls Nov 25, 2026
9b9409c
[test] core: check an appended block against its change event and a r…
MrDongsls Nov 25, 2026
65c5681
[docs] development: record why relation rules stay out of stored models
MrDongsls Nov 25, 2026
ca05478
[bugfix] web: fail the build when storyboard reasons drift from the c…
MrDongsls Nov 25, 2026
9d7dd0f
[bugfix] core: select storyboard copy with the shared language rule
MrDongsls Nov 25, 2026
33e084d
[feat] web: add Storyboard cameras from the timeline and guard the st…
MrDongsls Nov 25, 2026
c631c4c
[test] browser: accept the continuous Storyboard's first add in a rea…
MrDongsls Nov 25, 2026
d54cda0
[test] browser: cover a conflicting Storyboard add and keep the toolt…
MrDongsls Nov 25, 2026
decff75
[test] browser: hold the append reply to see the in-flight state of t…
MrDongsls Nov 25, 2026
1936f0a
[docs] development: record the rollback that follows an acknowledged …
MrDongsls Nov 25, 2026
dac8483
Merge branch 'codex/storyboard-ticket-02' into codex/director-stage-s…
MrDongsls Nov 25, 2026
baf98e2
[feat] web: look up the Storyboard block that owns a time
MrDongsls Nov 26, 2026
59b1a94
[feat] web: sample what a preview shows from a preview source
MrDongsls Nov 26, 2026
d93e217
[feat] web: hold the preview source in Director Stage view state
MrDongsls Nov 26, 2026
7a0144f
[bugfix] web: drop the selection of a Storyboard block that the docum…
MrDongsls Nov 26, 2026
6f7eb05
[feat] web: let a preview capture a keyframe on the camera it shows
MrDongsls Nov 26, 2026
437ee48
[feat] web: preview the Director Stage from a source held in view state
MrDongsls Nov 26, 2026
0d27e16
[test] browser: cover the Director Stage preview source end to end
MrDongsls Nov 26, 2026
5b30976
[docs] development: describe the preview-source coverage of the Story…
MrDongsls Nov 26, 2026
821334b
[bugfix] web: camera lists keep moving the Director Stage preview
MrDongsls Nov 26, 2026
fffd1ba
[test] browser: cover camera-list clicks against the preview source
MrDongsls Nov 26, 2026
6ef4d56
[docs] development: name the camera-list coverage of the Storyboard j…
MrDongsls Nov 26, 2026
41e296f
[feat] web: key a Storyboard thumbnail by what it pictures
MrDongsls Nov 26, 2026
51b9b8d
[feat] web: give the Director Stage Storyboard row room for a thumbnail
MrDongsls Nov 26, 2026
78e72ee
[feat] web: show a selected Storyboard block as a fill of its own
MrDongsls Nov 26, 2026
018b090
[feat] web: outline the Storyboard block the playhead is on in white
MrDongsls Nov 26, 2026
1926c90
[bugfix] web: stop drawing boundary diamonds on the Storyboard lane
MrDongsls Nov 26, 2026
ee21c71
[feat] web: picture each Storyboard block's camera at the block's start
MrDongsls Nov 26, 2026
57bc631
[test] browser: cover what a Storyboard thumbnail follows and keeps
MrDongsls Nov 26, 2026
5241210
[feat] web: narrow a Storyboard block by giving up its name, then its…
MrDongsls Nov 26, 2026
d9344ac
[test] browser: let the Storyboard journey write pictures for a visua…
MrDongsls Nov 26, 2026
bb096f3
[test] browser: watch the Director Stage viewport while thumbnails re…
MrDongsls Nov 26, 2026
5781472
[docs] development: name the block presentation coverage of the Story…
MrDongsls Nov 26, 2026
53f87c3
[test] browser: count the pictures one task makes during playback
MrDongsls Nov 26, 2026
d9c789e
[test] browser: judge the watched viewport by its frames, not by the …
MrDongsls Nov 26, 2026
f95a99b
[feat] web: name the scene's content revision in a Storyboard thumbna…
MrDongsls Nov 26, 2026
7b762af
[bugfix] web: refresh Storyboard thumbnails after scene loads
MrDongsls Nov 26, 2026
4ba0177
[bugfix] web: hold the last Storyboard preview frame
MrDongsls Nov 26, 2026
693ae79
Merge branch 'codex/storyboard-ticket-03' into codex/director-stage-s…
MrDongsls Nov 26, 2026
f3a7381
[feat] director stage: reorder and ripple-resize storyboard blocks
MrDongsls Nov 26, 2026
02d1d01
[test] director stage: verify persisted storyboard gestures in Chromium
MrDongsls Nov 26, 2026
7c0075a
Merge commit '02d1d01d047b63fc1446d1a145215dae6944e03a' into codex/di…
MrDongsls Nov 26, 2026
49e7f1d
[test] director stage: locate narrow-block labels by purpose
MrDongsls Nov 26, 2026
4868cb2
Merge ticket 04 storyboard browser test locator fix
MrDongsls Nov 26, 2026
7c22ba5
[feat] director stage: delete storyboard blocks and cameras
MrDongsls Nov 27, 2026
4a2a7e2
Merge Ticket 05 storyboard and camera deletion
MrDongsls Nov 27, 2026
b4681b8
[feat] director stage: export continuous Storyboards and clamp stage …
MrDongsls Nov 27, 2026
48686d3
[test] director stage: verify Storyboard cuts in a published MP4
MrDongsls Nov 27, 2026
d3230f0
[fix] director stage: preserve Storyboard command evidence and timing
MrDongsls Nov 27, 2026
1345071
[test] director stage: verify bilingual Storyboard editing through pu…
MrDongsls Nov 27, 2026
ffbe918
[test] director stage: match localized export guidance in the dialog
MrDongsls Nov 27, 2026
2ca1bb1
[feat] web: compact the Director Stage workbench layout
MrDongsls Nov 27, 2026
3fea5eb
Merge branch 'codex/director-stage-storyboard' into feat/director-sta…
MrDongsls Nov 27, 2026
9988099
[bugfix] web: keep the Director Stage exact input inside its drag row
MrDongsls Nov 27, 2026
44dce45
[chore] web: drop a trailing space from the Nunito Sans license
MrDongsls Nov 27, 2026
3a1bdd2
[feat] web: drag a Storyboard block to another place with feedback
MrDongsls Nov 27, 2026
ea464f4
Merge ticket 01: drag basics, grab cursors and a block that follows t…
MrDongsls Nov 27, 2026
61e3eff
[feat] web: show where a dragged Storyboard block would be inserted
MrDongsls Nov 27, 2026
54391e6
Merge ticket 02: insertion line for a carried Storyboard block
MrDongsls Nov 27, 2026
317875c
[feat] web: land the playhead on a dragged Storyboard block's new start
MrDongsls Nov 27, 2026
d324908
[test] director stage: list the drag's playhead checks in the journey
MrDongsls Nov 27, 2026
b2bcaf8
Merge ticket 03: the playhead lands on the dragged block
MrDongsls Nov 27, 2026
12a971a
[test] director stage: pin reorder packing with one shared fixture
MrDongsls Nov 28, 2026
148adbc
[refactor] web: name the state that keeps the Storyboard waiting
MrDongsls Nov 28, 2026
30ae5fa
[refactor] director stage: hold a command's reply once in the journey
MrDongsls Nov 28, 2026
e2e2784
[bugfix] web: hold a cancelled Storyboard drag's pointer until release
MrDongsls Nov 28, 2026
7736242
[bugfix] web: carry a Storyboard block without keyboard focus showing
MrDongsls Nov 28, 2026
3435a9a
[bugfix] web: take a dragged block's stored start from the receipt
MrDongsls Nov 28, 2026
ae1da1a
[docs] director stage: describe dragging Storyboard blocks
MrDongsls Nov 28, 2026
8e8b6ad
Merge ticket 05: fixes from the two-axis review
MrDongsls Nov 28, 2026
2c71c7f
Merge branch 'zcode/director-stage-storyboard-drag' into feat/directo…
MrDongsls Nov 28, 2026
51e13ee
[bugfix] web: let a Storyboard block be carried to either end
MrDongsls Nov 28, 2026
037d6da
Merge branch 'zcode/storyboard-drag-end-fix' into feat/director-stage…
MrDongsls Nov 28, 2026
09579be
[feat] web: show a lifted Director Stage subject's height above ground
MrDongsls Nov 28, 2026
16bf643
[bugfix] web: anchor edges on every node but the Director Stage node
MrDongsls Nov 29, 2026
cc95a89
[test] web: match the stage console in structured editors
MrDongsls Nov 29, 2026
2eb07b9
[test] web: count storyboard pictures per task beyond the window
MrDongsls Nov 29, 2026
f43efcf
[test] assets: give the changed file a distinct mtime
MrDongsls Nov 29, 2026
c4589b0
[feat] camera: add Director View, camera rigs and preset placement
MrDongsls Nov 29, 2026
386ed95
[feat] camera: keep rigs out of preview surfaces and Storyboard pictures
MrDongsls Nov 29, 2026
4c2b578
[feat] camera: shape the camera preview by the camera's own aspect
MrDongsls Nov 29, 2026
56c2ca8
[feat] camera: disable camera presets until the stage has a subject
MrDongsls Nov 29, 2026
eb69162
[feat] camera: fit the preview-source selector into the preview frame…
MrDongsls Nov 29, 2026
3f89980
[test] web: cover Director Stage camera endpoints
MrDongsls Nov 29, 2026
088610d
[test] web: cover Director Stage camera ends and preset placement in …
MrDongsls Nov 29, 2026
7e9f5a5
[docs] camera: describe the Director View, camera rigs and presets
MrDongsls Nov 29, 2026
a45c0f7
[bugfix] camera: take the still through the preview source's camera
MrDongsls Nov 29, 2026
acc1c5d
[test] web: adapt the stage gizmo journey to the director view
MrDongsls Nov 29, 2026
d36e132
[test] web: cover camera presets on an empty stage
MrDongsls Nov 29, 2026
9808246
[bugfix] camera: keep the preview frame's bar as high as its buttons
MrDongsls Nov 29, 2026
05be7b1
[bugfix] camera: keep transform handles out of preview surfaces
MrDongsls Nov 29, 2026
dc4ecc1
[test] web: test core's preview frame in the visual journey
MrDongsls Nov 29, 2026
169b9d6
[test] web: add the console journey's second camera by a preset
MrDongsls Nov 29, 2026
91a6ab8
[test] web: press the viewfinder button in the output journey
MrDongsls Nov 29, 2026
d5610bf
[test] web: read the Storyboard gate's pictures from the preview
MrDongsls Nov 29, 2026
42d287a
[refactor] camera: remove two tree styles that no markup uses
MrDongsls Nov 29, 2026
8abc42c
[test] web: check a camera's own aspect in the visual journey
MrDongsls Nov 29, 2026
e3a18c6
[docs] camera: refresh the Director Stage pictures the feature changed
MrDongsls Nov 29, 2026
ff63c4f
[test] web: wait for the stage to adopt the held background
MrDongsls Nov 30, 2026
edb6164
[test] web: seed the Director Stage output journey with a subject
MrDongsls Nov 30, 2026
62a1bdd
Merge branch 'zcode/storyboard-held-background-race' into feat/direct…
MrDongsls Nov 30, 2026
557a763
Merge branch 'zcode/stage-output-journey-subject' into feat/director-…
MrDongsls Nov 30, 2026
7567dbe
Merge branch 'feat/director-stage-core' into reland/feat-stage-camera…
MrDongsls Nov 30, 2026
6847f73
[test] web: name what the Storyboard journey checks for cameras now
MrDongsls Nov 30, 2026
ee036ac
[bugfix] camera: point the Cameras tab's note at preset placement
MrDongsls Nov 30, 2026
b8f80e0
[docs] camera: name the Director Stage 导演台 in the Chinese guide
MrDongsls Nov 30, 2026
f5f15b2
[test] web: name the camera preview in the Storyboard journey's runni…
MrDongsls Nov 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions apps/api/src/opendirector_api/localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from fastapi import Request


from opendirector.domain.language import wants_english_language
from opendirector.domain.storyboard_errors import storyboard_error_message
from opendirector.domain.timeline_errors import timeline_error_message

from opendirector.domain.creation.commands import CommandReceipt
Expand Down Expand Up @@ -111,15 +113,6 @@
}


def wants_english_language(value: str | None) -> bool:
"""Use the primary Accept-Language tag, matching the browser decision."""
value = (value or "").strip()
if not value:
return False
primary = value.split(",", 1)[0].split(";", 1)[0].strip().lower()
return not primary.startswith("zh")


def wants_english(request: Request) -> bool:
return wants_english_language(request.headers.get("accept-language"))

Expand All @@ -132,6 +125,8 @@ def localized_error_for_language(
code: str = "operation_rejected",
) -> str:
specific = timeline_error_message(code, language)
if specific is None:
specific = storyboard_error_message(code, language)
if specific is not None:
return specific
if not wants_english_language(language):
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions docs/development/director-stage-implementation-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Director Stage implementation plan

This plan keeps the Director Stage work in reviewable, dependency-ordered
feature branches. Each branch owns a complete user-facing capability and is
stacked on the branch immediately before it.

## Branch stack

1. `feat/stage-output-assets` — output assets, frozen render plans, and the
publication contract.
2. `feat/stage-fullscreen` — the Director Stage shell, full-screen layout, and
shared stage geometry contracts.
3. `feat/director-stage-assets` — asset rail cards, thumbnail capture, and
registered asset references.
4. `feat/stage-gizmo-placement` — the editable stage core: placement from
preview cards, mutually exclusive transform tools, viewport/view state,
object tree and inspector, timeline editing, environment controls, and
persistence validation.
5. `feat/stage-camera-rigs` — independent camera rigs, viewpoint controls,
Director View, and camera monitors.
6. `feat/stage-agent-publish` — the parallel agent publication capability,
based on the shared stage core and independent of the camera UI.

## Delivery rules

- Keep a branch limited to its capability and the contracts it must expose to
the next branch.
- Move a prerequisite to the lowest branch that needs it; do not duplicate it
in a later feature branch.
- Every feature unit includes focused tests, a production build, bilingual
message validation, and the relevant Python contract tests.
- Every code-ready unit receives a semantic signed commit with a body starting
with `## summary`.
- Rebase the stack from low to high only after the lower branch passes its
checks. Keep the branches local until the review targets are agreed.

## Acceptance boundary

The Director Stage document is the persisted source of business facts. View
state, selection, preview mode, split view, menus, and interaction modes stay
ephemeral. Asset cards and agent operations use the same placement and apply
contracts as direct user interaction. Camera preview output is independent
from the main Director View and does not make viewpoint movement move the main
stage camera.
16 changes: 16 additions & 0 deletions docs/development/director-stage-ui-feedback-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Director Stage UI feedback follow-up

This plan tracks the three follow-up changes identified from the annotated
Director Stage comparison against the local Jiemeng reference screenshots.
Work stays on the semantic `feat/stage-gizmo-placement` branch.

## Acceptance stages

| Stage | Scope | Acceptance | Status |
| --- | --- | --- | --- |
| F1 | Transform tool mode | Move, rotate, and scale are a discriminated single-choice state; only the selected helper is visible and keyboard/buttons preserve that invariant | complete |
| F2 | Asset card previews | Stage object cards show a PNG thumbnail rendered from the corresponding 3D object at the origin, centered and cropped from the render; imported objects use their loaded scene when available | complete |
| F3 | Object tree and inspector layout | Right rail follows the reference split between a searchable object tree and an independently scrolling property inspector, with stable grouping and scroll behavior | complete |

Each stage requires a focused behavior or browser check, the relevant project
checks, and a signed Git commit before the next stage begins.
45 changes: 45 additions & 0 deletions docs/development/director-stage-visual-alignment-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Director Stage visual alignment plan

This execution plan tracks the visual-alignment work against the native Jiemeng
Director Stage screenshots referenced by the external audit plan. It is scoped
to the existing `feat/stage-fullscreen` branch because the branch owns the
Director Stage shell, layout, asset tabs, and viewport tools.

The reference is the screenshot set in the local audit workspace:

`C:\Users\10425\.zcode\workspace\draft-9c960b48-85bb-4dbe-8ee1-03eba20460c0\jimeng-canvas-audit\screenshots`

Primary comparison states:

- `02-director-console.png`: static console shell.
- `09-director-console-dynamic.png`: dynamic-mode transition.
- `11-director-console-dynamic-mode.png`: dynamic console and timeline.
- `12-director-console-camera-moves.png`: camera-move asset tab.
- `13-director-console-view-settings.png`: viewport settings popover.
- `14-director-console-shoot.png`: camera/shoot view.

## Rules

- Match the reference geometry, spacing, density, color hierarchy, and state
transitions before introducing new visual language.
- Keep the 3D viewport as the base layer. Panels are full-height workbench
regions or overlays, not document-flow dialogs.
- Keep business values and bilingual message keys unchanged while changing
presentation.
- Work on the existing semantic branch. Do not create a new branch for this
alignment pass.
- Each stage must have a browser screenshot or computed-geometry check, the
smallest relevant automated checks, and a signed commit (`commit -s`).
- After the shell commits land, rebase `feat/stage-gizmo-placement` onto this
branch before continuing work that depends on the shell.

## Stages

| Stage | Scope | Reference states | Acceptance | Status |
| --- | --- | --- | --- | --- |
| V1 | Workbench shell geometry and base color tokens: top bar, left asset rail, right inspector, viewport bounds, and bottom timeline boundary | 02, 11 | No floating-dialog margins on the main shell; panel widths and boundaries are stable at 1920×1080 and 1700×1100; existing console browser flow remains green | complete |
| V2 | Top bar and asset-library density: compact actions, mode switch, asset tabs, search, cards, and active states | 02, 11, 12 | Header and left rail follow the reference rhythm; active tab and compact control states are visible and keyboard accessible | complete |
| V3 | Object tree and inspector hierarchy: grouped rows, section dividers, fields, toggles, and scroll behavior | 02, 11, 13 | Right side reads as object tree above properties; selected/empty states preserve the same geometry | complete |
| V4 | Dynamic timeline: transport, ruler, tracks, playhead, frame/keyframe density, and dynamic/static state transition | 09, 11, 12 | Dynamic mode exposes the timeline with reference density; static mode does not reserve an unexplained editor area | planned |
| V5 | Viewport overlays and transient surfaces: tool rail, PiP, settings menu, viewfinder, help, and shoot state | 03, 13, 14 | Each overlay matches its reference anchor, z-order, padding, and dismissal behavior | planned |
| V6 | Screenshot matrix and rebase handoff | 02, 09, 11–14 | Capture before/after comparison evidence, run required checks, commit, then rebase `feat/stage-gizmo-placement` and rerun its browser lanes | planned |
38 changes: 38 additions & 0 deletions docs/development/lessons.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ When work exposes a consequential risk or a recurring problem, add a lesson or u
- **Trigger:** A workspace timer retains its document while an editor commit installs a newer authoritative baseline.
- **Lesson:** A timer may run after the editor's saving flag clears but before React installs the new document. Comparing that old closure against the new baseline can turn a view-only save into a business rollback, invalidating a previously captured publication version.
- **Check:** Invalidate scheduled automatic callbacks when the editor transaction starts, drain queued saves and explicitly persist the current draft before the edit. Preserve publication CAS checks. Exercise the real due callback at the acknowledgment boundary; isolate projection-test gates by snapshot identity, assert release/restoration and always clean up. Distinguish a forced reproduction from proof of the exact CI schedule.
- **Same-continuation follow-up:** The Director Stage Storyboard add (commit `33e084dc`) reproduced the rollback without a timer. After an editor save was acknowledged, the step that followed it in the same asynchronous continuation sent the next server command and first persisted `historyRef.current.present`. React had not yet installed the document the save produced, so that persist compared the previous canvas with the new baseline and wrote the saved draft back to what it was before the save; the command was then refused with `revision_conflict`. Only the real-browser journey showed it; the unit tests of either side could not. After an acknowledged editor save, a later step in the same continuation must not flush the canvas from `historyRef` again, because the save already did; `appendStageStoryboard` takes `savedDraft` for exactly that case. Cover a flow that saves a draft and then sends a command with a browser step that reads the stored document afterwards.


## An upstream response and a consumer finishing it are separate facts
Expand All @@ -100,3 +101,40 @@ When work exposes a consequential risk or a recurring problem, add a lesson or u
- **Lesson:** [Issue #302](https://github.com/ThinkFlowLab/OpenDirector/issues/302) identified four citation groups whose Unicode private-use delimiters and internal source IDs were displayed as text. The native and persisted replies agreed byte for byte; intact text transport did not establish usable presentation.
- **Check:** Verify the source metadata as well as reply text, multiple citations, split streaming markers, history reopening, copying and missing-source fallback. Preserve raw execution evidence and tool offsets; leave literal code examples unchanged and inspect both interface languages in the browser.
- **Presentation follow-up:** The source-link UI in #302 initially inherited a library modal's utility classes without the corresponding CSS. Text and click checks passed while the border and close-button positioning failed. Use the supported custom renderer with repository-owned styles, and check computed styles, element geometry, long URLs, keyboard close and focus restoration as well as translated text.

## Values read back from renderer math need tolerant edit comparison

- **Trigger:** Committing document values that were read back from three.js after the renderer recomputed them, such as camera orbit gesture ends or transform-handle drags in the Director Stage.
- **Lesson:** The stage's orbit commit compared the read-back pose with exact equality while `setCamera` round-trips the pose through OrbitControls' spherical update; an unchanged camera could read one ulp away (5.000000000000001 vs 5), so every frozen gesture end committed an epsilon pose plus a phantom camera keyframe at the playhead. Unit fixtures used exact values, so only a real browser (tests/browser/director_stage_gizmo.mjs) exposed the phantom undo entry.
- **Check:** When a gesture commits values that passed through renderer math, compare edit results within a small float tolerance while keeping parse-time validation exact, and cover the unchanged-gesture path in the browser rather than only with exact unit fixtures.

## A relation rule in a stored model makes older records unreadable

- **Trigger:** Adding a new business rule to a pydantic model that a stored snapshot or a stored command payload uses, so that it seems to be enforced everywhere at once.
- **Lesson:** The first plan for the continuous Storyboard put the rule into the stored `DirectorData` model. `ProjectSnapshot.model_validate` runs on project load and on every command, and a commit record re-parses its stored command whenever history loads, so a project saved with sparse shots would have failed to open instead of refusing one Director Stage write. The same ordering hides specific rejections: the HTTP and Agent entry points parse a command payload before the application service runs, so a relation check in the payload model answers with a generic `invalid_input` before the write boundary can report its stable code, and on raw values it rejects sub-millisecond input that the normalized rule accepts.
- **Check:** Put the rule in a domain function that the application write boundary calls on normalized copies, and leave the stored model as the last line of defence. When a command has to reach that boundary before the model's own relation checks, parse the incoming document with a sibling model that defers only those checks and dumps identically, so commit records and replay fingerprints are unaffected. Add a test that stores the unsupported shape through the store, reopens the project from disk, and asserts that the write is rejected with the stable code while the stored document is unchanged. Commit `d878d5f9` and `tests/test_creation_director.py` show the shape.


## WebGL viewport and canvas readback use different units

- **Trigger:** Drawing a preview into a WebGL canvas rectangle and copying the result into a 2D canvas.
- **Lesson:** During Storyboard ticket 03, the viewport was sized in logical pixels to render a fixed-size device-pixel thumbnail. Multiplying the readback dimensions by the device pixel ratio again included neighboring viewport content. At 2×, a solid-color 128×72 probe contained only 2,304 of the expected 9,216 pixels of that color.
- **Check:** Convert the viewport rectangle to device pixels once, then read that rectangle using the drawing buffer height and the 2D canvas origin. Verify the actual image at DPR greater than 1 and check that the visible viewport is restored before the thumbnail task returns. See [the Storyboard browser journey](../../tests/browser/director_stage_storyboard.mjs).

## Storyboard edits and export need the same endpoint calculation

- **Trigger:** Appending a block or shortening the main timeline when saved intervals contain sub-millisecond times.
- **Evidence:** The [Director Stage command tests](../../tests/test_creation_director.py) reproduce an append that previously created an internal gap and a duration clamp that failed structural validation. The continuity check rounded each interval component, while append rounded their sum and clamp could fall below the original stored end.
- **Check:** Compare the stored intervals, query result, applied receipt, and replay after append or clamp. Include a legacy interval whose rounded endpoint differs from its stored endpoint. Verify existing block timing and animation survive the operation.

## A picture inside a dragged element takes the pointer gesture away

- **Trigger:** A pointer gesture that may begin wherever the user presses inside an element holding an `<img>`, such as a block with a thumbnail, while the gesture owns the pointer through `setPointerCapture`.
- **Lesson:** A picture left draggable starts the browser's own drag on the press. It fires `dragstart`, then `pointercancel` at the element holding the capture and `lostpointercapture`, so a gesture that ends on a cancel is over before the pointer has moved and its release writes nothing. Commit `3a1bdd29` fixed the Director Stage Storyboard block by making its thumbnail `draggable={false}`. Measured in a minimal page in headless Chromium (a button holding a picture, the capture on its outer element): a press on the name gave `pointerdown` → `pointerup`; a press on the picture gave `pointerdown` → `dragstart` → `pointercancel` → `lostpointercapture` → `dragend`; with `draggable=false` the picture gave `pointerdown` → `pointerup`. The [Storyboard browser journey](../../tests/browser/director_stage_storyboard.mjs) started each drag from the centre of the block, which is its name, so the one press that could not drag, the one on the picture, was never made.
- **Check:** Give every picture inside an element that is dragged `draggable={false}`, as `ReferenceThumbnail.tsx` and `SubjectNodeCard.tsx` do, and start one browser gesture from the picture itself, asserting that its release still commits. A gesture that is exercised only from text has not shown that the whole target can be dragged.

## A cancelled pointer gesture keeps its capture until the pointer is let go

- **Trigger:** A pointer gesture that holds its pointer through `setPointerCapture` and can be cancelled while the button is still held, by Escape, a `pointercancel` or the window losing focus.
- **Lesson:** Commit `e2e2784e` fixed the Director Stage Storyboard drag. Its cancel released the capture at once, so the release that followed was sent to whatever lay under the pointer, and the `click` it produced went to the common ancestor of the press and the release. Over an empty stretch of the lane that ancestor was the lane itself, whose click moves the playhead: a drag cancelled with Escape moved the playhead when the mouse was let go, although nothing had been written. The [Storyboard browser journey](../../tests/browser/director_stage_storyboard.mjs) could not see it, because its lane was full of blocks and every release landed on one. The same shape, a cancel that releases the capture, is in `LayerBoard.tsx`, `TimelineEditor.tsx`, `LocalImageTools.tsx` and `TimelineTextLane.tsx`; none of them was checked for a release that lands elsewhere.
- **Check:** Leave the capture to the browser, which gives it up with the `pointerup`, and let the surface that holds the pointer stop the `click`. Cover every way of cancelling with a release where no target of the gesture lies, on an empty part of the surface and outside it, in a real browser.
Loading
Loading