Skip to content

Conversation

@ysthakur
Copy link
Member

@ysthakur ysthakur commented Jan 4, 2026

Goes towards fixing #995 (description box can change sides for every suggestion with the IdeMenu, causing seizures for photosensitive users)

This PR makes it so that which side the description box is on is not influenced by the description itself (only applicable when the description_mode is PreferRight, the default). This means that when scrolling down the list of completions, it will never change sides. The PR also fixes a bug where, if the description menu was on the left, it would sometimes push the completions box to the right, causing more motion.

Breaking change

However, a breaking change caused by this is the change in the meaning of min_description_width. Previously, it was set to 0 by default, and now I'm setting it to 15 (arbitrary choice, open to changing it). Opened nushell/nushell#17280 to update this on the Nushell side. I'm unsure what exactly its purpose was before, but it's now used as the threshold for deciding when to switch the description box to the left.

For example, if min_description_width is 15, then as long as we have 15 columns available on the right of the completions box, the description box can stay on the right. Once we have 14 or fewer columns available, the description box switches to the left. Setting min_description_width to 0 would effectively force the description box to stay on the right.

Recordings

Here's a recording of what the default IdeMenu looks like in Nushell (warning: I decreased the playback speed but the recording includes scrolling down the menu, not sure if that can trigger seizures. Recommendation from alicealysia is to decrease window size first if you're photosensitive):

asciicast

And here it is with correct_cursor_pos: true:
asciicast

@ysthakur ysthakur requested a review from fdncred January 4, 2026 04:17
@ysthakur ysthakur added the A-Completions Area: Tab completion and inline hint completions label Jan 4, 2026
@alicealysia
Copy link

Re the warning, yeah, slowing down playback helps quite a bit, something extra that I will advise here is that viewers with photo-sensitivity should still reduce the window size if using a larger screen for the sake of saftey, but I was able to watch comfortably.

Copy link
Contributor

@fdncred fdncred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work Yash! Looks like lots of fiddly bits to get this working. I'm fine with moving forward with this and dogfooding it a for a bit in nushell.

@ysthakur ysthakur merged commit 25d2424 into nushell:main Jan 4, 2026
6 checks passed
@ysthakur ysthakur deleted the fix-seizures branch January 4, 2026 13:30
ysthakur added a commit to nushell/nushell that referenced this pull request Jan 4, 2026
Change default IdeMenu `min_description_width` from 0 to 15 to prepare
for nushell/reedline#996

Also bumps to latest commit on Reedline (which includes the linked
Reedline PR)

## Release notes summary - What our users need to know

Doesn't need to be mentioned in the release notes

## Tasks after submitting

None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Completions Area: Tab completion and inline hint completions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants