Skip to content

fix(ci): finish two cleanups that left main red - #2432

Merged
jackwener merged 1 commit into
mainfrom
fix/knip-orphaned-css-helpers
Aug 7, 2026
Merged

fix(ci): finish two cleanups that left main red#2432
jackwener merged 1 commit into
mainfrom
fix/knip-orphaned-css-helpers

Conversation

@jackwener

Copy link
Copy Markdown
Member

问题

main 从 #2425knip --workspace apps/desktop 一直红,format:check 也红。这会连带把所有 PR 的 typecheck job 拖红(PR CI 跑的是与 main 的合并结果),#2430 就是这么红的。

两处都是清理没做完的尾巴,不是新决策:

  • test: drop low-value import-boundary guard and CSS-contract suites #2425 删掉了 CSS-contract 测试套件,但把它们的 helper 留下了 —— assertCssRuleDeclsparseCssBlocks 失去唯一调用方。删掉这两个之后,它们背后整棵扫描子树(cssRuleBodysplitSelectorListstripCssComments、postcss block walk、CssBlock 类型)也一并失去引用,随之删除;postcss 是这棵子树在本 workspace 的唯一用途,同步从 devDependencies 移除。文件仍欠调用方的 REPO_ROOT(9 个测试在用)和 readAllRendererCss(1 个)保留。
  • chore: remove product Voice module end-to-end #2426 端到端移除了 Voice 模块,但 provider-connection-dialog 只被已删除的 voice-settings-page 引用,成了孤儿。

顺带跑了一次 formatter 到 tool-free-model-call.ts —— 这正是 format:check 红的那个文件。

全部无行为变更。

怎么验证的

  • knip --workspace apps/desktop--workspace packages/ui 均退出 0(改前在干净 main 上复现为红,确认非本分支引入)。
  • typecheck / lint / format:check / build 全绿。
  • @maka/desktop 1735 passed、@maka/runtime 3304 passed,均 0 fail。
  • 删除前逐个确认无引用:provider-connection-dialog 全仓 0 处引用;被删 helper 各自仅剩自身定义处。
  • package-lock.json 只删了 apps/desktop 那一行 postcss 声明(本机 npm 会顺手剥掉 libc: [glibc/musl] 字段,会破坏 Linux 解析,已还原)。

main has been red on `knip --workspace apps/desktop` since #2425, with
`format:check` red alongside it, which drags every open PR's typecheck job
red too (PR CI runs the branch merged with main).

The knip half is leftovers, not new decisions:

- #2425 deleted the CSS-contract suites but kept their helpers, so
  `assertCssRuleDecls` and `parseCssBlocks` lost their only callers. Removing
  them orphans the whole scanning subtree behind them (`cssRuleBody`,
  `splitSelectorList`, `stripCssComments`, the postcss block walk and the
  `CssBlock` type), which goes with them; `postcss` was that subtree's only
  use in this workspace and leaves devDependencies. What the file still owes
  its callers is `REPO_ROOT` and `readAllRendererCss`, which stay.
- #2426 removed the Voice module end-to-end, but `provider-connection-dialog`
  was reachable only from the deleted `voice-settings-page` and survived it.

The format half is just the formatter over three files that landed without
it: `tool-free-model-call.ts`, and `bootstrap-connections.ts` +
`connection-store.test.ts` from #2431.

No behaviour change in any of this.
@jackwener
jackwener force-pushed the fix/knip-orphaned-css-helpers branch from c4b087a to 45b682a Compare August 7, 2026 10:37
@jackwener
jackwener merged commit 79a641b into main Aug 7, 2026
1 check 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