mirror of
https://github.com/siop-spelev/siop2.git
synced 2026-08-08 12:41:54 +00:00
feat(r4.3): file d'écriture, verrou optimiste D2, Synchro & conflits
Serveur : updatedAt exposé au détail OT ; baseUpdatedAt optionnel sur transition/coche/bilan → 409 « Conflit de version » contextualisé (qui, quand) ; toute écriture secondaire (coche, bilan, commentaire, conso, MO) fait avancer la version — sans version fournie, le web est inchangé. ADR-003 : sécurité & protocole de routage mobile (qui vit où sur l'appareil, purge complète à la déconnexion — correctif réel : la file et le cache persisté survivaient au logout). Mobile : file persistée AsyncStorage rejouée dans l'ordre — succès → propagation de la version fraîche aux saisies restantes du même OT (nos écritures ne se conflictent pas entre elles, un écart étranger reste détecté) ; coupure → tout attend ; refus → CONFLIT, la file s'arrête, l'humain tranche (voir l'OT / rejouer sur version à jour / abandonner). Transitions, coches, bilan et photos (D5, compressées ~1600 px) passent par la file avec patch optimiste du cache ; écran Synchro (badge tabbar ambre/rouge) ; préchargement parc + référentiels (le bilan hors-ligne a ses vocabulaires). Recette « mode avion » 13/13 en Expo web piloté : gestes hors-ligne → 3 en file → modification concurrente de Salma → conflit tranché → serveur Terminé avec bilan. 17 tests jest-expo, 74 tests API. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
8
apps/mobile/src/api/schema.d.ts
vendored
8
apps/mobile/src/api/schema.d.ts
vendored
@@ -1776,6 +1776,8 @@ export interface components {
|
||||
};
|
||||
allowedTransitions: ("OPEN" | "IN_PROGRESS" | "ON_HOLD" | "DONE" | "CANCELLED")[];
|
||||
closureBlockers: string[];
|
||||
/** Format: date-time */
|
||||
updatedAt: string;
|
||||
};
|
||||
ConsumePart: {
|
||||
/** Format: uuid */
|
||||
@@ -1945,6 +1947,8 @@ export interface components {
|
||||
/** @enum {string} */
|
||||
to: "OPEN" | "IN_PROGRESS" | "ON_HOLD" | "DONE" | "CANCELLED";
|
||||
comment?: string;
|
||||
/** Format: date-time */
|
||||
baseUpdatedAt?: string;
|
||||
};
|
||||
CommentCreate: {
|
||||
message: string;
|
||||
@@ -1960,6 +1964,8 @@ export interface components {
|
||||
externalCauseId?: string | null;
|
||||
actionTakenId?: string | null;
|
||||
componentConcernedId?: string | null;
|
||||
/** Format: date-time */
|
||||
baseUpdatedAt?: string;
|
||||
};
|
||||
ChecklistItem: {
|
||||
/** Format: uuid */
|
||||
@@ -1978,6 +1984,8 @@ export interface components {
|
||||
ChecklistPatch: {
|
||||
/** @enum {string} */
|
||||
state: "PENDING" | "DONE" | "NA";
|
||||
/** Format: date-time */
|
||||
baseUpdatedAt?: string;
|
||||
};
|
||||
RequestsResponse: {
|
||||
requests: {
|
||||
|
||||
Reference in New Issue
Block a user