fix: disable globe rotation while it is loading#34
Conversation
📝 WalkthroughWalkthroughUpdated the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@app/src/lib/components/globe/Globe.svelte`:
- Around line 51-52: The globe's rotation is permanently disabled because
enableRotate depends only on isLoaded and the texture-loading promise (the code
that sets isLoaded inside the texture load) can reject or hang; wrap the async
texture/load logic in a try/catch/finally (or attach .catch and .finally) so
that isLoaded is always set in finally to release the rotation lock, and in the
catch set a load failure flag or apply a fallback texture (e.g., set loadFailed
= true or use a default texture) so the UI can still enable rotation via
enableRotate={isLoaded || loadFailed} (reference isLoaded, enableRotate and the
texture-loading block to locate the changes).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 66c6e60f-1be8-4e57-b680-05eb1b274729
📒 Files selected for processing (1)
app/src/lib/components/globe/Globe.svelte
Closes #32
Summary by CodeRabbit
Release Notes
Bug Fixes