Summary
useTerminalWidth caps content width to 120 columns regardless of terminal size, leaving most of a wide terminal empty.
Location
source/hooks/useTerminalWidth.ts (compiled to dist/hooks/useTerminalWidth.js):
const calculateBoxWidth = (columns) => Math.max(Math.min(columns - 4, 120), 40);
Also source/constants.ts sets DEFAULT_TERMINAL_WIDTH = 120 — unclear whether this was intended as a cap or just a fallback.
Impact
On a 190-column terminal, usable width is clamped to ~116 (120 − 4 padding), wasting ~74 columns of horizontal space. Forces users to either:
- Resize their terminal smaller, or
- Patch the dist file after every
npm update
Suggested fix
- Use the full terminal width as the max (or make it configurable)
- At minimum remove the
Math.min(columns - 4, 120) cap so it respects actual terminal width
- Or expose a setting in
nanocoder-preferences.json / agents.config.json for max-width
Workaround
sed -i "s/min(columns - 4, 120)/min(columns - 4, 999)/" \
"$NVM_DIR/versions/node/$(ls -1 "$NVM_DIR/versions/node" | tail -1)/lib/node_modules/@nanocollective/nanocoder/dist/hooks/useTerminalWidth.js"
Summary
useTerminalWidthcaps content width to 120 columns regardless of terminal size, leaving most of a wide terminal empty.Location
source/hooks/useTerminalWidth.ts(compiled todist/hooks/useTerminalWidth.js):Also
source/constants.tssetsDEFAULT_TERMINAL_WIDTH = 120— unclear whether this was intended as a cap or just a fallback.Impact
On a 190-column terminal, usable width is clamped to ~116 (120 − 4 padding), wasting ~74 columns of horizontal space. Forces users to either:
npm updateSuggested fix
Math.min(columns - 4, 120)cap so it respects actual terminal widthnanocoder-preferences.json/agents.config.jsonfor max-widthWorkaround