docs(scope): update SCOPE_CONTROL for v0.303

This commit is contained in:
senke 2026-02-22 03:38:49 +01:00
parent 4c81233983
commit ea730665bb
4 changed files with 128 additions and 26 deletions

View file

@ -92,13 +92,13 @@ Voir [V0_301_RELEASE_SCOPE.md](V0_301_RELEASE_SCOPE.md) pour le détail.
| N1 | Notifications push : Web Push subscription, envoi sur follow/like/comment/message, préférences, badge titre |
| P2 | Présence enrichie : rich presence (track en cours), mode invisible, PUT /users/me/presence |
## Reporté en v0.303
## À livrer en v0.303
| Lot | Feature |
|-----|---------|
| C2 | Chat appels : WebRTC audio/vidéo 1-to-1, signalisation via WebSocket |
| C2 | Chat appels : WebRTC audio/vidéo 1-to-1, signalisation via WebSocket (CallOffer, CallAnswer, ICECandidate, CallHangup, CallReject) |
Voir [V0_302_RELEASE_SCOPE.md](V0_302_RELEASE_SCOPE.md) pour le détail.
Voir [V0_303_RELEASE_SCOPE.md](V0_303_RELEASE_SCOPE.md) pour le détail.
---

View file

@ -0,0 +1,99 @@
# Plan d'implémentation v0.303 — Lot C2 Chat appels WebRTC
**Version cible** : v0.303
**Objectif** : Appels audio 1-to-1 fonctionnels via WebRTC
**Référence** : [V0_303_RELEASE_SCOPE.md](V0_303_RELEASE_SCOPE.md)
**Dernière mise à jour** : février 2026
---
## Diagramme de dépendances C2
```mermaid
flowchart TD
subgraph ChatServer [Chat Server Rust]
C2_1a[IncomingMessage CallOffer/Answer/ICE/Hangup/Reject]
C2_1b[OutgoingMessage CallOffer/Answer/ICE/Hangup/Rejected]
C2_1c[send_to_user WebSocketManager]
C2_1d[Handler match arms]
end
subgraph Frontend [Frontend React]
C2_2[useWebRTC hook]
C2_3[CallButton IncomingCallModal ActiveCallBar]
end
C2_1a --> C2_1d
C2_1b --> C2_1d
C2_1c --> C2_1d
C2_1d --> C2_2
C2_2 --> C2_3
```
---
## Phase 0 — Vérification préalable
| # | Tâche | Fichiers | Commit suggéré |
|---|-------|----------|----------------|
| 0.1 | Vérifier que veza-chat-server compile | `veza-chat-server/` | — |
| 0.2 | Vérifier que apps/web build OK | `apps/web/` | — |
| 0.3 | Lire structure IncomingMessage/OutgoingMessage | `veza-chat-server/src/websocket/mod.rs` | — |
---
## Phase 1 — C2.1 Signalisation (Chat Server)
| # | Tâche | Fichiers | Commit suggéré |
|---|-------|----------|----------------|
| 1.1 | Ajouter variants IncomingMessage (CallOffer, CallAnswer, ICECandidate, CallHangup, CallReject) | `veza-chat-server/src/websocket/mod.rs` | `feat(chat-server): add call signaling IncomingMessage variants` |
| 1.2 | Ajouter variants OutgoingMessage (CallOffer, CallAnswer, ICECandidate, CallHangup, CallRejected) | `veza-chat-server/src/websocket/mod.rs` | `feat(chat-server): add call signaling OutgoingMessage variants` |
| 1.3 | Implémenter send_to_user dans WebSocketManager | `veza-chat-server/src/websocket/` (broadcast ou manager) | `feat(chat-server): add send_to_user for 1-to-1 delivery` |
| 1.4 | Ajouter RateLimitAction::CallSignaling | `veza-chat-server/src/security/rate_limiter.rs` | `feat(chat-server): add CallSignaling rate limit` |
| 1.5 | Handler match arms pour CallOffer, CallAnswer, ICECandidate, CallHangup, CallReject | `veza-chat-server/src/websocket/handler.rs` | `feat(chat-server): handle call signaling messages` |
| 1.6 | Vérifier conversation DM (2 participants) avant relayer | `handler.rs` | (inclus dans 1.5) |
**Validation** : `cargo build --release` dans veza-chat-server.
---
## Phase 2 — C2.2-C2.4 UI et WebRTC (Frontend)
| # | Tâche | Fichiers | Commit suggéré |
|---|-------|----------|----------------|
| 2.1 | Créer useWebRTC hook (RTCPeerConnection, SDP/ICE exchange via WS) | `apps/web/src/features/chat/hooks/useWebRTC.ts` | `feat(chat): add useWebRTC hook` |
| 2.2 | Créer CallButton (DM uniquement) | `apps/web/src/features/chat/components/CallButton.tsx` | `feat(chat): add CallButton component` |
| 2.3 | Créer IncomingCallModal (Accepter/Refuser) | `apps/web/src/features/chat/components/IncomingCallModal.tsx` | `feat(chat): add IncomingCallModal` |
| 2.4 | Créer ActiveCallBar (mute, hangup) | `apps/web/src/features/chat/components/ActiveCallBar.tsx` | `feat(chat): add ActiveCallBar` |
| 2.5 | Intégrer états call dans chatStore (Zustand) | Store chat existant | `feat(chat): add call state to chat store` |
| 2.6 | Connecter CallButton, IncomingCallModal, ActiveCallBar à ConversationView | `ConversationView.tsx` ou équivalent | `feat(chat): wire call UI to conversation` |
| 2.7 | getUserMedia audio + RTCPeerConnection (C2.3 MVP) | `useWebRTC.ts` | (inclus dans 2.1) |
| 2.8 | getUserMedia video (C2.4 optionnel) | `useWebRTC.ts` | `feat(chat): add video support to WebRTC` |
**Validation** : `npm run build`, Storybook stories pour CallButton, IncomingCallModal, ActiveCallBar.
---
## Phase 3 — Finalisation
| # | Tâche | Fichiers | Commit suggéré |
|---|-------|----------|----------------|
| 3.1 | MSW handlers pour messages call (si tests) | `apps/web/src/mocks/handlers.ts` | `test(chat): add MSW handlers for call signaling` |
| 3.2 | Stories Storybook (Loading, Error, Empty) | `CallButton.stories.tsx`, etc. | `feat(chat): add call component stories` |
| 3.3 | Mise à jour CHANGELOG v0.303 | `CHANGELOG.md` | `docs: update CHANGELOG for v0.303` |
| 3.4 | Vérification SCOPE_CONTROL, FEATURE_STATUS | — | — |
---
## Ordre d'exécution recommandé
1. **Phase 0** — Vérification (15 min)
2. **Phase 1** — Signalisation Chat Server (1-2 j)
3. **Phase 2** — Frontend (2-3 j)
4. **Phase 3** — Finalisation (0.5 j)
---
## Références
- [V0_303_RELEASE_SCOPE.md](V0_303_RELEASE_SCOPE.md) — Scope détaillé
- [veza-chat-server/src/websocket/mod.rs](../veza-chat-server/src/websocket/mod.rs) — Types existants
- [STORYBOOK_CONTRACT.md](../apps/web/docs/STORYBOOK_CONTRACT.md) — Contrat Storybook

