Repository navigation
Graphlink advanced visualization: ChartSpec V2, linked brushing, data-verified branches and scientific layers - #1057
Conversation
dovvnloading
left a comment
There was a problem hiding this comment.
Review — changes needed before merge
Reviewed the chart canonicalization, analysis and rendering paths, statistical helpers, sampling and regression coverage at 12a53d33. Three correctness findings:
[P1] Zoom can erase a valid line segment or connect unrelated visible vertices. web_ui/src/app/canvas/charts/scientificSampling.ts:17–25 filters all vertices outside the X viewport before ScientificChartMarks.tsx:178–182 constructs a single path. Reproduced the actual selection branch with x=[0,10], y=[0,10], viewport x=[4,6], y=[0,10], kind=line: it returns [] even though the diagonal crosses the visible rectangle. The previous full path plus clipPath showed the crossing. For lines, retain segment endpoints at viewport boundaries and preserve path breaks where a nonmonotonic series exits/re-enters; do not connect separated runs across omitted data. Add crossing-with-no-visible-vertex, boundary and nonmonotonic zoom tests, including the pre-existing <=300-observation case.
[P1] Precise axis ranges fail whenever OLS or hexbin is enabled. web_ui/src/app/canvas/charts/ChartAnalysisPane.tsx:252–255 calls canonicalizeChartAnalysis without its new data parameter. The regression and density validation in chartSpec.ts:190–215 explicitly requires data, so Apply ranges throws even with valid bounds. Pass chartData, as the commit path already does, and exercise Apply ranges with each mode enabled, including locked ranges.
[P2] Composite color legend can omit valid categories. CompositeChartMarks.tsx:120 truncates the global palette legend to the first eight values. The canonicalizers allow eight groups independently per colorBy field, so two layers using distinct categorical fields with eight disjoint labels each are valid, but eight labels are omitted and colors may repeat. Bound the union or define explicit field-aware color/legend semantics; add a multi-layer, multi-field fixture and check consistent labeling in publication exports.
CI for this head is still running, including scientific and MCP browser checks. POSIX has passed. Do not merge until these findings are addressed and the resulting head passes all checks. This is a review comment rather than a formal request-changes review because the connected account is the PR author. No changes to the branch or CI gates.
…ends Keep scientific line connectivity independent of sampled point markers, pass chart data into precise-range validation, and enforce one field-aware eight-slot legend in both canonicalizers and renderers. Add interaction, rendering, export and validation regressions.
dovvnloading
left a comment
There was a problem hiding this comment.
Follow-up to the three review findings: fixed on 7ea3c2d (11 files). P1 line rendering now keeps the connected full-source path and uses the existing SVG clip path; the 1,200-glyph budget remains for interactive point/error marks. P1 precise-range validation now receives chartData, including with OLS/hexbin and locked axes. P2 both canonicalizers enforce eight shared color/legend slots across the figure, including ungrouped layers; distinct (field, value) pairs receive distinct identities, repeated bindings reuse a slot, and the live and publication renderers share that ordering. The legend has dedicated space instead of truncating entries. Added React interaction and backend export/validation regression tests and updated docs. Nine isolated checks against committed source passed (geometry, palette identities/limit, and range wiring). Full repo tests were not run locally: the environment cannot resolve github.com to clone the project. Fresh CI/browser checks are required on this head before merge. No CI gates changed.
dovvnloading
left a comment
There was a problem hiding this comment.
Merge-readiness review
Reviewed the latest head 03e53b537a005fdc4f7354011512a941ecefcd96, concentrating on canonicalization, scientific rendering/export, source-row branching, persistence, and the three earlier review findings. The full connected scientific line path now survives viewport clipping; exact-range validation receives chart data for OLS/hexbin; and both canonicalizers enforce a shared field-aware eight-slot palette. The backend derives branches from canonical source rows, rejects stale snapshots and invalid indices, and records undoable commands. The new regressions cover these paths and generated wire compatibility.
Verified the four required CI jobs passed (Windows Python including compile/lint/pytest/performance and audit, frontend including schema/type/lint/Vitest/build, isolated wheel build, and POSIX checks), plus scientific-workbench and MCP Connect Chromium workflows. The nightly-only boot-smoke was skipped as designed. Main has eight intervening commits with no overlapping changed file paths; GitHub reports a clean merge and no unresolved review threads.
Non-blocking follow-up: scientific scatter sampling tests viewport inclusion using observation centers, so error bars whose centers are outside a zoomed viewport may no longer appear even if an uncertainty interval crosses the boundary. Underlying values and publication data are not lost; consider a dedicated clipping/sampling regression for this edge case. This is a targeted static review using the existing CI evidence, not a fresh native desktop run (checkout is blocked by DNS in this environment). No CI gates changed. I am recording a comment rather than self-approving because the connected account is the PR author. The stated CI prerequisite is satisfied; proceeding with the authorized squash merge if GitHub still permits it.
Graph-native linked brushing and source-row chart branching
scene.branchCompositeSelectioncommand creates the derived chart and its source relationship. Save/load now resolves chart-to-chart parent IDs, preserving graph lineage across reloads. Invalid or stale selections create nothing.Additional: editable and recommended composite figures
scene.setCompositeDesignintent validates layers against immutable original data, checks expected previous design to reject stale saves, supports undo/redo, and never accepts client changes to numeric or categorical arrays.New: ChartSpec V2 — composable multi-panel figures
scene.generateChartintent.Implemented — advanced scientific visualization (first major tranche)
Actual code, not mocks or design proposals.
Behavior and correctness
Original observations and persisted source data are never mutated by these view layers. Existing chart types and default visualization stay unchanged until a layer is opted in. New mode choices persist through the existing undoable chart-analysis intent, and export uses stored source data.
Regression intervals assume independent, homoscedastic residuals and are pointwise mean-response intervals, not prediction intervals, and do not use measurement error as weights. Raincloud density widths are relative within a group, not cross-group mass. Heatmap Euclidean distances are unit-sensitive. SVG representative sampling is visualization-only; hexbin explicitly communicates density.
Review and CI
feat/advanced-scientific-chart-layersbuilds onmain; draft / do not merge until CI is green.