Detect pending tab navigations for popup domain suggestions - #544
Merged
Conversation
Agent-Logs-Url: https://github.com/salarcode/SmartProxy/sessions/ce813f92-b526-45e7-b41c-0b2152e4e5a2 Co-authored-by: salarcode <1272095+salarcode@users.noreply.github.com>
Agent-Logs-Url: https://github.com/salarcode/SmartProxy/sessions/ce813f92-b526-45e7-b41c-0b2152e4e5a2 Co-authored-by: salarcode <1272095+salarcode@users.noreply.github.com>
Agent-Logs-Url: https://github.com/salarcode/SmartProxy/sessions/ce813f92-b526-45e7-b41c-0b2152e4e5a2 Co-authored-by: salarcode <1272095+salarcode@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Enhance popup menu for domain suggestion during navigation
Detect pending tab navigations for popup domain suggestions
May 19, 2026
There was a problem hiding this comment.
Pull request overview
Tracks pending main-frame navigations so popup domain suggestions reflect destinations before page loading completes.
Changes:
- Adds
webNavigationtracking and URL reconciliation. - Adds navigation permissions to browser manifests.
- Adds focused utility and tab-navigation tests.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/core/TabManager.ts |
Tracks navigation events and updates tab URLs. |
src/lib/Utils.ts |
Adds transient and pending URL logic. |
src/tests/TabManager.test.ts |
Tests navigation tracking behavior. |
src/tests/Utils.test.ts |
Tests URL preservation helpers. |
package.json |
Configures Jest for TypeScript tests. |
src/manifest-chrome.json |
Adds navigation permission. |
src/manifest-chrome-mv2.json |
Adds navigation permission. |
src/manifest-edge.json |
Adds navigation permission. |
src/manifest-firefox.json |
Adds navigation permission. |
src/manifest-firefox-unlisted.json |
Adds navigation permission. |
src/manifest-firefox-android.json |
Adds navigation permission. |
src/manifest-opera.json |
Adds navigation permission. |
src/manifest-thunderbird.json |
Adds navigation permission. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/lib/Utils.ts:303
- This predicate still allows a lagging real
tabs.queryURL to overwrite the pending URL.updateActiveTabruns on everytabs.onUpdated; afteronBeforeNavigatestoreshttps://new.example, a query still reporting the previoushttps://old.examplemakes this returnfalse, restoring the old URL and reintroducing the popup lag. URL shape cannot distinguish a pending navigation from error recovery (and also prevents recovery to a legitimateabout:blank); track explicit pending-navigation state and clear/override it on commit or error instead.
return Utils.isTransientTabUrl(incomingUrl) && !Utils.isTransientTabUrl(existingUrl);
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.
Popup domain suggestions previously depended on
tabs.onUpdated, so they could lag while a page was still loading. This change tracks main-frame navigation earlier viawebNavigation, while falling back to the current document URL if navigation is cancelled.Navigation tracking
webNavigationmain-frame events inTabManager.Extension permissions
webNavigationpermission across supported manifests.Test coverage
TabManagertests for: