Skip to content

fix(hackbrowser): wait for DOM quiescence to capture timer-mounted content - #130

Open
lorenzozanee wants to merge 1 commit into
CyberStrikeus:mainfrom
lorenzozanee:fix/hackbrowser-time-dependent-dom-05
Open

fix(hackbrowser): wait for DOM quiescence to capture timer-mounted content#130
lorenzozanee wants to merge 1 commit into
CyberStrikeus:mainfrom
lorenzozanee:fix/hackbrowser-time-dependent-dom-05

Conversation

@lorenzozanee

Copy link
Copy Markdown

What does this PR do?

Fixes #103. networkidle misses content mounted by setTimeout with no network activity, so the scan finishes before timer-driven widgets appear. This adds a bounded DOM quiescence wait (quiet 600 ms, timeout 5 s) to the post-navigation settle step; stable pages add ~600 ms and the 4.5 s repro is now captured. The transient-UI auto-close gap was already fixed on main by 01647a5a.

Type of change

  • Bug fix
  • New feature / agent
  • Security tool / MCP server / Bolt plugin
  • Agent skill / knowledge base
  • UI / TUI improvement
  • Documentation
  • Refactor / performance
  • CI / infrastructure

Security impact

  • This PR adds or modifies tool execution (shell, file, network)
  • This PR changes agent permissions or scope
  • This PR modifies authentication / authorization logic
  • This PR has no security impact

How did you verify it works?

Synthetic localhost page that appends a button after 4.5 s — before the fix the scan never saw it, after it is found. Existing hackbrowser unit tests still pass.

Checklist

  • bun turbo typecheck passes
  • Tested locally with at least one LLM provider
  • PR is focused on a single change
  • No secrets, credentials, or API keys in the diff
  • Breaking changes are documented (if any)

Reviewers: @badchars

…ntent

The crawler's stabilizeAfterGoto only waited for networkidle,
so content injected via setTimeout (no network activity) was
missed when the scan ran before the timer fired. Add a bounded
DOM-mutation quiescence wait (quiet 600ms, timeout 5000ms) that
covers the 4.5s synthetic repro while costing only ~600ms on
stable pages and capping continuous-mutation pages. Closes CyberStrikeus#103.
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.

hackbrowser crawling engine: time-dependent DOM defeats the crawl (transient-UI decay vs latency; timer-mounted content)

1 participant