anomalyco / anomalyco/opencode
Search keyboard handling splits emoji characters
@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
- Open the model picker or project selector.
- Enter
model 🚀in the search input. - Move focus outside the input while keeping the picker open.
- 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
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.
Assessment
This issue has not been assessed yet.