fix(macos): detect ChatGPT by executable path - #274
Draft
Es1lama wants to merge 1 commit into
Draft
Conversation
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.
Summary / 摘要
pgrep -x ChatGPT/Codexstatus detection with one process-table scan that matches the full main executable command path.codexresult in the menu-bar apply prompt so both UI paths report the same state.Type / 类型
Platform / 平台
Self-check / 自测
Docs-only / 仅文档
macOS (when code under
macos/changes)macos/tests/run-tests.shpassed / 已通过macos/scripts/doctor-macos.shverify-dream-skin-macos.shor Desktop VerifyWindows (when code under
windows/changes)install/start/verify/restorescripts exercised / 已按改动跑过对应脚本User-facing / 用户可见变更
macos/CHANGELOG.md(andmacos/VERSIONif release-worthy) / 已更新 changelog(发版时再 bump VERSION)Security / 安全
127.0.0.1) where applicable / CDP 仍仅本机回环(如适用)Notes / 补充
Root cause and impact
On the reproduced macOS 26 session, the main process was:
but
psexposed itscommvalue as/Applications/Ch. Thereforepgrep -x ChatGPTreturned no PID even while ChatGPT was running. The menu showed ChatGPT as closed and the apply action offered the cold-start prompt.The status path remains deliberately cheap: it scans
psonce, matches only the saved or standard main executable path, and does not invoke Node, CDP,codesign, orlsof. Helper processes do not use the main executable path. Sensitive start/stop paths continue to use the existing signed runtime and executable identity validation incommon-macos.sh.Validation
pgrep -x ChatGPTreturned no PID whilepsshowed the complete main command path.status-dream-skin-macos.sh --jsonreportedcodexRunning: truefor that same running process./bin/sleep.CI=1 CODEX_DREAM_SKIN_SKIP_DOCTOR=1 macos/tests/run-tests.shpassed twice after the final fixture cleanup, including signed-runtime theme switching and runtime-state integration.git diff --checkpassed.The repository skipped SwiftPM/XCTest because this host has Command Line Tools rather than a full matching Xcode macOS platform. Doctor was deliberately skipped; this change only affects non-destructive status presentation and prompt selection.