View file

@ -57,11 +57,11 @@
### Immédiat (post v0.302)
1. Tag : v0.302
2. Merge dans main
3. Créer V0_303_RELEASE_SCOPE.md (placeholder)
3. V0_303_RELEASE_SCOPE.md créé (scope complet Lot C2)
### Prochaine version (v0.303)
- **Lot C2** : Chat appels WebRTC (signalisation, CallButton, IncomingCallModal, ActiveCallBar)
- Autres lots à définir
- **Lot C2** : Chat appels WebRTC 1-to-1 (signalisation CallOffer/Answer/ICE, CallButton, IncomingCallModal, ActiveCallBar)
- Voir [V0_303_RELEASE_SCOPE.md](V0_303_RELEASE_SCOPE.md) et [PLAN_V0_303_IMPLEMENTATION.md](PLAN_V0_303_IMPLEMENTATION.md)
---
@ -70,7 +70,9 @@
| Document | Usage |
|----------|-------|
| [PLAN_V0_301_FINALISATION.md](PLAN_V0_301_FINALISATION.md) | Plan de finalisation v0.301 |
| [V0_302_RELEASE_SCOPE.md](V0_302_RELEASE_SCOPE.md) | Scope v0.302 (groupes avancés, push, appels, présence) |
| [V0_303_RELEASE_SCOPE.md](V0_303_RELEASE_SCOPE.md) | Scope v0.303 (Chat appels WebRTC 1-to-1) |
| [V0_302_RELEASE_SCOPE.md](V0_302_RELEASE_SCOPE.md) | Scope v0.302 (groupes avancés, push, présence) |
| [PLAN_V0_303_IMPLEMENTATION.md](PLAN_V0_303_IMPLEMENTATION.md) | Plan d'implémentation v0.303 |
| [V0_301_RELEASE_SCOPE.md](V0_301_RELEASE_SCOPE.md) | Scope détaillé v0.301 (Phase 3 Social) |
| [V0_203_RELEASE_SCOPE.md](V0_203_RELEASE_SCOPE.md) | Scope v0.203 (archivé) |
| [SCOPE_CONTROL.md](SCOPE_CONTROL.md) | Anti-scope-creep, workflow |

