feat(aep): carte AEP — push Gitea 2026-04-28
This commit is contained in:
87
V2-cadrage/J-prompt-session-2-fiche.md
Normal file
87
V2-cadrage/J-prompt-session-2-fiche.md
Normal file
@@ -0,0 +1,87 @@
|
||||
# J — Prompt Sonnet 2 : Page fiche détaillée + commentaires
|
||||
|
||||
> **Lancer APRÈS validation checkpoint étape 2 (Sonnet 1).**
|
||||
> Peut tourner en **parallèle avec Sonnet 3** (étape 6 contribuer) — pas de conflit attendu sur les fichiers.
|
||||
|
||||
## Mission
|
||||
|
||||
Construire la page fiche détaillée `/fiche/[id]` + section commentaires modérés.
|
||||
|
||||
## Contexte (lis AVANT)
|
||||
|
||||
**Racine projet** : `nav-carte/`
|
||||
|
||||
Specs (toutes dans `nav-carte/V2-cadrage/`) :
|
||||
1. Spec session : `H-prompt-session-2-front.md` (section "Étape 3")
|
||||
2. Wireframes : `E-spec-frontend.md` (page fiche)
|
||||
3. Pipe collaboration / modération : `F-spec-pipe-collaboration.md` §3 (filtre éthique Mistral Nemo)
|
||||
4. Palette : `palette-nav-v2.md`
|
||||
5. Schéma DB : `F-spec-pipe-collaboration.md` §2
|
||||
|
||||
Code base :
|
||||
- `nav-carte/pages/fiche/` (squelette V1 à enrichir)
|
||||
- `nav-carte/components/OrgCard.vue` (réutilisable pour card en haut)
|
||||
- `nav-carte/server/routes/` (proxy NocoDB existant)
|
||||
- Note Sonnet 1 (à lire dans JOURNAL-V2.md) : conventions composants + résolutions de conflits
|
||||
|
||||
## Livrables
|
||||
|
||||
- [ ] Route SSR : `/fiche/[id]`
|
||||
- [ ] Composants :
|
||||
- `FicheDetail.vue` — affichage complet : nom, `description_enrichie` si dispo sinon `description_user`, tags fonctions, échelle, territoire, URL, localisation (mini-carte Leaflet)
|
||||
- `CommentSection.vue` — liste commentaires `moderation_status: approved`, tri chronologique
|
||||
- `CommentForm.vue` — formulaire (nom + email + commentaire 50-500 chars) + submit API
|
||||
- [ ] API endpoints :
|
||||
- `GET /api/fiche/[id]` — proxy NocoDB
|
||||
- `POST /api/comment` — filtre éthique Mistral Nemo synchrone (timeout 2s, fallback : `moderation_status: pending` si timeout). Cf. F §3.
|
||||
- [ ] Méta SEO dynamiques : `<title>{nom} — NAV`, description (extrait description), og:image (logo par défaut)
|
||||
- [ ] Bouton "← retour carte" qui restaure les query params filtres
|
||||
- [ ] Rate limit POST commentaire : Redis (cf. Sonnet 3 si déjà en place, sinon coordonner)
|
||||
|
||||
## Règles
|
||||
|
||||
- Accents français
|
||||
- Palette respectée
|
||||
- Mobile-first
|
||||
- Pas de Google Fonts
|
||||
- Pas de modif schéma NocoDB
|
||||
- Pas de touche à : carte index, sidebar filtres, formulaire `/contribuer`, worker IA
|
||||
|
||||
## Délégation cascade autorisée
|
||||
|
||||
Sous-agents Task (Sonnet) pour : recherche pattern Mistral Nemo dans codebase, génération composant isolé, audit V1 fiche.
|
||||
|
||||
## Critère de fin
|
||||
|
||||
- `npm run dev` charge `/fiche/[id]` pour une fiche seed (ex : id=1)
|
||||
- Commentaire posté apparaît avec status correct (approved si filtre OK, pending sinon)
|
||||
- Bouton retour carte préserve filtres URL
|
||||
- Mobile testé (devtools)
|
||||
- Commits atomiques
|
||||
|
||||
## Doute / blocage
|
||||
|
||||
- Mistral Nemo non configuré → POST commentaire = `pending` direct + TODO dans journal
|
||||
- Spec ambiguë → tranche au plus simple, note dans `JOURNAL-V2.md`
|
||||
- Blocage dur → STOP + reporte
|
||||
|
||||
## Résumé attendu
|
||||
|
||||
```
|
||||
## S2 Étape 3 — [DONE / BLOCKED]
|
||||
|
||||
### Livrables
|
||||
- ✓ ... / ✗ ...
|
||||
|
||||
### Décisions
|
||||
- ...
|
||||
|
||||
### À tester
|
||||
- /fiche/1, /fiche/2, post commentaire, retour carte avec filtres
|
||||
|
||||
### Fichiers modifiés / Commits
|
||||
- ...
|
||||
|
||||
### Coordination Sonnet 3
|
||||
- Rate limit Redis : posé / à poser ?
|
||||
```
|
||||
Reference in New Issue
Block a user