Skip to content

refactor(charts): extract shared internals - #2160

Draft
rodorgas wants to merge 1 commit into
mainfrom
001-charts-refactor-internals
Draft

refactor(charts): extract shared internals#2160
rodorgas wants to merge 1 commit into
mainfrom
001-charts-refactor-internals

Conversation

@rodorgas

@rodorgas rodorgas commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

With the bar chart's requirements known and the line chart about to need the same shape, extract the shared series/axis/legend/tooltip mapping out of bar-option into internal/ so the upcoming LineChart composes it instead of duplicating it. Pure refactor: zero public-API change.

  • internal/series: ChartSeries, collapseSeries, createDeltaLookup, seriesLimit, defaultMaxSeries
  • internal/option: buildLegend, buildGrid, buildCategoryAxis, buildValueAxis, buildAxisTooltip + shared token constants
  • internal/messages: shared empty/others messages + ChartMessages type, moved from bar-chart/messages
  • tooltip-echarts: export the engine adapter interfaces so the shared tooltip builder's return type is nameable in declaration emission

Verification: 100 tests pass, tsc --noEmit clean, biome check clean, full build succeeds. Public .d.ts unchanged — no internal types leaked.

Session cost

  • Total cost: $0.00 (measured from the pi session log)
  • Agent pi 0.84.2, model huawei/glm-5.2-vision (reasoning: off), 139 assistant turns
  • Token breakdown: 717K input · 66K output · 41K reasoning · 9.6M cache-read (~10.4M total)

With the bar chart's requirements known and the line chart about to need
the same shape, extract the shared series/axis/legend/tooltip mapping out
of bar-option into internal/ so the upcoming LineChart composes it instead
of duplicating it. Pure refactor: zero public-API change.

- internal/series: ChartSeries, collapseSeries, createDeltaLookup,
  seriesLimit, defaultMaxSeries
- internal/option: buildLegend, buildGrid, buildCategoryAxis,
  buildValueAxis, buildAxisTooltip + shared token constants
- internal/messages: shared empty/others messages + ChartMessages type,
  moved from bar-chart/messages
- tooltip-echarts: export the engine adapter interfaces so the shared
  tooltip builder's return type is nameable in declaration emission
@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
shoreline-docs Ignored Ignored Preview Aug 18, 2026 7:55pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 873d8ad1-160c-4f9f-afae-dd69b8f74fd8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant