nanocoder icon indicating copy to clipboard operation
nanocoder copied to clipboard

[Bug] The "(Shift+Tab to cycle)" mode-cycling hint only renders on terminals too narrow to spare the room for it

Open addyCooks opened this issue 2 months ago • 2 comments

Description

The status line's mode-cycling hint is gated on isNarrow, and useResponsiveTerminal classifies any terminal under 80 columns as narrow. This is backwards relative to the block's own stated purpose a few lines above it in the same file, which lists this hint among the optional segments to drop when the row is running out of space so it should appear by default and be dropped under pressure, not the other way around.

Parent: #907

Steps to Reproduce

  1. Start Nanocoder at a normal terminal width (e.g. 100 columns).
  2. Observe the status line at the bottom (normal mode on · tune: full (auto)).
  3. Resize (or restart) the terminal down to 70 columns and observe the same line again.

Expected Behavior

The (Shift+Tab to cycle) hint is visible by default at normal widths, where there's ample room for it, and is the first segment dropped only once a narrow terminal genuinely can't fit the full row.

Actual Behavior

At 100 columns the hint is completely absent normal mode on with nothing after it. Resizing down to 70 columns (which still has plenty of room to spare) makes the hint suddenly appear: normal (Shift+Tab to cycle) · tune: full. On any terminal 80 columns or wider, there is no on-screen affordance at all for mode cycling the four-level width-drop cascade that's supposed to shed this hint under real pressure never gets a chance to run, because the hint doesn't exist to begin with at normal widths.

Recording

Image

Root Cause

source/components/development-mode-indicator.tsx:145-146:

const shiftHintFull =
	isNarrow && developmentMode !== 'headless'
		? ' (Shift+Tab to cycle)'
		: '';

isNarrow comes from source/hooks/useTerminalWidth.tsx:116, if (width < 80) return 'narrow';. Neither DEVELOPMENT_MODE_LABELS nor DEVELOPMENT_MODE_LABELS_NARROW (source/types/core.ts) contains this text either, so it truly only exists behind this one inverted condition.

Suggested Fix

Invert the condition so the hint is included by default (developmentMode !== 'headless') and let the existing width-budget drop cascade a few lines below remove it under real space pressure which is exactly the mechanism the surrounding comment already describes.

Additional Context

  • [x] I have searched existing issues to ensure this is not a duplicate
  • [x] I can reproduce this issue consistently
  • [x] This issue occurs on the latest main

addyCooks avatar Sep 23 '26 11:09 addyCooks

Hey @akramcodez ! I’d be interested in working on this could you assign this to me ?

addyCooks avatar Sep 23 '26 11:09 addyCooks

Picking this up - a fix will follow shortly.

awhite0030 avatar Sep 23 '26 12:09 awhite0030