Uh oh!
There was an error while loading. Please reload this page.
fix(plugin-charts,plugin-dashboard): a scatter ignores compareTo, exactly as pie / donut / funnel do - #7498
Conversation
…pie/donut/funnel do
A `chartType: 'scatter'` chart — and the dashboard widget types `scatter` and
`bubble`, which both map onto it — synthesised a muted "previous period"
overlay series when `compareTo` was set. A scatter binds ONE measure and the
renderer reads y through the single `YAxis dataKey={series[0].dataKey}`, so
that overlay was plotted on the PRIMARY series' y: the previous period was
painted exactly on top of the current one (#7194).
Ruling on #7402 (maintainer, 2026-09-03): remove the published capability
rather than keep drawing that picture. `supportsCompareTo` in ObjectChart and
the DatasetWidget chart path now exclude scatter exactly as they exclude
pie / donut / funnel, so the primary draws, no `__comparison` / `__compare`
series is synthesised, and a compare-to document never reaches the
two-or-more-series scatter refusal of #7194. It returns with the multi-measure
projection recorded as option A of #7194.
`packages/plugin-dashboard/SKILL.md` — the current-tense published statement of
which families ignore `compareTo` — is updated. The historical CHANGELOG entry
that first published the list is left as written.
One pin per path plus a mandatory `bar` control that still gets its overlay;
without the control a regression suppressing every comparison series would
pass every new assertion.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMrWaQw3XS5DxTHxp4yRyC✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
os-project-manager
commented
Sep 3, 2026
Clause-② in-seat contract review — PASSCommissioned by the Tier verification (维护者 2026-08-27 裁定 — a commissioned review is legitimate only if verified): every harness-stamped Contract review — objectui PR #7498 (head |
os-project-manager
commented
Sep 3, 2026
✅ Landing — contract review PASS, 32/32 green, ready + auto-merge
The reviewer's own landing condition was wait for
|
| carrier | labels |
|---|---|
| PR #7498 | plugin, plugin: charts, tests |
| card #7402 | pm:dispatched |
The protocol has the PR creator hang needs:contract-reviewwith the reviewable contract increment, and Clause-②: yes was declared here in the body and in the claim comment. The label was not applied, so condition ② is satisfied only trivially — the gate never existed to be passed.
⛔ I am not treating that as equivalent to a cleared gate. The substance is satisfied: an isolated reviewer at CONTRACT_REVIEW_TIER reviewed this increment and returned PASS, which is what the label exists to force. But this is the second carrier defect this lane has hit today — the first was PR #7491, where the card-side Clause-② declaration was machine-invisible because no comment matched the claim marker. Two different failures, same class: the declaration was made and the mechanism that reads it was not fed.
scripts/pm/check-clause2-carriers.mjs exits 2 in this session (it needs its own GitHub token; this seat reaches GitHub only through MCP, and its own output says that is not a clearance). Both carrier readings here are manual, and a manual reading covers strictly less than the tool. Naming that so the next seat knows which instrument was used.
⭐ The review corrected me, and I have taken the correction
On #7402 I ruled the CHANGELOG question option A and recorded it as "deviating from the ruling's literal word," flagging it for the director to object to. The reviewer showed there is no deviation: the ruling says the plugin-charts CHANGELOG statement becomes the new sentence, and this PR's changeset compiles into packages/plugin-charts/CHANGELOG.md at the next release — which is exactly how the sentence it replaces got there. The ruling is satisfied by mechanism, not worked around. I am correcting that on #7402 rather than leaving a false self-accusation on the record.
Its carrier sweep for that question was also wider than the one I accepted — content/**, docs/**, skills/**, package READMEs, JSDoc in types and core, plus three broader phrasings, each checked independently — and the implementer's "SKILL.md is the only current-tense carrier" claim holds on that stronger basis.
One optional note deliberately NOT required
The reviewer observed the changeset's "Charts that keep the overlay: line, area, bar, horizontal-bar, combo" reads as exhaustive while radar also draws the appended series. ⛔ Not required as an amendment: that imprecision is inherited from the pre-PR SKILL.md:24 sentence, not introduced here, and widening this PR to correct inherited copy is the scope creep the lane exists to avoid. Recorded so it is a known, chosen gap rather than an unnoticed one.
Housekeeping
The reviewer left /home/user/objectui-review-7498 in place (detached worktree, installed, closure built). It is a session-local scratch tree on a shared container — whoever next needs the disk can remove it; nothing depends on it.
Generated by Claude Code
Uh oh!
There was an error while loading. Please reload this page.
Fixes#7402
Clause-②: yes— a published behaviour statement changes, so this PR stays draft, is not enqueued and has no auto-merge: thedomain:uiseat runs its in-seat contract review before it lands.Implements the maintainer ruling recorded on #7402 (comment 5523068497, 2026-09-03, verbatim 「同意」): (b) —
compareToon ascatteris not supported, and scatter joins pie / donut / funnel on the ignore list.What changed
packages/plugin-charts/src/ObjectChart.tsxsupportsCompareToexcludesscatteras well as pie / donut / funnel. The comparison fetch is skipped entirely, so noMEASURE__comparisoncolumn exists andaugmentedSeriesnever appends the overlay.packages/plugin-dashboard/src/DatasetWidget.tsxchartIgnoresCompareTo(chartType === 'scatter'), which suppressescomparisonSeries. Written against the CHART type, so it covers both widget-type spellings —scatterandbubbleboth map tochartType: 'scatter'throughCHART_TYPE_MAP.packages/plugin-dashboard/SKILL.mdcompareTo, in both places it appears..changeset/7402-scatter-ignores-compareto.mdminoron both packages, stating plainly that a published capability is removed and naming the condition for its return.A compare-to document therefore never reaches the two-or-more-series scatter refusal of #7194 — the primary draws, and nothing is refused. #7194 remains open and is unaffected by this PR.
Why removal rather than a refusal
A scatter binds ONE measure and the renderer reads y through the single
YAxis dataKey={series[0].dataKey}, so the synthesised overlay was plotted on the primary's y: "previous period" painted exactly on top of "current". Drawing it honestly needs the multi-measure projection recorded as option A of #7194, which is not built. Per the ruling the capability is removed until that projection arrives, and returns with it — one payment, no transition. A refusal was rejected because it names a key the author never wrote and loses the correctly drawn primary too.Verification (all figures observed on
b68c77a17, on a SHARED container — heavy runs went through this box's verify lock, so wall-clock absolutes are contended readings)pnpm exec vitest runfrom the repo root over the two new files: 2 files passed, 6 tests passed.pnpm exec vitest run --maxWorkers=2 packages/plugin-charts/ packages/plugin-dashboard/from the repo root: 131 files passed, 1208 tests passed, 0 failed (216s).origin/main(20cb8db9b) over the new tests: 4 failed | 2 passed. Red: both scatter pins in plugin-charts and thescatter+bubblecases in plugin-dashboard. Green: the twobarCONTROLS — which is the point of having them, since a regression that suppressed every comparison series would otherwise satisfy every new assertion. The mutation was proven on disk before the run (blob hash moved from92a0b536/0189be13, anchored grep counts1/2→0/0, pre-fix text back at1/1); the restore was proven by state afterwards (blob hashes equal HEAD's again,git diff HEADempty), undertrap … EXIT INT TERMwith absolute paths.pnpm --filter @object-ui/plugin-charts --filter @object-ui/plugin-dashboard run type-check: bothDone, exit 0. Both new test files were confirmed to be IN the checked program (tsc --listFiles, 1 hit each) rather than assumed to be.no-explicit-any/no-unused-varsbaseline in files this PR does not touch. Narrowed to the two changed packages deliberately: the file set comes from eslint's own flat config, the count from--format json, and the config enables no type-aware linting (noparserOptions.project/projectService), so this diff cannot move the verdict on any file it does not touch.check:control-bytes(6160 files),check:vi-mock-specifiers,check:vi-mock-inherit(123/123@object-ui/reactcall sites inherit),check:doc-fences,check:skills-paths,check:shell-escape-residue,check:changeset-presence,check:changeset-no-major: all exit 0, each read off the gate's own verdict line.Two judgment calls, surfaced rather than decided quietly
1. The historical
CHANGELOG.mdline is left as written.packages/plugin-charts/CHANGELOG.md:1727is generated by changesets and records what a released version did; editing it rewrites history that was true when it shipped. The same sentence also sits in three other packages' CHANGELOGs (types,core,plugin-dashboard) — all historical fan-out of one changeset, all left alone. The current-tense publication of that list turned out to bepackages/plugin-dashboard/SKILL.md, which is updated here in both places, and the new statement is carried into the next release notes by this PR's changeset. Nothing was silently rewritten.2.
comparisonStyle(s, 'scatter')(AdvancedChartImpl.tsx:92, call site :1758) is NOT dead, so it stays.variantis an authorable series key on the chart schema, read from raw input innormalizeChartSchema.ts:247and from authoredchartConfigin@object-ui/core'schart-presentation.ts:125. A hand-authoredchartType: 'scatter'withseries: [{ dataKey, variant: 'comparison' }]reaches that branch directly, and being a single-series chart it is not caught by #7194's refusal either. What this PR removes is only the SYNTHESISED overlay; the authored spelling is untouched.Filed, not fixed here
#7495 — the
compareTochart-family exclusion list now exists in two places and disagrees:DatasetWidgetstill runs the comparison query and appends an unused overlay series for pie / donut / funnel (the renderer drawsseries[0]only, so nothing is mis-drawn). Out of this card's declared scope; that one wants its own decision because it changes dashboard behaviour for three more families.Reachability at the time of the change
0 authored scatter/bubble instances in-repo across both spellings, and no
compareToat all inexamples/**/*.json; control"type": "bar"fires at 5 example files. Incidence in deployed tenant metadata is not measurable from this repo.🤖 Generated with Claude Code
https://claude.ai/code/session_01EMrWaQw3XS5DxTHxp4yRyC
Generated by Claude Code