Skip to content

Bug [Visual]: TUI populated with gibberish upon copying #2256

Closed

Description

@fkukuck
  • GNOME Terminal v3.28.3-4.el8
  • Shell GNU bash v4.4.20(1)-release
  • opencode v0.5.24

Upon release of the mouse button after highlighting text to copy, the TUI is populated with gibberish.
Gibberish can be erased by resizing the terminal window.
Writing into the input does not remove the gibberish completely but only overwrites it for the characters that are newly typed out.

Recording.2025-08-26.131307.mp4

This is minor but wanted to make sure it's documented.
Would like to take this opportunity to thank you guys so much for opencode!

Activity

  1. github-actions commented on Aug 26, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Aug 26, 2025

    @rekram1-node
    Contributor

    that’s so strange, tui is about to get a big overhaul so I hope this will be fixed for you when that gets done

  3. jensenojs commented on Sep 2, 2025

    @jensenojs
    Contributor

    1 :
    Image

    2 : select first one

    Image

    3 : Press comma

    Image

    using item2 on mac, Monaco Nerd Font. I'm not sure if this type of problem is ultimately tracked under this issue?

  4. rekram1-node commented on Sep 2, 2025

    @rekram1-node
    Contributor

    There is a separate issue that tracks issues w/ Chinese specifically

  5. jensenojs commented on Sep 3, 2025

    @jensenojs
    Contributor

    tks

    There is a separate issue that tracks issues w/ Chinese specifically

  6. jensenojs commented on Sep 4, 2025

    @jensenojs
    Contributor
    Image

    updated : original terminal in mac wii seems ok, So it may be related to some settings of item2. @rekram1-node

    Is there any other information I can provide that might help diagnose this problem?

    updated : "Gibberish can be erased by resizing the terminal window.", same here

    Image

    1 : Image

    2 : select first one

    Image 3 : Press comma Image using item2 on mac, Monaco Nerd Font. I'm not sure if this type of problem is ultimately tracked under this issue?
  7. rekram1-node commented on Sep 4, 2025

    @rekram1-node
    Contributor

    I wish I could help better here but I am not really sure I think all the different terminals just have some ansi inconsistencies, there maybe something specific to your config causiing issue but like I said this is all going to be moved to opentui soon and I think one of the problems they at least mentioned attacking is inconsistent ansi between terminals

  8. jensenojs commented on Sep 16, 2025

    @jensenojs
    Contributor

    I'm not sure if this clue is useful, just note it here for now. I will look into this issue again over the weekend.

    I tried the following terminal emulators, and all of them can reproduce the issue I mentioned above:
    kitty, item2, wezterm, ghostty, rio

    However, some other terminals, such as wave, warp, tabby, do not exhibit the aforementioned problem.

    The reason I discovered this difference was because I wanted to try using opencode normally on other terminals. Unfortunately, on the corresponding terminals (wave, warp, tabby), I couldn't use some of the keybindings I originally set up in nvim (such as ). (I believe opencode.nvim is a very good way to integrate AI into nvim.) Then I did some research and eventually found Comprehensive keyboard handling in terminals, Comprehensive keyboard handling in terminals. I tried 4 out of the 7 terminals mentioned and was able to reproduce this issue.

    in ghostty, it call tell different between and by using cat -v

    Image

    But I'm not sure if this issue is related to Chinese characters, it doesn't seem like it, but if OpenTUI is going to be an alternative in the future, we might need to pay attention to this aspect. OpenCode itself might not necessarily need such extensive shortcut recognition support (or maybe it could? You can never have too many shortcuts hahaha).

  9. rekram1-node commented on Sep 16, 2025

    @rekram1-node
    Contributor

    thanks for this, will keep it in mind

  10. fkukuck commented on Nov 14, 2025

    @fkukuck
    ContributorAuthor

    FYI original issue still present in opencode 1.0.61

  11. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    bugSomething isn't working
    on Nov 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions