Skip to content

fix(css): preserve user variables during generated cleanup - #1197

Merged
sonofmagic merged 21 commits into
mainfrom
codex/ci-css-release-recovery
Sep 14, 2026
Merged

sonofmagic merged 21 commits into
mainfrom
codex/ci-css-release-recovery

Conversation

@sonofmagic

@sonofmagic sonofmagic commented Sep 13, 2026

Copy link
Copy Markdown
Owner

变更

修复 Tailwind v4 主题清理、框架 vendor CSS 恢复和小程序最终产物边界:按生成来源精确删除主题声明,保留用户变量、优先级和覆盖顺序;按条件上下文、选择器和完整声明恢复 vendor CSS,兼容 legacy/graph、大产物、层和组合选择器;公开 core weapp 最终化入口移除 Tailwind banner,避免 weapp-vite 集成留下 WXSS 检测误报。

补充跨平台 Taro issue-998 行为断言、WXSS AST 全局选择器检测、NutUI/vendor 真实组合回归、framework composition 单元回归和 core banner 边界回归。新增中文 patch changeset .changeset/tidy-css-cleanup.md,只覆盖 weapp-tailwindcss

验证

  • CI=1 pnpm test --update=none:542 files,5302 passed,47 skipped。
  • CI=1 pnpm test:release:222 passed,4 skipped。
  • apps-generator:10/10 passed(含更新后 --update=none 串行复核)。
  • static shard 1/3:20 passed,6 skipped;2/3:24 passed,2 skipped;3/3:24 passed,2 skipped;分片测试分别为 107 passed/18 skipped、122 passed/10 skipped、130 passed/3 skipped。
  • pnpm agents:checkgit diff --check、冻结 lockfile 安装和核心包构建通过。
  • pnpm typecheck 仍有基线 445 条诊断,与修改前逐条比较无新增;未将其报告为全绿。
  • 真实 Taro/uni-app/uni-app x 构建、issues-977-978、Taro coverage、template contract 和 canonical smoke 已通过;uni-app x 仅为本机 HBuilderX CLI 构建,不作为设备验收。

相关 Issue

Mpx 多平台及性能边界补充

默认 matcher 补齐 .ddml / .ddss,修复钉钉模板类名和 rem2rpx 适配被跳过的问题。五个 Mpx 平台基线只删除旧的未转换 rem 值,生产与 HMR 全部保持 --spacing: 8rpx。保留纯生成路径的优化,撤回会留下重复 @charset 的空生成路径短路,并新增边界回归。

  • defaults 与 composition 定向测试:24 项通过(先复现 5 项失败再修复)。
  • 五平台生产构建与 initial/replace/add/restore HMR:全部通过。
  • CI=1 E2E_PROJECT_FILTER='^mpx-tailwindcss-v4$' pnpm e2e:static --update=none:64 文件、342 测试通过,15 文件、44 测试跳过。
  • 完整单测与 Release 集合均在最终源码上重跑;中文 changeset 同步新增行为。
  • 旧 head 0cdac282a 的五项 benchmark 与 performance guard 均通过,新 head 的 CI 仍需等待完成。
  • 上游跟进:repoctl #893PR #894

@changeset-bot

changeset-bot Bot commented Sep 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0cdac28

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

PR 性能基准报告:部分结果

  • Commit:0d5c3dc2be88
  • 生成时间:2026-09-14T03:20:02.508Z
  • Benchmark:success
  • Watch:未触发/无产物

总览

指标 结果
Build 稳态中位数平均变化 -0.61%
HMR 稳态 P95 平均变化 -1.61%
插件 Build 中位数平均变化 -0.40%
插件 HMR 门禁统计平均变化 -5.47%
Watch HMR p50 / p95 N/A / N/A ms
Watch RSS 峰值 / 最大增量 0.00 / 0.00 MB
Watch Heap 峰值 0.00 MB

Benchmark 项目矩阵

项目 平台 Base Build 冷/稳态(ms) Current Build 冷/稳态(ms) Build 变化 Base HMR median/P95(ms) Current HMR median/P95(ms) HMR 变化 状态
demo-mpx-tailwindcss-v4__mp-weixin mp-weixin 13253.48 / 13207.74 13314.82 / 13094.66 +0.11% 4749.26 / 5409.83 4836.53 / 5559.20 +2.76% ok
demo-taro-vite-react-tailwindcss-v4__mp-weixin mp-weixin 32264.00 / 31805.52 32046.58 / 31055.27 -2.06% 7161.70 / 7289.49 6661.65 / 7003.13 -3.93% ok
demo-taro-webpack-react-tailwindcss-v4__mp-weixin mp-weixin 23287.83 / 23202.24 23437.37 / 23436.38 +0.85% 3720.10 / 9322.07 3877.96 / 9140.28 -1.95% ok
demo-uni-app-vite-tailwindcss-v4__mp-weixin mp-weixin 7869.50 / 7850.93 7798.44 / 7788.49 -0.90% 1030.72 / 2878.65 969.09 / 2824.91 -1.87% ok
demo-weapp-vite-tailwindcss-v4__mp-weixin mp-weixin 5715.21 / 5652.85 5596.63 / 5626.65 -1.06% 8004.52 / 8349.06 8040.26 / 8092.99 -3.07% ok

