From 1ffb4b4ca5372286cfd80fe739954b7451bc79e0 Mon Sep 17 00:00:00 2001 From: 1942-Zaid Date: Tue, 23 Jun 2026 19:15:48 +0530 Subject: [PATCH] fix: increase terminal max-width from 120 to 1024 The calculateBoxWidth function in useTerminalWidth capped content width at 120 columns regardless of terminal size, wasting horizontal space on wide terminals (>190 cols). Bumped to 1024, matching the existing DEFAULT_TERMINAL_WIDTH constant. Closes #595 --- source/constants.ts | 2 +- source/hooks/useTerminalWidth.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/constants.ts b/source/constants.ts index 7dacd825..e79114db 100644 --- a/source/constants.ts +++ b/source/constants.ts @@ -47,7 +47,7 @@ export const MAX_WEB_SEARCH_QUERY_LENGTH = 500; export const DEFAULT_FIND_FILES_RESULTS = 50; export const DEFAULT_SEARCH_RESULTS = 30; export const DEFAULT_WEB_SEARCH_RESULTS = 10; -export const DEFAULT_TERMINAL_WIDTH = 120; +export const DEFAULT_TERMINAL_WIDTH = 1024; export const DEFAULT_TERMINAL_COLUMNS = 80; // === FILE READING === diff --git a/source/hooks/useTerminalWidth.tsx b/source/hooks/useTerminalWidth.tsx index e2d913d9..e1f1e4b9 100644 --- a/source/hooks/useTerminalWidth.tsx +++ b/source/hooks/useTerminalWidth.tsx @@ -5,7 +5,7 @@ type TerminalSize = 'narrow' | 'normal' | 'wide'; // Calculate box width (leave some padding and ensure minimum width) const calculateBoxWidth = (columns: number) => - Math.max(Math.min(columns - 4, 120), 40); + Math.max(Math.min(columns - 4, 1024), 40); const computeWidth = () => calculateBoxWidth(process.stdout.columns || DEFAULT_TERMINAL_COLUMNS);