Description
When running Nanocoder in a small terminal window, if the user has enough chat messages to create a scrollable history, pressing the / key causes the chat view to unexpectedly jump/scroll all the way to the bottom.
Reproduction Steps
- Open Nanocoder.
- Resize the terminal window so it is relatively small in height.
- Generate enough chat messages to create a scrollable history.
- Scroll up slightly in the history so you are no longer at the bottom.
- Type
/ in the input field to trigger the command menu.
- Expected: The slash command completion menu opens smoothly without aggressively moving the chat history viewport.
- Actual: The chat view jumps immediately to the bottom of the message list.
Context & Suspected Cause
This is a layout glitch likely stemming from how Ink.js handles <Static> components and flexbox recalculations. When showCompletions becomes true in source/components/user-input.tsx, the autocomplete menu renders its list of options. This dynamically changes the height of the input container, pushing the chat view up and triggering Ink's scroll container to recalculate and pin itself to the bottom of the list.
Description
When running Nanocoder in a small terminal window, if the user has enough chat messages to create a scrollable history, pressing the
/key causes the chat view to unexpectedly jump/scroll all the way to the bottom.Reproduction Steps
/in the input field to trigger the command menu.Context & Suspected Cause
This is a layout glitch likely stemming from how Ink.js handles
<Static>components and flexbox recalculations. WhenshowCompletionsbecomestrueinsource/components/user-input.tsx, the autocomplete menu renders its list of options. This dynamically changes the height of the input container, pushing the chat view up and triggering Ink's scroll container to recalculate and pin itself to the bottom of the list.