View file

@ -1,19 +1,19 @@
# Contrôle du scope — Anti-scope-creep
**Objectif** : Éviter toute dérive de scope. Chaque modification doit être intentionnelle et traçable.
**Référence active** : [V0_302_RELEASE_SCOPE.md](V0_302_RELEASE_SCOPE.md)
**Version précédente** : [V0_301_RELEASE_SCOPE.md](V0_301_RELEASE_SCOPE.md)
**Référence active** : [V0_303_RELEASE_SCOPE.md](V0_303_RELEASE_SCOPE.md)
**Version précédente** : [V0_302_RELEASE_SCOPE.md](V0_302_RELEASE_SCOPE.md)
---
## 1. Règle d'or
> **Avant d'ajouter quoi que ce soit : vérifier si c'est dans le scope v0.302.**
> **Avant d'ajouter quoi que ce soit : vérifier si c'est dans le scope v0.303.**
> Si non → ne pas ajouter. Créer un ticket pour une version ultérieure.
---
## 2. Pendant la phase v0.302 (jusqu'au tag)
## 2. Pendant la phase v0.303 (jusqu'au tag)
### 2.1 Autorisé
@ -26,17 +26,17 @@
### 2.2 Interdit
- **Nouvelles features** hors scope v0.302
- **Nouvelles features** hors scope v0.303
- **Nouvelles routes** ou pages hors scope
- **Nouvelles dépendances** (sauf correctif sécurité)
- **Changements de comportement** sur les features HORS SCOPE
- **"Améliorations"** non liées à un bug identifié ou une feature IN SCOPE v0.302
- **"Améliorations"** non liées à un bug identifié ou une feature IN SCOPE v0.303
### 2.3 Cas limite
| Situation | Action |
|-----------|--------|
| Bug dans une feature HORS SCOPE | Corriger si blocant pour une feature IN SCOPE v0.302. Sinon : ticket pour plus tard. |
| Bug dans une feature HORS SCOPE | Corriger si blocant pour une feature IN SCOPE v0.303. Sinon : ticket pour plus tard. |
| Dépendance obsolète/vulnérable | Mettre à jour. Documenter dans la PR. |
| Refactoring qui change une API interne | Autorisé si 0 impact sur le contrat public et tests passent. |
| "Petite amélioration UX" | **Non.** Créer un ticket pour v0.102+. |
@ -47,12 +47,12 @@
### 3.1 Checklist pré-commit (dans la tête)
1. **Mon changement modifie-t-il une feature IN SCOPE v0.302 ?**
1. **Mon changement modifie-t-il une feature IN SCOPE v0.303 ?**
- Oui → Continuer. S'assurer qu'il n'y a pas de régression.
- Non → **STOP.** Est-ce une correction de bug ? Si oui, la feature est-elle IN SCOPE ?
2. **Mon changement ajoute-t-il du code ?**
- Nouvelle route, nouveau composant, nouveau service → **STOP.** Hors scope v0.302.
- Nouvelle route, nouveau composant, nouveau service → **STOP.** Hors scope v0.303.
- Correction, refactoring, test → OK si lié à une feature IN SCOPE.
3. **Mes tests passent-ils ?**
@ -81,7 +81,7 @@ Format : `type(scope): description`
Dans chaque PR, le relecteur doit valider :
- [ ] Le changement est dans le scope v0.302 (voir [V0_302_RELEASE_SCOPE.md](V0_302_RELEASE_SCOPE.md))
- [ ] Le changement est dans le scope v0.303 (voir [V0_303_RELEASE_SCOPE.md](V0_303_RELEASE_SCOPE.md))
- [ ] Aucune nouvelle feature ajoutée
- [ ] Aucune régression sur les flows critiques
- [ ] Les tests passent
@ -98,22 +98,22 @@ Une PR sera rejetée si :
---
## 5. Proposer une feature pour APRÈS v0.203
## 5. Proposer une feature pour APRÈS v0.303
### 5.1 Template
Utiliser le template [Feature request](.github/ISSUE_TEMPLATE/feature_request.md) avec :
- **Alignement scope** : cocher "Hors scope v0.302 — pour v0.303+"
- **Alignement scope** : cocher "Hors scope v0.303 — pour v0.304+"
- **Justification** : pourquoi cette feature est nécessaire
- **Effort estimé** : S / M / L / XL
- **Dépendances** : quelles features v0.302 doivent être stables avant
- **Dépendances** : quelles features v0.303 doivent être stables avant
### 5.2 Workflow
1. Créer une issue avec le template
2. **Ne pas implémenter** tant que v0.302 n'est pas taguée
3. Une fois v0.302 stable, prioriser les issues "v0.303" dans V0_303_RELEASE_SCOPE.md
2. **Ne pas implémenter** tant que v0.303 n'est pas taguée
3. Une fois v0.303 stable, prioriser les issues "v0.304" dans V0_304_RELEASE_SCOPE.md
---
@ -125,7 +125,7 @@ Si une vulnérabilité critique est identifiée :
- Correctif autorisé **immédiatement**
- Documenter dans la PR
- Pas besoin d'être dans le scope v0.202
- Pas besoin d'être dans le scope v0.303
### 6.2 Blocage production
@ -140,7 +140,7 @@ Pour tout cas ambigu :
- Ouvrir une issue "Scope clarification"
- Décision documentée dans l'issue
- Mise à jour de V0_302_RELEASE_SCOPE.md si le scope est étendu (exception rare)
- Mise à jour de V0_303_RELEASE_SCOPE.md si le scope est étendu (exception rare)
---
@ -160,12 +160,13 @@ Pour tout cas ambigu :
- v0.202 : Phase 2 Contenu — Lots G, H, F, C, D — taguée
- v0.203 : Phase 2 Contenu — D1, K, L (queue collaborative, recherche enrichie, Social Trending) — taguée
- v0.301 : Phase 3 Social — P0, C1, P1, S1 (Chat Server fix, typing, read receipts, présence, social enrichi) — taguée
- v0.302 : Phase 3 Social — S2, N1, C2, P2 (groupes avancés, push, appels, rich presence) — taguée
- v0.302 : Phase 3 Social — S2, N1, P2 (groupes avancés, push, rich presence) — taguée
- v0.303 : Phase 3 Social — C2 (Chat appels WebRTC 1-to-1) — en préparation
---
## 8. Rappel pour les contributeurs
- **Cursor / IA** : Les règles dans `.cursorrules` rappellent de vérifier le scope avant toute modification.
- **Humains** : Lire [V0_302_RELEASE_SCOPE.md](V0_302_RELEASE_SCOPE.md) avant de coder.
- **Humains** : Lire [V0_303_RELEASE_SCOPE.md](V0_303_RELEASE_SCOPE.md) avant de coder.
- **En doute ?** Ouvrir une issue "Scope clarification" plutôt que de coder.