anomalyco / anomalyco/opencode
TUI: tab close × has an extremely narrow mouse hitbox
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
In the OpenCode 2 CLI/TUI, the close × button on a tab is very difficult to click with the mouse.
Visually, the × occupies a normal character width, but it feels like only about half of the rendered glyph is actually clickable.
Clicking slightly to one side of the visible × either does nothing or selects the tab instead of closing it.
Screenshot
Attach screenshot here.
Expected behavior
The entire visible × area should be clickable.
Ideally, the mouse hitbox should cover at least the full terminal cell(s) occupied by the close glyph.
Actual behavior
Only a very narrow portion of the visible × seems to trigger the close action.
This makes closing tabs with the mouse unnecessarily difficult.
Possible cause
The close glyph appears to be:
× (U+00D7 MULTIPLICATION SIGN)
U+00D7 has East Asian Width = Ambiguous.
Depending on the terminal / locale / font configuration, it may be rendered as 2 terminal columns while the TUI mouse hitbox calculation treats it as 1 column.
That could explain the behavior where only approximately half of the rendered glyph responds to clicks.
This is only a hypothesis.
As a quick test, replacing × temporarily with ASCII x might help determine whether this is related to terminal cell-width calculation.
Plugins
nothing.
OpenCode version
- OpenCode version: v2.0.8
Steps to reproduce
- Using multi tab.
- Click X to close tab
Screenshot and/or share link
Likely, [><] is rendered as two columns, but only [>] is included in the hitbox.
Operating System
- OS: Linux
Terminal
- Terminal: Zed Editor's internal
Other
- Locale: Japanese / CJK environment
- Display server: Wayland
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the TUI tab close control and its mouse hitbox calculation, reproducing the issue with multiple tabs in the reported Linux, Japanese/CJK, Zed terminal environment. Check how the visible × glyph width is measured and verify that the full terminal cell area closes the tab without selecting it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100