opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Windows Multiple Display Issue

Open QDaed opened this issue 6 months ago • 5 comments

Windows Build 1.Unable to scroll in sessions 2.When scroll down with active session the text got stack together like visual bug 3.Unable to copy text when using opencode

QDaed avatar Jun 25 '25 22:06 QDaed

Image PoC Unable to scroll and the text is stack together when output

QDaed avatar Jun 26 '25 14:06 QDaed

I can confirm with 0.1.143 from releases.

-- edit -- If problem is on Go side 224 line of tui.go is a good place to start debugging. https://github.com/sst/opencode/blob/dev/packages/tui/internal/tui/tui.go#L224

-- edit -- bun run .\packages\opencode\src\index.ts https://github.com/oven-sh/bun/issues/20675

Maybe transplant bun compiled files from WSL... maybe tomorrow. Now main/stable branch is broken on windows platform.

SQLek avatar Jun 26 '25 19:06 SQLek

I was unable to localize compiled bun/ts files to transplant wsl=>windows, so I transplanting whole cross compiled binary with debug enabled.

GOOS=windows GOARCH=amd64 go build -gcflags="all=-N -l" -o opencode.exe ./cmd/opencode/

And no luck. I'm still missing some shaman knowledge how to run opencode without JS components.

Bun still broken, Downgraded version to 1.2.14, still panics.

Last hope to run bun in wsl and connect to it from host. After that I'm giving up.

-- edit -- To run just Tui:

  1. Modify index.ts in wsl, 0.0.0.0 and port of Your choosing.
  2. Capture envs OPENCODE_SERVER and OPENCODE_APP_INFO
  3. Add \\wsl$\<distro-name> to paths in APP_INFO.
  4. Run ./packages/tui/cmd/opencode with injected envs.

So far we know:

  • Scroll-up work better but can miss a line when redrawing
  • Scroll-down redraws only few bottom lines
  • After resize repaint is correct, ~~but view port is called with SetContent only containing currently visible area.~~ (my bad, red hering) Kinda strange and worth investigating.

-- edit -- I'm able to reproduce scrolling glitches using bubbles/viewport example from bubbletea documentation. Further investigation tomorrow.

SQLek avatar Jun 27 '25 15:06 SQLek

At the moment this scroll issue and display text make windows unusable , https://github.com/sst/opencode/pull/486 this pull exactly solve the problem with fixing the overlay while rendering

QDaed avatar Jun 28 '25 00:06 QDaed

@QDaed is this still an issue? its good for me now

Hona avatar Jan 05 '26 23:01 Hona