Skip to content

refactor(goto): drop heuristicPopupSearchTimeout override, use default#828

Merged
Kikobeats merged 1 commit into
masterfrom
feat/autoconsent-heuristics
Jul 9, 2026
Merged

refactor(goto): drop heuristicPopupSearchTimeout override, use default#828
Kikobeats merged 1 commit into
masterfrom
feat/autoconsent-heuristics

Conversation

@Kikobeats

@Kikobeats Kikobeats commented Jul 9, 2026

Copy link
Copy Markdown
Member

Measured: the raised 500ms cap only engages on ~200k-element DOMs (a 100k-element page's heuristic scan is 69ms, under the 100ms default) and never gates request wall-clock, since autoconsent runs async. Reverting to the default 100 removes the theoretical worst case at zero detection cost. tier2 and enablePopupMutationObserver stay.


Note

Low Risk
Config-only tweak for CMP heuristics; only affects rare very large DOMs where scans might exceed 100ms, with no changes to auth, networking, or core goto flow.

Overview
Stops passing heuristicPopupSearchTimeout: 500 in the autoconsent initResp config so DuckDuckGo autoconsent uses its built-in 100ms cap for heuristic DOM popup scans.

heuristicMode: 'tier2' and enablePopupMutationObserver are unchanged. Unit tests and AVA snapshots were updated to match the slimmer config shape (no assertion on the removed key).

Reviewed by Cursor Bugbot for commit 074b53d. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Bug Fixes

    • Updated consent handling settings to use the latest heuristic behavior, removing an outdated timeout value.
    • Kept the rest of the consent banner and blocking behavior unchanged.
  • Tests

    • Adjusted unit test expectations to match the updated consent configuration.
    • Refreshed snapshot output to reflect the new configuration shape.

Measured: the raised 500ms cap only engages on ~200k-element DOMs (a 100k-element page's heuristic scan is 69ms, under the 100ms default) and never gates request wall-clock, since autoconsent runs async. Reverting to the default 100 removes the theoretical worst case at zero detection cost. tier2 and enablePopupMutationObserver stay.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 335afc77-0c5f-4c7d-9e4a-543d2d9bf675

📥 Commits

Reviewing files that changed from the base of the PR and between 797bbea and 074b53d.

⛔ Files ignored due to path filters (1)
  • packages/goto/test/unit/adblock/snapshots/index.js.snap is excluded by !**/*.snap
📒 Files selected for processing (3)
  • packages/goto/src/adblock.js
  • packages/goto/test/unit/adblock/index.js
  • packages/goto/test/unit/adblock/snapshots/index.js.md
💤 Files with no reviewable changes (2)
  • packages/goto/src/adblock.js
  • packages/goto/test/unit/adblock/index.js

📝 Walkthrough

Walkthrough

The heuristicPopupSearchTimeout configuration option is removed from autoconsentConfig in adblock.js. Corresponding unit test assertions and the AVA snapshot for initResp/config are updated to remove references to this key from expected config keys and serialized JSON output.

Changes

Adblock Heuristic Timeout Removal

Layer / File(s) Summary
Remove heuristicPopupSearchTimeout config and update tests
packages/goto/src/adblock.js, packages/goto/test/unit/adblock/index.js, packages/goto/test/unit/adblock/snapshots/index.js.md
The heuristicPopupSearchTimeout: 500 setting is removed from autoconsentConfig; the config-shape test drops its related assertion, and the AVA snapshot's configKeys and configStr are updated to exclude the removed key.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: removing the heuristicPopupSearchTimeout override and using the default behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/autoconsent-heuristics

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Kikobeats Kikobeats merged commit b040953 into master Jul 9, 2026
11 of 12 checks passed
@Kikobeats Kikobeats deleted the feat/autoconsent-heuristics branch July 9, 2026 13:34
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.

1 participant