Skip to content

Conversation

built-by-as
Copy link
Owner

Summary

  • Modified the get-branches handler to sort the returned branch list
  • main and master branches now appear first in the list
  • Makes it easier to select the primary branch when creating new sessions

Test plan

  • Test that main/master branches appear first when fetching branches
  • Verify other branches maintain their order
  • Confirm session creation works with sorted branch list

🤖 Generated with Claude Code

built-by-as and others added 4 commits October 19, 2025 21:35
Modified the get-branches handler to sort the returned branch list so that
'main' and 'master' branches appear first, making them easier to select
when creating new sessions.

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

Co-Authored-By: Claude <[email protected]>
- Extracted branch fetching and sorting logic into branch-utils.ts
- Set up Jest testing framework with TypeScript support
- Added 13 comprehensive unit tests with mocked simple-git
- Simplified IPC handler to use extracted getBranches function
- Sorting ensures main/master appear first without enforcing order between them

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

Co-Authored-By: Claude <[email protected]>
- Created test.yml workflow that runs on PRs and pushes to main
- Runs npm test and npm run build to verify changes
- Set up branch protection to require test job to pass before merging

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

Co-Authored-By: Claude <[email protected]>
- Renamed branch-utils.ts to git-utils.ts
- Renamed branch-utils.test.ts to git-utils.test.ts
- Updated imports in main.ts
- Allows for adding other git-related functionality in the future

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

Co-Authored-By: Claude <[email protected]>
@built-by-as built-by-as merged commit 7998e03 into main Oct 20, 2025
1 check passed
@built-by-as built-by-as deleted the branch-list-master branch October 20, 2025 01:49
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