fix(canvas): harden Safari WebGL and video playback - #452
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
| useEffect(() => { | ||
| if (worker) { | ||
| worker.postMessage({ | ||
| type: "update-contact-open", | ||
| isContactOpen: isContactOpen | ||
| }) | ||
| } | ||
| }, [worker, isContactOpen]) | ||
| if (!worker || !sceneReady) return | ||
|
|
||
| worker.postMessage({ | ||
| type: "update-contact-open", | ||
| isContactOpen: isContactOpen | ||
| }) | ||
| }, [worker, sceneReady, isContactOpen]) |
There was a problem hiding this comment.
Readiness gate leaves direct sends open
When contact is opened or closed before ContactScene installs its worker listener, the store sends update-contact-open directly without waiting for sceneReady. The message is dropped after isAnimating is set, leaving contact interaction stuck until another state change.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/contact/contact-canvas.tsx
Line: 191-198
Comment:
**Readiness gate leaves direct sends open**
When contact is opened or closed before `ContactScene` installs its worker listener, the store sends `update-contact-open` directly without waiting for `sceneReady`. The message is dropped after `isAnimating` is set, leaving contact interaction stuck until another state change.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
Validation
pnpm build