[app] Quote tooltip is misaligned when the first selected line spans multiple inline fragments

Open 💬 0 comments Opened Jul 17, 2026 by fyy99

What version of the Codex App are you using (From “About Codex” dialog)?

26.715.21425 (5488)

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

When selecting text in an assistant response, the floating "Quote" action is positioned incorrectly if the selected portion of the first visual line is rendered as multiple inline fragments—for example, plain text + inline code + trailing plain text.

The action is centered above only the first fragment, so it appears noticeably to the left of the actual center of the selected content.

What steps can reproduce the bug?

  1. Ask Codex to output a sentence containing inline code, for example: Please verify build_123 before continuing., with build_123 rendered as inline code.
  2. Select the whole sentence so the selection crosses the leading plain text, the inline-code element, and the trailing plain text.
  3. Observe the floating "Quote" action after releasing the pointer.

The issue is intermittent across content, but it reproduces when one visual line is split into multiple inline-rendered fragments.

What is the expected behavior?

The floating "Quote" action should be centered above the horizontal union of all selected fragments on the first visual line, rather than above only the first fragment.

Additional information

Root-cause hypothesis (inference only; not based on access to Codex App source code): Range.getClientRects() returns multiple rectangles for a single visual line when a selection crosses inline DOM nodes. The positioning logic appears to anchor to the first non-empty rectangle. Grouping all non-empty rectangles that vertically overlap the first selected visual line, computing their horizontal union, and centering the action above that union should avoid the offset.

I searched the existing Codex issues for quote/selection tooltip alignment problems and did not find an obvious duplicate.

View original on GitHub ↗