Repository navigation
Guard macOS-only desktop actions / 限制 macOS 专属操作的平台范围 - #19
Merged
Merged
Conversation
This was referenced Sep 19, 2026
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.
English · 简体中文
English
Do not offer or automatically invoke macOS-only desktop actions on Windows/Linux. Keep the working macOS paths instead of introducing a second IDE-automation implementation.
Problem
IDE auto-reload, quarantine repair, and native switch notifications rely on AppleScript/System Events or
xattr, but their controls and some callers are not restricted to macOS. A savedauto_reload_ide=truecan also invoke the unsupported path after a manual account switch, even without another click on the toolbar option.The failure is at the operating-system boundary; it does not require changing the account-switching algorithm.
Conservative fix
proxy.rsdiff is those two conditions; request forwarding, account selection, retries, and switching logic are not edited.Although the changes touch 9 files, the complete diff is +69/−12 lines, including tests: the same platform boundary must be enforced at the controls, callers, and native entry points. This does not implement Windows IDE automation, add terminal/process-control behavior, alter proxy configuration, or add dependencies/localization.
Verification
Local Windows validation at head
fd64365passed:The 2 frontend contract tests cover platform classification and both reload call sites. The native Windows test confirms unsupported actions return before launching tools. No running IDE or installed-app state was changed. This is guard coverage, not a claim that macOS automation was exercised on a live desktop.
Independent review: one commit directly on upstream
main(f64a44a); no other split PR is required. The intended result is an honest unsupported state on other platforms, not a replacement for the existing macOS functionality.简体中文
在 Windows/Linux 上不要展示为可用或自动调用 macOS 专属操作;保留现有 macOS 路径,不另起一套 IDE 自动化实现。
问题
IDE 自动重载、隔离属性修复和切号系统通知依赖 AppleScript/System Events 或
xattr,但相关控件及部分调用入口没有限制平台。配置中已保存的auto_reload_ide=true也可能在手动切号后触发不受支持的操作,即使用户没有再次点击工具栏开关。这里的问题在操作系统调用边界,不需要改动账号切换算法。
尽量保守的处理
proxy.rs的全部修改仅为这两个条件,不改请求转发、账号选择、重试或切号逻辑。虽然涉及 9 个文件,但含测试的总 diff 仅 +69/−12 行:控件、调用方和原生入口需要一致地限制平台。没有实现 Windows IDE 自动化,没有新增终端启动/进程控制,不改代理配置,也不增加依赖或本地化内容。
验证依据
在 Windows 上针对当前提交
fd64365完成本地验证:2 个前端约束测试覆盖平台识别和两处重载调用;原生 Windows 测试确认不支持的操作会在启动工具前返回。没有操作正在运行的 IDE,也没有修改已安装应用的状态。这些是平台限制测试,不把它表述为 macOS 桌面自动化的实机验证。
**可独立审阅和合并:**直接基于 upstream
main(f64a44a)的单个提交,无须先合并其他 PR。目标只是让其他平台明确显示“不支持”,而不是替换已经存在的 macOS 功能。