feat: Add remote sync for project clones

Fetch remote changes before agents start working so they build on
up-to-date code. Adds ProjectSyncManager with git fetch + ff-only
merge of defaultBranch, integrated into phase dispatch to sync
before branch creation.

- Schema: lastFetchedAt column on projects table (migration 0029)
- Events: project:synced, project:sync_failed
- Phase dispatch: sync all linked projects before creating branches
- tRPC: syncProject, syncAllProjects, getProjectSyncStatus
- CLI: cw project sync [name] --all, cw project status [name]
- Frontend: sync button + ahead/behind badge on projects settings
This commit is contained in:
Lukas May
2026-03-05 11:45:09 +01:00
parent 79966cdf20
commit 5e77bf104c
20 changed files with 496 additions and 6 deletions

View File

@@ -197,6 +197,20 @@
"when": 1771891200000,
"tag": "0027_add_chat_sessions",
"breakpoints": true
},
{
"idx": 28,
"version": "6",
"when": 1771977600000,
"tag": "0028_add_review_comments",
"breakpoints": true
},
{
"idx": 29,
"version": "6",
"when": 1772064000000,
"tag": "0029_add_project_last_fetched_at",
"breakpoints": true
}
]
}