Repository navigation
feat(aggregation): mask HeatmapLayer source points - #11208
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a118275fa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
[Medium impact] The PR appears safe to merge based on this follow-up review. SummaryAdds heatmap masking for source points or the final rendered surface, with weight updates after mask changes.
Reviews (10) · Last reviewed commit: "Update heatmap domain test for draw-time..." · Reviewed by Greptile |
d96da95 to
47d1c8f
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 65a84f6. Configure here.
chrisgervang
left a comment
There was a problem hiding this comment.
Reviewed 34fb53e after merge; follow-ups below.
No P1s.
Labels: P1 settle before this is merged, P2 can follow, Non-blocking optional.
Generated by Claude Code
| ### Heatmap filtering | ||
|
|
||
| - `DataFilterExtension` filters the points that contribute to `HeatmapLayer` on WebGPU. | ||
| - `MaskExtension` limits the source points that contribute to a heatmap. Set `maskByInstance: false` to clip the rendered heatmap. |
There was a problem hiding this comment.
P2: The HeatmapLayer behavior is only described in whats-new. The maskByInstance entry in mask-extension.md says it is "automatically deduced from the layer type", which does not tell a reader that a heatmap masks source points unless the prop is false.
Could we add that sentence to the maskByInstance entry and link the whats-new bullet to #maskbyinstance?
Generated by Claude Code
| goldenImage: './test/render/golden-images/heatmap-lnglat.png' | ||
| }, | ||
| { | ||
| // Golden: the polygon hole clips the entire display quad contribution. |
There was a problem hiding this comment.
Non-blocking: This golden is empty, so the case also passes if the heatmap draws nothing. Could the hole cover half the blob, so the golden shows a clipped edge?
Generated by Claude Code
| // debugFBO(this.maskMap, {opaque: true}); | ||
| const channelRemoved = | ||
| previousMasks && Object.keys(previousMasks).some(id => !this.masks?.[id]); | ||
| this._updateMaskedAggregations(layers, didRender || Boolean(channelRemoved)); |
There was a problem hiding this comment.
Non-blocking: A mask larger than twice the viewport makes the masked heatmap reaccumulate every point on each pan frame. Could the refresh skip frames where only the mask texture bounds moved?
Details
getRenderBoundsclips large masks to the padded viewport, sodidRenderis true on every pan.- The unmasked heatmap reuses its texture until the view leaves
worldBounds.
Generated by Claude Code
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.

Background
Refreshes the approach in #7397 against the current Heatmap and MaskEffect. Stacked on #11207 for the shared weight pass changes.
Change List
Verified: lint, 207 node tests, package build before the final fixture update, and masked and filtered render comparisons.
Note
Medium Risk
Modifies render pass orchestration between
MaskEffectandHeatmapLayerweight accumulation and updates shader filtering hooks. Scope is largely contained to masked aggregation rendering and is backed by new render tests.Overview
Adds support for
MaskExtensioninHeatmapLayer, allowing source points that contribute to the heatmap's weight accumulation pass to be filtered by mask geometry. SettingmaskByInstance: falsealso enables clipping the final rendered heatmap display quad instead of filtering individual source points.Updates
MaskEffectto refresh masked aggregation layers whenever mask channels or boundaries change, ensuring weight textures regenerate once mask render targets are ready. In addition, weight and display shaders now hook into position and color filtering, andTriangleLayerevaluates its color domain dynamically at draw time.Reviewed by Cursor Bugbot for commit 34fb53e. Bugbot is set up for automated code reviews on this repo. Configure here.