Benchmark 插件处理阶段

项目 Build Plugin base/current(ms) 变化 HMR Plugin base/current(ms) 变化
demo-mpx-tailwindcss-v4__mp-weixin 1282.00 / 1256.00 -2.03% 1321.00 / 1310.00 -0.83%
demo-taro-vite-react-tailwindcss-v4__mp-weixin 6515.00 / 6561.00 +0.71% 3813.00 / 3482.00 -8.68%
demo-taro-webpack-react-tailwindcss-v4__mp-weixin 7267.00 / 7229.00 -0.52% 7103.00 / 6374.00 -10.26%
demo-uni-app-vite-tailwindcss-v4__mp-weixin 2551.00 / 2557.00 +0.24% 907.00 / 888.00 -2.09%
demo-weapp-vite-tailwindcss-v4__mp-weixin N/A / N/A N/A N/A / N/A N/A

Benchmark 内存

项目 Build RSS base peak/steady(MB) Build RSS current peak/steady(MB) Peak 变化 HMR RSS base peak/steady(MB) HMR RSS current peak/steady(MB) Peak 变化
demo-mpx-tailwindcss-v4__mp-weixin 1248.82 / 1180.18 1236.91 / 1175.91 -0.95% 2243.61 / 2137.90 2235.77 / 2110.37 -0.35%
demo-taro-vite-react-tailwindcss-v4__mp-weixin 1642.73 / 1524.50 1726.91 / 1603.27 +5.12% 3050.13 / 3003.75 3061.29 / 2997.65 +0.37%
demo-taro-webpack-react-tailwindcss-v4__mp-weixin 1395.39 / 1353.73 1431.48 / 1362.98 +2.59% 2045.36 / 1959.30 1910.25 / 1838.69 -6.61%
demo-uni-app-vite-tailwindcss-v4__mp-weixin 767.18 / 766.90 770.83 / 770.83 +0.48% 900.26 / 884.30 773.84 / 713.53 -14.04%
demo-weapp-vite-tailwindcss-v4__mp-weixin 605.21 / 552.29 618.71 / 575.46 +2.23% 1475.93 / 1411.09 1373.97 / 1341.81 -6.91%

Watch 明细

项目 平台 变更类型 样本数 ready(ms) avg/p50/p95/max(ms) 插件 p50/p95(ms) RSS peak/delta(MB) Heap peak(MB)

门禁与诊断

  • Benchmark 性能门禁:通过
  • Benchmark 缺失项目:无
  • Benchmark 错误:0
  • Watch 解析错误:0

运行链接

统计口径
  • Build/HMR 版本对照沿用现有 benchmark 的 base/current 和门禁统计。
  • Watch 仅报告当前提交的真实跨平台 watcher 结果,不额外运行 base;跨 shard 总览分位数按各报告摘要聚合,项目/平台行保留原始口径。
  • 未触发或缺失的场景显示为 N/A,不当作 0。

@sonofmagic
sonofmagic force-pushed the codex/ci-css-release-recovery branch from 3257990 to 0cc599c Compare September 13, 2026 14:19
@sonofmagic
sonofmagic force-pushed the codex/ci-css-release-recovery branch from 0cc599c to 7a4a494 Compare September 13, 2026 14:20
@sonofmagic

Copy link
Copy Markdown
Owner Author

补充提交 b6d2590 已推送到 codex/ci-css-release-recovery。

  • 增加生成变量/用户变量清理、框架 vendor/NutUI 级联、WXSS AST、Taro 跨平台路径、模板契约与 repoctl 发布恢复回归测试
  • 新增中文 changeset:.changeset/tidy-css-cleanup.md
  • 更新受影响 static baseline
  • CI=1 pnpm test --update=none:540 files passed,5280 tests passed,47 skipped
  • CI=1 pnpm test:release:全部通过
  • pnpm agents:check、git diff --check:通过
  • typecheck 保持基线 445 条既有诊断,未新增
  • apps-generator 当前仍有 weapp-vite 产物 banner 断言失败,已保留失败证据,未伪报全绿
  • repoctl issues: Version Packages (next) #887fix: compile css macro platform branches #888

@sonofmagic
sonofmagic merged commit d3a5778 into main Sep 14, 2026
213 of 218 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant