Skip to content

Conversation

@Stukova
Copy link
Member

@Stukova Stukova commented Jan 27, 2026

Added buffer checks to skip hover detection and prevent findHoveredLine() from executing before buffers are initialized

Summary by CodeRabbit

  • Bug Fixes
    • Improved hover detection reliability by preventing hover rendering until required rendering resources are initialized, avoiding spurious or missing hover responses.
  • Chores
    • Bumped package version to 2.6.4.
    • Added a prepublish step to run the build before publishing.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Stukova Olya <stukova.o@gmail.com>
@Stukova Stukova requested a review from rokotyan January 27, 2026 07:08
@coderabbitai
Copy link

coderabbitai bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

Added defensive precondition checks in findHoveredLine to return early when required buffers or curve geometry are not initialized, preventing hover-detection rendering. Also bumped package.json version from 2.6.2 to 2.6.4 and added a prepublishOnly script.

Changes

Cohort / File(s) Summary
Hover Detection Safety Guards
src/modules/Lines/index.ts
Added early-return checks in findHoveredLine for pointsBuffer, linkIndexFbo, linkIndexBuffer, colorBuffer, widthBuffer, arrowBuffer, and curveLineGeometry/curveLineBuffer to avoid running hover rendering when resources are not ready.
Package Metadata
package.json
Bumped version from 2.6.2 to 2.6.4 and added "prepublishOnly": "npm run build:vite" to scripts; adjusted script formatting.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I peek at buffers before I bound,
No stray renders making a sound.
Geometry ready, indices in cheer,
I hop on through—no crashes here. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main change: adding buffer precondition guards to prevent WebGL errors during link hover detection, which matches the primary code change in findHoveredLine.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Stukova Olya <stukova.o@gmail.com>
Signed-off-by: Stukova Olya <stukova.o@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants