Retain a covering M4 overview during line refinement - #362
Conversation
|
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 (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthrough
ChangesDecimated coverage fallback
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant decimate_view
participant tier_update
participant ChartView
decimate_view->>tier_update: include normalized x_range
tier_update->>ChartView: install refined buffers and record coverage
ChartView->>ChartView: compare current view with _decimatedWindow
ChartView->>ChartView: draw home geometry when coverage is exceeded
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@js/src/50_chartview.ts`:
- Around line 4061-4072: Normalize the viewport bounds returned by
_axisRange(g.xAxis) before comparing them with the normalized _decimatedWindow
range. Update the refined-coverage check in the decimated rendering branch so
reversed views such as [100, 0] are evaluated using their lower and upper
bounds, preserving overview rendering whenever the normalized viewport extends
outside r.
In `@python/xy/interaction.py`:
- Around line 474-477: Transport the served x-range through the established
raw-f32 buffer-reference path instead of embedding [lo_x, hi_x] in JSON. Update
python/xy/interaction.py:474-477 to emit the buffer reference; update
tests/test_channel.py:44-44 to assert the decoded binary range; update
js/src/54_kernel.ts:779-781 to decode that buffer before assigning
_decimatedWindow; and document the binary served-window encoding and fallback
semantics in spec/design/lod-architecture.md:356-360.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 43920446-af50-41cc-bcc4-03e3be3a17c3
📒 Files selected for processing (5)
js/src/50_chartview.tsjs/src/54_kernel.tspython/xy/interaction.pyspec/design/lod-architecture.mdtests/test_channel.py
Merging this PR will not alter performance
Comparing Footnotes
|
_axisRange preserves axis direction while the served x_range arrives normalized, so a reversed axis view compared raw hi-before-lo bounds against the normalized window and treated a partial refinement as covering. Compare normalized [lo, hi] on both sides; record the rule in the LOD spec (T1).
Motivation
never blank) described a density covering fallback but the decimated tier lacked an equivalent retained overview, creating a spec/implementation mismatch.Description
x_rangemetadata to M4/tier replies inpython/xy/interaction.pyso the client knows the exact window each decimation reply served.g._homeDecimated,g._decimatedWindow, andg._decimatedRefinedinjs/src/50_chartview.ts, and draw the retained overview whenever the active refined window does not cover the current view.js/src/54_kernel.ts(so the initial covering geometry is not destroyed by the first refinement) and record the repliedx_rangeon the client-side trace object._deleteVaos,_deleteBuffers, and_destroyTraceResources) and update the LOD design doc (spec/design/lod-architecture.md) to document the T1/T8 behavior for decimated traces.tests/test_channel.pyto assert that decimation replies include thex_rangefield (transport contract change).Testing
node js/build.mjs, which completed successfully and produced the minified client bundles.uv run pytest tests/test_channel.py tests/test_figure.py -q, which completed successfully for the targeted tests.uv run ruff check .anduv run ruff format --check ., both of which passed.uv run --with pre-commit pre-commit run --all-files) could not be executed in this environment due to PyPI access being unavailable, but Ruff hooks were exercised directly and passed.python3 scripts/smoke_render.py) could not be executed in this environment because no Chromium binary is available, so an end-to-end headless render probe was not run here.Fixes #352
Summary by CodeRabbit
Summary by CodeRabbit
Bug Fixes
New Features
x_rangeto support more reliable coverage checks.Tests
x_rangein tier update payloads.Documentation