diff --git a/.trae/jobs/auto-flow.md b/.trae/jobs/auto-flow.md index 015eb762bf..ca898d69a8 100644 --- a/.trae/jobs/auto-flow.md +++ b/.trae/jobs/auto-flow.md @@ -15,66 +15,64 @@ parameters: bumpType: auto notCommit: true head: '' - mode: auto - commitBeforeFlow: true + mode: browser commitAllowEmpty: false pushAfterCommit: true commitMessageStrategy: auto - enforceCommit: true - commitRetry: 1 + flowStep: 1 required_parameters: [] outputs: - autotest_report - rush_change_entries - - pr_url + - commit_message + - pushed_branch + - compare_url + - next_step_hint success_criteria: - - flow_completed + - flow_step_completed --- -# Auto Flow Job(分支 → 单测 → 变更日志 →PR 串行编排) +# Auto Flow Job(单步执行:单测 → 变更日志 → 提交 → PR) ## 参数检查 - 分支参数 `head` 可选:若未提供,将通过 `git rev-parse --abbrev-ref HEAD` 推导当前分支 - 建议提供 `topic` 以优化 PR 标题;未提供时将回退为当前分支名 +- 原则:不覆盖子 Job 默认参数;仅透传用户显式提供的参数 -## 步骤 - -1. 分支预检查 +## 单步模式说明 -- 运行 `git rev-parse --abbrev-ref HEAD` 获取当前分支作为 `head` -- 确认当前分支不是 `main`/`develop`,且工作树状态符合提交规范 -- 人工检查点:如不在开发分支,请先自行创建并切换到正确分支 +- 本 Job 每次仅执行一个步骤,由 `parameters.flowStep` 指定(取值:`1|2|3|4`)。 +- 步骤完成后进入人工暂停,返回 `next_step_hint` 提示你在对话中输入“执行下一步”推进到下一步。 - 1.1 自动提交未提交变更(当 `commitBeforeFlow==true`) - -- 检查工作树:`git status --porcelain` -- 若存在未提交变更: - - `git add --all` - - 生成提交信息(按 `commitMessageStrategy`): - - `auto`:类型 `chore`;作用域为顶层或包名(如 `vchart`);主题为 `sync changes before Auto Flow` - - 最终示例:`chore(vchart): sync changes before Auto Flow` - - 运行 `git commit {{#commitAllowEmpty}}--allow-empty{{/commitAllowEmpty}} -m ""` - - 若 `pushAfterCommit==true`:`git push -u origin {{head}}` - - 提交后校验(当 `enforceCommit==true`): - - 运行 `git status --porcelain`,若非空则视为失败;进行最多 `commitRetry` 次重试(`git add --all && git commit -m ''`),仍失败则中止流程并提示处理 -- 若 `commitBeforeFlow==false` 且存在未提交变更:直接失败并提示先完成提交 +## 步骤 -2. 运行差异驱动单测 +1. 差异驱动单测(flowStep=1) - 执行 Job:`.trae/jobs/auto-test.md` -- 传参:`sinceBranch={{baseBranch}}`(其余沿用默认) +- 传参:`sinceBranch={{baseBranch}}` - 接收输出:`autotest_report=.trae/output/autotest.report.local.md` -- 人工检查点:打开临时报告,确认新增/更新测试与覆盖率 +- 人工检查点:打开临时报告,确认新增/更新测试与覆盖率是否合理 -3. 生成 Rush 变更日志 +2. 生成 Rush 变更日志(flowStep=2) - 执行 Job:`.trae/jobs/changelog-rush-smart.md` - 传参:`sinceBranch={{baseBranch}}`、`message={{message}}`、`bumpType={{bumpType}}`、`notCommit={{notCommit}}` -- 接收输出:`rush_change_entries` -- 人工检查点:检查 `common/changes/**` 条目与摘要 +- 说明:仅透传用户显式提供的参数,未提供时不传,使用子 Job 默认值 +- 接收输出:`rush_change_entries`、`computed_bump_type`、`final_message` +- 人工检查点:检查 `common/changes/**` 条目与摘要是否合理 + +3. 智能提交(flowStep=3) + +- 执行 Job:`.trae/jobs/commit-smart.md` +- 传参: + - `head={{head || (git rev-parse --abbrev-ref HEAD)}}` + - `message={{message}}`(为空时使用步骤 2 的 `final_message`) +- 说明:除 `head` 与 `message` 外,其余参数不强制设置;未提供时使用子 Job 默认值 +- 接收输出:`commit_message`、`pushed_branch` +- 人工检查点:确认提交信息与推送分支是否正确 -4. 创建 PR +4. 创建 PR(flowStep=4) - 执行 Job:`.trae/jobs/pr-create.md` - 传参: @@ -85,11 +83,12 @@ success_criteria: - `labels={{labels}}` - `message={{message}}`(用于正文摘要) - `bumpType={{bumpType}}` - - `mode={{mode}}`(auto 优先 gh → token → 浏览器 URL) - - `commitBeforeCreate=false`(已在 1.1 阶段完成自动提交) -- 接收输出:`pr_url` -- 人工检查点:最终确认并提交 + - `mode={{mode}}`(交互默认 `browser`,生成 Compare URL 与本地正文) + - `localBodyFile=true` +- 说明:仅透传上述必要编排参数,不改变子 Job 输出;未提供的可选项不透传,使用子 Job 默认值 +- 接收输出:`compare_url`、`generated_body_preview` +- 人工检查点:在浏览器页面完成最终提交 5. 完成 -- 标记 `flow_completed`,返回 `autotest_report`、`rush_change_entries` 与 `pr_url` +- 标记 `flow_step_completed`,返回本步骤对应输出与 `next_step_hint` diff --git a/.trae/jobs/auto-test.md b/.trae/jobs/auto-test.md index 4d556199ee..35e4dc174d 100644 --- a/.trae/jobs/auto-test.md +++ b/.trae/jobs/auto-test.md @@ -12,13 +12,14 @@ parameters: onlyNew: false reportFormat: md applyManualOverrides: true - replaceAutogen: true + replaceAutogen: false dryRun: false preview: false stopOnError: true focusChangedOnly: false snapshotStrategy: combined tempReportPath: .trae/output/autotest.report.local.md + includeWorkingTree: true mockDefaults: time: fixed(2020-01-01T00:00:00Z) random: seed(42) @@ -43,11 +44,15 @@ manual_overrides: [] ## 步骤 -1. 差异采集 +1. 差异采集(含未提交内容,当 `includeWorkingTree==true`) - 运行 `git fetch --all --prune` -- 运行 `git diff --name-status --diff-filter=AMR {{sinceBranch}}...HEAD` -- 对每个变更文件,运行 `git diff --unified=0 {{sinceBranch}}...HEAD ` 获取行级差异 +- 收集已提交差异:`git diff --name-status --diff-filter=AMR {{sinceBranch}}...HEAD` +- 收集工作树差异:`git status --porcelain` +- 行级差异: + - 已提交:`git diff --unified=0 {{sinceBranch}}...HEAD ` + - 暂存未提交:`git diff --cached --unified=0 -- ` + - 未暂存:`git diff --unified=0 -- ` 2. 影响分析 diff --git a/.trae/jobs/commit-smart.md b/.trae/jobs/commit-smart.md new file mode 100644 index 0000000000..ade43ab4bf --- /dev/null +++ b/.trae/jobs/commit-smart.md @@ -0,0 +1,54 @@ +--- +job: commit-smart +intent: git-commit-push +version: v1 +domain: git +runner: trae-solo +parameters: + head: '' + commitAllowEmpty: false + pushAfterCommit: true + commitMessageStrategy: auto + message: '' +required_parameters: [] +outputs: + - commit_message + - pushed_branch +success_criteria: + - commit_created_or_skipped +--- + +# Commit Job(智能提交与推送) + +## 步骤 + +1. 推导分支 + +- 若 `parameters.head` 为空:`git rev-parse --abbrev-ref HEAD` + +2. 工作树检查 + +- `git status --porcelain`;若无变更且 `commitAllowEmpty==false`,返回 `commit_created_or_skipped`(跳过) + +3. 生成提交信息(策略 `auto`) + +- 类型:按路径前缀判定(含 `docs/` → `docs`;含 `__tests__/`/`*.test.*` → `test`;否则 `chore|fix|feat` 依据 `common/changes/**` 的 `type`,缺省 `chore`) +- 作用域:`packages/` 或顶层目录 +- 主题:若 `message` 非空用其首行,否则: + - 有 `common/changes/**`:取最新条目的 `comment` + - 否则:`sync changes before PR (N files)` + +4. 执行提交与推送 + +- `git add --all` +- `git commit {{#commitAllowEmpty}}--allow-empty{{/commitAllowEmpty}} -m ""` +- 若 `pushAfterCommit==true`:`git push -u origin {{head}}` + +5. 输出 + +- `commit_message` 与 `pushed_branch` + +## 人工检查点 + +- 返回提交信息与结果,待确认后继续 PR 步骤。 + diff --git a/common/changes/@visactor/vchart/chore-auto-flow-experience_2025-12-26-07-42.json b/common/changes/@visactor/vchart/chore-auto-flow-experience_2025-12-26-07-42.json new file mode 100644 index 0000000000..dd524f3bdf --- /dev/null +++ b/common/changes/@visactor/vchart/chore-auto-flow-experience_2025-12-26-07-42.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "chore(auto-flow): optimize auto flow", + "type": "none", + "packageName": "@visactor/vchart" + } + ], + "packageName": "@visactor/vchart", + "email": "lixuef1313@163.com" +} \ No newline at end of file diff --git a/common/changes/@visactor/vchart/fix-heatmap-label_2025-12-26-08-38.json b/common/changes/@visactor/vchart/fix-heatmap-label_2025-12-26-08-38.json new file mode 100644 index 0000000000..13ba46254f --- /dev/null +++ b/common/changes/@visactor/vchart/fix-heatmap-label_2025-12-26-08-38.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: fix default lineWidth for heatmap label\n\n", + "type": "none", + "packageName": "@visactor/vchart" + } + ], + "packageName": "@visactor/vchart", + "email": "dingling112@gmail.com" +} \ No newline at end of file diff --git a/packages/vchart/src/series/heatmap/heatmap.ts b/packages/vchart/src/series/heatmap/heatmap.ts index 3ad2f3d783..7467526fb9 100644 --- a/packages/vchart/src/series/heatmap/heatmap.ts +++ b/packages/vchart/src/series/heatmap/heatmap.ts @@ -73,7 +73,7 @@ export class HeatmapSeries ex return; } this.setMarkStyle(textMark, { - fill: this.getColorAttribute(), + fill: this._spec.cell?.style?.fill ?? this.getColorAttribute(), text: (datum: Datum) => { return datum[this.getMeasureField()[0]]; } diff --git a/packages/vchart/src/theme/builtin/common/series/heatmap.ts b/packages/vchart/src/theme/builtin/common/series/heatmap.ts index 6697536abf..460e324640 100644 --- a/packages/vchart/src/theme/builtin/common/series/heatmap.ts +++ b/packages/vchart/src/theme/builtin/common/series/heatmap.ts @@ -9,5 +9,10 @@ export const heatmap: IHeatmapSeriesTheme = { }, cellBackground: { visible: false + }, + label: { + style: { + lineWidth: 2 + } } };