063a839790
- Add clone_mode and branch fields to tool_instances - Add ssh_key_id to git_repositories for per-repo SSH key assignment - Implement host-side git cloning with branch selection (default: main) - Mount SSH keys into containers for git operations in clone mode - Add dirty state check on clone-mode instance deletion with confirmation - Update SessionsPage with mount/clone selector, branch input, SSH key display - Add SSH key selector to repository creation form - Add dirty delete confirmation modal with changed files list - Update API schemas and endpoints for new fields - Sync delta specs to main specs (git-repo, tool-instances, repo-clone-mode) - Archive completed OpenSpec change: repo-clone-mode-with-ssh - Document git requirement for custom tool types Quality gates: Frontend typecheck and build passed OpenSpec: repo-clone-mode-with-ssh archived with all tasks complete
18 lines
923 B
Markdown
18 lines
923 B
Markdown
## Why
|
|
|
|
The current repository creation flow creates mirrored bare repositories for clone-based repos. That breaks the workspace model because the UI and file editing features expect a normal working clone with an initial branch, remote tracking, and pull/fetch behavior that works from a checked-out branch.
|
|
|
|
## What Changes
|
|
|
|
- Create clone-based repositories as normal working clones instead of mirrors
|
|
- Initialize blank repositories as working clones with an initial branch when needed
|
|
- Ensure newly created repos have a usable current branch for workspace browsing and commits
|
|
- Update pull semantics to use the current tracked branch when available
|
|
- Keep fetch behavior available for remote-synced repositories
|
|
|
|
## Impact
|
|
|
|
- Backend: repository creation and git control helpers
|
|
- Backend tests: clone, pull, and empty-repo branch behavior
|
|
- Frontend: no intentional UX change beyond sync behavior becoming reliable
|