Skip to content

refactor(desktop): remove internal compatibility facades - #4151

Merged
Astro-Han merged 1 commit into
mainfrom
refactor/desktop-remove-compat-facades
Aug 29, 2026
Merged

refactor(desktop): remove internal compatibility facades#4151
Astro-Han merged 1 commit into
mainfrom
refactor/desktop-remove-compat-facades

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

Remove two completed Desktop migration layers:

  • import shared thread search directly from @maka/core/thread-search and delete the Desktop forwarding module
  • import the Computer Use PIP feed from its owner and remove the migration-only re-exports from the PIP controller

The 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 passed
  • npm --workspace @maka/desktop run typecheck — passed, including main, preload, renderer, and Storybook configs
  • npm run format:check — passed across 1771 files
  • merge-tree checked against open PR fix(i18n): localize built-in tool names #4010: both overlapping Desktop files auto-merge; its existing conflicts remain limited to the removed core tool-catalog files

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex implemented the import cleanup, deletion, focused verification, and conflict analysis. The commit includes a Generated-by: Codex trailer.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/S Under 100 readable lines label Aug 29, 2026
@Astro-Han
Astro-Han marked this pull request as ready for review August 29, 2026 09:42
@Astro-Han
Astro-Han marked this pull request as draft August 29, 2026 09:49
@Astro-Han
Astro-Han marked this pull request as ready for review August 29, 2026 09:50

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;剩下的调用方现在直接从该包入口导入,入口已经导出测试用到的 runThreadSearchfindMatchfoldForMatch 和几个 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
@Astro-Han
Astro-Han force-pushed the refactor/desktop-remove-compat-facades branch from 7533864 to 1897eb9 Compare August 29, 2026 10:00

@zhiiw zhiiw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-search module or the removed pip-window re-exports (ParentWindowLike/PipWindowLike/withComputerUsePip) — grepped the whole tree at this head.
  • The repointed imports land on the owning modules: @maka/core/thread-search is a published entrypoint of @maka/core, and withComputerUsePip comes from pip-feed.js, its owner.
  • desktop-native-capability-assembly.ts now 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 为绿。

@Astro-Han
Astro-Han merged commit 4638e64 into main Aug 29, 2026
1 check passed
@Astro-Han
Astro-Han deleted the refactor/desktop-remove-compat-facades branch August 29, 2026 10:35
saltand pushed a commit to saltand/maka-agent that referenced this pull request Aug 31, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants