Repository navigation
Reporting layer v1: scatter, dual-axis overlay, brush-zoom (#1606) - #1683
Merged
Merged
Conversation
The composer's charting gaps, closed as one coherent model extension: - overlay (second measure): same-source only, compiled as one more select expression over the same fact rows (the ratio two-operand precedent generalized) - never a join, never a parameter, one query. Validated by the exact aggregate/unit rulebook the primary uses (shared ResolveAggregateAndUnit helper), coherence-gated to scatter and ungrouped line/area, rejected elsewhere by name. - scatter viz: ranked, one point per group, x = primary (ORDER BY value DESC LIMIT topN), y = overlay's value2; hover titles + drill clicks; own renderer with dual nice-scaled axes. - dual-axis line/area: the overlay drawn against its own right-hand axis (own scale, unit caption, reserved color, dashed) - the right gutter is reserved only when an overlay is present, so overlay-less charts render byte-for-byte as before. - brush-zoom: pointer-capture drag on any time-series chart re-runs the panel on the brushed ABSOLUTE window; run endpoint gains windowStart/windowEnd (ISO-8601, precedence over hours, both-or- neither, start<end, 90-day ceiling, reject-not-clamp) - historical windows become first-class for MCP too. Zoom chip survives empty and error results. - NowUtc decoupled from EndUtc in ComposeRunContext: routing and the partial-window notice measure age from actual now, so a zoomed 30-to-25-days-ago window routes to the daily rollup (pinned). - CAGG AND-gate: one route serves both value expressions; either failing to remap sends the whole panel to raw. - Composer UI: Second-measure picker, scatter in the chart list, the five viz-coherence mirrors updated, overlay round-trips through descToComposedPanel/composedPanelToDesc (edit-and-save can never silently shed it). MCP catalog/tool prose updated (also fixes the stale stacked-bar omission). Tests: 9-case overlay rejection matrix, accept pins (scatter + ratio overlay), compile pins (AS value2, param-count invariance, scatter SQL shape, both-remap-or-raw, historical-window routing), 4-case absolute-window rejection matrix. Suite 3140/0; live-gated vs fresh plain PG 3268/0. Closes the charting item of #1606. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
erikdarlingdata
enabled auto-merge
July 26, 2026 15:30
This was referenced Jul 26, 2026
Compose: HardRowCap truncation on time series silently keeps the OLDEST slice and says nothing
#1687
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The charting item of #1606, re-prioritized: "investment in reporting layer is crucial."
What's new
overlay) — a panel can carry one more same-source measure. It compiles as a second select expression (AS value2) over the same fact rows — the ratio two-operand precedent generalized: never a join, never a parameter, one query. Same aggregate/unit rulebook as the primary (extracted into a shared helper so the two can't drift); coherence-gated to scatter and ungrouped line/area, rejected everywhere else by name./api/compose/run(and therefore MCPrun_custom_view_panel) gainswindowStart/windowEnd: ISO-8601, precedence overhours, both-or-neither, start<end, 90-day ceiling, reject-not-clamp. Historical analysis becomes first-class.ComposeRunContext.NowUtcseparates "when is now" from "when does the window end": routing and the retention notice measure age from actual now. Pinned: a 30→25-days-ago window routes to the daily rollup.Design + review
Plan reviewed adversarially by a separate tech-lead agent before implementation; all findings adopted (overlay coherence outside ValidateVizMode's table early-return, editor mirror threading, reject-not-clamp window semantics, zoom-chip-on-empty, param-order invariance pin,
pivotTimeSeriesvalue2 wiring,otherColumnsexclusion).Testing
AS value2, parameter-count invariance with/without overlay, scatter SQL shape (ORDER BY value DESC + bound LIMIT), both-remap-or-raw on the rollup route, historical-window NowUtc routing.🤖 Generated with Claude Code