atuinsh / atuin

✨ Magical shell history
https://atuin.sh
MIT License
20.96k stars 565 forks source link

Directory can be truncated in CLI inspector #2088

Open ellie opened 5 months ago

ellie commented 5 months ago

If the terminal is too narrow, and the length of the directory path is too long, then it is truncated

We use a Ratatui table to display this information. Each cell in the table has a height of 1 by default, and it does not seem possible to make the height dynamic. We'll probably need to figure out a different way of rendering this information

atuin-bot commented 5 months ago

This issue has been mentioned on Atuin Community. There might be relevant details there:

https://forum.atuin.sh/t/inspect-feedback-the-directory-path-is-truncated-in-inspect-page/322/3

kidonng commented 5 months ago

Semi-related, but the inspector generally doesn't look good when the terminal is relatively narrow. This is default 80x25 window in iTerm, as you can see a lot more stuff are truncated (even if there's space remaining in the box, at least that's what it looks like to me):

Screenshot 2024-06-26 at 1 30 34 AM

The truncated header (with the shortcuts hint and history count) is prominent in the (main) Search window as well.

salzig commented 2 weeks ago

even worse, if you prefer a inline_height = 10 everything after Duration gets truncated away without indication of "missing" values. a bit OT, but there is also no keyboard shortcut to increase the size to fullscreen, or "force" full render of the inspector.

tombh commented 1 week ago

Just to reiterate @salzig's point to see if I understand and agree: when setting something like inline_height = 10, it'd be nice to have a way of still being able to easily see the fullscreen inspector view. For example either a keyboard shortcut or a new config like inspector_height = full.

romen commented 1 week ago

Alternatively (or in addition) one idea could be to make the text fields of this view browsable (e.g. with arrow keys or mouse click) and use a line(s) at the bottom (like the one used to invite feedback) to show the untruncated value of the currently selected field.