fix(auth): update terminology to 'sign in' and 'sign out' (#20892)

Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
Mark McLaughlin
2026-03-10 12:10:26 -07:00
committed by GitHub
parent b00d7c88ad
commit b404fc02e7
35 changed files with 95 additions and 78 deletions

View File

@@ -36,7 +36,7 @@ describe('AboutBox', () => {
expect(output).toContain('gemini-pro');
expect(output).toContain('default');
expect(output).toContain('macOS');
expect(output).toContain('Logged in with Google');
expect(output).toContain('Signed in with Google');
unmount();
});
@@ -63,7 +63,7 @@ describe('AboutBox', () => {
);
await waitUntilReady();
const output = lastFrame();
expect(output).toContain('Logged in with Google (test@example.com)');
expect(output).toContain('Signed in with Google (test@example.com)');
unmount();
});

View File

@@ -116,8 +116,8 @@ export const AboutBox: React.FC<AboutBoxProps> = ({
<Text color={theme.text.primary}>
{selectedAuthType.startsWith('oauth')
? userEmail
? `Logged in with Google (${userEmail})`
: 'Logged in with Google'
? `Signed in with Google (${userEmail})`
: 'Signed in with Google'
: selectedAuthType}
</Text>
</Box>

View File

@@ -28,9 +28,9 @@ describe('LogoutConfirmationDialog', () => {
);
await waitUntilReady();
expect(lastFrame()).toContain('You are now logged out.');
expect(lastFrame()).toContain('You are now signed out');
expect(lastFrame()).toContain(
'Login again to continue using Gemini CLI, or exit the application.',
'Sign in again to continue using Gemini CLI, or exit the application.',
);
expect(lastFrame()).toContain('(Use Enter to select, Esc to close)');
unmount();
@@ -45,7 +45,7 @@ describe('LogoutConfirmationDialog', () => {
expect(RadioButtonSelect).toHaveBeenCalled();
const mockCall = vi.mocked(RadioButtonSelect).mock.calls[0][0];
expect(mockCall.items).toEqual([
{ label: 'Login', value: LogoutChoice.LOGIN, key: 'login' },
{ label: 'Sign in', value: LogoutChoice.LOGIN, key: 'login' },
{ label: 'Exit', value: LogoutChoice.EXIT, key: 'exit' },
]);
expect(mockCall.isFocused).toBe(true);

View File

@@ -37,7 +37,7 @@ export const LogoutConfirmationDialog: React.FC<
const options: Array<RadioSelectItem<LogoutChoice>> = [
{
label: 'Login',
label: 'Sign in',
value: LogoutChoice.LOGIN,
key: 'login',
},
@@ -61,10 +61,10 @@ export const LogoutConfirmationDialog: React.FC<
>
<Box flexDirection="column" marginBottom={1}>
<Text bold color={theme.text.primary}>
You are now logged out.
You are now signed out
</Text>
<Text color={theme.text.secondary}>
Login again to continue using Gemini CLI, or exit the application.
Sign in again to continue using Gemini CLI, or exit the application.
</Text>
</Box>

View File

@@ -539,7 +539,7 @@ describe('<ModelStatsDisplay />', () => {
const output = lastFrame();
expect(output).toContain('Auth Method:');
expect(output).toContain('Logged in with Google');
expect(output).toContain('Signed in with Google');
expect(output).toContain('(test@example.com)');
expect(output).toContain('Tier:');
expect(output).toContain('Pro');

View File

@@ -340,8 +340,8 @@ export const ModelStatsDisplay: React.FC<ModelStatsDisplayProps> = ({
<Text color={theme.text.primary}>
{selectedAuthType.startsWith('oauth')
? userEmail
? `Logged in with Google (${userEmail})`
: 'Logged in with Google'
? `Signed in with Google (${userEmail})`
: 'Signed in with Google'
: selectedAuthType}
</Text>
</Box>

View File

@@ -616,7 +616,7 @@ describe('<StatsDisplay />', () => {
const output = lastFrame();
expect(output).toContain('Auth Method:');
expect(output).toContain('Logged in with Google (test@example.com)');
expect(output).toContain('Signed in with Google (test@example.com)');
expect(output).toContain('Tier:');
expect(output).toContain('Pro');
});

View File

@@ -589,8 +589,8 @@ export const StatsDisplay: React.FC<StatsDisplayProps> = ({
<Text color={theme.text.primary}>
{selectedAuthType.startsWith('oauth')
? userEmail
? `Logged in with Google (${userEmail})`
: 'Logged in with Google'
? `Signed in with Google (${userEmail})`
: 'Signed in with Google'
: selectedAuthType}
</Text>
</StatRow>

View File

@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2025 Google LLC
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
@@ -45,7 +45,7 @@ describe('<UserIdentity />', () => {
await waitUntilReady();
const output = lastFrame();
expect(output).toContain('test@example.com');
expect(output).toContain('Signed in with Google: test@example.com');
expect(output).toContain('/auth');
expect(output).not.toContain('/upgrade');
unmount();
@@ -91,7 +91,8 @@ describe('<UserIdentity />', () => {
await waitUntilReady();
const output = lastFrame();
expect(output).toContain('Logged in with Google');
expect(output).toContain('Signed in with Google');
expect(output).not.toContain('Signed in with Google:');
expect(output).toContain('/auth');
expect(output).not.toContain('/upgrade');
unmount();
@@ -111,11 +112,20 @@ describe('<UserIdentity />', () => {
await waitUntilReady();
const output = lastFrame();
expect(output).toContain('test@example.com');
expect(output).toContain('Signed in with Google: test@example.com');
expect(output).toContain('/auth');
expect(output).toContain('Premium Plan');
expect(output).toContain('Plan: Premium Plan');
expect(output).toContain('/upgrade');
// 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('Signed in with Google'))).toBe(
true,
);
expect(lines?.some((line) => line.includes('Plan: Premium Plan'))).toBe(
true,
);
unmount();
});
@@ -168,7 +178,7 @@ describe('<UserIdentity />', () => {
await waitUntilReady();
const output = lastFrame();
expect(output).toContain('Enterprise Tier');
expect(output).toContain('Plan: Enterprise Tier');
expect(output).toContain('/upgrade');
unmount();
});

View File

@@ -43,7 +43,10 @@ export const UserIdentity: React.FC<UserIdentityProps> = ({ config }) => {
<Box>
<Text color={theme.text.primary} wrap="truncate-end">
{authType === AuthType.LOGIN_WITH_GOOGLE ? (
<Text>{email ?? 'Logged in with Google'}</Text>
<Text>
<Text bold>Signed in with Google{email ? ':' : ''}</Text>
{email ? ` ${email}` : ''}
</Text>
) : (
`Authenticated with ${authType}`
)}
@@ -55,7 +58,7 @@ export const UserIdentity: React.FC<UserIdentityProps> = ({ config }) => {
{tierName && (
<Box>
<Text color={theme.text.primary} wrap="truncate-end">
{tierName}
<Text bold>Plan:</Text> {tierName}
</Text>
<Text color={theme.text.secondary}> /upgrade</Text>
</Box>

View File

@@ -136,7 +136,7 @@ export function ValidationDialog({
<CliSpinner />
<Text>
{' '}
Waiting for verification... (Press ESC or CTRL+C to cancel)
Waiting for verification... (Press Esc or Ctrl+C to cancel)
</Text>
</Box>
{errorMessage && (