tui rendering artifacting #1264

Closed
opened 2026-02-16 17:30:12 -05:00 by yindo · 19 comments
Owner

Originally created by @AviseOffical on GitHub (Aug 12, 2025).

Originally assigned to: @adamdotdevin on GitHub.

the tui does not seem to be re-rendered of force-updated

Image

also if u where to try and copy console log from when i build a project and paste (ctrl+v) a long snippet of error code/syntax the opencode will begin working before i even hit enter when i still am pasting error log/msg.

Originally created by @AviseOffical on GitHub (Aug 12, 2025). Originally assigned to: @adamdotdevin on GitHub. the tui does not seem to be re-rendered of force-updated <img width="679" height="980" alt="Image" src="https://github.com/user-attachments/assets/4573264b-2589-40f6-83e3-5048ce90afeb" /> also if u where to try and copy console log from when i build a project and paste (ctrl+v) a long snippet of error code/syntax the opencode will begin working before i even hit enter when i still am pasting error log/msg.
yindo added the windows label 2026-02-16 17:30:12 -05:00
yindo closed this issue 2026-02-16 17:30:12 -05:00
Author
Owner

@rekram1-node commented on GitHub (Aug 12, 2025):

@xXT10Xx this seems terminal specific, which terminal are u using?

@rekram1-node commented on GitHub (Aug 12, 2025): @xXT10Xx this seems terminal specific, which terminal are u using?
Author
Owner

@AviseOffical commented on GitHub (Aug 12, 2025):

@xXT10Xx this seems terminal specific, which terminal are u using?

@rekram1-node
im on windows and have tried console, windows terminal and terminal inside of vscode.

