Polish treemap view in vortex explorer#8613
Conversation
6f08e27 to
2bde076
Compare
Merging this PR will not alter performance
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | chunked_varbinview_into_canonical[(1000, 10)] |
168.9 µs | 205.5 µs | -17.81% |
| ❌ | Simulation | slice_empty_vortex |
339.4 ns | 397.8 ns | -14.66% |
| ⚡ | Simulation | chunked_bool_canonical_into[(1000, 10)] |
26.9 µs | 16.7 µs | +60.92% |
| ⚡ | Simulation | chunked_varbinview_canonical_into[(100, 100)] |
259.5 µs | 224.4 µs | +15.64% |
| ⚡ | Simulation | chunked_varbinview_into_canonical[(100, 100)] |
306.8 µs | 271.5 µs | +13.01% |
| ⚡ | Simulation | bitwise_not_vortex_buffer_mut[128] |
273.6 ns | 244.4 ns | +11.93% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing claude/stoic-brown-5pzm5s (28f77da) with develop (00c39e8)
Footnotes
-
4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
a6a3616 to
68ca1f7
Compare
0ax1
left a comment
There was a problem hiding this comment.
codex:
• Findings
- Medium: vortex-web/src/components/explorer/BlockTreemap.tsx:158 leaves selfSelected.current stale after a treemap-originated selection. After clicking tile A, selecting another node externally, then selecting A externally again, the effect treats
A as self-originated and refuses to re-root the treemap. The marker set at vortex-web/src/components/explorer/BlockTreemap.tsx:268 should be one-shot: clear it when it matches, and also clear it before handling a non-matching external selection.
|
@claude in depth review |
|
Claude finished @0ax1's task in 2m 25s —— View job In-depth review — Polish treemap viewReviewed the full diff (9 files, +673/−350). This is a clean refactor: the old 🔴 Correctness — confirming the codex finding (the one real bug)
The ref is meant to distinguish "the map selected this" from "something external selected this," so only external selections re-root the zoom. But it's a write-once latch that's never reset. Trace:
The marker needs to be one-shot: clear it the moment it's consumed. The minimal fix is in the effect: useEffect(() => {
if (!selectedNodeId) return;
if (selectedNodeId === selfSelected.current) {
selfSelected.current = null; // consume the one-shot marker
return;
}
selfSelected.current = null; // external selection: don't let a stale marker linger
setDrillId(selectedNodeId);
const node = findNodeById(root, selectedNodeId);
if (node && isFlatLayout(node) && !node.children.some((c) => c.isArrayNode)) {
onExpand?.(node.id);
}
}, [selectedNodeId, root, onExpand]);I checked the interaction with the async 🟡 Minor / nits (non-blocking)
✅ Things that look good
Re: "No preview deploy?"That's outside the diff — this PR doesn't touch CI/preview-deploy config, so I can't tell from the changed files whether a preview should have been produced. If the preview workflow is expected for I did not run |
|
Addressed the review in
Ran Generated by Claude Code |
Signed-off-by: Robert Kruszewski <github@robertk.io>
5e5d5f9 to
28f77da
Compare
Polish treemap view in vortex explorer