fix(web): handle the 2026-09 ChatGPT redesign (composer, send, turns, blob: images) - #42
Conversation
… blob: images) ChatGPT is rolling out a redesigned chat UI that removed every hook the web backend relied on: the composer lost #prompt-textarea, Send lost its testid and got a localized label, [data-message-author-role] is gone (turns are now div[data-turn-key], and the whole thread is rendered twice), and the result image is a blob: <img> in [data-testid=generated-image-preview]. - Selectors live in WEB_*_SEL constants shared by the page JS and the chrome-use commands; each keeps the legacy selector and adds the redesign. - Send is scoped to the composer's form and never matches voice/dictation. - User turns are counted per distinct turn key, so the doubled thread and nested markers count once. - A redesigned reply counts only once it has content (markdown or gallery). - blob: results are accepted once decoded and fetched in the page; if the blob was revoked, the decoded <img> is re-encoded as PNG in the page. - Stop button matches localized labels (停止/中止). - Tests hold the selectors to a scrubbed live capture of the legacy layout and a fixture of the redesign built from the DOM recorded in #41. Fixes #41
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe web backend now supports legacy and redesigned ChatGPT layouts for prompt submission and generated-image detection. It also retrieves generated images served through page-local ChangesWeb backend compatibility
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The change adds support for the redesigned ChatGPT layout and blob-URL images while keeping the legacy layout working. No merge-blocking issues were found. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change broadens support within an existing ChatGPT browser session, without an identified new external entrypoint or demonstrated security-control bypass. The redesigned layout has not been verified against a live account, and behavior with multiple matching composer forms remains uncertain. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 23.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 30 functions across 1 files. (5 skipped: 5 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #41
ChatGPT's redesigned chat UI (rolling out per account) removed every DOM hook the web backend used. This keeps the legacy selectors and adds the redesigned ones next to them.
#prompt-textareaform div.ProseMirror[contenteditable=true]button[data-testid=send-button]button[type=submit], localized label (发送)[data-message-author-role]div[data-turn-key]+[data-user-message-bubble]+h4[data-conversation-role=assistant], whole thread rendered twice<img src=…estuary/content…><img src="blob:https://chatgpt.com/…">in[data-testid=generated-image-preview]Changes
WEB_*_SELconstants, shared by the page JS and the chrome-usefill/clickcommands.form:has(div.ProseMirror…)) and excludes voice/dictation buttons.data-turn-key, so the doubled render and nested markers count once.blob:results are accepted once decoded and downloaded inside the page. If the blob was revoked, the page re-encodes the decoded<img>as PNG.停止,中止).Tests
tests/fixtures/chatgpt-thread-legacy.html: a scrubbed live capture of the legacy layout from a real run.tests/fixtures/chatgpt-thread-redesign.html: the redesign, built from the DOM recorded in web backend broken by ChatGPT UI redesign (composer / send button / turn markers / blob: image src) #41. The account used here is still served the legacy layout, so the redesign couldn't be captured live.--backend webgeneration on the legacy layout (regression check) saved a valid 1254x1254 PNG.Summary by CodeRabbit
blob:URLs readable only by the page.