Repository navigation
Analytics: keep bars stacked with target lines - #9565
builder-factory wants to merge 5 commits into
Conversation
Visual recap — generation failedRecap authentication failed — |
|
The combo renderer still applies the existing rounded-corner styling to each bar, so interior segments can indeed be rounded. I am leaving that cosmetic behavior unchanged in this PR: choosing the outermost segment correctly depends on each row, axis, sign, and hidden series, and changing it would broaden the rendering fix beyond the reported stacking regression. The existing browser verification covers stacking and target lines; it did not specifically validate corner treatment. |
There was a problem hiding this comment.
Builder reviewed your changes and has a few items to flag 🟡
Review Details
Incremental Review Summary
The latest PR head adds the @agent-native/toolkit patch changeset and adjusts the chart test harness/specs; the combo-chart implementation continues to pass stacked through both render paths, scopes stack IDs by Y axis, and uses signed stacking. I rechecked the prior rounded-corner concern: it remains present because the combo bars still use a fixed rounded-top radius for every segment. A second low-severity presentation inconsistency is that the combo tooltip does not receive stacked, so it cannot show the stacked total as the standard stacked-bar renderer does. No prior inline comments existed to resolve. A spec typecheck attempt encountered unrelated existing errors elsewhere in the toolkit; parallel review reports the chart spec passes. This is a standard-risk UI change. 🧪 Browser testing: Skipped — the browser-test-planner agent is unavailable in this environment.
|
The missing stacked total in combo tooltips is a real presentation difference. Passing |
|
The factory stopped working on this PR: the agent is blocked: A single-repository worktree is needed for the required proof, and the unresolved latency report needs a closeout safeguard.. A person needs to take it from here. A new review or comment from a person hands it back to the factory for 3 more rounds. |
Summary
Combo charts now honor
config.stackedfor their bar series. Bars stack while line series, such as a target line, still render on top.The proof line below proves the mixed-sign chart fix; the original chart-stack proof was locally demonstrated. Chat latency remains independently unresolved: the run span was 55,580 ms and the model span sum was 52,311 ms. Model spans are not necessarily serial, and their sum is not necessarily the time to the first visible answer. No provider attribution or latency fix is claimed.
Root cause
The combo renderer did not propagate
stackedto its bar series. This is the likely root cause, but it is not confirmed in production because dashboard access returned 401.Problem
An analytics dashboard panel that combined stacked bars with a target line rendered the bars grouped side by side instead of stacked. The combo renderer ignored
stacked, so users couldn't have stacking and a target line at the same time.Solution
The
stackedflag is passed through toComboRenderer. Bar series get astackId, and the chart uses a signed stack offset so positive and negative values stack on opposite sides of zero. Lines are never stacked. Charts that don't setstackedkeep the existing grouped-bar behavior.Key Changes
ComboRenderertakes a newstackedprop. It is wired fromDashboardPanelChartand the analytics template'sSqlChartQuery.ComposedChartgetsstackOffset="sign"when stacked.Bargets astackId. With dual axes, the ID is per axis (stack-<axisId>), so stacks on the left and right axes sit side by side instead of merging.durationAxisPropsacceptsstackedKeys, so duration axes are sized to the stacked bar totals. Independent lines such as the target are still measured separately.getBoundingClientRectmock now returns text-based sizes for the Recharts measurement span.Notes
This PR was created by Factory (sami+factory-service-account@builder.io)
Verified
▶ Watch the interaction
Stacked combo charts with target lines (Combo charts: stacked and grouped)
To clone this PR locally use the Github CLI with command
gh pr checkout 9565You can tag me at @BuilderIO for anything you want me to fix or change
https://beta.agent-workspace.builder.io/fleet/inbox/3195
Reports
https://builder-internal.slack.com/archives/C0ATH3CCZT4/p1795199632958989
fix-proof: proven, red at 8accab4 (exit 1), green at fafe18b: pnpm --filter @agent-native/toolkit exec vitest run src/app/dashboard-charts/DashboardPanelChart.spec.tsx