GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tui: multi-code-point emoji render as blank boxes inside tmux · Issue #54931 · anomalyco/opencode

tui: multi-code-point emoji render as blank boxes inside tmux #54931

New issue
Copy link
New issue
Copy link
Closed
Closed
tui: multi-code-point emoji render as blank boxes inside tmux#54931
Copy link

Description

@major
major
opened on Oct 12, 2026
Issue body actions

Summary

Inside tmux, the TUI renders emoji that use multiple code points as blank or box placeholder cells. Plain kitty without tmux is not affected. This affects keycap sequences (1 + U+FE0F + U+20E3) and base characters followed by VS16 (U+FE0F), such as ⚠️ and 🅰️. The same bytes render correctly in the same terminal outside opencode, with and without tmux. Emoji that are a single code point, such as 💡, render fine.

Environment

  • opencode version: v0.0.0-dev-20853
  • OS: Fedora 44, Linux 7.2.9-200.fc44.x86_64
  • Terminal: kitty 0.48.2 inside tmux 3.7c (variation-selector-always-wide on). Plain kitty is not affected.
  • Shell: zsh
  • Install/channel: dev
  • Active plugins: [email protected] (agents and orchestration only, does not touch rendering)
  • Font: JetBrains Mono, with Noto Color Emoji as the emoji fallback

Reproduction

  1. Confirm that the terminal can draw the sequences:
    printf '1\ufe0f\u20e3  \u26a0\ufe0f  \U0001F170\ufe0f  \U0001F4A1\n'
    All four emoji render correctly in plain kitty and inside a tmux pane.
  2. Start opencode in the same terminal.
  3. Get an assistant message that contains the same characters, for example: ask the model to reply with exactly 1️⃣ 2️⃣ ⚠️ 🅰️ 🅱️ 💡.

Expected Behavior

The message shows the same glyphs as the printf output in step 1.

Actual Behavior

  • 💡 renders correctly.
  • 1️⃣, 2️⃣, ⚠️, 🅰️, 🅱️ render as dark blank or box cells. Some show one box and some show two.
  • 🅲 (U+1F172, no VS16) also renders as a small box placeholder.
Sequence Code points In plain kitty / tmux In opencode TUI
1️⃣ 0031 FE0F 20E3 renders box
⚠️ 26A0 FE0F renders box
🅰️ 1F170 FE0F renders box
💡 1F4A1 renders renders

Additional Context

  • Reproduces every time.
  • This looks like a width or grapheme-cluster disagreement in the TUI renderer: sequences with VS16 or a combining keycap mark are split or measured differently from how the terminal draws them.
  • Possibly related, but with a different symptom (stale glyphs, not placeholder boxes): tui: stale Unicode text spills into sidebar in Herdr #53632. Also related to grapheme handling: TUI: Locale.truncate splits emoji surrogates and under-truncates CJK — UTF-16 units instead of display width #44338.
  • Workaround: avoid emoji that use multiple code points in output.

Activity

  1. opencode-agent commented on Oct 12, 2026

    @opencode-agent
    opencode-agentBot
    on Oct 12, 2026 – with OpenCode Agent
    Contributor
    More actions

    Thanks for the detailed report and the code-point table.

    I couldn't reproduce this in our sandbox because it has no kitty. The headless terminal we use can't draw colour emoji at all, so its screenshots can't show the problem. What I could check on 0.0.0-dev-20853: the TUI keeps 1️⃣, ⚠️, 🅰️ and so on as whole clusters, and in our test terminal it writes each full sequence followed by a 2-column cursor move. So the bytes look correct there.

    One difference that only applies to kitty: the TUI library tests whether the terminal supports kitty's text-sizing escape (OSC 66). When it does, every emoji is sent wrapped as ESC]66;w=2;<emoji>ESC\. That is the most likely reason kitty behaves differently, so this needs someone with kitty to confirm. If you have a moment, these would help narrow it down:

    • Does it still happen if you start opencode with OPENTUI_FORCE_WCWIDTH=1 opencode or OPENTUI_FORCE_UNICODE=1 opencode?
    • In plain kitty, does printf '\e]66;w=2;\u26a0\ufe0f\e\\ \e]66;w=2;1\ufe0f\u20e3\e\\ \e]66;w=2;\U0001F4A1\e\\\n' show the same boxes for the first two and a normal 💡?

    Related issues: #53632 (stale Unicode glyphs in the sidebar) and #44338 (grapheme-aware truncation).

  2. major commented on Oct 12, 2026

    @major
    major
    on Oct 12, 2026
    ContributorAuthor
    More actions

    Thanks! I ran your checks on kitty 0.48.2 and tmux 3.7c. This only happens in tmux. Plain kitty is fine, so the "with and without tmux" in my report was wrong.

    Setup Env var Result
    plain kitty none renders correctly
    plain kitty OPENTUI_FORCE_EXPLICIT_WIDTH=0 renders correctly
    kitty + tmux none black boxes
    kitty + tmux OPENTUI_FORCE_EXPLICIT_WIDTH=0 black boxes
    kitty + tmux OPENTUI_FORCE_UNICODE=1 renders correctly

    Your OSC 66 printf also renders correctly in plain kitty, so kitty and OSC 66 are not the cause.

    Cause: when $TMUX is set, opentui uses the wcwidth width method. It measures VS16 and keycap sequences (1️⃣, ⚠️, 🅰️) as 1 column. tmux with variation-selector-always-wide on draws them 2 columns wide, and the next cell overwrites the right half of the glyph. 💡 is not affected because it is 2 columns wide in both methods. Your sandbox wasn't in tmux, so it saw the 2-column cursor move.

    OPENTUI_FORCE_EXPLICIT_WIDTH=0 makes no difference in tmux, because tmux doesn't support OSC 66, so it's already off there.

    Workaround: start opencode with OPENTUI_FORCE_UNICODE=1 inside tmux.

    A real fix probably belongs in opentui. It could stop forcing wcwidth in tmux versions that draw VS16 emoji wide, or let users set the width method so opencode can pass it through.

    🅲 (U+1F172) is a separate font-coverage gap on my side. It shows a box in plain kitty too, so please ignore it.

  3. major
    changed the title [-]tui: multi-code-point emoji (keycaps, VS16) render as blank boxes[/-] [+]tui: multi-code-point emoji render as blank boxes inside tmux[/+] on Oct 12, 2026
  4. major commented on Oct 12, 2026

    @major
    major
    on Oct 12, 2026
    ContributorAuthor
    More actions

    Upstream issue in opentui: anomalyco/opentui#1654

  5. neriousy commented on Nov 19, 2026

    @neriousy
    neriousy
    on Nov 19, 2026
    Member
    More actions

    This was caused by OpenTUI forcing the wcwidth width method inside tmux (anomalyco/opentui#1654). OpenTUI 0.8.3 now uses the unicode width method for tmux 3.6 and newer, and OpenCode moved to OpenTUI 0.8.4 in #63055. If emoji still render as blank cells in tmux on the latest version, comment here and we'll reopen.

  6. neriousy
    closed this as completedon Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.