Skip to content

fix(adapter): prevent panel avoidance from over-constraining ChatGPT composer width - #808

Merged
urzeye merged 3 commits into
mainfrom
fix/chatgpt-avoidance-composer-width
Jul 28, 2026
Merged

fix(adapter): prevent panel avoidance from over-constraining ChatGPT composer width#808
urzeye merged 3 commits into
mainfrom
fix/chatgpt-avoidance-composer-width

Conversation

@urzeye

@urzeye urzeye commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

ChatGPT 2025 redesign nests the composer input area inside #thread, sharing max-w-(--thread-content-max-width) containers (Tailwind v4) with conversation content. The previous broad [class*="thread-content-max-width"] selector matched both thread content and composer wrappers, causing panel avoidance CSS to apply redundant max-width constraints across multiple wrapper layers and collapse the input box horizontally.

Changes

  • Split CHATGPT_THREAD_WIDTH_SELECTOR into three independent WidthSelectorConfig entries in getPanelAvoidanceConfig(). Each selector now generates its own CSS rule — if :has() fails in a browser, only that rule is dropped; the other two survive independently.
  • Add :not(:has(form[data-type="unified-composer"])) to thread content and legacy selectors, so they exclude composer-containing wrappers while still constraining the composer form directly via a separate selector.
  • Remove dead #composer-background selector — this element no longer exists in the current ChatGPT DOM.
  • Keep page-width getWidthSelectors() unchanged — page-width mode constrains all thread-content-max-width elements including composer wrappers, which is the correct behavior when no panel is open.

Verification

  • pnpm typecheck — passed
  • pnpm lint:check — no new warnings
  • pnpm format:check — passed (unrelated chatgpt-demo.htm excluded)

urzeye added 3 commits July 28, 2026 12:30
…composer width

ChatGPT 2025 redesign nests the composer input area inside #thread,
sharing max-w-(--thread-content-max-width) containers (Tailwind v4)
with conversation content. The previous broad [class*="thread-content-max-width"]
selector matched both thread content and composer wrappers, causing
panel avoidance CSS to apply redundant max-width constraints across
multiple wrapper layers and collapse the input box horizontally.

- Split THREAD_WIDTH_SELECTOR into three independent WidthSelectorConfig
  entries so :has() failure in one does not cascade to the others
- Add :not(:has(form[data-type="unified-composer"])) to thread content
  and legacy selectors to exclude composer-containing wrappers
- Remove dead #composer-background selector (element no longer in DOM)
@urzeye urzeye self-assigned this Jul 28, 2026
@urzeye urzeye added the bug Something isn't working label Jul 28, 2026
@urzeye urzeye added this to the v1.1.8 milestone Jul 28, 2026
@urzeye
urzeye merged commit b83e7c9 into main Jul 28, 2026
1 check passed
@urzeye
urzeye deleted the fix/chatgpt-avoidance-composer-width branch July 28, 2026 04:35
@github-project-automation github-project-automation Bot moved this from Todo to Done in Ophel Development Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant