Skip to content

fix: Capture modal dialogs and action popups outside main container (#16)#17

Merged
diegosouzapw merged 1 commit into
masterfrom
fix/issue-16-action-buttons-not-captured
Apr 25, 2026
Merged

fix: Capture modal dialogs and action popups outside main container (#16)#17
diegosouzapw merged 1 commit into
masterfrom
fix/issue-16-action-buttons-not-captured

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Fixes #16 by capturing dialogs and popups appended outside the main chat container and injecting them into the HTML payload sent to the mobile UI.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 83ab217a48

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/server.js
const addedDialogs = new Set();
dialogs.forEach(d => {
if (cascade.contains(d)) return;
if (d.offsetParent === null && !d.closest('[class*="toast"]')) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep visible fixed dialogs when collecting popups

The visibility guard d.offsetParent === null drops most fixed-position overlays, because visible position: fixed elements commonly have no offsetParent. In practice this means many modal/dialog popups targeted by this change are still excluded unless their class matches *toast*, so the new capture path can miss exactly the UI it is intended to mirror.

Useful? React with πŸ‘Β / πŸ‘Ž.

Comment thread src/server.js

const textGroups = new Map();
Array.from(clone.querySelectorAll('button, [role="button"], a, summary, span, div, p')).forEach(el => {
Array.from(wrapper.querySelectorAll('button, [role="button"], a, summary, span, div, p')).forEach(el => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid assigning omni indices to elements outside click scope

Switching interactive annotation to wrapper.querySelectorAll(...) adds data-omni-* indices for cloned dialogs outside the chat container, but clickElement() still resolves candidates only under #cascade/#conversation/#chat (same file, lines 1093-1104). When users tap those newly mirrored popup actions, the index/text pair is computed from a broader DOM than the server searches, so remote clicks fail for those controls.

Useful? React with πŸ‘Β / πŸ‘Ž.

@diegosouzapw diegosouzapw merged commit 8cb660b into master Apr 25, 2026
4 checks passed
@diegosouzapw diegosouzapw deleted the fix/issue-16-action-buttons-not-captured branch April 25, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Issue: Action buttons not captured in Omnichat (Antigravity v1.23.2 Compatibility)

1 participant