From 2a28132fed2d2ef2e4d7c4be10d4e03019eb4b6f Mon Sep 17 00:00:00 2001 From: wenshao Date: Wed, 8 Apr 2026 21:03:21 +0800 Subject: [PATCH] fix(footer): suppress hint when status line active, hide on exit prompts - Hide "? for shortcuts" when a custom status line is configured (status line already occupies the top row, hint is redundant) - Hide status line during Ctrl+C/D exit prompts to keep footer at one row during exit flow - Matches upstream Claude Code suppressHint + exitMessage behavior --- packages/cli/src/ui/components/Footer.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/cli/src/ui/components/Footer.tsx b/packages/cli/src/ui/components/Footer.tsx index bde50505a..9934f3582 100644 --- a/packages/cli/src/ui/components/Footer.tsx +++ b/packages/cli/src/ui/components/Footer.tsx @@ -52,8 +52,11 @@ export const Footer: React.FC = () => { const contextWindowSize = config.getContentGeneratorConfig()?.contextWindowSize; + // Hide "? for shortcuts" when a custom status line is active (it already + // occupies the top row, so the hint is redundant). Matches upstream behavior. + const suppressHint = !!statusLineText; + // Left bottom row: high-priority messages > approval mode > hint. - // Matches upstream layout where status line and hints coexist vertically. const leftBottomContent = uiState.ctrlCPressedOnce ? ( {t('Press Ctrl+C again to exit.')} ) : uiState.ctrlDPressedOnce ? ( @@ -67,7 +70,7 @@ export const Footer: React.FC = () => { ) : showAutoAcceptIndicator !== undefined && showAutoAcceptIndicator !== ApprovalMode.DEFAULT ? ( - ) : ( + ) : suppressHint ? null : ( {t('? for shortcuts')} ); @@ -117,11 +120,13 @@ export const Footer: React.FC = () => { > {/* Left column — status line on top, hints/mode on bottom */} - {statusLineText && ( - - {statusLineText} - - )} + {statusLineText && + !uiState.ctrlCPressedOnce && + !uiState.ctrlDPressedOnce && ( + + {statusLineText} + + )} {leftBottomContent}