OpenTUI: Missing main view text when resizing
Description
Opening a new window in i3 makes the opencode window resize. After resize the text in the main view is missing.
OpenCode version
v1.0.7
Steps to reproduce
- Open opencode to fill the whole screen
- Open a 2nd window and split the screen in 2 windows (opencode + 2nd window)
- Expect opencode to resize and still show everything
Screenshot and/or share link
Operating System
Arch Linux + i3
Terminal
Alacritty
This issue might be a duplicate of existing issues. Please check:
- #3328: Same issue where TUI doesn't resize properly when window resizes, showing broken display
- #3676: Window resizing doesn't work on Windows terminals with similar symptoms
- #3394: OpenTUI resize issue where UI elements flow into each other after resizing
Feel free to ignore if none of these address your specific case.
After this happens, are you able to get the main view to display correctly by resizing the terminal window incrementally?
After this happens, are you able to get the main view to display correctly by resizing the terminal window incrementally?
No, I tried resizing both horizontally and vertically, smaller and bigger. The main view stays empty.
Also tried scrolling up (with mouse wheel), to see if the text just got pushed, but nothing happens when I scroll.
Its like the main view has been cleared.
When I enter a new prompt, it starts populating again with blocks from the new prompt (the old blocks are still gone).
What I've noticed that if you keep the conversation going for a bit, then you scroll up, sometimes you can see the messages correctly. The resize trick works after using the /editor command only.
If the content reappears after aggressive scrolling it is a known issue in the scrollbox clipping. I'll fix that in the opentui lib and add an option to turn clipping off in opencode implementation should it not get better.
If the content reappears after aggressive scrolling it is a known issue in the scrollbox clipping. I'll fix that in the opentui lib and add an option to turn clipping off in opencode implementation should it not get better.
I think you've got it!
Had to spam scroll for 30+ seconds with my mouse, but eventually got to the old blocks.
https://github.com/sst/opencode/pull/3834
fixes it for me