| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
When an accessibility node is marked as ignored with no name, the code was returning null immediately, which cut off the entire subtree below it. This caused browser_snapshot to return only the root element on real websites like Google. Now it still recurses into children and flattens them: - 0 children -> null - 1 child -> promoted up - multiple children -> wrapped in transparent generic node
wow, way to call me out for vibe coding too much 😭 |
Sorry, something went wrong.
There was a problem hiding this comment.
Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)src/lib/snapshot.ts:48
const uid = nextUid++;
const node: SnapshotNode = { uid, role: "generic", children };
byUid.set(uid, node);
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Problem
browser_snapshot only returned the root element on real websites (e.g. Google, Example Domain). The accessibility tree was being truncated because walkAXTree returned null immediately for any ignored node without a name, cutting off its entire subtree.
Root Cause
Chrome's accessibility tree wraps content in <div> containers with role none and ignored=true. When walkAXTree encountered these nodes, the early return null at line 35 prevented traversal into their children, which contained the actual page content.
Fix
Instead of returning null, the function now:
Testing
Verified with a standalone CDP script and in OpenCode against: