Fix 3D browse-mode follow-ups from post-merge review of #253 - #255
Conversation
- Add SRI + crossorigin to the three and 3d-force-graph CDN loads - Restore the semantic depth layer (fz) when unpinning a focused node - Give nodes unreachable from the entry state a distinct fallback layer - Escape the profile title at the asd3dOverlay interpolation point - Remove dead code in open3D and the unused GRAIN_HALF constant - Warn that defogLinks/checkParticleArrivals rely on private internals - Add tests for the enable3d/theme branching and title escaping
|
@coderabbitai review |
|
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe 3D overlay now escapes profile titles, uses SRI-validated CDN loading, preserves semantic node depth during unpinning, assigns fallback depth layers, and refreshes the graph through the direct path. Tests cover 3D output, themes, and title escaping. Changes3D overlay security and generation
3D graph depth and refresh
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The PR hardens 3D asset loading and preserves node depth when unpinning, with focused tests and clean type checking; no actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant HtmlGenerator
participant ThreeModuleLoader
participant ThreeJsCDN
participant ForceGraphCDN
HtmlGenerator->>ThreeModuleLoader: Load verified Three.js module
ThreeModuleLoader->>ThreeJsCDN: Request module with SRI
ThreeJsCDN-->>ThreeModuleLoader: Return validated module
HtmlGenerator->>ForceGraphCDN: Load 3d-force-graph with SRI
ForceGraphCDN-->>HtmlGenerator: Return validated script
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2.x #255 +/- ##
===========================================
- Coverage 100.00% 91.62% -8.38%
===========================================
Files 11 14 +3
Lines 850 1027 +177
Branches 247 304 +57
===========================================
+ Hits 850 941 +91
- Misses 0 62 +62
- Partials 0 24 +24 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Addresses the should-fix items and nits from the post-merge review of #253.
Should-fix
loadScriptnow setsintegrity+crossorigin="anonymous"for the 3d-force-graph UMD. Three ≥0.179 ships no UMD build, so its ESM build is loaded as a module script with SRI (populating the SRI-verified module cache) and the existingimport()resolves from that cache.unpinNodediscards semantic depth:assignDepthLevelsstores__asd3dDepthFz;unpinNodeclears onlyfx/fyand restoresfzto the depth-derived layer.Nits
if (lastTagKey === null) refreshGraphData(true)inopen3D.GRAIN_HALF.defogLinks/checkParticleArrivalsrelying on 3d-force-graph private internals.maxDepth + 1) instead of depth 0.asd3dOverlayescapes the title at the interpolation point (defense in depth).Tests
Added
html-generator.test.tscovering theenable3d/themebranching and title escaping. Full suite: 128 tests pass;tsc --noEmitclean.Summary by CodeRabbit
Security
Bug Fixes
Tests