From 03aed0e9cebae5651b1b4d8dfacdb3d796f55e4f Mon Sep 17 00:00:00 2001 From: Aadesh Kheria Date: Wed, 27 May 2026 15:43:46 -0700 Subject: [PATCH] fix(dev-tool): show 'Welcome back' instead of 'Anonymous' for unnamed users The dev tool Identity card used 'Anonymous' as the fallback when a logged-in user had no displayName, which contradicted the green 'Authenticated' badge shown alongside it and collided with the real isAnonymous user concept. Now show the actual anonymous state only when isAnonymous is true; otherwise prefer displayName and fall back to 'Welcome back' for named-less authenticated users. --- packages/template/src/dev-tool/dev-tool-core.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/template/src/dev-tool/dev-tool-core.ts b/packages/template/src/dev-tool/dev-tool-core.ts index c267deb36..5f8a52020 100644 --- a/packages/template/src/dev-tool/dev-tool-core.ts +++ b/packages/template/src/dev-tool/dev-tool-core.ts @@ -946,7 +946,9 @@ function createOverviewTab(app: StackClientApp): TabResult { } else { avatar.textContent = initials; } - userName.textContent = currentUser.displayName || 'Anonymous'; + userName.textContent = currentUser.isAnonymous + ? 'Anonymous' + : (currentUser.displayName || 'Welcome back'); userEmail.textContent = currentUser.primaryEmail || 'No email'; authIndicator.style.display = ''; } else {