fix: Capture modal dialogs and action popups outside main container (#16)#17
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
π‘ 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".
| const addedDialogs = new Set(); | ||
| dialogs.forEach(d => { | ||
| if (cascade.contains(d)) return; | ||
| if (d.offsetParent === null && !d.closest('[class*="toast"]')) return; |
There was a problem hiding this comment.
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 πΒ / π.
|
|
||
| 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 => { |
There was a problem hiding this comment.
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 πΒ / π.
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.