anomalyco / anomalyco/opencode

Search keyboard handling splits emoji characters

Open
#49,491 1 comment 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Sep 17, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

The shared search keyboard handler deletes and moves by UTF-16 code unit instead of Unicode code point. When a model or project search contains an emoji and focus is outside the search input, pressing Backspace can remove only half of the surrogate pair and leave a replacement character in the query. Arrow navigation can likewise place the caret inside the character.

Plugins

None

OpenCode version

1.18.31

Steps to reproduce
  1. Open the model picker or project selector.
  2. Enter model 🚀 in the search input.
  3. Move focus outside the input while keeping the picker open.
  4. Press Backspace so the document-level search handler processes the key.

Expected: the rocket is removed as one character, leaving model .

Actual: only one UTF-16 code unit is removed, leaving model �.

Screenshot and/or share link

Not applicable; a focused call to the shared keyboard handler reproduces the malformed string directly.

Operating System

All

Terminal

All

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.