@AviseOffical commented on GitHub (Aug 12, 2025): > [@xXT10Xx](https://github.com/xXT10Xx) this seems terminal specific, which terminal are u using? @rekram1-node im on windows and have tried console, windows terminal and terminal inside of vscode.
Author
Owner

@AviseOffical commented on GitHub (Aug 15, 2025):

@adamdotdevin have u by chance fixed or looked into this?

@AviseOffical commented on GitHub (Aug 15, 2025): @adamdotdevin have u by chance fixed or looked into this?
Author
Owner

@gius commented on GitHub (Aug 21, 2025):

I am on Windows as well, tried different terminals - the rendering seems broken, some sections/areas remain displayed when scrolling. It seems that it gets broken after the first prompt, while the response is streamed - some rows scroll the screen down as expected, some overwrite the last one.

Image
@gius commented on GitHub (Aug 21, 2025): I am on Windows as well, tried different terminals - the rendering seems broken, some sections/areas remain displayed when scrolling. It seems that it gets broken after the first prompt, while the response is streamed - some rows scroll the screen down as expected, some overwrite the last one. <img width="1159" height="403" alt="Image" src="https://github.com/user-attachments/assets/664eda48-89d6-4b3d-9c0c-58ad8b846d6b" />
Author
Owner

@rekram1-node commented on GitHub (Aug 21, 2025):

Sorry to hear that, our windows support is lackluster hoping it can continue to improve in near future

@rekram1-node commented on GitHub (Aug 21, 2025): Sorry to hear that, our windows support is lackluster hoping it can continue to improve in near future
Author
Owner

@mairs8 commented on GitHub (Aug 25, 2025):

i am getting the same issue too.

@mairs8 commented on GitHub (Aug 25, 2025): i am getting the same issue too.
Author
Owner

@JosXa commented on GitHub (Oct 21, 2025):

I just had this happen in Alacritty Windows too:

Image
@JosXa commented on GitHub (Oct 21, 2025): I just had this happen in Alacritty Windows too: <img width="805" height="630" alt="Image" src="https://github.com/user-attachments/assets/25ed063a-2169-4b95-8d43-1e35ac20a2a1" />
Author
Owner

@zendril commented on GitHub (Oct 25, 2025):

It seems to be something with the ANSI color sequences or line endings.

set NO_COLOR=1 fixes the artifacting and also the wonky mouse scrollback issues, but the tradeoff is that we lose color

Is there a possibility to see if this is BubbleTea 2 beta related?

@zendril commented on GitHub (Oct 25, 2025): It seems to be something with the ANSI color sequences or line endings. `set NO_COLOR=1` fixes the artifacting and also the wonky mouse scrollback issues, but the tradeoff is that we lose color Is there a possibility to see if this is BubbleTea 2 beta related?
Author
Owner

@rekram1-node commented on GitHub (Oct 25, 2025):

we are about to ship a rewrite of the tui that wont be using bubbletea should resolve all this

@rekram1-node commented on GitHub (Oct 25, 2025): we are about to ship a rewrite of the tui that wont be using bubbletea should resolve all this
Author
Owner

@zendril commented on GitHub (Oct 25, 2025):

Fantastic news.

@zendril commented on GitHub (Oct 25, 2025): Fantastic news.
Author
Owner

@zendril commented on GitHub (Oct 25, 2025):

we are about to ship a rewrite of the tui that wont be using bubbletea should resolve all this

Is this in a branch or a preview release? I'll pull it and try/verify on windows (and wsl).

@zendril commented on GitHub (Oct 25, 2025): > we are about to ship a rewrite of the tui that wont be using bubbletea should resolve all this Is this in a branch or a preview release? I'll pull it and try/verify on windows (and wsl).
Author
Owner

@rekram1-node commented on GitHub (Oct 26, 2025):

@zendril yes you can try it by running the following, it should always track to latest version of opentui branch:

bun x opencode-ai@opentui

@rekram1-node commented on GitHub (Oct 26, 2025): @zendril yes you can try it by running the following, it should always track to latest version of opentui branch: bun x opencode-ai@opentui
Author
Owner

@zendril commented on GitHub (Oct 26, 2025):

FYI

I'm on windows, this seems like it is looking for linux/posix pathing.
Tried from inside git-bash but no difference.

error: interpreter executable "/bin/sh" not found in %PATH%

Bun failed to remap this bin to its proper location within node_modules.
This is an indication of a corrupted node_modules directory.

Please run 'bun install --force' in the project root and try
it again. If this message persists, please open an issue:
https://github.com/oven-sh/bun/issues
@zendril commented on GitHub (Oct 26, 2025): FYI I'm on windows, this seems like it is looking for linux/posix pathing. Tried from inside git-bash but no difference. ``` error: interpreter executable "/bin/sh" not found in %PATH% Bun failed to remap this bin to its proper location within node_modules. This is an indication of a corrupted node_modules directory. Please run 'bun install --force' in the project root and try it again. If this message persists, please open an issue: https://github.com/oven-sh/bun/issues ```
Author
Owner

@rekram1-node commented on GitHub (Oct 26, 2025):

good to know ty

@rekram1-node commented on GitHub (Oct 26, 2025): good to know ty
Author
Owner

@zendril commented on GitHub (Oct 26, 2025):

Took a bit of a look.

When I bun dev the opentui branch I get a message to check the log which says ERROR 2025-10-26T05:24:50 +241ms service=default name=Error message=getContextId cannot be used under non-hydrating context stack=Error: getContextId cannot be used under non-hydrating context

Adding --conditions=browser seems to get past that and allow the branch to run fine.

Made the following PR but take this with a grain of salt because this is the first time I've opened this codebase up.

https://github.com/sst/opencode/pull/3453

@zendril commented on GitHub (Oct 26, 2025): Took a bit of a look. When I `bun dev` the opentui branch I get a message to check the log which says `ERROR 2025-10-26T05:24:50 +241ms service=default name=Error message=getContextId cannot be used under non-hydrating context stack=Error: getContextId cannot be used under non-hydrating context` Adding `--conditions=browser` seems to get past that and allow the branch to run fine. Made the following PR but take this with a grain of salt because this is the first time I've opened this codebase up. https://github.com/sst/opencode/pull/3453
Author
Owner

@zendril commented on GitHub (Oct 26, 2025):

As a follow-up, I built the windows exe from that PR (this build doesn't run ON windows, but ran the build on wsl to produce the opencode-windows-x64 binary) and was able to run that just fine.

Also ran the linux version and that worked ok too, so I don't think I broke anything with the PR change.

@zendril commented on GitHub (Oct 26, 2025): As a follow-up, I built the windows exe from that PR (this build doesn't run ON windows, but ran the build on wsl to produce the opencode-windows-x64 binary) and was able to run that just fine. Also ran the linux version and that worked ok too, so I don't think I broke anything with the PR change.
Author
Owner

@rekram1-node commented on GitHub (Oct 26, 2025):

awesome thank you

@rekram1-node commented on GitHub (Oct 26, 2025): awesome thank you
Author
Owner

@zendril commented on GitHub (Oct 26, 2025):

Thanks for merging. Pulled the opentui branch with that merged in and bun dev seems to work fine.

Still getting error: interpreter executable "/bin/sh" not found in %PATH% when running bun x opencode-ai@opentui

I made another PR for that so that the package.json invokes a run.js that figures out whether it should be ./bin/opencode or ./bin/opencode.cmd

https://github.com/sst/opencode/pull/3466

I know I hijacked this thread a bit.. but the combination of these two fixes makes the opentui branch usable on windows and should now support bun x opencode@opentui

@zendril commented on GitHub (Oct 26, 2025): Thanks for merging. Pulled the opentui branch with that merged in and `bun dev` seems to work fine. Still getting `error: interpreter executable "/bin/sh" not found in %PATH%` when running `bun x opencode-ai@opentui` I made another PR for that so that the package.json invokes a run.js that figures out whether it should be ./bin/opencode or ./bin/opencode.cmd https://github.com/sst/opencode/pull/3466 I know I hijacked this thread a bit.. but the combination of these two fixes makes the opentui branch usable on windows and should now support `bun x opencode@opentui`
Author
Owner

@rekram1-node commented on GitHub (Oct 26, 2025):

no prob this is helpful, thank u

@rekram1-node commented on GitHub (Oct 26, 2025): no prob this is helpful, thank u
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1264