fix(cli): resolve PR review comments regarding mode ids and copyModeEnabled

This commit is contained in:
Keith Guerin
2026-03-27 11:51:58 -07:00
parent a44ea49cf7
commit 8d5b930ef5
4 changed files with 27 additions and 480 deletions
+3 -1
View File
@@ -259,7 +259,9 @@ export const Composer = ({ isFocused = true }: { isFocused?: boolean }) => {
{showUiDetails &&
!settings.merged.ui.hideFooter &&
!isScreenReaderEnabled && <Footer />}
!isScreenReaderEnabled && (
<Footer copyModeEnabled={uiState.copyModeEnabled} />
)}
</Box>
);
};
+5 -7
View File
@@ -171,7 +171,7 @@ function isFooterItemId(id: string): id is FooterItemId {
}
interface FooterColumn {
id: FooterItemId;
id: string;
header: string;
element: (maxWidth: number) => React.ReactNode;
width: number;
@@ -233,7 +233,7 @@ export const Footer: React.FC<{ copyModeEnabled?: boolean }> = ({
const potentialColumns: FooterColumn[] = [];
const addCol = (
id: FooterItemId,
id: string,
header: string,
element: (maxWidth: number) => React.ReactNode,
dataWidth: number,
@@ -249,12 +249,10 @@ export const Footer: React.FC<{ copyModeEnabled?: boolean }> = ({
};
// 1. System Indicators (Far Left, high priority)
// Note: These don't have IDs in ALL_ITEMS yet, but we handle them as specials
if (displayVimMode) {
const vimStr = `[${displayVimMode}]`;
// We'll use a hacky cast for now or ideally update ALL_ITEMS
addCol(
'mode', // Using 'mode' as a placeholder for system indicators
'vim-mode',
'',
() => <Text color={theme.text.accent}>{vimStr}</Text>,
vimStr.length,
@@ -462,10 +460,10 @@ export const Footer: React.FC<{ copyModeEnabled?: boolean }> = ({
}
// 3. Transients
if (corgiMode) addCol('mode', '', () => <CorgiIndicator />, 5); // Hacky ID for now
if (corgiMode) addCol('corgi-mode', '', () => <CorgiIndicator />, 5);
if (showErrorSummary) {
addCol(
'mode', // Hacky ID
'error-summary',
'',
() => <ConsoleSummaryDisplay errorCount={errorCount} />,
12,
@@ -1,45 +1,49 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`<Footer /> > displays "Limit reached" message when remaining is 0 1`] = `
" workspace (/directory) sandbox /model /stats
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro limit reached
" mode (Shift+Tab) workspace (/directory) sandbox /model /stats
manual ~/project/foo/bar/and/some/more/directories/to/make/it/lo no sandbox gemini-pro limit reached
"
`;
exports[`<Footer /> > displays the usage indicator when usage is low 1`] = `
" workspace (/directory) sandbox /model /stats
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro 85%
" mode (Shift+Tab) workspace (/directory) sandbox /model /stats
manual ~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro 85%
"
`;
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders complete footer in narrow terminal (baseline narrow) > complete-footer-narrow 1`] = `
" workspace (/directory) sandbox /model context
...me/more/directories/to/make/it/long no sandbox gemini-pro 14%
" mode (Shift+Tab) workspace (/directory) sandbox /model
manual ...rectories/to/make/it/long no sandbox gemini-pro
"
`;
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders complete footer with all sections visible (baseline) > complete-footer-wide 1`] = `
" workspace (/directory) sandbox /model context
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro 14% used
" mode (Shift+Tab) workspace (/directory) sandbox /model context
manual ~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro 14% used
"
`;
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders footer with CWD and model info hidden to test alignment (only sandbox visible) > footer-only-sandbox 1`] = `
" sandbox
no sandbox
" mode (Shift+Tab) sandbox
manual no sandbox
"
`;
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders footer with all optional sections hidden (minimal footer) > footer-minimal 1`] = `""`;
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders footer with all optional sections hidden (minimal footer) > footer-minimal 1`] = `
" mode (Shift+Tab)
manual
"
`;
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders footer with only model info hidden (partial filtering) > footer-no-model 1`] = `
" workspace (/directory) sandbox
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox
" mode (Shift+Tab) workspace (/directory) sandbox
manual ~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox
"
`;
exports[`<Footer /> > hides the usage indicator when usage is not near limit 1`] = `
" workspace (/directory) sandbox /model /stats
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro 15%
" mode (Shift+Tab) workspace (/directory) sandbox /model /stats
manual ~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro 15%
"
`;