Skip to content

Desktop project picker: prefix collision — opening "foo-ios" selects/opens "foo" #40094

Description

@Hyperion2220

Description

In OpenCode Desktop, I cannot open a repository/directory whose name is a string prefix of another directory already added to the project list. Example: I have a repo/dir vesper and another repo/dir vesper-ios. When I open the project picker and try to choose vesper-ios, the app selects vesper instead (or refuses to open vesper-ios entirely).

Expected behavior: Selecting a directory opens exactly that directory, regardless of whether another directory's name is a prefix of it.

Actual behavior: The shorter name matches as a prefix, so the wrong project is opened and I can't work in vesper-ios.

This is distinct from the existing issues about identical project names or directories that share the same git remote (e.g. #34285, #34067, #39676, #36344, #35714) — here the two directories have different names, but one is a string prefix of the other.

Plugins

None relevant.

OpenCode version

N/A — reproduced on the current Desktop beta.

Steps to reproduce

  1. Add a directory named vesper to OpenCode Desktop.
  2. Attempt to open a new project and choose a directory named vesper-ios.
  3. Observe that vesper-ios cannot be selected; the picker resolves to vesper instead.

Screenshot and/or share link

Not available.

Operating System

macOS (Apple Silicon)

Terminal

OpenCode Desktop app

Metadata

Metadata

Assignees

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