diff --git a/docs/cli/settings.md b/docs/cli/settings.md index ac1fdc98fc..3165983d14 100644 --- a/docs/cli/settings.md +++ b/docs/cli/settings.md @@ -56,7 +56,7 @@ they appear in the UI. | Dynamic Window Title | `ui.dynamicWindowTitle` | Update the terminal window title with current status icons (Ready: ◇, Action Required: ✋, Working: ✦) | `true` | | Show Home Directory Warning | `ui.showHomeDirectoryWarning` | Show a warning when running Gemini CLI in the home directory. | `true` | | Show Compatibility Warnings | `ui.showCompatibilityWarnings` | Show warnings about terminal or OS compatibility issues. | `true` | -| Hide Tips | `ui.hideTips` | Hide helpful tips in the UI | `false` | +| Hide Tips | `ui.hideTips` | Hide helpful tips in the UI | `true` | | Escape Pasted @ Symbols | `ui.escapePastedAtSymbols` | When enabled, @ symbols in pasted text are escaped to prevent unintended @path expansion. | `false` | | Show Shortcuts Hint | `ui.showShortcutsHint` | Show the "? for shortcuts" hint above the input. | `true` | | Hide Banner | `ui.hideBanner` | Hide the application banner | `false` | diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index acfb272754..91e19076f1 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md @@ -246,7 +246,7 @@ their corresponding top-level category object in your `settings.json` file. - **`ui.hideTips`** (boolean): - **Description:** Hide helpful tips in the UI - - **Default:** `false` + - **Default:** `true` - **`ui.escapePastedAtSymbols`** (boolean): - **Description:** When enabled, @ symbols in pasted text are escaped to @@ -1933,7 +1933,7 @@ of v0.3.0: "ui": { "theme": "GitHub", "hideBanner": true, - "hideTips": false, + "hideTips": true, "customWittyPhrases": [ "You forget a thousand things every day. Make sure this is one of ’em", "Connecting to AGI" diff --git a/packages/cli/src/config/settingsSchema.ts b/packages/cli/src/config/settingsSchema.ts index c40e87db18..cc214564ac 100644 --- a/packages/cli/src/config/settingsSchema.ts +++ b/packages/cli/src/config/settingsSchema.ts @@ -538,7 +538,7 @@ const SETTINGS_SCHEMA = { label: 'Hide Tips', category: 'UI', requiresRestart: false, - default: false, + default: true, description: 'Hide helpful tips in the UI', showInDialog: true, }, diff --git a/packages/cli/src/ui/App.test.tsx b/packages/cli/src/ui/App.test.tsx index 3505e63452..f31d656b77 100644 --- a/packages/cli/src/ui/App.test.tsx +++ b/packages/cli/src/ui/App.test.tsx @@ -94,7 +94,9 @@ describe('App', () => { it('should render main content and composer when not quitting', async () => { const { lastFrame, unmount } = await renderWithProviders(, { uiState: mockUIState, - settings: createMockSettings({ ui: { useAlternateBuffer: false } }), + settings: createMockSettings({ + ui: { useAlternateBuffer: false, hideTips: false }, + }), }); expect(lastFrame()).toContain('Tips for getting started'); @@ -111,7 +113,9 @@ describe('App', () => { const { lastFrame, unmount } = await renderWithProviders(, { uiState: quittingUIState, - settings: createMockSettings({ ui: { useAlternateBuffer: false } }), + settings: createMockSettings({ + ui: { useAlternateBuffer: false, hideTips: false }, + }), }); expect(lastFrame()).toContain('Quitting...'); @@ -128,7 +132,9 @@ describe('App', () => { const { lastFrame, unmount } = await renderWithProviders(, { uiState: quittingUIState, - settings: createMockSettings({ ui: { useAlternateBuffer: true } }), + settings: createMockSettings({ + ui: { useAlternateBuffer: true, hideTips: false }, + }), }); expect(lastFrame()).toContain('HistoryItemDisplay'); @@ -144,7 +150,9 @@ describe('App', () => { const { lastFrame, unmount } = await renderWithProviders(, { uiState: dialogUIState, - settings: createMockSettings({ ui: { useAlternateBuffer: true } }), + settings: createMockSettings({ + ui: { useAlternateBuffer: true, hideTips: false }, + }), }); expect(lastFrame()).toContain('Tips for getting started'); @@ -167,7 +175,9 @@ describe('App', () => { const { lastFrame, unmount } = await renderWithProviders(, { uiState, - settings: createMockSettings({ ui: { useAlternateBuffer: true } }), + settings: createMockSettings({ + ui: { useAlternateBuffer: true, hideTips: false }, + }), }); expect(lastFrame()).toContain(`Press Ctrl+${key} again to exit.`); @@ -180,7 +190,9 @@ describe('App', () => { const { lastFrame, unmount } = await renderWithProviders(, { uiState: mockUIState, - settings: createMockSettings({ ui: { useAlternateBuffer: true } }), + settings: createMockSettings({ + ui: { useAlternateBuffer: true, hideTips: false }, + }), }); expect(lastFrame()).toContain('Notifications'); @@ -195,7 +207,9 @@ describe('App', () => { const { lastFrame, unmount } = await renderWithProviders(, { uiState: mockUIState, - settings: createMockSettings({ ui: { useAlternateBuffer: true } }), + settings: createMockSettings({ + ui: { useAlternateBuffer: true, hideTips: false }, + }), }); expect(lastFrame()).toContain('Tips for getting started'); @@ -247,7 +261,9 @@ describe('App', () => { const { lastFrame, unmount } = await renderWithProviders(, { uiState: stateWithConfirmingTool, config: configWithExperiment, - settings: createMockSettings({ ui: { useAlternateBuffer: true } }), + settings: createMockSettings({ + ui: { useAlternateBuffer: true, hideTips: false }, + }), }); expect(lastFrame()).toContain('Tips for getting started'); @@ -263,7 +279,9 @@ describe('App', () => { (useIsScreenReaderEnabled as Mock).mockReturnValue(false); const { lastFrame, unmount } = await renderWithProviders(, { uiState: mockUIState, - settings: createMockSettings({ ui: { useAlternateBuffer: true } }), + settings: createMockSettings({ + ui: { useAlternateBuffer: true, hideTips: false }, + }), }); expect(lastFrame()).toMatchSnapshot(); unmount(); @@ -273,7 +291,9 @@ describe('App', () => { (useIsScreenReaderEnabled as Mock).mockReturnValue(true); const { lastFrame, unmount } = await renderWithProviders(, { uiState: mockUIState, - settings: createMockSettings({ ui: { useAlternateBuffer: true } }), + settings: createMockSettings({ + ui: { useAlternateBuffer: true, hideTips: false }, + }), }); expect(lastFrame()).toMatchSnapshot(); unmount(); @@ -286,7 +306,9 @@ describe('App', () => { } as UIState; const { lastFrame, unmount } = await renderWithProviders(, { uiState: dialogUIState, - settings: createMockSettings({ ui: { useAlternateBuffer: true } }), + settings: createMockSettings({ + ui: { useAlternateBuffer: true, hideTips: false }, + }), }); expect(lastFrame()).toMatchSnapshot(); unmount(); diff --git a/packages/cli/src/ui/components/AppHeader.test.tsx b/packages/cli/src/ui/components/AppHeader.test.tsx index 4dbdbc0052..03697b1b6d 100644 --- a/packages/cli/src/ui/components/AppHeader.test.tsx +++ b/packages/cli/src/ui/components/AppHeader.test.tsx @@ -8,6 +8,7 @@ import { renderWithProviders, persistentStateMock, } from '../../test-utils/render.js'; +import { createMockSettings } from '../../test-utils/settings.js'; import type { LoadedSettings } from '../../config/settings.js'; import { AppHeader } from './AppHeader.js'; import { describe, it, expect, vi } from 'vitest'; @@ -33,6 +34,7 @@ describe('', () => { , { uiState, + settings: createMockSettings({ ui: { hideTips: false } }), }, ); @@ -55,6 +57,7 @@ describe('', () => { , { uiState, + settings: createMockSettings({ ui: { hideTips: false } }), }, ); @@ -76,6 +79,7 @@ describe('', () => { , { uiState, + settings: createMockSettings({ ui: { hideTips: false } }), }, ); @@ -106,6 +110,7 @@ describe('', () => { , { uiState, + settings: createMockSettings({ ui: { hideTips: false } }), }, ); @@ -160,6 +165,7 @@ describe('', () => { , { uiState, + settings: createMockSettings({ ui: { hideTips: false } }), }, ); @@ -183,6 +189,7 @@ describe('', () => { , { uiState, + settings: createMockSettings({ ui: { hideTips: false } }), }, ); @@ -205,6 +212,7 @@ describe('', () => { , { uiState, + settings: createMockSettings({ ui: { hideTips: false } }), }, ); @@ -227,6 +235,7 @@ describe('', () => { // First session const session1 = await renderWithProviders(, { uiState, + settings: createMockSettings({ ui: { hideTips: false } }), }); expect(session1.lastFrame()).toContain('Tips'); @@ -234,10 +243,9 @@ describe('', () => { session1.unmount(); // Second session - state is persisted in the fake - const session2 = await renderWithProviders( - , - {}, - ); + const session2 = await renderWithProviders(, { + settings: createMockSettings({ ui: { hideTips: false } }), + }); expect(session2.lastFrame()).not.toContain('Tips'); session2.unmount(); diff --git a/schemas/settings.schema.json b/schemas/settings.schema.json index 52a6f1e183..8d04f9e640 100644 --- a/schemas/settings.schema.json +++ b/schemas/settings.schema.json @@ -299,8 +299,8 @@ "hideTips": { "title": "Hide Tips", "description": "Hide helpful tips in the UI", - "markdownDescription": "Hide helpful tips in the UI\n\n- Category: `UI`\n- Requires restart: `no`\n- Default: `false`", - "default": false, + "markdownDescription": "Hide helpful tips in the UI\n\n- Category: `UI`\n- Requires restart: `no`\n- Default: `true`", + "default": true, "type": "boolean" }, "escapePastedAtSymbols": {