anomalyco / anomalyco/opencode

Directory picker skips the last suggestion when Up is pressed initially

Open
#44,960 1 comment 0 reactions 1 assignee View on GitHub

@Brendonovich is already working on this.

Since Aug 25, 2026.

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

Description

Description

In the directory picker autocomplete, pressing Up before any suggestion is active selects the penultimate result. This makes reverse keyboard navigation skip the last suggestion on the first key press.

Steps to reproduce
  1. Open the directory picker in the web or desktop app.
  2. Type a path or search term that produces at least three autocomplete suggestions.
  3. Leave the suggestions unselected.
  4. Press Up once.
Observed behavior

The penultimate suggestion becomes active.

Expected behavior

The last suggestion should become active so reverse navigation wraps from the unselected state to the end of the list.

Additional context

Down correctly starts at the first suggestion. Up should mirror that behavior from the opposite end. The issue is independent of the operating system and terminal because it occurs in the picker index calculation.

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.