fix(ci): finish two cleanups that left main red - #2432
Merged
Conversation
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
force-pushed
the
fix/knip-orphaned-css-helpers
branch
from
August 7, 2026 10:37
c4b087a to
45b682a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
main 从 #2425 起
knip --workspace apps/desktop一直红,format:check也红。这会连带把所有 PR 的 typecheck job 拖红(PR CI 跑的是与 main 的合并结果),#2430 就是这么红的。两处都是清理没做完的尾巴,不是新决策:
assertCssRuleDecls、parseCssBlocks失去唯一调用方。删掉这两个之后,它们背后整棵扫描子树(cssRuleBody、splitSelectorList、stripCssComments、postcss block walk、CssBlock类型)也一并失去引用,随之删除;postcss是这棵子树在本 workspace 的唯一用途,同步从 devDependencies 移除。文件仍欠调用方的REPO_ROOT(9 个测试在用)和readAllRendererCss(1 个)保留。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/desktop1735 passed、@maka/runtime3304 passed,均 0 fail。provider-connection-dialog全仓 0 处引用;被删 helper 各自仅剩自身定义处。package-lock.json只删了apps/desktop那一行 postcss 声明(本机 npm 会顺手剥掉libc: [glibc/musl]字段,会破坏 Linux 解析,已还原)。