From c88f81d354a9e7a8ead4e2e52547eaabf5ccf627 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Thu, 27 Nov 2025 11:21:13 -0800 Subject: [PATCH 1/2] fix checking when browser is complete: - origins list may be available before the browser is ready - just track separately and mark as incomplete if either browser not ready or no origins --- .../features/browser-profiles/profile-browser-dialog.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/features/browser-profiles/profile-browser-dialog.ts b/frontend/src/features/browser-profiles/profile-browser-dialog.ts index 83b4dd7068..dd846ed438 100644 --- a/frontend/src/features/browser-profiles/profile-browser-dialog.ts +++ b/frontend/src/features/browser-profiles/profile-browser-dialog.ts @@ -29,7 +29,6 @@ enum BrowserStatus { Initial, Pending, Ready, - Complete, Error, } @@ -54,6 +53,9 @@ export class ProfileBrowserDialog extends BtrixElement { @state() private browserStatus = BrowserStatus.Initial; + @state() + private originsLoaded = false; + @state() private showConfirmation = false; @@ -151,7 +153,8 @@ export class ProfileBrowserDialog extends BtrixElement { render() { const isCrawler = this.appState.isCrawler; const creatingNew = this.duplicating || !this.profile; - const incomplete = this.browserStatus !== BrowserStatus.Complete; + const incomplete = + this.browserStatus !== BrowserStatus.Ready || !this.originsLoaded; const saving = this.saveProfileTask.status === TaskStatus.PENDING; return html`, ) => { if (e.detail.origins.length) { - this.browserStatus = BrowserStatus.Complete; + this.originsLoaded = true; } }; From dd265746acdc8bf510da34ed11c695fd11e18674 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Thu, 27 Nov 2025 11:48:48 -0800 Subject: [PATCH 2/2] fix event not firing unless previous task value was set --- .../src/features/browser-profiles/profile-browser-dialog.ts | 2 +- frontend/src/features/browser-profiles/profile-browser.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/frontend/src/features/browser-profiles/profile-browser-dialog.ts b/frontend/src/features/browser-profiles/profile-browser-dialog.ts index dd846ed438..9166155afc 100644 --- a/frontend/src/features/browser-profiles/profile-browser-dialog.ts +++ b/frontend/src/features/browser-profiles/profile-browser-dialog.ts @@ -154,7 +154,7 @@ export class ProfileBrowserDialog extends BtrixElement { const isCrawler = this.appState.isCrawler; const creatingNew = this.duplicating || !this.profile; const incomplete = - this.browserStatus !== BrowserStatus.Ready || !this.originsLoaded; + !this.originsLoaded || this.browserStatus !== BrowserStatus.Ready; const saving = this.saveProfileTask.status === TaskStatus.PENDING; return html`( "btrix-browser-origins-change",