Skip to content

Conversation

@R44VC0RP
Copy link
Contributor

Summary

  • Add recent git branches to the "New session" dropdown for quick branch switching
  • Users can now see and checkout recent branches without leaving the web UI

Changes

  • Backend: Added GET /vcs/branches endpoint to list recent branches sorted by commit date
  • Backend: Added POST /vcs/checkout endpoint to switch branches
  • Frontend: Updated session-new-view dropdown to show up to 6 recent branches
  • Frontend: Handle branch selection with checkout API and toast notifications
  • SDK: Regenerated with new types (BranchInfo, CheckoutInput, CheckoutResult)

Testing

  1. Start API server: cd packages/opencode && bun dev -- serve --port 5556
  2. Start Vite: cd packages/app && VITE_API_URL=http://127.0.0.1:5556 bun dev
  3. Open http://localhost:3001, click "New session"
  4. Click branch dropdown - should show recent branches
  5. Select a different branch - should checkout and show toast

Notes

  • The pre-existing TypeScript "type instantiation excessively deep" error in server.ts was triggered by adding more routes. This is a known issue (see TODO at line 77) and exists independently of these changes.

Add ability to see and switch to recent git branches from the new session view:

- Add GET /vcs/branches endpoint to list recent branches sorted by commit date
- Add POST /vcs/checkout endpoint to switch branches
- Update session-new-view dropdown to show recent branches (up to 6)
- Handle branch selection with checkout and toast notifications
- Regenerate SDK with new types and methods
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@R44VC0RP R44VC0RP marked this pull request as draft January 11, 2026 20:47
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.

1 participant