Give Sokko TCG's interface files headers that explain their role, callers and pitfalls

Document the page, API client, offline cache, card renderer, quest pages and
admin dashboard: how stale responses are ignored, where the CSRF token lives,
which requests are idempotent and what the admin checks really protect. Fix
the Broken Mirror headers that still described two levels instead of three,
and the cards README that still described the stale-response bug as open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-12-01 09:56:58 +01:00
parent 73bd5ae21c
commit 34b412d968
21 changed files with 175 additions and 42 deletions

View file

@ -1,5 +1,17 @@
/**
* @file Assemble la navigation et les sections du tableau de bord d'administration Sokko TCG.
* @file Tableau de bord d'administration de Sokko TCG (`#/cards/admin/...`) : navigation entre les sections, puis
* la section demandée (vue d'ensemble, collections, codes, boutique, Guilde, atelier visuel, historique).
*
* Contexte : chargé à la demande par CardsPage.jsx, seulement pour un administrateur. Il lit le tableau de bord
* (`GET /api/cards/admin/dashboard`) et envoie les modifications par `runMutation` de CardsPage.
* Points d'entrée : `AdminPanel` ; `ADMIN_NAVIGATION` (sections et libellés).
* Utilisé par : CardsPage.jsx.
* Dépend de : useAdminDashboard.js, un fichier par section (Admin*.jsx), catalogLookup.js.
* Attention :
* - Le serveur vérifie les droits de chaque action ; cacher un bouton ne protège rien.
* - Après une modification du catalogue, `onCatalogChange` remplace le catalogue publié de toute l'application.
* - `SECTION_ALIASES` garde les anciennes adresses : ne pas en retirer.
* - Les libellés de l'administration sont écrits dans le JSX, pas dans site.json.
*/
import { useEffect, useState } from "react";