Repository navigation
Commit 8cad217
fix(shader-transitions,producer): harden CSS-only transition lifecycle and unblock CI
Three follow-on fixes after the optional-shader change rebased onto current
main (PR #832 introduced page-side compositing and the producer's hf#732
layered pipeline since this PR was opened).
shader-transitions/hyper-shader.ts
- Treat `cache.prog === null` as the canonical immutable marker for
CSS-only transitions via a new `isCssOnlyTransition()` helper.
- `disposeCachedTransition()` now restores the always-ready CSS fallback
state for prog=null caches instead of zeroing `fallback`/`ready` — the
previous behaviour, combined with `markScenesDirty()` re-running the
prewarm/capture pipeline, could put a CSS-only cache through the WebGL
path and reach `renderShader(state.prog!)` with a null prog (Copilot
review on lines 1168 + 1319).
- `markScenesDirty()` skips CSS-only caches; they have no shader to
recompile and no texture pyramid to recapture.
- `ensureTransitionCachesReady()` filters CSS-only caches out of the
prewarm work list.
- `tickShader()` now routes on `cache.fallback || cache.prog === null`
and threads a narrowed non-null `prog` local into `renderShader()`,
removing the unsound `state.prog!` non-null assertion.
- `initEngineMode()` filters CSS-only transitions before passing them to
`installPageSideCompositor()`, which expects `shader: ShaderName`
(required). Page-side compositing is shader-only; CSS crossfades stay
on the GSAP opacity timeline.
producer/render/stages/captureHdrHybridLoop.ts
producer/render/stages/captureHdrSequentialLoop.ts
- Guard `activeTransition.shader` against undefined: when omitted, route
the Node-side blend through `crossfade` (the engine's canonical
opacity blend, equivalent to `applyFallbackTransition()` on the page).
- The hybrid path also bypasses the worker pool when `shaderName` is
absent and runs `crossfade` inline.
This addresses the Copilot review comments and unblocks the 5 failing CI
jobs (Build, Typecheck, CLI smoke, Windows tests, Windows render) which
all rooted in 4 TS errors at these exact sites.
Co-authored-by: Cursor <[email protected]>1 parent a78e49c commit 8cad217
3 files changed
Lines changed: 58 additions & 10 deletions
File tree
- packages
- producer/src/services/render/stages
- shader-transitions/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
263 | 269 | | |
264 | | - | |
| 270 | + | |
265 | 271 | | |
266 | 272 | | |
267 | | - | |
| 273 | + | |
268 | 274 | | |
269 | 275 | | |
270 | 276 | | |
| |||
277 | 283 | | |
278 | 284 | | |
279 | 285 | | |
280 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
281 | 289 | | |
282 | 290 | | |
283 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
176 | 182 | | |
177 | 183 | | |
178 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1133 | 1133 | | |
1134 | 1134 | | |
1135 | 1135 | | |
1136 | | - | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
1137 | 1141 | | |
1138 | 1142 | | |
1139 | 1143 | | |
| |||
1147 | 1151 | | |
1148 | 1152 | | |
1149 | 1153 | | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
1150 | 1157 | | |
1151 | 1158 | | |
1152 | | - | |
| 1159 | + | |
1153 | 1160 | | |
1154 | 1161 | | |
1155 | 1162 | | |
| |||
1166 | 1173 | | |
1167 | 1174 | | |
1168 | 1175 | | |
1169 | | - | |
| 1176 | + | |
1170 | 1177 | | |
1171 | 1178 | | |
1172 | 1179 | | |
| |||
1456 | 1463 | | |
1457 | 1464 | | |
1458 | 1465 | | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
1459 | 1472 | | |
1460 | 1473 | | |
1461 | 1474 | | |
1462 | 1475 | | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
1463 | 1484 | | |
1464 | 1485 | | |
1465 | 1486 | | |
1466 | 1487 | | |
1467 | | - | |
1468 | 1488 | | |
1469 | 1489 | | |
1470 | 1490 | | |
| |||
1571 | 1591 | | |
1572 | 1592 | | |
1573 | 1593 | | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
1574 | 1597 | | |
1575 | 1598 | | |
1576 | 1599 | | |
| |||
1893 | 1916 | | |
1894 | 1917 | | |
1895 | 1918 | | |
1896 | | - | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
1897 | 1924 | | |
1898 | 1925 | | |
1899 | 1926 | | |
| |||
2247 | 2274 | | |
2248 | 2275 | | |
2249 | 2276 | | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
2250 | 2284 | | |
2251 | 2285 | | |
2252 | | - | |
| 2286 | + | |
2253 | 2287 | | |
2254 | 2288 | | |
2255 | 2289 | | |
| |||
0 commit comments