chore(cli): fix linting and stability issues found in monorepo test run

This commit is contained in:
Keith Guerin
2026-03-12 21:45:58 -07:00
parent 0c3500ddcb
commit faa180b9d8
3 changed files with 9 additions and 6 deletions

View File

@@ -846,11 +846,11 @@ export function migrateDeprecatedSettings(
const oldValue = settings[oldKey];
const newValue = settings[newKey];
if (typeof oldValue === 'boolean') {
if (oldValue === true || oldValue === false) {
if (foundDeprecated) {
foundDeprecated.push(prefix ? `${prefix}.${oldKey}` : oldKey);
}
if (typeof newValue === 'boolean') {
if (newValue === true || newValue === false) {
// Both exist, trust the new one
if (removeDeprecated) {
delete settings[oldKey];
@@ -913,7 +913,7 @@ export function migrateDeprecatedSettings(
let uiModified = false;
// Migrate hideIntroTips → hideTips (backward compatibility)
if (typeof newUi['hideIntroTips'] === 'boolean') {
if (newUi['hideIntroTips'] === true || newUi['hideIntroTips'] === false) {
foundDeprecated.push('ui.hideIntroTips');
if (newUi['hideTips'] === undefined) {
newUi['hideTips'] = newUi['hideIntroTips'];
@@ -960,6 +960,8 @@ export function migrateDeprecatedSettings(
newUi['hideStatusWit'] = true;
uiModified = true;
break;
default:
break;
}
}
@@ -1015,7 +1017,7 @@ export function migrateDeprecatedSettings(
// Migrate enableLoadingPhrases: false → hideStatusTips/hideStatusWit: true
const enableLP = newAccessibility['enableLoadingPhrases'];
if (typeof enableLP === 'boolean') {
if (enableLP === true || enableLP === false) {
foundDeprecated.push('ui.accessibility.enableLoadingPhrases');
if (
!enableLP &&

View File

@@ -8,6 +8,7 @@ import {
renderWithProviders,
persistentStateMock,
} from '../../test-utils/render.js';
import type { LoadedSettings } from '../../config/settings.js';
import { AppHeader } from './AppHeader.js';
import { describe, it, expect, vi } from 'vitest';
import { makeFakeConfig } from '@google/gemini-cli-core';
@@ -279,7 +280,7 @@ describe('<AppHeader />', () => {
merged: {
ui: { hideTips: true },
},
} as any,
} as unknown as LoadedSettings,
},
);
await waitUntilReady();

View File

@@ -35,7 +35,7 @@ export const LoadingIndicator: React.FC<LoadingIndicatorProps> = ({
currentLoadingPhrase,
wittyPhrase,
showWit = false,
showTips = true,
showTips: _showTips = true,
errorVerbosity: _errorVerbosity = 'full',
elapsedTime,
inline = false,