feat(frontend): SimulationFormPage 3-tab layout (Red Team / SOC / Tâche C2) (sprint 13) #15
Reference in New Issue
Block a user
Delete Branch "sprint/13-sim-tabs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
[Red Team | SOC]+ C2TasksPanel en-dessous à 3 tabsRed Team / SOC / Tâche C2avec sticky bar contextuelle, count pill C2 réactif, et statedisabledgating SOC + C2 selon status + RBAC.disabledper-item dansTabs.tsx(cf. sprint 11).aria-disabled, classe.tab-underline-disabled, ArrowLeft/Right skip les tabs disabled (avec guard anti-boucle infinie si tous disabled).useHashTab: nouveau param optionnelvalidIds?: string[]pour fallback gracieux si le hash pointe ailleurs. Back-compatible (EngagementDetailPage non modifiée)./c2/taskspour SOC depuis sprint 8 — sans ce gate, SOC voyait un panel cassé en cliquant le tab).Dépendance — sprints 11 + 12
Branche basée sur
sprint/12-i18n-fr(PR #14 toujours ouverte). Le diff incluera temporairement les commits sprint 11 + 12 jusqu'à ce que PR #14 merge — il se réduira automatiquement à sprint 13 seul.Test plan
tsc --noEmitclean,eslint --max-warnings=0clean.pnpm buildclean (✓ 2.54s) — PostCSS résout tous les@apply, leçon sprint 11feedback_css_apply_tokensrespectée.Comment tester en local
Scénarios :
pending) — Ouvre une simpending. TabRed Teamactif (underline bleu), tabsSOC(greyedtext-steel, non-clickable) etTâche C2(normal — admin RT). Sticky bar[ENREGISTRER + MARQUER POUR RÉVISION + Supprimer (rouge à droite)]. Footer FR.review_required) — CliqueMARQUER POUR RÉVISION→ status flip àreview_required→ tabSOCdevient enabled. Clique-le. Le panel SOC apparaît avec les 4 fields (Source de log, Logs, Commentaire SOC, Numéro d'incident). Sticky bar bascule :[ENREGISTRER SOC + CLORE].Tâche C2depuis n'importe quel status (admin/redteam). Count pill = nombre de tâches C2 (caché si 0). C2TasksPanel rendu plein écran. Pas de sticky bar sur ce tab (actions sont inline dans le tab Red Team).review_required. TabSOCenabled (correct), tabTâche C2greyed (cohérent avec le 403 backend). Clique impossible.SOC+Tâche C2greyed. Form minimal (Nom + Techniques MITRE). Sticky bar[CRÉER LA SIMULATION + ANNULER].done. AlertBanner success au-dessus des tabs ("Cette simulation est terminée…"). Tous tabs enabled. Sticky bar SOC :[ENREGISTRER SOC + Réouvrir].#socd'une simpending→ tabRed Teamactif (safeTab fallback). URL bar auto-corrigée à#red-teamviauseEffectsync.Fichiers modifiés
frontend/src/components/Tabs.tsxTabItem.disabled+ click guard + nav skip-disabled +aria-disabledfrontend/src/hooks/useHashTab.tsvalidIds?: string[]optionnel, back-compat sprint 11frontend/src/styles/index.css.tab-underline-disabled(text-steel cursor-not-allowed)frontend/src/pages/SimulationFormPage.tsxsafeTabguard + useEffect syncfrontend/src/i18n/fr.jsonsimulation.form.tab.{redTeam,soc,c2}DESIGN.mdCHANGELOG.mdfrontend/tests/components/Tabs.test.tsxfrontend/tests/SimulationFormPage.test.tsxDécisions verrouillées (de la phase planning)
aria-disabled){review_required, done}c2Tasks.lengthDécisions team-lead (appliquées)
red-team#red-team/#soc/#c2[Execute via C2]+[Import C2 history]: restent dans le tab Red Team (actions RT qui déclenchent C2)Findings résolus (reviews)
c2TabDisabled = isNew || isSoc) + nouveau testuseEffectsyncsafeTab ↔ activeTabquand stale hashtype="submit" form=""→type="button"sur new-sim submit.tab-underline-disabled:text-graphite opacity-50→text-steel(meilleur contraste)Out of scope (reconnu)
ForbiddenState/NotFoundStatecomponents (n'existent pas)Commits
🤖 Generated with Claude Code
- Tabs: disabled per-item (aria-disabled, native disabled, tab-underline-disabled, arrow-key skip); aria-controls wired - useHashTab: optional validIds fallback to defaultId - SimulationFormPage: 3-tab refactor; SOC tab gated on review_required|done; C2 tab disabled in create mode; contextual sticky bar hidden on C2 tab; safeTab guard against stale hash; SOC-blocked banner removed - fr.json: simulation.form.tab.{redTeam,soc,c2} keys - DESIGN.md: disabled tab variant + aria-controls documented - Tests: 253 passing (5 new Tabs disabled tests, SimulationFormPage rewritten for tab layout) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.