Skip to content

fix(app): wrap initial picker navigation - #44998

Closed
sdivyanshu90 wants to merge 1 commit into
anomalyco:devfrom
sdivyanshu90:picker-up-navigation
Closed

sdivyanshu90 wants to merge 1 commit into
anomalyco:devfrom
sdivyanshu90:picker-up-navigation

Conversation

@sdivyanshu90

@sdivyanshu90 sdivyanshu90 commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #44960

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The directory picker uses -1 when no autocomplete suggestion is active. Applying the normal wraparound calculation to that sentinel made the first Up press select the penultimate result. This change handles the unselected state explicitly, so Down starts at the first suggestion and Up starts at the last, and adds a regression assertion for reverse navigation.

How did you verify your code works?

From packages/app:

  • bun test src/components/directory-picker-domain.test.ts — 23 tests passed
  • bun typecheck — passed

Screenshots / recordings

Not applicable. This changes keyboard navigation logic without changing the rendered UI.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Aug 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@sdivyanshu90

Copy link
Copy Markdown
Contributor Author

Hi @Brendonovich, @Hona, could you please review this PR when you have a chance?

1 similar comment
@sdivyanshu90

Copy link
Copy Markdown
Contributor Author

Hi @Brendonovich, @Hona, could you please review this PR when you have a chance?

@sdivyanshu90

Copy link
Copy Markdown
Contributor Author

Hi @Hona @Brendonovich, could you please review this PR whenever you have some time. Thanks!

@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

@sdivyanshu90

sdivyanshu90 commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @Hona, this fix remains relevant and the linked issue is still open. Could you please reopen and review this PR when you have time? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Directory picker skips the last suggestion when Up is pressed initially

1 participant