-
Notifications
You must be signed in to change notification settings - Fork 30
Fix loading adHocMeshes from dataset view mode #8903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughReplaced dataset path construction in the ad-hoc mesh saga to use Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks (3 passed)✅ Passed checks (3 passed)
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
✨ Finishing Touches🧪 Generate unit tests
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
frontend/javascripts/viewer/model/sagas/meshes/ad_hoc_mesh_saga.ts (2)
445-446: Defensive check: ensure dataset.id is present when using the data storeLooks good to switch to IDs. To avoid silent 404s if state.dataset.id is missing in some view modes, add a lightweight assertion gated by useDataStore.
const datasetId = yield* select((state) => state.dataset.id); + // Required only for data-store backed requests + yield* call( + [ErrorHandling, ErrorHandling.assert], + !useDataStore || datasetId != null, + "dataset.id is required to request ad-hoc meshes from the data store.", + );
447-449: URL-encode path segments (datasetId, layer) and normalize base URLPrevents edge-case breakage for uncommon IDs or layer names and avoids double slashes.
- const dataStoreUrl = `${dataStoreHost}/data/datasets/${datasetId}/layers/${ - layer.fallbackLayer != null ? layer.fallbackLayer : layer.name - }`; + const base = dataStoreHost.replace(/\/+$/, ""); + const layerSegment = encodeURIComponent(layer.fallbackLayer ?? layer.name); + const dataStoreUrl = `${base}/data/datasets/${encodeURIComponent(String(datasetId))}/layers/${layerSegment}`;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
frontend/javascripts/viewer/model/sagas/meshes/ad_hoc_mesh_saga.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
frontend/javascripts/viewer/model/sagas/meshes/ad_hoc_mesh_saga.ts (1)
app/models/job/Job.scala (1)
datasetId(55-55)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: frontend-tests
- GitHub Check: build-smoketest-push
- GitHub Check: backend-tests
Follow-up fix for #8708 (request must be by id now)
URL of deployed dev instance (used for testing):
Steps to test:
Issues:
$PR_NUMBER.mdfile inunreleased_changesor use./tools/create-changelog-entry.py)