Skip to content

Fix v-b-tooltip DOM node leak in grid components (#1093)#1099

Merged
Tim020 merged 5 commits into
devfrom
feature/fix-1093-tooltip-leak
May 26, 2026
Merged

Fix v-b-tooltip DOM node leak in grid components (#1093)#1099
Tim020 merged 5 commits into
devfrom
feature/fix-1093-tooltip-leak

Conversation

@Tim020
Copy link
Copy Markdown
Contributor

@Tim020 Tim020 commented May 26, 2026

Summary

  • Replaces per-cell v-b-tooltip in ResourceAvailability.vue, SceneDensityHeatmap.vue, and MicAllocations.vue with a single shared BTooltip component per parent, driven by @mouseenter/@mouseleave
  • Adds src/composables/useHoverTooltip.ts to manage the shared target/text/visible state
  • Eliminates the N×M DOM node leak in ResourceAvailability (scenes × mics) and linear leaks in the other two components — DOM node count is now independent of data size
  • Tooltip appearance and positioning are identical to stock v-b-tooltip as BTooltip uses BVN's own floating-ui logic

Test plan

  • Browser verified: all three tooltips show correct dark BVN-styled tooltip anchored to the hovered element
  • DOM node count remains constant on hover (4 total, 1 shown, same 4 after mouseleave)
  • 151/151 Playwright E2E tests pass
  • npm run ci-lint clean
  • npm run typecheck clean

🤖 Generated with Claude Code

Tim020 and others added 3 commits May 26, 2026 19:28
BVN's v-b-tooltip directive teleports a persistent DOM node to <body>
for every bound element, causing quadratic growth in ResourceAvailability
(scenes × mics) and linear growth in SceneDensityHeatmap and MicAllocations.

Replace per-cell v-b-tooltip with a single shared BTooltip component per
parent driven by @mouseenter/@Mouseleave — one DOM node regardless of row
count, identical appearance and positioning via BVN's own floating-ui logic.
A useHoverTooltip composable manages the shared target/text/visible state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Keep feature branch implementation across all three mics components and
the useHoverTooltip composable, discarding the revert that dev carried.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added small-diff Small pull request client-v3 labels May 26, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

Client V3 Test Results

23 tests  ±0   23 ✅ ±0   0s ⏱️ ±0s
 2 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 0e6e03a. ± Comparison against base commit a1bf340.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

Client Test Results

128 tests  ±0   128 ✅ ±0   0s ⏱️ ±0s
  6 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 0e6e03a. ± Comparison against base commit a1bf340.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

Python Test Results

  1 files  ±0    1 suites  ±0   1m 31s ⏱️ -8s
611 tests ±0  611 ✅ ±0  0 💤 ±0  0 ❌ ±0 
616 runs  ±0  616 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 0e6e03a. ± Comparison against base commit a1bf340.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

Playwright E2E Results (chromium)

151 tests  ±0   151 ✅ ±0   1m 27s ⏱️ -1s
 14 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 0e6e03a. ± Comparison against base commit a1bf340.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

Playwright E2E Results (firefox)

151 tests  ±0   151 ✅ ±0   1m 33s ⏱️ ±0s
 14 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 0e6e03a. ± Comparison against base commit a1bf340.

♻️ This comment has been updated with latest results.

Tim020 and others added 2 commits May 26, 2026 22:59
The composable was called in script setup but never imported, causing
ReferenceError at runtime. Added explicit import to all three components.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…onents

The merge conflict resolution had kept the old v-b-tooltip directive in
the templates while only adding the useHoverTooltip script bindings.
BVN's v-b-tooltip renders an inline node per bound element which, inside
a CSS grid, occupies a grid cell and produces the staggered empty-column
layout. Replaced all three remaining v-b-tooltip usages with the
@mouseenter/@Mouseleave pattern that drives the shared BTooltip instance.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@Tim020 Tim020 enabled auto-merge (squash) May 26, 2026 22:05
@Tim020 Tim020 merged commit a5fa500 into dev May 26, 2026
35 checks passed
@Tim020 Tim020 deleted the feature/fix-1093-tooltip-leak branch May 26, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client-v3 small-diff Small pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

V3 UI: ResourceAvailability leaks duplicate BVN tooltip DOM nodes per reactive render

1 participant