紧急兼容新版 App 的桌宠真实鼠标交互 / Urgent compatibility fix for real-mouse pet interaction#1555
Open
Yuimi-chaya wants to merge 2 commits into
Open
紧急兼容新版 App 的桌宠真实鼠标交互 / Urgent compatibility fix for real-mouse pet interaction#1555Yuimi-chaya wants to merge 2 commits into
Yuimi-chaya wants to merge 2 commits into
Conversation
中文:适配新版 Codex App 的 avatar overlay 生命周期变化,避免瞬时能力探测失败、旧 driver 清理和迟到 dispatcher 订阅停掉新的真实鼠标 runtime。改用宠物几何边界优先让出原生 hover/拖拽。此提交不包含桌宠持续状态功能。 English: Adapt the real-mouse pet runtime to the new Codex App avatar-overlay lifecycle. Transient capability probe failures, stale driver cleanup, and late dispatcher subscriptions no longer retire the replacement runtime. Mascot geometry yields to native hover and drag interaction. Persistent pet status is intentionally excluded.
Yuimi-chaya
force-pushed
the
codex/pet-real-mouse-app-compat
branch
from
July 18, 2026 23:43
858b35f to
29f8951
Compare
Contributor
Author
|
已补充 Pointer Capture 与共享拖拽所有权修复。进一步排查确认,旧实现仅维护 dragging 状态,指针移出桌宠边界后事件可能落到下层页面,导致偶发拖拽失效或点击穿透。当前追加补丁已在 Codex App 26.715.4045.0 完成真人测试,边界外持续拖拽、松开恢复、点击穿透防护以及 hover/视线优先级均通过。PR 文案与验证信息也已同步更新,麻烦继续审查。 |
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.
中文
为什么需要这次紧急兼容更新
PR #1455 合并后,Codex++ 已经能够把 V2 桌宠原本由 Computer Use 虚拟光标驱动的视线动作映射到 Windows 真实鼠标。这个功能在当时的 Codex App 中可以正常工作,但 Codex App
26.715.2305.0之后更新了 avatar overlay 的页面生命周期、模块加载时序和 execution context 切换方式,原有 runtime 开始出现新的竞态。真实使用中会出现以下现象:
后续排查还确认了一个更直接的拖拽根因:原脚本只维护
dragging布尔状态,没有真正建立浏览器 Pointer Capture。指针离开桌宠边界后,后续事件可能被下层页面接收,于是表现为拖不动、拖到一半失去交互,或点击直接穿透到桌宠背后的界面。这不是 #1455 初始实现时就存在的问题,而是新版 Codex App 改变运行时行为后产生的兼容回归。如果不及时合并,已经进入主干的真实鼠标桌宠功能在新版 App 上会表现为时好时坏,用户只能反复切换开关或重启,并且可能遇到桌宠无法拖拽、点击穿透等明显交互问题。
修改内容
setPointerCapture,结束时调用releasePointerCapture;即使指针移出桌宠边界,拖拽事件仍由桌宠持有。pointercancel、lostpointercapture、窗口失焦、runtime 停止和重新注入时统一清理拖拽所有权,避免残留状态。范围边界
验证
node --check assets/inject/pet-real-mouse-inject.jscargo fmt --all -- --checkgit diff --checkcargo test -p codex-plus-core --test cdp_bridge -j 2,78/78通过1/1通过cargo check -p codex-plus-launcher -j 226.715.4045.0真人测试通过:桌宠边界外持续拖拽、松开恢复、点击穿透防护、原生 hover 与真实鼠标视线优先级均正常这是针对已合并功能的新版 App 紧急兼容更新,希望可以尽快审查并合并,避免 #1455 在当前 Codex App 上继续以不稳定状态提供给用户。
English
Why this urgent compatibility update is needed
After PR #1455 was merged, Codex++ could map the V2 pet gaze animation, which was originally driven by the Computer Use virtual cursor, to the real Windows mouse. The feature worked with the Codex App version available at that time. Codex App releases after
26.715.2305.0changed the avatar-overlay page lifecycle, module-loading timing, and execution-context transitions, exposing new races in the existing runtime.Observed symptoms include:
Further investigation confirmed a direct drag root cause: the old script tracked only a
draggingboolean and never established browser Pointer Capture. Once the pointer left the pet bounds, subsequent events could be delivered to the underlying page, causing drag loss or click-through interaction.This was not an original #1455 defect. It is a compatibility regression caused by newer Codex App runtime behavior. Without this update, the already-merged real-mouse pet feature remains unreliable on current App versions, forcing users to toggle or restart and sometimes leaving the pet non-draggable with click-through interaction.
Changes
setPointerCaptureon drag start andreleasePointerCaptureon completion, retaining drag ownership outside the pet bounds.pointercancel,lostpointercapture, window blur, runtime shutdown, and reinjection.Scope
Validation
node --check assets/inject/pet-real-mouse-inject.jscargo fmt --all -- --checkgit diff --checkcargo test -p codex-plus-core --test cdp_bridge -j 2,78/78passed1/1passedcargo check -p codex-plus-launcher -j 226.715.4045.0: dragging beyond pet bounds, release recovery, click-through prevention, native hover, and real-mouse gaze priority all passedBecause this repairs an already-merged feature broken by newer App lifecycle behavior, an expedited review and merge would prevent #1455 from remaining unreliable for current Codex App users.