refactor: reorganize client transport and extension internals
- Split client, native, remote, serve, markdown, and SDK internals into focused packages with direct imports. - Move local and remote transport framing/protocol helpers behind clearer module boundaries. - Break up the extension injected DOM logic into a separate content dispatch bundle and dedicated content modules. - Add explicit client handling for passive remote discovery without noisy PQ warnings. - Keep behavior covered with updated unit, integration, and extension tests.
This commit is contained in:
@@ -51,7 +51,16 @@ export class NavigationCommands extends CommandGroup {
|
||||
|
||||
private async navTo({ tabId, url }: NavToArgs) {
|
||||
const tab = await chrome.tabs.update(tabId, { url });
|
||||
return { id: tab.id, url: tab.url || url };
|
||||
const deadline = Date.now() + 1000;
|
||||
while (tabId && Date.now() < deadline) {
|
||||
const current = await chrome.tabs.get(tabId);
|
||||
const currentUrl = current.url || current.pendingUrl || "";
|
||||
if (currentUrl === url || currentUrl.startsWith(url)) {
|
||||
return { id: current.id, url: currentUrl };
|
||||
}
|
||||
await new Promise(r => setTimeout(r, 50));
|
||||
}
|
||||
return { id: tab.id, url: tab.url || tab.pendingUrl || url };
|
||||
}
|
||||
|
||||
private async navReload({ tabId }: NavTabArgs, bypassCache: boolean) {
|
||||
|
||||
Reference in New Issue
Block a user