Fix floating Codex++ menu overlapping long thread titles#75
Merged
BigPizzaV3 merged 2 commits intoMay 14, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a Codex Desktop header layout regression where the floating Codex++ menu could anchor to a button inside the thread title region (e.g., the ... menu), causing overlap with long thread titles. It narrows the anchor-candidate logic so the floating menu positions relative to the actual right-side header toolbar cluster.
Changes:
- Added
isHeaderToolbarButton(button, header)to more precisely filter eligible header toolbar buttons for anchoring. - Updated floating-menu positioning logic to use the new toolbar-button predicate instead of broad “right half of window” matching.
- Extended renderer-inject contract tests to assert the presence of the new anchor-selection logic.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
codex_session_delete/inject/renderer-inject.js |
Tightens floating Codex++ menu anchor selection to avoid title-region buttons and prevent overlap with long titles. |
tests/test_renderer_script.py |
Adds assertions ensuring the updated floating-anchor selection logic remains present in the injected renderer script. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
This PR fixes a header layout regression where the floating
Codex++menu can overlap long thread titles in Codex Desktop.Problem
When the thread title is short, the floating
Codex++label appears in the expected position.When the thread title is long, the floating
Codex++label can shift left into the title area and visually overlap the thread title text.This is not a sidebar issue, and it is not a generic text truncation problem in the title itself. It is a regression in the floating menu positioning logic.
This regression was introduced by commit
0e7175a(refactor: 标题、操作确认样式优化).As shown in the figure:

When
Codex++cannot be inserted into the native menu area, it falls back to the floating header mode (codex-plus-menu-floating) and usesupdateFloatingCodexPlusMenuPosition()to choose a header button as its positioning anchor.The anchor selection in that refactor was too broad. It treated any header button on the right half of the window as a possible anchor:
Codex++That also includes the thread-title action button (
...) inside the title region.In long-title scenarios, the floating
Codex++menu was therefore anchored against a button inside the title region instead of the real right-side toolbar cluster, which caused the overlap.I confirmed this by inspecting the live Codex header DOM through CDP:
.ms-auto.flex.shrink-0.items-centerFix
isHeaderToolbarButton(button, header)header.children[2])Result
Codex++no longer anchors itself to the title-region...buttonCodex++labelValidation
Passed:
node --check codex_session_delete/inject/renderer-inject.jspytest -q tests/test_renderer_script.py tests/test_cdp.pyResult:
37 passedScreenshot