You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's possible to cause a panic with an Inline viewport if it is the size of the screen. If this happens, then max_chunk_size will end up being 0 causing chunks to panic.
### Description
With #7822 (and #7805 ) we're using `insert_before` to persist logs.
This can panic (ratatui-org/ratatui#999) if
the viewport fills the entire terminal.
This PR changes our viewport construction so it now takes terminal size
into account. (Previously we always would use 60, even if the terminal
didn't have 60 rows)
### Testing Instructions
Use UI with a terminal that has a height of 60 or less.
Closes TURBO-2695
Unfortunately we cant' change things easily to return errors as there are lots of apps that this would break, but we can add new methods that do this (and it's one of those things we've spoken about a few times), so the first option is really orthogonal to this problem. Ideally we should never panic for things that are expected (and sometimes even for things which can be handled by ignoring the problem).
Here, I think this probably should succeed and write the line above the viewport.
Would you consider submitting a PR to fix this?
I'd suggest adding a unit / integration test if possible that shows this panicking and then make that unit test succeed.
Description
It's possible to cause a panic with an
Inline
viewport if it is the size of the screen. If this happens, thenmax_chunk_size
will end up being0
causingchunks
to panic.To Reproduce
Expected behavior
Either:
Environment
The text was updated successfully, but these errors were encountered: