From 6ffac7c500406221fbcbe0e7fd8d5dc14e31a834 Mon Sep 17 00:00:00 2001 From: Katherine Reynolds <7054971+reynoldskr@users.noreply.github.com> Date: Wed, 26 Nov 2025 10:30:12 -0800 Subject: [PATCH] Removed first page in favour of vault user --- .../popup/settings/tunnel-demo.component.html | 6 ++-- .../popup/settings/tunnel-demo.component.ts | 29 ++++++++++++++++++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/apps/browser/src/tools/popup/settings/tunnel-demo.component.html b/apps/browser/src/tools/popup/settings/tunnel-demo.component.html index aa1e167035e..8d3559ede16 100644 --- a/apps/browser/src/tools/popup/settings/tunnel-demo.component.html +++ b/apps/browser/src/tools/popup/settings/tunnel-demo.component.html @@ -5,7 +5,8 @@ - + + - +

Connection Status

diff --git a/apps/browser/src/tools/popup/settings/tunnel-demo.component.ts b/apps/browser/src/tools/popup/settings/tunnel-demo.component.ts index 81414ecd832..68c59a8c873 100644 --- a/apps/browser/src/tools/popup/settings/tunnel-demo.component.ts +++ b/apps/browser/src/tools/popup/settings/tunnel-demo.component.ts @@ -83,11 +83,38 @@ export class TunnelDemoComponent implements OnInit, OnDestroy { private tunnelClient: TunnelClientService, ) {} - ngOnInit(): void { + async ngOnInit(): Promise { // Subscribe to tunnel client events this.tunnelClient.events$ .pipe(takeUntil(this.destroy$)) .subscribe((event) => this.handleTunnelEvent(event)); + + // Auto-start pairing with active account username + await this.autoStartPairing(); + } + + /** + * Automatically start pairing using the active account's email as username + */ + private async autoStartPairing(): Promise { + try { + // Get the active account's email + const activeAccount = await firstValueFrom(this.accountService.activeAccount$); + if (!activeAccount?.email) { + this.addActivityLog("No active account found", "error"); + return; + } + + // Set the username to the account email + this.formGroup.patchValue({ + username: activeAccount.email, + }); + + // Auto-start pairing + await this.startPairing(); + } catch (error) { + this.addActivityLog(`Failed to auto-start pairing: ${error.message || error}`, "error"); + } } ngOnDestroy(): void {