Own Vega-Lite schema snapshot and chart defaults
Problem
Vendor the Vega-Lite schema as a tracked compile-time artifact, add a dedicated chart defaults YAML for Dataface house style, wire config loading so chart defaults remain centralized in YAML, document the ownership boundary, and validate with tests. Keep runtime compiled boards lean by using schema/default files only at compile time.
Context
- Chart and theme defaults previously lived inline inside
dataface/core/compile/default_config.yml. - The compile loader in
dataface/core/compile/config.pytreated that single file as the entire defaults source. - Theme handling already supports open-ended Vega-Lite config via
ThemeConfig(extra="allow"), but the repo did not vendor the upstream Vega-Lite schema snapshot as an explicit compile-time artifact. - The desired direction is to keep runtime compiled boards lean while moving schema ownership and chart house-style defaults into explicit files.
Possible Solutions
- Recommended: vendor the upstream Vega-Lite v5 schema JSON, split chart/Vega-Lite defaults into a dedicated
chart_defaults.yml, and makeconfig.pyassemble a merged runtime config fromdefault_config.ymlpluschart_defaults.ymlbefore user overrides. - Keep everything in
default_config.yml. This preserves current behavior but keeps chart house-style and app-wide defaults mixed together. - Replace the current config with a fully Dataface-authored hand-maintained chart schema immediately. This offers the strongest ownership model but is much larger in scope and slower to land safely.
Plan
- Add a vendored Vega-Lite schema snapshot under
dataface/core/compile/vendor/. - Split Vega-Lite config, palettes, and themes into
dataface/core/compile/chart_defaults.yml. - Update
dataface/core/compile/config.pyso built-in runtime defaults are assembled from both YAML files and expose helpers for compile-time schema access. - Update docs/tests to reflect the new defaults stack and verify the vendored schema plus merged chart defaults.
Implementation Progress
- Created the task and marked it
in_progress. - Added
dataface/core/compile/vendor/vega-lite-v5.schema.jsonas a vendored upstream schema snapshot. - Split chart presentation defaults into
dataface/core/compile/chart_defaults.yml. - Updated
dataface/core/compile/config.pyto mergedefault_config.ymlandchart_defaults.ymlinto one runtime config and added schema path/load helpers. - Added tests for the chart defaults stack and vendored schema availability.
- Kept existing Vega-Lite/theme pass-through behavior and fixed theme serialization so extra config keys survive
to_vega_config(). - Wired the vendored schema into
apps/ide/scripts/generate_schema.pyso IDE schema generation now consumes the snapshot for Vega-Lite metadata and dynamic theme enumeration. - Reverted incidental visual default changes so the split remains behavior-preserving relative to
main.
Review Feedback
- Round 1 (
.cbox/reviews/commits-origin-main-HEAD-2026-03-12-092813.md): requested changes because the branch mixed structural config splitting with silent visual default changes and introduced vendored-schema helpers without a real consumer. - Response: reverted the visual default changes to match
main, wired the vendored schema into the IDE schema generator, and replaced the serializationassertwith a real exception. -
Round 2 (
.cbox/reviews/commits-origin-main-HEAD-2026-03-12-093803.md): approved with only non-blocking recommendations. -
[x] Review cleared