feat: Git collaboration tools with branch management (#2139)
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Add Git collaboration with branch management and collaborator controls.
Improves GitHub sync with conflict handling, fetch/pull/rebase/merge
support, and safer push options.
- **New Features**
- Branch management: create, switch, rename, delete, and merge branches;
list local/remote; detect conflicts; rebase continue/abort and merge
abort.
- Collaborators: list, invite, and remove collaborators in Publish and
App Details when connected.
- Sync improvements: fetch/pull (with optional rebase), merge, conflict
inspection, branch rename, and reset; push supports force and
force-with-lease.
- UI updates: branch combobox with refresh/create actions; integrated
Branch and Collaborator managers; clearer push success feedback.
- **Tests**
- New e2e: covers creating, switching, renaming, merging, and deleting
branches.
- Updated GitHub e2e and snapshots for branch UI and push success
message.
- Test helper adds “publish” mode; fake GitHub server adds collaborator
endpoints and seed data.
<sup>Written for commit a9a3166d3742b0fe3e672d69a12531b443b653f9.
Summary will update on new commits.</sup>
<!-- End of auto-generated description by cubic. -->
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Introduces comprehensive Git collaboration features with UI, IPC, and
test coverage.
>
> - **Branch management UI**: `GithubBranchManager` for
create/switch/rename/delete/merge, refresh, source branch selection,
conflict banners; integrated into `GitHubConnector` and Publish/App
Details panels
> - **Collaborator management UI**: `GithubCollaboratorManager` to
list/invite/remove collaborators when connected
> - **Enhanced sync flow**: `GitHubConnector` supports rebase status,
abort/continue, “Rebase and Sync”, safe force push (`force-with-lease`),
structured errors, auto-sync deduping
> - **New IPC/git ops**: handlers and client methods for `fetch`,
`pull`, `rebase` (abort/continue), `merge` (abort), `branch` CRUD, list
local/remote branches, conflict listing, git state checks; `git_utils`
adds native/isomorphic implementations and conflict/state detection
> - **Testing & mocks**: New e2e `git_collaboration.spec.ts` (branch
lifecycle, collaborators), updated GitHub specs/snapshots; fake GitHub
server adds collaborator endpoints and push event tweaks
> - **Plumbing**: Preload exposes new GitHub IPC channels; types
extended (`GithubSyncOptions`, git param types)
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
210af660701490139d75b1be86c55e9782056ade. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
正在显示
差异被折叠。
请
注册
或者
登录
后发表评论