Skip to content

fix(chartcuterie): Avoid plottable imports that break Node VM sandbox#112668

Merged
DominikB2014 merged 2 commits intomasterfrom
dominikbuszowiecki/fix-chartcuterie-explore-config
Apr 10, 2026
Merged

fix(chartcuterie): Avoid plottable imports that break Node VM sandbox#112668
DominikB2014 merged 2 commits intomasterfrom
dominikbuszowiecki/fix-chartcuterie-explore-config

Conversation

@DominikB2014
Copy link
Copy Markdown
Contributor

@DominikB2014 DominikB2014 commented Apr 10, 2026

The plottable classes (Line, Area, Bars) import @sentry/react which requires browser globals (window, document, etc.) unavailable in chartcuterie's Node.js VM sandbox. When the config bundle includes these imports, runInNewContext fails during eval, causing chartcuterie to silently fall back to its previous config — which doesn't include slack:explore.line. This broke all Explore Slack unfurls.

Replaces the plottable toSeries() approach with direct LineSeries/BarSeries/AreaSeries constructors, which are lightweight wrappers that are safe for the chartcuterie bundle. Keeps the DisplayType support for rendering different chart types.

Fixes https://linear.app/getsentry/issue/DAIN-1486/unfurl-fails

The plottable classes (Line, Area, Bars) import @sentry/react which
requires browser globals unavailable in chartcuterie's Node.js VM
sandbox. This caused the config eval to fail silently, making
chartcuterie fall back to its old config without slack:explore.line.

Replace the plottable approach with direct LineSeries/BarSeries/
AreaSeries constructors which are safe for the chartcuterie bundle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 10, 2026
@linear-code
Copy link
Copy Markdown

linear-code bot commented Apr 10, 2026

DAIN-1486 Unfurl fails

No external consumers after the chartcuterie revert; only used
internally by createPlottableFromTimeSeriesAndWidget.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread static/app/chartcuterie/explore.tsx
@DominikB2014 DominikB2014 merged commit fe836ca into master Apr 10, 2026
65 checks passed
@DominikB2014 DominikB2014 deleted the dominikbuszowiecki/fix-chartcuterie-explore-config branch April 10, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants