fix(embed): explicit loading states until model is displayed - #736
Merged
Merged
Conversation
Embed marked ready as soon as project source arrived, so ChatGPT iframes showed an empty canvas. Track Project saved → Building geometry → Loading mesh → Model displayed (or Build/Viewer failed + Retry). FunnelViewer reports phases; DisplayReadySensor requires nonempty geometry, camera fit, and a submitted frame. Optional ?meshUrl= hooks Phase 3 artifacts.
react-refresh/only-export-components failed because DisplayReadySensor.tsx exported both the helper and the component. Move the helper to its own module and keep FunnelViewer/tests importing from there. react-hooks/refs failed on assigning onReadyRef.current during render; sync the callback via useEffect, matching useParamUpdate. Signed-off-by: Andrii Shylenko <14119286+w1ne@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/embed/$slugsetreadyas soon as source downloaded, so ChatGPT’s Studio viewer iframe looked “done” while geometry was still building (or failed) — empty canvas.DisplayReadySensoronly fires after nonempty geometry + camera fit window + submitted frames (iframeloadis not enough).?meshUrl=+ FunnelViewermeshUrlprop scaffold Phase 3 artifact loading (still executes source today).Pairs with server PR: https://github.com/w1ne/kernelCAD-server/pull/129
Test plan
DisplayReadySensornonempty geometry unit tests/embed/<slug>— status progresses; never leaves empty canvas as completePhase 3
Design note:
docs/phase3-versioned-mesh-artifact.md. Full evaluate-once artifact pipeline left for a follow-up (keep OCCT mutex).