refactor(desktop): remove internal compatibility facades - #4151
Conversation
jackwener
left a comment
There was a problem hiding this comment.
I found no P0–P3 issues on exact head 7533864d5ff28944edc4fc19ad616a43cd822f23.
The two deleted surfaces were forwarding only. Desktop's search/thread-search.ts re-exported @maka/core/thread-search unchanged; the remaining callers now import that package export, which already lists runThreadSearch, findMatch, foldForMatch, and the helpers the Desktop test uses. withComputerUsePip already lived in pip-feed.ts; the one production caller now imports it there, and nothing else imported the pip-window.ts re-export or the ParentWindowLike / PipWindowLike type re-exports. I grepped the tree for leftover paths; none remain.
I am not merging. This is a refactor; merge is a human call. Hosted test was still in progress when I posted. This review does not claim CI is green.
Posted by an automated review agent operated by @WAWQAQ. This is not an
independent human review and does not satisfy the committer review required by
CONTRIBUTING.md. A human is accountable for this comment — please push back if
anything here is wrong.
简体中文
精确 head 7533864d5ff28944edc4fc19ad616a43cd822f23 上我没有发现 P0–P3。
删掉的两层都只是转发。Desktop 的 search/thread-search.ts 原样再导出 @maka/core/thread-search;剩下的调用方现在直接从该包入口导入,入口已经导出测试用到的 runThreadSearch、findMatch、foldForMatch 和几个 helper。withComputerUsePip 本来就在 pip-feed.ts;唯一的生产调用方改从那里导入,没有其它文件再从 pip-window.ts 拿它或 ParentWindowLike / PipWindowLike。我搜过残留路径,没有。
我不合入。这是重构,合入由人类决定。发这条时 hosted test 还在跑,这次审查不表示 CI 已绿。
本条评论由 @WAWQAQ 运行的自动化审查程序发出。它不构成 CONTRIBUTING.md
所要求的独立人类审查,也不能替代人类审查。有人类对本条评论负责,如有错误请直接指出。
Import shared thread search and the Computer Use PIP feed from their owning modules. Remove the Desktop-only forwarding file and the completed PIP migration re-exports while leaving the PIP controller and lifecycle unchanged. Generated-by: Codex
7533864 to
1897eb9
Compare
zhiiw
left a comment
There was a problem hiding this comment.
Reviewed at exact head 1897eb9f (rebased since the earlier head I verified; the PR's own five files are byte-identical between the two heads — the delta is a rebase onto a newer main, carrying 319b7ed0 and b16376d7 from main underneath).
Pure compatibility-facade removal, verified rather than assumed:
- No consumer still imports the deleted
search/thread-searchmodule or the removedpip-windowre-exports (ParentWindowLike/PipWindowLike/withComputerUsePip) — grepped the whole tree at this head. - The repointed imports land on the owning modules:
@maka/core/thread-searchis a published entrypoint of@maka/core, andwithComputerUsePipcomes frompip-feed.js, its owner. desktop-native-capability-assembly.tsnow imports the controller and the feed from their respective owners — no behavior change, verified by typecheck.
Executed on a real Windows machine: clean forced rebuild of the workspace libs plus desktop main at the reviewed content, then thread-search + runtime-host-search-ipc-main — 20/20 pass. test is completed/success on the exact head.
简体中文
纯 facade 删除,全部核实而非假设:全树没有任何残留导入;重定向的导入都落在拥有者模块上(core 的 thread-search 是已发布 entrypoint,PIP feed 来自其属主);行为零变化由 typecheck 佐证。本机真 Windows 强制干净重建后两个受影响测试 20/20 过。当前 head 的 test 为绿。
Import shared thread search and the Computer Use PIP feed from their owning modules. Remove the Desktop-only forwarding file and the completed PIP migration re-exports while leaving the PIP controller and lifecycle unchanged. Generated-by: Codex
Summary
Remove two completed Desktop migration layers:
@maka/core/thread-searchand delete the Desktop forwarding moduleThe PIP controller/lifecycle and shared search implementation remain unchanged, so this reduces internal API surface without changing behavior.
Verification
node --test apps/desktop/dist/main/__tests__/thread-search.test.js apps/desktop/dist/main/__tests__/runtime-host-search-ipc-main.test.js— 20 passednpm --workspace @maka/desktop run typecheck— passed, including main, preload, renderer, and Storybook configsnpm run format:check— passed across 1771 filesAI use
Select exactly one:
Tool(s) and scope: Codex implemented the import cleanup, deletion, focused verification, and conflict analysis. The commit includes a
Generated-by: Codextrailer.Checklist
Does this PR entail a change in behavior?