Skip to content

fix: preserve executable chart sources and clarify skill data contracts - #4718

Merged
xile611 merged 6 commits into
developfrom
codex/skill-generation-contracts
Oct 21, 2026
Merged

xile611 merged 6 commits into
developfrom
codex/skill-generation-contracts

Conversation

@666haiwen

@666haiwen 666haiwen commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

背景与方案

Skill 生成的 HTML 编辑器此前仅提取 const spec 对象,导致数据变量和 helper 闭包丢失;图/树数据结构及布局节点与原始记录的关系也缺少清晰说明。

  • 初始渲染和编辑统一执行完整源码,安全序列化嵌入文本,并增加有限的配置契约检查。
  • 补齐 Sankey 数据形状、Treemap 原始记录取值和正确的引用路径。
  • 层级构造与可选 tooltip/样式分开;通用图例说明不绑定特定图型,移除重复路由。
  • 维护测试放在运行 Skill 之外,由独立 CI 执行,不要求消费者运行整套测试。

保留上游依赖/CDN 策略;不引入宿主发布协议或私有服务依赖,不修改图表库实现。相关工作:#4713。

验证与边界

  • 最新 Skill 检查:76 项 Node 契约测试、45 项 Python 测试通过。
  • 串行真实模型与产物浏览器验收:普通 Treemap、指定配色/tooltip 的 Treemap、Sankey 聚合和恢复数据通过。两组不同字段的 tooltip 经人工悬浮确认。
  • 最后精简轮使用产品会话 API 和发布后的 HTML;不将其描述为新增的官网点击端到端测试。
  • 空数据中央提示及清空/恢复生命周期归为延后处理的边缘回归。模型仍出现过无效回调或未交付产物,不能记为通过;不作为本次收敛的必过项。
  • 前一提交 4381ac2 的 pre-push 检查通过 141 suites / 1,241 tests,全量视觉回归 264/264;与 develop 72e4ae6 的图表库 bundle 一致。本轮没有修改图表库实现。
  • 本地验证不等于托管 CI 全绿。PR 保持 Draft,等待评审,不合并。

变更类型

  • Bug fix
  • Documentation
  • Test / Workflow

Changelog

Language Changelog
English Preserve complete chart source in Skill-generated editors and clarify reusable graph/hierarchy contracts and reference navigation.
中文 Skill 编辑器保留完整源码,补齐通用图与层级数据契约、回调说明和引用导航。

Preserve helper closures and literal source through generation and editor updates.
Validate graph, hierarchy and callback contracts before delivery.
Clarify reference paths and layout-datum tooltip access.

Keep public dependencies unchanged and maintenance tests outside the runtime skill.
Add focused CI for generation contracts.
Separate hierarchy construction from optional styling and tooltip customization.
Remove duplicated routing and chart-specific legend rules.
Retain scoped maintenance tests and make edge-case regression optional.
Comment thread skills/vchart-development-assistant/references/api/API_INDEX.md Outdated
Comment thread skills/vchart-development-assistant/references/components/legend.md
Validate series containers and entries before traversing their configuration.

Return configuration errors instead of crashing or reporting source evaluation failure.

@xile611 xile611 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

发现 1 项 P2 问题:普通 Sankey 的多数据集配置会被新增校验器误拒绝,建议修复后合入。

验证:Node.js 22 下,76 项 Node 契约测试、45 项 Python 测试通过;另用 Chromium 复现了行内评论中的合法配置,实际绘制出 2 个节点、1 条边,但生成器返回 SANKEY_GRAPH_REQUIRED。现有测试仅覆盖 common + series 的数据集选择,未覆盖普通 Sankey 的同类场景。

Comment thread skills/vchart-development-assistant/scripts/spec-contract.cjs Outdated
Reject malformed data descriptors with source paths instead of throwing during graph checks.
Preserve legend filter keys in customization examples and consolidate API lookup links.

@visactor-review-bot visactor-review-bot Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最新复查提交: 3363402

未发现可确认的新问题。

Comment thread skills/vchart-development-assistant/references/components/tooltip.md Outdated
Chenzexian added 2 commits October 20, 2026 15:46
Replace misleading custom event string-array guidance with built-in trigger combinations
and an event-object example.

Codex-Model: GPT-6
Ordinary Sankey charts use the first root dataset for their default series.
Keep auxiliary datasets out of graph-shape checks while rejecting malformed
selected data. Cover source validation and HTML generation regressions.

Codex-Model: GPT-6
@666haiwen
666haiwen enabled auto-merge October 20, 2026 09:01
@xile611
xile611 disabled auto-merge October 21, 2026 02:31
@xile611
xile611 merged commit b644af4 into develop Oct 21, 2026
11 of 13 checks passed
@xile611
xile611 deleted the codex/skill-generation-contracts branch October 21, 2026 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants