Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/template/src/dev-tool/dev-tool-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,9 @@ function createOverviewTab(app: StackClientApp<true>): TabResult {
} else {
avatar.textContent = initials;
}
userName.textContent = currentUser.displayName || 'Anonymous';
userName.textContent = currentUser.isAnonymous
? 'Anonymous'
: (currentUser.displayName ?? 'Welcome back');
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Using ?? instead of || here means an empty-string displayName will render as blank text, while the avatar initials (computed with || two lines above) will fall through to primaryEmail. If the goal is to treat empty strings as "no name", keep || for consistency, or switch both to ??.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/template/src/dev-tool/dev-tool-core.ts, line 951:

<comment>Using `??` instead of `||` here means an empty-string `displayName` will render as blank text, while the avatar initials (computed with `||` two lines above) will fall through to `primaryEmail`. If the goal is to treat empty strings as "no name", keep `||` for consistency, or switch both to `??`.</comment>

<file context>
@@ -948,7 +948,7 @@ function createOverviewTab(app: StackClientApp<true>): TabResult {
         userName.textContent = currentUser.isAnonymous
           ? 'Anonymous'
-          : (currentUser.displayName || 'Welcome back');
+          : (currentUser.displayName ?? 'Welcome back');
         userEmail.textContent = currentUser.primaryEmail || 'No email';
         authIndicator.style.display = '';
</file context>
Suggested change
: (currentUser.displayName ?? 'Welcome back');
: (currentUser.displayName || 'Welcome back');
Fix with Cubic

userEmail.textContent = currentUser.primaryEmail || 'No email';
authIndicator.style.display = '';
} else {
Expand Down
Loading