feat: add native macOS controller support - #298
Merged
MistEO merged 3 commits intoJul 29, 2026
Conversation
Implement ProjectInterface V2 MacOS discovery and connection flows, add runtime and permission guards, and map pipeline hotkeys to native CGKeyCode values.
Contributor
There was a problem hiding this comment.
Hey - 我在这里给出了一些整体层面的反馈:
- 前端中的 macOS 错误处理(localizeControllerError)目前依赖对错误消息内容的子字符串匹配;可以考虑改用后端提供的结构化错误码或专用错误类型,这样可以让本地化和分支逻辑在未来错误消息发生变更时更稳健。
- macos_system_version_supported 对任何无法解析的版本字符串都会静默返回 false;如果 sysctl 返回了意料之外的格式,你可能需要记录日志或以更明确的诊断信息形式暴露出来,以便区分系统信息格式异常和确实不受支持的系统版本。
用于 AI Agents 的提示词
Please address the comments from this code review:
## Overall Comments
- The macOS error handling on the frontend (localizeControllerError) depends on substring matches in error messages; consider using structured error codes or dedicated error types from the backend to make localization and branching more robust to future message changes.
- macos_system_version_supported silently returns false for any unparsable version string; if sysctl returns unexpected formats, you may want to log or surface a more explicit diagnostic to distinguish malformed system info from genuinely unsupported versions.帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续的代码审查。
Original comment in English
Hey - I've left some high level feedback:
- The macOS error handling on the frontend (localizeControllerError) depends on substring matches in error messages; consider using structured error codes or dedicated error types from the backend to make localization and branching more robust to future message changes.
- macos_system_version_supported silently returns false for any unparsable version string; if sysctl returns unexpected formats, you may want to log or surface a more explicit diagnostic to distinguish malformed system info from genuinely unsupported versions.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The macOS error handling on the frontend (localizeControllerError) depends on substring matches in error messages; consider using structured error codes or dedicated error types from the backend to make localization and branching more robust to future message changes.
- macos_system_version_supported silently returns false for any unparsable version string; if sysctl returns unexpected formats, you may want to log or surface a more explicit diagnostic to distinguish malformed system info from genuinely unsupported versions.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Return an explicit diagnostic when kern.osproductversion cannot be parsed, log the raw value, and localize the new error across supported languages.
Contributor
Author
|
Addressed the system-version parsing feedback in b4a5a0a:
Regarding structured errors: the current project command boundary consistently uses |
Owner
|
冲突了,康康 |
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.
Closes #242
Summary
MacOSsupport with the correctmacos.title_regexcontractRelation to #271
This supersedes #271 by reimplementing its approach on the current
mainbranch and addressing the remaining protocol, compatibility, permission, and hotkey gaps.Validation
pnpm buildcargo check --lockedcargo test --locked --lib(6 passed)git diff --checkQA note
Runtime verification on macOS 14+ hardware is still recommended for the first-run TCC permission flow, GlobalEvent/PostToPid input behavior, and non-US keyboard layouts.