Sprint 6c — Frontend T2 Live UI + state machine + integration
feat(t2-live): state machine pure 9 states x 8 events (resolves FTD-09) feat(t2-live): useT2LiveSession WS orchestrator + audio hooks + close codes feat(t2-live): T2SujetsPage, T2PreparationPage (2min timer + notes + ideas), T2DialoguePage (3:30 dialogue + terminal screen with WAV download) feat(t2-live): T2LiveContext provider for sujet sharing between pages fix(TaskSelector): unlock EO_T2_LIVE card via hasAccess (resolves FTD-33) chore: Tache type + labels + config extended with EO_T2_LIVE test: 21 t2-machine tests — 259/259 green (+21)
This commit is contained in:
parent
7862f7c9f3
commit
1d95166611
17 changed files with 1229 additions and 33 deletions
|
|
@ -78,7 +78,10 @@ export async function updateSujet(id: string, sujetId: string): Promise<void> {
|
|||
/**
|
||||
* Mappe une Tache vers les paramètres de la route `GET /sujets`.
|
||||
* Retourne `null` pour les tâches sans catalogue de sujets côté base
|
||||
* (EO_T1 : sujet fixe connu, EO_T2_LIVE : interaction sans sujet).
|
||||
* (EO_T1 : sujet fixe connu).
|
||||
*
|
||||
* Sprint 6c : `EO_T2_LIVE` mappe vers (mode='EO', tache=2) pour récupérer
|
||||
* la grille de sujets T2 (rôle + contexte alimentés en BDD).
|
||||
*/
|
||||
function mapTacheToSujetParams(tache: Tache): { mode: 'EE' | 'EO'; tacheNumber: 1 | 2 | 3 } | null {
|
||||
switch (tache) {
|
||||
|
|
@ -88,6 +91,8 @@ function mapTacheToSujetParams(tache: Tache): { mode: 'EE' | 'EO'; tacheNumber:
|
|||
return { mode: 'EE', tacheNumber: 2 }
|
||||
case 'EE_T3':
|
||||
return { mode: 'EE', tacheNumber: 3 }
|
||||
case 'EO_T2_LIVE':
|
||||
return { mode: 'EO', tacheNumber: 2 }
|
||||
case 'EO_T3':
|
||||
return { mode: 'EO', tacheNumber: 3 }
|
||||
case 'EO_T1':
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ const TACHE_LABELS: Record<Tache, string> = {
|
|||
EE_T2: 'Expression Écrite — Tâche 2',
|
||||
EE_T3: 'Expression Écrite — Tâche 3',
|
||||
EO_T1: 'Expression Orale — Tâche 1',
|
||||
EO_T2_LIVE: 'Expression Orale — Tâche 2 Live',
|
||||
EO_T3: 'Expression Orale — Tâche 3',
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,11 @@
|
|||
* Ne jamais les injecter comme HTML — passer par react-markdown dans les composants.
|
||||
*/
|
||||
|
||||
/** Identifiants des tâches disponibles en mode simulation (hors T2 Live). */
|
||||
export type Tache = 'EE_T1' | 'EE_T2' | 'EE_T3' | 'EO_T1' | 'EO_T3'
|
||||
/**
|
||||
* Identifiants des tâches disponibles en mode simulation.
|
||||
* `EO_T2_LIVE` désigne la T2 EO en dialogue live (Sprint 6).
|
||||
*/
|
||||
export type Tache = 'EE_T1' | 'EE_T2' | 'EE_T3' | 'EO_T1' | 'EO_T2_LIVE' | 'EO_T3'
|
||||
|
||||
/** Mode de la simulation — examen uniquement accessible au plan Premium. */
|
||||
export type Mode = 'entrainement' | 'examen'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue