fix: detect same-URL navigations via webNavigation.onCommitted for st…#501
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds same-URL navigation detection in the background script to ensure activation/injection logic runs even when tabs.onUpdated doesn’t emit a changeInfo.url update (e.g., affiliate activation flows that redirect back to the same retailer URL, like StubHub).
Changes:
- Add
chrome.webNavigation.onCommittedlistener (top-frame) and per-tab URL deduping to catch same-URL navigations. - Refactor “page complete” inline-search scraping into a shared helper.
- Update manifest/docs to include the
webNavigationpermission (documented as optional/recommended).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| extension-files/test-extension/public/manifest.json | Adds webNavigation permission to enable onCommitted-based navigation detection. |
| extension-files/bringweb3-sdk/utils/background/handleTabEvents.ts | Adds webNavigation.onCommitted handling + dedup map; refactors inline-search link scraping into onPageComplete. |
| extension-files/bringweb3-sdk/README.md | Documents webNavigation permission and explains why it’s recommended. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kalfada
requested changes
May 13, 2026
kalfada
left a comment
Contributor
There was a problem hiding this comment.
Please see the comments I added, also, every change in the SDK folder requires a changeset comment, lmk if you need help with that
f78272e to
78496e3
Compare
kalfada
reviewed
May 17, 2026
78496e3 to
6dc9a0a
Compare
kalfada
reviewed
May 19, 2026
- Add optional webNavigation.onCommitted listener to detect same-URL navigations - Add webNavigation.onCompleted for inline-search page scraping - Fall back to chrome.tabs.onUpdated when webNavigation permission is absent - Add 'webNavigation' to test-extension manifest permissions - Update README to document the optional webNavigation permission
6dc9a0a to
829080e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AB: “The ‘Activated’ popup doesn’t appear after activation on StubHub.com.”
https://github.com/Bring-Web3-LTD/TODO/issues/355