Agents for developpement added + frontend add + backend added. Git viewer created + agent and template creator + layout and project creator
3.1 KiB
3.1 KiB
L8 — Git
Binôme : dev-git / test-git
Zones : infrastructure/git, application/git, frontend/features/git
Dépendances amont : L0, L1, L2.
Objectif
Support Git intégré (local) via libgit2.
Périmètre (DEV)
- Adapter
Git2Repository(git2) :status,stage/unstage,commit,branches,checkout,current_branch,diff,log,pull,push,clone,init. - Use cases Git (
GitStatus,GitCommit,GitCheckout,GitPush, …). - Front : panneau Git (changements, staging, commit, branches).
Périmètre (TEST)
- Use cases avec
GitRepositorymocké. - Intégration :
Git2Repositorysur repo temporaire (init → commit → branch → status). - Front : feature git avec gateway mock.
Definition of Done
cargo test(git) +vitestverts ; opérations git de base utilisables (dev manuel).
Spike
- Vendoring statique git2/openssl pour l'AppImage (coordonné avec L11).
Avancement
✅ Backend (vert)
- Dépendance :
git20.20 (default-features = false, pas d'openssl) liée à la libgit2 système via.cargo/config.toml(LIBGIT2_SYS_USE_PKG_CONFIG=1) — évite cmake/vendoring ; le vendoring statique AppImage reste pour L11. - Infra :
Git2Repository(infrastructure/git/mod.rs) implémenteGitPort—init,status,stage,unstage,commit(signature de repliIdeA <idea@localhost>si pas de config user),branches,current_branch,checkout,log.pull/pushrenvoient une erreur explicite (réseau/credentials → L9). Appels libgit2 synchrones sansawait⇒ futuresSend. 3 tests d'intégration (vrai repo temporaire). - Application (
application/git/) :GitStatus,GitStage,GitUnstage,GitCommit(valide message non vide + eventGitStateChanged),GitBranches(liste + courante),GitCheckout(+ event),GitLog,GitInit(+ event). 7 tests use cases (mockGitPort). cargo test --workspace: 298 verts, 0 régression ; clippy clean.
✅ IPC app-tauri (vert)
- Composition root :
Git2Repositoryconstruit, 8 use cases injectés. 8 commands (git_status,git_stage,git_unstage,git_commit,git_branches,git_checkout,git_log,git_init), résolutionprojectId → rootviaresolve_project. DTOsGitFileStatusDto/GitCommitDto/GitBranchesDto+ request DTOs camelCase. Teststests/dto_git.rs(12).cargo test -p app-tauri74 verts ; workspace 310 verts, 0 régression ; clippy clean.
✅ Front (vert)
- Port
GitGatewaycomplet (8 méthodes) + typesGitFileStatus/GitCommit/GitBranches; adapterTauriGitGateway;MockGitGatewaystateful (état par projet, seedé) pour le mode offline. - Feature
features/git:useGit(projectId)+GitPanel(sections Staged/Unstaged + stage/unstage, message + commit, branches + checkout, log récent), monté dans l'onglet projet. 17 tests ; suite front 157 verts ;tscclean ; garde-fou « no invoke » OK.
⏳ Hors périmètre L8
pull/push/clone(réseau + credentials) → L9 (RemoteGitRepository+ callbacks) ; vendoring statique git2 pour l'AppImage → L11.