Commit a3a7e33
committed
fix(video_compose): derive the Remotion theme from real playbook keys
`_build_theme_from_playbook` documents itself as reading "a playbook's actual
color values [...] not picked from a preset menu", but three of the keys it
reads are not in the playbook schema, so each silently fell back to a
hardcoded default for every playbook:
typo.get("heading") schema key is `headings`
palette.get("muted_text") schema key is `muted`
motion.get("pace") `pace` is an identity field; motion carries
pacing_rules, not a pace enum
Effect, before -> after:
flat-motion-graphics headingFont Inter -> Space Grotesk
muted #6B7280 -> #64748B
spring 20/120 @0.4s -> 12/80 @0.3s (pace: fast)
minimalist-diagram headingFont Inter -> IBM Plex Sans
anime-ghibli headingFont Inter -> Noto Serif JP
Every playbook rendered its headings in Inter regardless of what it declared,
and no playbook's declared pace ever reached the spring config.
This is the Remotion counterpart of the HyperFrames style-bridge defect in
issue #306. That bridge lives in lib/hyperframes_style_bridge.py and is
untouched here, as are the open PRs against it (#296, #307).
Two adjacent things deliberately left alone:
- `palette.get("surface", bg)` also names a key the schema does not define,
but the fallback to the background color is an explicit, sensible default
rather than a dropped value. Giving playbooks a real surface color would be
a schema addition, not a bug fix.
- The pace branch still handles only `fast` and `slow`, so `deliberate` and
`rapid` land on the moderate default. Extending that mapping is a motion
tuning decision, not part of reading the right key.
Note on ordering: Root.tsx's resolveTheme currently prefers a named preset
over themeConfig, which meant this derived theme was discarded whenever the
playbook name matched a Remotion preset — masking the defect. Fixing
resolveTheme before this would have made every video lose its heading
typeface, muted color and motion pacing at once.
Expectations in the new tests come from the playbook YAML rather than a
hardcoded table, so a playbook that changes its typeface keeps them honest.
Verified: 4 cases fail on the unfixed tree; full suite goes 964 -> 977 passed
with no regressions.1 parent 4eab34c commit a3a7e33
2 files changed
Lines changed: 93 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1253 | 1253 | | |
1254 | 1254 | | |
1255 | 1255 | | |
1256 | | - | |
| 1256 | + | |
1257 | 1257 | | |
1258 | 1258 | | |
1259 | 1259 | | |
| |||
1271 | 1271 | | |
1272 | 1272 | | |
1273 | 1273 | | |
1274 | | - | |
| 1274 | + | |
1275 | 1275 | | |
1276 | 1276 | | |
1277 | 1277 | | |
| |||
1287 | 1287 | | |
1288 | 1288 | | |
1289 | 1289 | | |
1290 | | - | |
1291 | | - | |
1292 | | - | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
1293 | 1293 | | |
1294 | 1294 | | |
1295 | 1295 | | |
| |||
0 commit comments