Skip to content

feat(router-app): add autocomplete for repo and branch selection - #34

Merged
mrsimpson merged 2 commits into
mainfrom
petite-snakes-itch
Apr 27, 2026
Merged

feat(router-app): add autocomplete for repo and branch selection#34
mrsimpson merged 2 commits into
mainfrom
petite-snakes-itch

Conversation

@mrsimpson

Copy link
Copy Markdown
Owner

Summary

  • Add autocomplete dropdown for repository and source branch fields in the new session form
  • User repos and branches are fetched from GitHub API via new backend endpoints
  • Build a reusable Autocomplete component with keyboard navigation (arrow keys, Enter, Escape)
  • Repos load lazily on mount; branches load when a repo is selected
  • All new API endpoints have comprehensive test coverage

Changes

  • opencode-router: Add GET /api/user/repos and GET /api/user/urls/repos/branch endpoints
  • opencode-router-app: New Autocomplete component, updated SessionInputBar
  • Fix defensive query param parsing (remove localhost fallback)

- Add custom Autocomplete component with keyboard navigation
- Add API endpoints for listing user's GitHub repos and branches
- Integrate autocomplete into SessionInputBar for better UX

The autocomplete shows user's repos when they focus the repo field and
loads branches when a repo is selected.
- Replace new URL(url, 'http://localhost') with URLSearchParams for
  suggest-branch and branches endpoints
- Add 17 new tests for GET /api/user/repos and branches endpoints
- Add tests verifying query param validation with early returns
@mrsimpson
mrsimpson merged commit 3274faa into main Apr 27, 2026
3 of 4 checks passed
@mrsimpson
mrsimpson deleted the petite-snakes-itch branch April 27, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant