Skip to content

[Windows][ChatGPT Desktop 26.924.22138][Codex GUI] Inline review comment loses focus to source editor and typing modifies the file #48836

Open

Description

@BSW-FIR

Summary

In the Codex GUI inside ChatGPT Desktop 26.924.22138 on Windows, typing into an inline file review/comment box can move keyboard focus to the underlying source-file editor. The same keystrokes are then inserted into the actual file being reviewed.

This is reproducible with normal English input and is even more visible with a Chinese IME.

Environment

  • Platform: Windows
  • App: ChatGPT Desktop
  • Desktop version: 26.924.22138
  • Surface: Codex GUI → file diff/review → inline comment
  • Input methods tested:
    • Direct English keyboard input
    • Chinese IME (candidate selection / composition commit)

Reproduction

Case 1: English input

  1. Open Codex in ChatGPT Desktop.
  2. Open a file diff/review.
  3. Add an inline comment and click inside the comment input box.
  4. Start typing English text.

Actual behavior

  • Focus jumps from the inline comment box to the underlying source-file editor.
  • The typed characters are inserted directly into the source file.
  • The comment box may remain empty.

Expected behavior

  • Focus should remain in the inline comment input.
  • Keystrokes entered into the comment UI must never modify the source file.

Case 2: Chinese IME

  1. Open Codex in ChatGPT Desktop.
  2. Open an inline comment box in the file review UI.
  3. Start composing Chinese text in the comment box, for example typing pinyin for 你好.
  4. Select/commit the IME candidate.

Actual behavior

  • During or immediately after IME composition commit, focus moves to the underlying source editor.
  • The committed Chinese text can also be inserted into the source file.
  • In some cases the comment box receives the text while the source file receives the same committed text as well.

Expected behavior

  • IME composition and commit should stay fully contained within the comment input.
  • The source editor must not receive keyboard/composition events from the inline comment UI.

Impact

This is more than a focus glitch: simply typing a review comment can unintentionally modify the file being reviewed.

Related issues

The behavior here appears related, but differs in that the leaked input reaches the source-file editor and causes actual file modification.

Activity

  1. added
    bug
    app
    windows-os
    code-review
    on Sep 28, 2026
  2. changed the title [-][Windows Desktop] Inline review comment loses focus to source editor and typing modifies the file[/-] [+][Windows][ChatGPT Desktop 26.924.22138][Codex GUI] Inline review comment loses focus to source editor and typing modifies the file[/+] on Sep 28, 2026
  3. BSW-FIR commented on Sep 30, 2026

    @BSW-FIR
    Author

    Follow-up after updating to ChatGPT Desktop 26.928.20755 on Windows:

    The original reproduction path is no longer available. In 26.928.20755, when I open a file from Files, select text in the file, the previous Comment action no longer appears.

    As a result, I can no longer reproduce the original focus/input leak through that UI path because the inline comment affordance itself is no longer exposed there.

    This does not confirm that the underlying bug was fixed. I have not confirmed whether this is:

    • an intentional removal/rollback of the file comment feature,
    • a temporary feature flag change,
    • or a mitigation for the original focus/input bug.

    For reference:

    • The bug was reproducible in ChatGPT Desktop 26.924.22138.
    • In 26.928.20755, Files → open file → select text no longer shows the Comment option.
  4. yhzhuo commented on Oct 1, 2026

    @yhzhuo

    As a frequent Codex user, I also see the file comment ability is missing. This is critically important for us as developers. Diff comments cannot replace file comments.

    Without file comments, we may need to manually type the path of the files and line numbers and send it to Codex through the prompt, but that has much lower efficiency. Otherwise, we may need to consider using other Custom/Third Party Codex UIs that support the file comments.

  5. caaaptaintop commented on Oct 20, 2026

    @caaaptaintop

    补充 macOS 原生 Markdown 行内评论复现:输入被拦截,并可能双写源文件

    本报告补充 #48836 的 macOS 复现信息。
    相关输入拦截报告:#52092

    环境

    • macOS 26.6.2(25G83)。
    • Codex/ChatGPT 桌面版 26.1013.40934,build 20770,prod 渠道。
    • 2026-10-20 本机应用更新检查返回 up_to_date。
    • 界面:本地 MD 文件的原生选文评论,不是浏览器网页批注或 CLI。

    用户现场观察及文件核验

    1. 在原生 MD 中选中文字,开启行内评论。
    2. 用户确认只输入一次中文“为什么”,评论框和源文件正文同时出现相同文字。
    3. 对磁盘文件与先前备份逐字比较,确认正文实际新增该前缀,排除纯显示问题。
    4. 用户还观察到评论框经常无法输入中文标点、空格,无法删除个别字,只能全选全部删除。完整的全选删除操作尚未在隔离环境复现。

    复现依赖当时的正文选区状态,未证明每次打开评论都必现;原生中文输入法的完整事件顺序尚未记录。

    已核查的代码路径

    安装包 webview/assets/editor-cf45ed7ec3d3.js,SHA-256:
    f0429ba3be8de9f1925bb4c938981ad7188ed5b7356a8100ed94d3419616491e

    • #Ye 用 event.composedPath().includes(正文根节点) 判断输入事件是否归正文所有,没有排除嵌入评论编辑器。
    • beforeinput 除 insertCompositionText 外,先 preventDefault,再交给正文 #ct。因此评论框普通输入和删除可被取消;正文没有选区时也会取消事件,但正文不变。
    • compositionend 会将非空 event.data 交给 #ct('insertText', data),并可使用正文仍保留或重建的选区修改内容,之后进入文件保存链。
    • 独立源码隔离回放验证了空格、中文逗号/句号和向前/向后删除的取消行为;该回放不是原生输入法或完整桌面 UI 重现。

    text-file-editor-tab-content.electron-95148699edb8.js 的 ii() 会在 Markdown 预览选文评论后切到 source 模式,再把 initialCommentRange 传给源码编辑器,因此切回预览不足以隔离该问题。

    这些证据与 #52092 描述的事件归属判断一致,也与本报告实际双写现象吻合;跨版本、跨平台是否为完全相同缺陷,仍请维护者确认。

    预期行为与验收要求

    • 用户可以自由选择任意词句,逐条添加针对性意见。
    • 不同位置的多条意见一起发送后,各自保留选文及对应来源位置。
    • 中文组合输入、中文标点、空格、单字向前/向后删除均正常。
    • 评论框输入和删除只修改评论,磁盘源文件保持不变。
    • 原生正文编辑仍正常;共享输入事件处理应排除独立评论输入区域。

    原生 MD 自由选文批注是本需求的验收目标;网页整段批注或手工描述行号不能替代。

    范围与状态

    客户端包、代码签名和源文件权限未修改。此报告仅含脱敏环境信息、现象、代码定位及验收标准,不含用户文档、截图、完整会话或日志。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugcode-reviewwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions