fix: restore compatibility with Antigravity v1.21.6 DOM changes#6
Merged
optimistengineer merged 3 commits intooptimistengineer:mainfrom Mar 28, 2026
Merged
Conversation
added 3 commits
March 27, 2026 20:37
…l class) - Model list items changed from <div> to <button> in 1.21.6+ - Use tag-agnostic 'button, div' selector with class-based filtering - Add 'w-full' to class filter to exclude non-model button matches - Add #conversation element check to waitForCascadePanelReady (1.21.6+ has no separate cascade-panel context; chat DOM is in main context)
…> regex collision Two bugs in htmlToTelegramHtml: 1. Bare <pre>content</pre> blocks (Antigravity renders pipe tables as <pre>) had no handler — the <pre><code> regex skipped them — leaving an orphan </pre> closing tag that caused Telegram 400 'Unexpected end tag' errors. Fix: add explicit bare <pre> handler after the <pre><code> handler. 2. The <p[^>]*> regex was matching <pre> tags (since 'pre' starts with 'p'). This caused the <pre> opening tag to be eaten by the paragraph replacement, leaving only the </pre> closing tag = malformed HTML. Same issue for <div>/<divider>. Fix: add \b word boundary after the element name in <p> and <div> regexes.
- htmlToTelegramMarkdown: 3 new tests covering bare <pre> orphan tag bug and <p[^>]*> regex collision with <pre> tags - cdpService: update fixture and assertion to reflect removal of the cascade-panel context; top workbench context (id 1) is now primary
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
Restores full Remoat compatibility with Antigravity IDE v1.21.6, which shipped a visual redesign of the agent panel that changed the DOM in three ways, breaking the bot.
Related Issues
Closes #
Type of Change
What Changed
1. Model picker —
<div>→<button>(cdpService.ts)Antigravity v1.21.6 changed model dropdown items from
<div class="cursor-pointer">to<button>elements and added aw-fullclass. The old selectors found nothing, making/modelreturn an empty list.Fix: Switched
getUiModels(),getCurrentModel(), andsetUiModel()to tag-agnostic:is(button, div)selectors withw-fullscoping to work across both old and new markup.2. Context readiness —
cascade-panelcontext removed (cdpService.ts)waitForCascadePanelReady()polled for a CDP execution context namedcascade-panel(a sandboxed iframe Antigravity used for the agent panel). That context was removed in v1.21.6 — the panel now renders directly in the main workbench context. The bot would hang forever waiting for a context that no longer exists.Fix: Updated the readiness check to query the main workbench DOM for
#conversationinstead.3. Telegram 400 parse error — orphan
</pre>tag (htmlToTelegramMarkdown.ts)Antigravity renders markdown pipe tables as bare
<pre>raw text</pre>blocks (not<pre><code>). Two bugs in the HTML formatter combined to produce an orphan</pre>closing tag, causing Telegram to reject messages with400 Bad Request: Unexpected end tag:<pre>handler — only<pre><code>pairs were handled. Bare<pre>blocks fell through;stripUnsupportedTagsstripped the opening<pre>but kept</pre>.<p[^>]*>regex matched<pre>tags —<p+[^>]*matchesre+>, making<pre>look like<p re>. The paragraph replacement ate the<pre>opening tag.Fix: Added an explicit bare
<pre>handler (runs after<pre><code>). Added\bword boundary to the<p>and<div>block-level regexes.Checklist
tests/utils/htmlToTelegramMarkdown.test.ts,tests/services/cdpService.test.ts)npm testandnpm run buildpass locally — 704/704 tests passing