You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: drop legacy 'native' AspectRatio via v6 schema migration
(1) Bumped axcutSchemaVersion 5 -> 6 and added upgradeV5DocumentToV6,
which rewrites every stored legacyEditor.aspectRatio === "native"
to a concrete "W:H" token (the timeline's largest clip dims,
falling back to "16:9"). The upgrader is wired into the existing
z.preprocess chain alongside v3->v4 and v4->v5.
(2) Dropped the "native" union arm from AspectRatio and the
per-helper branches in getAspectRatioValue / getAspectRatioLabel /
isAspectRatio / formatAspectRatioForCSS. Renamed
NATIVE_ASPECT_RATIO_FALLBACK -> ASPECT_RATIO_FALLBACK (the
file-private fallback). getNativeAspectRatioValue is kept.
(3) Removed the runtime bridge in outputFormat.resolveAspectRatioValue
(it was document-aware to resolve "native") and the self-migration
useMemo in V4Timeline (the activeToken that re-mapped
settings.aspectRatio to the largest clip's token). Both are dead
now that v6 documents cannot contain "native". Updated the three
preview/export call sites to the new one-arg signature.
(4) Tests: bumped every existing schemaVersion === 5 assertion to 6
(schema, migrate, document-service), added a 7-test v5->v6
migration block in schema/index.test.ts, and stripped the "native"
assertions from aspectRatioUtils and outputFormat tests (pointing
at the v5->v6 upgrader tests as the new home).
Intentionally untouched: lastBackgroundColor. The original audit
recommended dropping it as dead code, but the picker swatch in
src/lib/ai-edition/annotations/background.ts:25-29 reads it for the
swatch when bg is off, and toggleTextBackground writes it on every
toggle — it's the fix for the "background toggle always reverts to
black" regression.
0 commit comments