turbo
turbo copied to clipboard
New TUI: Scrolling behavior can be improved
Verify canary release
- [X] I verified that the issue exists in the latest Turborepo canary release.
Link to code that reproduces this issue
N/A
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Other
Which canary version will you have in your reproduction?
2.0.6-canary.0
Describe the Bug
Lifting out questions about scrolling from https://github.com/vercel/turbo/issues/8372 so we can have separate GitHub Issues for separate issues.
Expected Behavior
See comments both on the original issue and below for expected behavior from the community.
To Reproduce
Scrolling in the new TUI.
Additional context
No response
Any update on this?
I'm having problems with this too. Our application logs a lot of debug data when executing tasks, and the new TUI seems to limit scrollback, so I can't scroll up to see the startup parameters logged at the beginning of the task execution. I do not have this problem if disabling the new TUI. I find it very strange that Turbo would override the scrollback I've already configured in my terminal.
@aronstrandberg Doesn't solve your problem but, for context, the TUI renders in a vterm so doesn't automatically inherit your configurations. We hardcoded the buffer length since we couldn't find any way to do it in the xterm spec.
This class of problem isn't unique to Turborepo's TUI, for what it's worth. Anything rendering to an alt screen or manipulating your terminal can/will suffer from the same problems (nvim, tmux, etc.), and is the reason that we've struggled with figuring out a solution we like/users will like for the other scrolling behavior questions. Terminals are ooooold technology, and we're stretching them past their limits. 😄
But I'm able to use pgUp pgDown fine in those mentioned vt, how do you scroll to bottom w turbo tui?
how do you scroll to bottom w turbo tui?
@darr1s Are you meaning you're looking for a hotkey to do this with? We do have u and d now to scroll one line up and down, but we could also do a keybind for paging or jumping to top/bottom.
Hey @anthonyshew, the scrolling seems like not respect the scroll steps of native term/os (tested on both Windows/Mac). I noticed there are scrolling up/down button however they only scroll by 1 step.
My use case is building on the t3-stack (https://github.com/t3-oss/create-t3-turbo) and it is very difficult to scroll up and down to see terminal logs/errors. Furthermore it seems like it is not possible to have hybrid TUI/stream UI when there is a particular package requires TUI interactivity.
I wonder is it possible for turbo to replace its TUI with some existing open source TUI framework, which should provides good defaults for hotkey and UI rendering utilities. ie. https://github.com/gin66/tui-logger
Appreciate if you could give some pointer.
FWIW, 1,024 lines feels like a very low limit given the resources available to modern systems. If the average line of text is something like 70-100 bytes, that comes out to approximately 100KB. This ought to be configurable at the very least.
Aside from that, Page Up/Down support would be very much appreciated, as would some way of jumping to the start and end of the output—I think Ctrl+Home/End are fairly standard for that?
@anthonyshew I would kill for a hotkey to jump to bottom.
Scrolling to the bottom would be awesome. @anthonyshew, based on your prior considerations of the status of terminals, do you think it is feasible?
@darr1s The package you've linked is deprecated in favor of Ratatui, which we use.
@spinda @darr1s @aronstrandberg, see https://github.com/vercel/turborepo/pull/10247 for scrollback length.
@darr1s @danielfehergoto @devontivona @fox1t @ThallesP, see https://github.com/vercel/turborepo/pull/10248 for added keybinds.
Folks, with #10247 and #10248 now merged, I'm going to close out this issue. It appears most of what is in this Issue and #8372 that preceded it has been addressed. If there's something you believe is still not implemented well enough that it deserves to be called a bug, please open a fresh Issue. You can also request new features with a Discussion.
Thanks for the patience and giving us your feedback. 🙏