Repository navigation
feat(charts): draw any Vega-Lite chart over the table - #101
Conversation
Latest result Pull request merged. Final answersSession Pull request merged. Session Waiting for GitHub merge request 766fa415-532d-4ef9-8382-ed14f0fd228b. Verified HEAD and current checks: all required checks pass, and Pullfrog’s lookup and nested-data findings are addressed and resolved. No actionable P0/P1 findings remain; historical feedback is either fixed or resolved. Focused local tests were unavailable because workspace build artifacts are absent and pnpm’s prepare step cannot write protected Git metadata; hosted checks remain green. Session Fixed the Doctor failure and Pullfrog P1 lookup-data finding. Nested data is removed safely, lookup transforms with secondary data are rejected clearly, and the review thread is resolved. Charts Doctor passes with zero warnings; focused tests could not run because workspace build artifacts are absent. Awaiting current-head checks. Session Fixed the Doctor failure and Pullfrog P1 lookup-data finding. Nested data is removed safely, lookup transforms with secondary data are rejected clearly, and the review thread is resolved. Charts Doctor passes with zero warnings; focused tests could not run because workspace build artifacts are absent. Awaiting current-head checks. Session Fixed the Doctor failure and Pullfrog P1 lookup-data finding. Nested data is removed safely, lookup transforms with secondary data are rejected clearly, and the review thread is resolved. Charts Doctor passes with zero warnings; focused tests could not run because workspace build artifacts are absent. Awaiting current-head checks. Session Fixed the Doctor failure and Pullfrog P1 lookup-data finding. Nested data is removed safely, lookup transforms with secondary data are rejected clearly, and the review thread is resolved. Charts Doctor passes with zero warnings; focused tests could not run because workspace build artifacts are absent. Awaiting current-head checks. Session Fixed the Doctor failure and Pullfrog P1 lookup-data finding. Nested data is removed safely, lookup transforms with secondary data are rejected clearly, and the review thread is resolved. Charts Doctor passes with zero warnings; focused tests could not run because workspace build artifacts are absent. Awaiting current-head checks. Session Fixed the Doctor failure and Pullfrog P1 lookup-data finding. Nested data is removed safely, lookup transforms with secondary data are rejected clearly, and the review thread is resolved. Charts Doctor passes with zero warnings; focused tests could not run because workspace build artifacts are absent. Awaiting current-head checks. Session Fixed the Doctor failure and Pullfrog P1 lookup-data finding. Nested data is removed safely, lookup transforms with secondary data are rejected clearly, and the review thread is resolved. Charts Doctor passes with zero warnings; focused tests could not run because workspace build artifacts are absent. Awaiting current-head checks. |
comark-annotate
comark-carousel
comark-charts
comark-chips
comark-code
comark-diff
comark-embed
comark-github
comark-icon
comark-include
comark-linter
comark-tabs
comark-zoom
commit: |
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
There was a problem hiding this comment.
Important
The table-only data contract is not enforced for composed Vega-Lite specs.
Reviewed changes
This review covers the new Vega-Lite parsing, validation, server-side SVG rendering, renderer integration, documentation, and tests.
- Vega-Lite table charts — accepts a fenced
vega-litespec, converts table rows to values, compiles it during parsing, and preserves the table as rendered data. - Validation and safety — reports invalid JSON, unsupported chart props, missing fields, and root-level data; seals resource loading and strips SVG links.
- Rendering and docs — applies house defaults, exposes the new chart type through renderers, and documents the syntax and limitations.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
Important
The recursive table-data sanitization now breaks valid Vega-Lite lookup transforms by deleting their required secondary data source.
Reviewed changes
This review covers the nested-data sanitization and regression test added since the prior Pullfrog review.
- Sanitized composed views — recursively removes nested
datadeclarations before injecting the Markdown table as the root source. - Expanded safety coverage — verifies that nested inline rows and external resources cannot appear in the rendered SVG.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This incremental review covers the lookup-source safety fix added since the prior Pullfrog review.
- Rejected lookup data sources — detected Vega-Lite lookup transforms with
from.databefore recursive sanitization, so unsupported secondary sources now produce an issue and table-only fallback instead of being silently corrupted. - Retained table-only composition handling — preserved recursive removal of nested view data declarations and root injection of the Markdown table, with the existing sealed loader and SVG link stripping.
gpt-5.6-sol | 𝕏

Stacked on #99.
comark-charts lays out eight chart types itself. For any other chart, such as a box plot, a heatmap, or error bands, you can now put a Vega-Lite spec after the table in a
vega-liteblock:The table is still the data, so it stays in the page under Data and agents read the numbers as before. Each row becomes one data point, with numbers parsed like the other charts' cells. The spec is drawn while parsing, like the other charts (#99), so it works in every renderer.
configwins.datain the spec (the table replaces it), a field that's neither a header nor made by a transform (as, or a fold'skey/value), props such astype,x, orythat don't apply, annotations (marks need comark-charts' layout), and anything Vega can't draw. The chart then shows its table.Tests:
test/spec.test.tscovers drawing, each issue, transform fields, a failed draw, and a spec that tries to load URLs or add ajavascript:link.