From 0a36530dba3586fcec34f03ad11467f5b5cd2f0e Mon Sep 17 00:00:00 2001 From: Keith Lyons Date: Mon, 8 Sep 2025 23:09:03 -0400 Subject: [PATCH 1/9] fix: Restore footer configuration settings (#8041) The footer configuration settings (hideCWD, hideSandboxStatus, hideModelInfo) were lost during the AppContainer refactor. This commit reconnects the existing settings to the Footer component to restore the ability to hide individual footer elements. --- packages/cli/src/ui/components/Composer.tsx | 3 + packages/cli/src/ui/components/Footer.tsx | 176 +++++++++++--------- 2 files changed, 100 insertions(+), 79 deletions(-) diff --git a/packages/cli/src/ui/components/Composer.tsx b/packages/cli/src/ui/components/Composer.tsx index fa5322e4ae9..986c79d9ff9 100644 --- a/packages/cli/src/ui/components/Composer.tsx +++ b/packages/cli/src/ui/components/Composer.tsx @@ -54,6 +54,9 @@ export const Composer = () => { promptTokenCount: uiState.sessionStats.lastPromptTokenCount, nightly: uiState.nightly, isTrustedFolder: uiState.isTrustedFolder, + hideCWD: settings.merged.ui?.footer?.hideCWD || false, + hideSandboxStatus: settings.merged.ui?.footer?.hideSandboxStatus || false, + hideModelInfo: settings.merged.ui?.footer?.hideModelInfo || false, }; return ( diff --git a/packages/cli/src/ui/components/Footer.tsx b/packages/cli/src/ui/components/Footer.tsx index f1cb7445fcb..e2d4c6335bd 100644 --- a/packages/cli/src/ui/components/Footer.tsx +++ b/packages/cli/src/ui/components/Footer.tsx @@ -33,6 +33,9 @@ export interface FooterProps { nightly: boolean; vimMode?: string; isTrustedFolder?: boolean; + hideCWD?: boolean; + hideSandboxStatus?: boolean; + hideModelInfo?: boolean; } export const Footer: React.FC = ({ @@ -49,6 +52,9 @@ export const Footer: React.FC = ({ nightly, vimMode, isTrustedFolder, + hideCWD = false, + hideSandboxStatus = false, + hideModelInfo = false, }) => { const { columns: terminalWidth } = useTerminalSize(); @@ -60,100 +66,112 @@ export const Footer: React.FC = ({ ? path.basename(tildeifyPath(targetDir)) : shortenPath(tildeifyPath(targetDir), pathLength); + const justifyContent = hideCWD && hideModelInfo ? 'center' : 'space-between'; + return ( - - {debugMode && } - {vimMode && [{vimMode}] } - {nightly ? ( - - - {displayPath} - {branchName && ({branchName}*)} + {(debugMode || vimMode || !hideCWD) && ( + + {debugMode && } + {vimMode && [{vimMode}] } + {!hideCWD && ( + nightly ? ( + + + {displayPath} + {branchName && ({branchName}*)} + + + ) : ( + + {displayPath} + {branchName && ( + ({branchName}*) + )} + + ) + )} + {debugMode && ( + + {' ' + (debugMessage || '--debug')} - - ) : ( - - {displayPath} - {branchName && ( - ({branchName}*) - )} - - )} - {debugMode && ( - - {' ' + (debugMessage || '--debug')} - - )} - + )} + + )} {/* Middle Section: Centered Trust/Sandbox Info */} - - {isTrustedFolder === false ? ( - untrusted - ) : process.env['SANDBOX'] && - process.env['SANDBOX'] !== 'sandbox-exec' ? ( - - {process.env['SANDBOX'].replace(/^gemini-(?:cli-)?/, '')} - - ) : process.env['SANDBOX'] === 'sandbox-exec' ? ( - - macOS Seatbelt{' '} - - ({process.env['SEATBELT_PROFILE']}) + {!hideSandboxStatus && ( + + {isTrustedFolder === false ? ( + untrusted + ) : process.env['SANDBOX'] && + process.env['SANDBOX'] !== 'sandbox-exec' ? ( + + {process.env['SANDBOX'].replace(/^gemini-(?:cli-)?/, '')} - - ) : ( - - no sandbox (see /docs) - - )} - - - {/* Right Section: Gemini Label and Console Summary */} - - - - {isNarrow ? '' : ' '} - {model}{' '} - - - {showMemoryUsage && } - - - {corgiMode && ( - - | - - - - `) - + ) : process.env['SANDBOX'] === 'sandbox-exec' ? ( + + macOS Seatbelt{' '} + + ({process.env['SEATBELT_PROFILE']}) + + + ) : ( + + no sandbox (see /docs) )} - {!showErrorDetails && errorCount > 0 && ( - - | - + + )} + + {/* Right Section: Gemini Label and Console Summary */} + {(!hideModelInfo || showMemoryUsage || corgiMode || (!showErrorDetails && errorCount > 0)) && ( + + {!hideModelInfo && ( + + + {isNarrow ? '' : ' '} + {model}{' '} + + + {showMemoryUsage && } )} + + {corgiMode && ( + + {!hideModelInfo && | } + + + + `) + + + )} + {!showErrorDetails && errorCount > 0 && ( + + {!hideModelInfo && | } + + + )} + - + )} ); }; From 2821d45ccecf4be274c5995e1b22de3219c3e902 Mon Sep 17 00:00:00 2001 From: Keith Lyons Date: Tue, 9 Sep 2025 22:41:20 -0400 Subject: [PATCH 2/9] style: Apply prettier formatting to Footer.tsx --- packages/cli/src/ui/components/Footer.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/cli/src/ui/components/Footer.tsx b/packages/cli/src/ui/components/Footer.tsx index e2d4c6335bd..296ef0855d2 100644 --- a/packages/cli/src/ui/components/Footer.tsx +++ b/packages/cli/src/ui/components/Footer.tsx @@ -79,8 +79,8 @@ export const Footer: React.FC = ({ {debugMode && } {vimMode && [{vimMode}] } - {!hideCWD && ( - nightly ? ( + {!hideCWD && + (nightly ? ( {displayPath} @@ -94,8 +94,7 @@ export const Footer: React.FC = ({ ({branchName}*) )} - ) - )} + ))} {debugMode && ( {' ' + (debugMessage || '--debug')} @@ -137,7 +136,10 @@ export const Footer: React.FC = ({ )} {/* Right Section: Gemini Label and Console Summary */} - {(!hideModelInfo || showMemoryUsage || corgiMode || (!showErrorDetails && errorCount > 0)) && ( + {(!hideModelInfo || + showMemoryUsage || + corgiMode || + (!showErrorDetails && errorCount > 0)) && ( {!hideModelInfo && ( From 73dee3211cb40aa4f613f16f0aa35cc7d772d046 Mon Sep 17 00:00:00 2001 From: Keith Lyons Date: Mon, 8 Sep 2025 23:09:03 -0400 Subject: [PATCH 3/9] fix: Restore footer configuration settings (#8041) The footer configuration settings (hideCWD, hideSandboxStatus, hideModelInfo) were lost during the AppContainer refactor. This commit reconnects the existing settings to the Footer component to restore the ability to hide individual footer elements. --- packages/cli/src/ui/components/Composer.tsx | 3 + packages/cli/src/ui/components/Footer.tsx | 176 +++++++++++--------- 2 files changed, 100 insertions(+), 79 deletions(-) diff --git a/packages/cli/src/ui/components/Composer.tsx b/packages/cli/src/ui/components/Composer.tsx index 07d97660294..cf55d09220b 100644 --- a/packages/cli/src/ui/components/Composer.tsx +++ b/packages/cli/src/ui/components/Composer.tsx @@ -54,6 +54,9 @@ export const Composer = () => { promptTokenCount: uiState.sessionStats.lastPromptTokenCount, nightly: uiState.nightly, isTrustedFolder: uiState.isTrustedFolder, + hideCWD: settings.merged.ui?.footer?.hideCWD || false, + hideSandboxStatus: settings.merged.ui?.footer?.hideSandboxStatus || false, + hideModelInfo: settings.merged.ui?.footer?.hideModelInfo || false, }; return ( diff --git a/packages/cli/src/ui/components/Footer.tsx b/packages/cli/src/ui/components/Footer.tsx index f1cb7445fcb..e2d4c6335bd 100644 --- a/packages/cli/src/ui/components/Footer.tsx +++ b/packages/cli/src/ui/components/Footer.tsx @@ -33,6 +33,9 @@ export interface FooterProps { nightly: boolean; vimMode?: string; isTrustedFolder?: boolean; + hideCWD?: boolean; + hideSandboxStatus?: boolean; + hideModelInfo?: boolean; } export const Footer: React.FC = ({ @@ -49,6 +52,9 @@ export const Footer: React.FC = ({ nightly, vimMode, isTrustedFolder, + hideCWD = false, + hideSandboxStatus = false, + hideModelInfo = false, }) => { const { columns: terminalWidth } = useTerminalSize(); @@ -60,100 +66,112 @@ export const Footer: React.FC = ({ ? path.basename(tildeifyPath(targetDir)) : shortenPath(tildeifyPath(targetDir), pathLength); + const justifyContent = hideCWD && hideModelInfo ? 'center' : 'space-between'; + return ( - - {debugMode && } - {vimMode && [{vimMode}] } - {nightly ? ( - - - {displayPath} - {branchName && ({branchName}*)} + {(debugMode || vimMode || !hideCWD) && ( + + {debugMode && } + {vimMode && [{vimMode}] } + {!hideCWD && ( + nightly ? ( + + + {displayPath} + {branchName && ({branchName}*)} + + + ) : ( + + {displayPath} + {branchName && ( + ({branchName}*) + )} + + ) + )} + {debugMode && ( + + {' ' + (debugMessage || '--debug')} - - ) : ( - - {displayPath} - {branchName && ( - ({branchName}*) - )} - - )} - {debugMode && ( - - {' ' + (debugMessage || '--debug')} - - )} - + )} + + )} {/* Middle Section: Centered Trust/Sandbox Info */} - - {isTrustedFolder === false ? ( - untrusted - ) : process.env['SANDBOX'] && - process.env['SANDBOX'] !== 'sandbox-exec' ? ( - - {process.env['SANDBOX'].replace(/^gemini-(?:cli-)?/, '')} - - ) : process.env['SANDBOX'] === 'sandbox-exec' ? ( - - macOS Seatbelt{' '} - - ({process.env['SEATBELT_PROFILE']}) + {!hideSandboxStatus && ( + + {isTrustedFolder === false ? ( + untrusted + ) : process.env['SANDBOX'] && + process.env['SANDBOX'] !== 'sandbox-exec' ? ( + + {process.env['SANDBOX'].replace(/^gemini-(?:cli-)?/, '')} - - ) : ( - - no sandbox (see /docs) - - )} - - - {/* Right Section: Gemini Label and Console Summary */} - - - - {isNarrow ? '' : ' '} - {model}{' '} - - - {showMemoryUsage && } - - - {corgiMode && ( - - | - - - - `) - + ) : process.env['SANDBOX'] === 'sandbox-exec' ? ( + + macOS Seatbelt{' '} + + ({process.env['SEATBELT_PROFILE']}) + + + ) : ( + + no sandbox (see /docs) )} - {!showErrorDetails && errorCount > 0 && ( - - | - + + )} + + {/* Right Section: Gemini Label and Console Summary */} + {(!hideModelInfo || showMemoryUsage || corgiMode || (!showErrorDetails && errorCount > 0)) && ( + + {!hideModelInfo && ( + + + {isNarrow ? '' : ' '} + {model}{' '} + + + {showMemoryUsage && } )} + + {corgiMode && ( + + {!hideModelInfo && | } + + + + `) + + + )} + {!showErrorDetails && errorCount > 0 && ( + + {!hideModelInfo && | } + + + )} + - + )} ); }; From e02366367e8022438c85ddc58520cdf6cbbe7212 Mon Sep 17 00:00:00 2001 From: Keith Lyons Date: Tue, 9 Sep 2025 22:41:20 -0400 Subject: [PATCH 4/9] style: Apply prettier formatting to Footer.tsx --- packages/cli/src/ui/components/Footer.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/cli/src/ui/components/Footer.tsx b/packages/cli/src/ui/components/Footer.tsx index e2d4c6335bd..296ef0855d2 100644 --- a/packages/cli/src/ui/components/Footer.tsx +++ b/packages/cli/src/ui/components/Footer.tsx @@ -79,8 +79,8 @@ export const Footer: React.FC = ({ {debugMode && } {vimMode && [{vimMode}] } - {!hideCWD && ( - nightly ? ( + {!hideCWD && + (nightly ? ( {displayPath} @@ -94,8 +94,7 @@ export const Footer: React.FC = ({ ({branchName}*) )} - ) - )} + ))} {debugMode && ( {' ' + (debugMessage || '--debug')} @@ -137,7 +136,10 @@ export const Footer: React.FC = ({ )} {/* Right Section: Gemini Label and Console Summary */} - {(!hideModelInfo || showMemoryUsage || corgiMode || (!showErrorDetails && errorCount > 0)) && ( + {(!hideModelInfo || + showMemoryUsage || + corgiMode || + (!showErrorDetails && errorCount > 0)) && ( {!hideModelInfo && ( From c52fc84ac740163d5f18241bc28ab27e18c562ce Mon Sep 17 00:00:00 2001 From: Keith Lyons Date: Wed, 10 Sep 2025 22:15:18 -0400 Subject: [PATCH 5/9] fix(cli): Restore context summary alignment tweaks --- packages/cli/src/ui/components/Composer.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/ui/components/Composer.tsx b/packages/cli/src/ui/components/Composer.tsx index cf55d09220b..d452abe7f58 100644 --- a/packages/cli/src/ui/components/Composer.tsx +++ b/packages/cli/src/ui/components/Composer.tsx @@ -108,7 +108,9 @@ export const Composer = () => { Date: Thu, 11 Sep 2025 10:01:08 -0700 Subject: [PATCH 6/9] Adjust alignment for accept/yolo/shell mode --- packages/cli/src/ui/components/Composer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/ui/components/Composer.tsx b/packages/cli/src/ui/components/Composer.tsx index d452abe7f58..562817a92f3 100644 --- a/packages/cli/src/ui/components/Composer.tsx +++ b/packages/cli/src/ui/components/Composer.tsx @@ -109,13 +109,13 @@ export const Composer = () => { - + {process.env['GEMINI_SYSTEM_MD'] && ( |⌐■_■| )} From f78a96413443990ee31d2fd32a2abecbc35cf9d7 Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Thu, 11 Sep 2025 10:03:00 -0700 Subject: [PATCH 7/9] Format --- packages/cli/src/ui/components/Composer.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/ui/components/Composer.tsx b/packages/cli/src/ui/components/Composer.tsx index 562817a92f3..ef6bcd1cb60 100644 --- a/packages/cli/src/ui/components/Composer.tsx +++ b/packages/cli/src/ui/components/Composer.tsx @@ -109,7 +109,9 @@ export const Composer = () => { Date: Thu, 11 Sep 2025 09:13:22 -0400 Subject: [PATCH 8/9] test(cli): Add golden snapshot tests for footer --- .../cli/src/ui/components/Footer.test.tsx | 52 +++++++++++++++++++ .../__snapshots__/Footer.test.tsx.snap | 20 +++++++ 2 files changed, 72 insertions(+) create mode 100644 packages/cli/src/ui/components/__snapshots__/Footer.test.tsx.snap diff --git a/packages/cli/src/ui/components/Footer.test.tsx b/packages/cli/src/ui/components/Footer.test.tsx index e3673dfee75..bfcd94ba16e 100644 --- a/packages/cli/src/ui/components/Footer.test.tsx +++ b/packages/cli/src/ui/components/Footer.test.tsx @@ -156,4 +156,56 @@ describe('