File and MCP resource search fails to match text hidden by truncation #4463

Closed
opened 2026-02-16 17:43:51 -05:00 by yindo · 1 comment
Owner

Originally created by @bagatka on GitHub (Jan 8, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Problem

When attaching files or MCP resources using @ in the TUI, long paths/URIs are truncated with "..." in the middle for display (e.g., src/components/f...ationService.ts). The fuzzy search runs against this truncated string, so typing text hidden by the ellipsis fails to find matches.
This affects:

Files - long file paths
MCP Resources - long resource names/URIs

Expected behavior

Fuzzy search should match against the full path/URI, not the truncated display string.

Resize your terminal window to be as small as possible while still being able to type in the input field
Have a file with a long path (e.g., src/components/files/FileValidationService.ts)
Type @ to open the autocomplete menu
Start typing part of the filename that gets hidden by truncation (e.g., "Validation")
The file doesn't appear in the results, even though it should match

Plugins

No response

OpenCode version

1.1.6

Steps to reproduce

  1. Resize your terminal window to be as small as possible while still being able to type in the input field
  2. Have a file with a long path (e.g., src/components/files/FileValidationService.ts)
  3. Type @ to open the autocomplete menu
  4. Start typing part of the filename that gets hidden by truncation (e.g., "Validation")
  5. The file doesn't appear in the results, even though it should match

Screenshot and/or share link

https://github.com/user-attachments/assets/645ebbf5-3928-4f96-a05a-d283ccde6d12

Operating System

macOS 26.2/Windows 11

Terminal

Ghostty/Windows Terminal

Originally created by @bagatka on GitHub (Jan 8, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description ## Problem When attaching files or MCP resources using `@` in the TUI, long paths/URIs are truncated with "..." in the middle for display (e.g., `src/components/f...ationService.ts`). The fuzzy search runs against this truncated string, so typing text hidden by the ellipsis fails to find matches. This affects: Files - long file paths MCP Resources - long resource names/URIs ## Expected behavior Fuzzy search should match against the full path/URI, not the truncated display string. Resize your terminal window to be as small as possible while still being able to type in the input field Have a file with a long path (e.g., src/components/files/FileValidationService.ts) Type `@` to open the autocomplete menu Start typing part of the filename that gets hidden by truncation (e.g., "Validation") The file doesn't appear in the results, even though it should match ### Plugins _No response_ ### OpenCode version 1.1.6 ### Steps to reproduce 1. Resize your terminal window to be as small as possible while still being able to type in the input field 2. Have a file with a long path (e.g., src/components/files/FileValidationService.ts) 3. Type `@` to open the autocomplete menu 4. Start typing part of the filename that gets hidden by truncation (e.g., "Validation") 5. The file doesn't appear in the results, even though it should match ### Screenshot and/or share link https://github.com/user-attachments/assets/645ebbf5-3928-4f96-a05a-d283ccde6d12 ### Operating System macOS 26.2/Windows 11 ### Terminal Ghostty/Windows Terminal
yindo added the opentuibug labels 2026-02-16 17:43:51 -05:00
yindo closed this issue 2026-02-16 17:43:51 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 8, 2026):

For keybind-related issues, please also check our pinned keybinds documentation: #4997

@github-actions[bot] commented on GitHub (Jan 8, 2026): For keybind-related issues, please also check our pinned keybinds documentation: #4997
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4463