Skip to content

fix(chat): 对话区域长按菜单冲突解决 - #654

Open
mrytsr wants to merge 1 commit into
spacering-net:mainfrom
mrytsr:fix/mobile-message-selection-menu
Open

mrytsr wants to merge 1 commit into
spacering-net:mainfrom
mrytsr:fix/mobile-message-selection-menu

Conversation

@mrytsr

@mrytsr mrytsr commented Sep 4, 2026

Copy link
Copy Markdown

问题

在手机上长按消息文本时,浏览器的原生文本选择 UI 和会话级 Radix 右键菜单会同时弹出,两个菜单互相遮挡,导致选择和复制文本变得困难。

解决方案

在进入会话内容区域时记录 pointer 类型。触摸或触控笔长按文本时,只阻止事件传播到会话级应用菜单,不调用 preventDefault(),因此系统文本选择菜单仍然可以正常出现。

鼠标右键行为保持不变,仍会打开会话菜单。原有的选区快捷操作(复制、引用、提问)也保持可用。

测试

  • 已运行 pnpm run lint
  • 已运行相关 Vitest 测试,覆盖新的 pointer guard、选区气泡、聊天输入、图片操作、文件引用操作和 group shell reconciliation,共 70 个测试通过
  • 已验证:
    • 触摸/触控笔长按不再弹出应用会话菜单
    • 原生文本选择菜单未被阻止
    • 鼠标右键仍正常打开会话菜单
image

xyalter pushed a commit to lesscodex/codeg that referenced this pull request Oct 31, 2026
## Summary

Fix the `/compact` completion race observed while implementing client
system prompts.

Compaction item completion is a progress/lifecycle signal, not proof
that Codex has released the turn. The command now waits for the matching
terminal `turn/completed` notification before completing foreground
work. It returns the real turn result through the existing success,
cancellation, and failure handling.

- V1 holds the prompt response until the compact turn ends.
- V2 still accepts the prompt early, but holds idle and the next queued
prompt until the turn ends.
- Compaction progress updates, including legacy `thread/compacted`
rendering, are unchanged.
- Existing close/dispose/process-exit handling still rejects pending
waits and releases observers.
- Remove the runtime-log wait from the real-process system-prompt
integration fixture: it now starts the next probe immediately after ACP
completion.

Standard subagent support remains a separate work package.

## Validation

- Added a regression assertion that failed on the original
implementation: item completion resolved the command before turn
completion.
- Added v1/v2 wire-order snapshots proving the next prompt cannot start
in that gap.
- Cover early success/failure/cancellation before acknowledgement,
unrelated turn completion, and failure/cancellation after item
completion; retain rejection, cancellation, and connection/process-exit
coverage.
- `npm run typecheck` — passed, including examples.
- `npm test` — **1,867 passed**, 36 skipped.
- `npm run build` — passed.
- `npm run test:integration` — **7 passed**, including immediate
compact-to-prompt transitions through ACP v1/v2 against real Codex
app-server with a local mock model, without runtime-log synchronization.
- `npm run codex-test -- -p '/compact' ... -o summary` — passed against
real Codex; ended with `end_turn` and observed both item and turn
completion.
- `git diff --check` — passed.

The full live-model E2E suite and local cross-platform binary bundles
were not run; CI runs binary bundling.
xyalter pushed a commit to lesscodex/codeg that referenced this pull request Oct 31, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.3.0](agentclientprotocol/codex-acp@v2.2.2...v2.3.0)
(2026-10-26)


### Features

* add ACP v2 support again
([spacering-net#620](agentclientprotocol/codex-acp#620))
([9e1690f](agentclientprotocol/codex-acp@9e1690f))
* mark session list rows of worktrees Codex made (agentWorktree)
([spacering-net#631](agentclientprotocol/codex-acp#631))
([aa02d43](agentclientprotocol/codex-acp@aa02d43))
* narrow models to what the providers/set gateway lists
([spacering-net#627](agentclientprotocol/codex-acp#627))
([3f555f9](agentclientprotocol/codex-acp@3f555f9))
* report the model of each native subagent session
([spacering-net#678](agentclientprotocol/codex-acp#678))
([51005a6](agentclientprotocol/codex-acp@51005a6))
* return initial ACP v2 session commands
([spacering-net#652](agentclientprotocol/codex-acp#652))
([5e9b7c5](agentclientprotocol/codex-acp@5e9b7c5))
* support AIR sessionIndex extension
([spacering-net#590](agentclientprotocol/codex-acp#590)) v2
([spacering-net#622](agentclientprotocol/codex-acp#622))
([2fd758c](agentclientprotocol/codex-acp@2fd758c))
* support append-mode ACP system prompts
([spacering-net#653](agentclientprotocol/codex-acp#653))
([5993a12](agentclientprotocol/codex-acp@5993a12))


### Bug Fixes

* disable Codex's Visualize skill, whose output ACP clients show as raw
text
([spacering-net#667](agentclientprotocol/codex-acp#667))
([0ba94f5](agentclientprotocol/codex-acp@0ba94f5))
* display the selected wire provider as JetBrains Air Gateway
([spacering-net#589](agentclientprotocol/codex-acp#589))
([cc54abf](agentclientprotocol/codex-acp@cc54abf))
* explain Codex config load errors caused by a deleted working directory
([spacering-net#626](agentclientprotocol/codex-acp#626))
([a636804](agentclientprotocol/codex-acp@a636804))
* explain invalid_encrypted_content errors after a provider change
([spacering-net#668](agentclientprotocol/codex-acp#668))
([a77829f](agentclientprotocol/codex-acp@a77829f))
* hold a fork back from the session list until its session/fork response
is out
([spacering-net#642](agentclientprotocol/codex-acp#642))
([59974c7](agentclientprotocol/codex-acp@59974c7))
* include subagent edits in the agent file-change report
([spacering-net#632](agentclientprotocol/codex-acp#632))
([7d07123](agentclientprotocol/codex-acp@7d07123))
* leave codex exec runs out of the session list without sessionIndex
([spacering-net#639](agentclientprotocol/codex-acp#639))
([df75d2b](agentclientprotocol/codex-acp@df75d2b))
* migrate to ACP SDK 2.0
([spacering-net#649](agentclientprotocol/codex-acp#649))
([c8fd166](agentclientprotocol/codex-acp@c8fd166))
* publish the commands when the skills change
([spacering-net#643](agentclientprotocol/codex-acp#643))
([a62b568](agentclientprotocol/codex-acp@a62b568))
* report structured ACP v2 failures
([spacering-net#651](agentclientprotocol/codex-acp#651))
([5377bfe](agentclientprotocol/codex-acp@5377bfe))
* show a Codex subagent's follow-up turn in a new subagent session
([spacering-net#634](agentclientprotocol/codex-acp#634))
([7c761c7](agentclientprotocol/codex-acp@7c761c7))
* synchronize ACP v2 foreground state
([spacering-net#650](agentclientprotocol/codex-acp#650))
([986955a](agentclientprotocol/codex-acp@986955a))
* update codex to 0.164.0
([spacering-net#666](agentclientprotocol/codex-acp#666))
([e227c0e](agentclientprotocol/codex-acp@e227c0e))
* wait for the compact turn to finish
([spacering-net#654](agentclientprotocol/codex-acp#654))
([ced4c34](agentclientprotocol/codex-acp@ced4c34))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: acp-release-bot[bot] <246668977+acp-release-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant