Skip to content

Conversation

@sei40kr
Copy link
Contributor

@sei40kr sei40kr commented Dec 11, 2025

Summary

Converts branch checkout and delete operations to use the new interactive picker, providing a better user experience for branch selection.

Changes

  • Branch checkout now uses interactive picker instead of text input
  • Branch delete now uses interactive picker for selecting branches to delete
  • Both operations support filtering, navigation, and custom input fallback

Test Plan

  • Updated branch operation snapshot tests to work with picker interface
  • Tests cover picker usage, filtering, navigation, and cancellation scenarios

Dependencies

Note: This PR depends on #468 being merged first.

🤖 Generated with Claude Code

@sei40kr sei40kr changed the title feat: Convert branch operations to interactive picker feat: convert branch operations to interactive picker Dec 11, 2025
@sei40kr sei40kr mentioned this pull request Dec 11, 2025
1 task
@sei40kr sei40kr force-pushed the feat/branch-interactive-picker branch from 9151434 to 3311023 Compare December 12, 2025 03:08
@sei40kr sei40kr marked this pull request as draft December 25, 2025 19:22
@altsem
Copy link
Owner

altsem commented Dec 28, 2025

I noted that cancelling the picker takes me back to the submenu, while as before it would close the submenu completely. I'd vote cancelling should just close everything.

sei40kr and others added 5 commits January 19, 2026 01:04
- Convert Checkout to use interactive picker with fuzzy search
- Convert Delete to use interactive picker
- Exclude current branch from picker lists
- Add comprehensive test coverage for all picker interactions
- CheckoutNewBranch and Spinoff remain as text prompts (branch names, not git revs)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove 6 tests that duplicate functionality already covered by unit tests
in src/picker.rs and src/ui/picker.rs:

- checkout_picker_filter
- checkout_picker_navigate
- checkout_picker_scroll
- delete_picker_filter
- delete_picker_navigate
- delete_picker_scroll

These tests verify basic picker functionality (filtering, navigation,
scrolling) which is comprehensively tested at the unit level. The branch
integration tests now focus on branch-specific operations: candidate
retrieval, cancellation, and actual git command execution.

Remove setup_many_branches helper function that was only used by the
deleted scroll tests.
Close the submenu when opening the branch picker (checkout/delete) so
that cancelling the picker returns to the main view instead of the
submenu. This provides a better UX where ESC consistently closes
everything rather than requiring multiple ESC presses.

Before: Picker -> ESC -> Submenu -> ESC -> Main view
After:  Picker -> ESC -> Main view
Update editor test names to reflect that branch operations now use
the picker instead of prompts:
- exit_from_prompt_exits_menu -> exit_from_picker_exits_menu
- re_enter_prompt_from_menu -> re_enter_picker_from_menu
Remove snapshot files that are no longer referenced by any tests.
@sei40kr sei40kr force-pushed the feat/branch-interactive-picker branch from 3311023 to 5be4fe8 Compare January 18, 2026 16:30
@sei40kr
Copy link
Contributor Author

sei40kr commented Jan 18, 2026

@altsem

  1. Resolved the conflict
  2. Modified the behavior to close the menu when the picker is opened: e3f3e06
  3. Removed picker UI tests from the branch that had overlapping test perspectives: f10991d
  4. Deleted unreferenced snapshots: 5be4fe8

@sei40kr sei40kr marked this pull request as ready for review January 18, 2026 16:32
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.

2 participants