diff --git a/packages/cli/src/ui/components/AppHeader.tsx b/packages/cli/src/ui/components/AppHeader.tsx
index 25ef20c963..26ca8182a0 100644
--- a/packages/cli/src/ui/components/AppHeader.tsx
+++ b/packages/cli/src/ui/components/AppHeader.tsx
@@ -93,11 +93,9 @@ export const AppHeader = ({ version, showDetails = true }: AppHeaderProps) => {
{/* Lines 3 & 4: User Identity info (Email /auth and Plan /upgrade) */}
-
- {settings.merged.ui.showUserIdentity !== false && (
-
- )}
-
+ {settings.merged.ui.showUserIdentity !== false && (
+
+ )}
)}
diff --git a/packages/cli/src/ui/components/UserIdentity.test.tsx b/packages/cli/src/ui/components/UserIdentity.test.tsx
index a5b41f4b61..8e63415f5c 100644
--- a/packages/cli/src/ui/components/UserIdentity.test.tsx
+++ b/packages/cli/src/ui/components/UserIdentity.test.tsx
@@ -45,12 +45,12 @@ describe('', () => {
await waitUntilReady();
const output = lastFrame();
- expect(output).toContain('Logged in with Google: test@example.com');
+ expect(output).toContain('test@example.com');
expect(output).toContain('/auth');
unmount();
});
- it('should render login message without colon if email is missing', async () => {
+ it('should render login message if email is missing', async () => {
// Modify the mock for this specific test
vi.mocked(UserAccountManager).mockImplementationOnce(
() =>
@@ -73,12 +73,11 @@ describe('', () => {
const output = lastFrame();
expect(output).toContain('Logged in with Google');
- expect(output).not.toContain('Logged in with Google:');
expect(output).toContain('/auth');
unmount();
});
- it('should render plan name on a separate line if provided', async () => {
+ it('should render plan name and upgrade indicator', async () => {
const mockConfig = makeFakeConfig();
vi.spyOn(mockConfig, 'getContentGeneratorConfig').mockReturnValue({
authType: AuthType.LOGIN_WITH_GOOGLE,
@@ -92,18 +91,10 @@ describe('', () => {
await waitUntilReady();
const output = lastFrame();
- expect(output).toContain('Logged in with Google: test@example.com');
+ expect(output).toContain('test@example.com');
expect(output).toContain('/auth');
- expect(output).toContain('Plan: Premium Plan');
-
- // Check for two lines (or more if wrapped, but here it should be separate)
- const lines = output?.split('\n').filter((line) => line.trim().length > 0);
- expect(lines?.some((line) => line.includes('Logged in with Google'))).toBe(
- true,
- );
- expect(lines?.some((line) => line.includes('Plan: Premium Plan'))).toBe(
- true,
- );
+ expect(output).toContain('Premium Plan');
+ expect(output).toContain('/upgrade');
unmount();
});
diff --git a/packages/cli/src/ui/components/UserIdentity.tsx b/packages/cli/src/ui/components/UserIdentity.tsx
index e506bfb052..0542241c16 100644
--- a/packages/cli/src/ui/components/UserIdentity.tsx
+++ b/packages/cli/src/ui/components/UserIdentity.tsx
@@ -37,25 +37,26 @@ export const UserIdentity: React.FC = ({ config }) => {
}
return (
-
+
+ {/* User Email /auth */}
{authType === AuthType.LOGIN_WITH_GOOGLE ? (
-
- Logged in with Google{email ? ':' : ''}
- {email ? ` ${email}` : ''}
-
+ {email ?? 'Logged in with Google'}
) : (
`Authenticated with ${authType}`
)}
/auth
- {tierName && (
+
+ {/* Tier Name /upgrade */}
+
- Plan: {tierName}
+ {tierName ?? 'Gemini Code Assist for individuals'}
- )}
+ /upgrade
+
);
};