# Story 3.3 : Vue kanban 4 colonnes (FR23) Status: done ## Story En tant que Transformateur, je veux voir toutes les idées dans une vue kanban organisée en 4 colonnes (Idée / À qualifier / Prioritaire / En cours), afin de visualiser d'un coup d'œil la progression du pipeline d'idées par étape. ## Acceptance Criteria 1. **Given** je suis sur le backlog (vue liste - Story 3.2) **When** je clique sur le bouton "Kanban" dans le toggle Liste / Kanban **Then** je suis redirigé vers `/workspace/[workspaceId]/backlog/kanban` **And** la page affiche 4 colonnes : **Idée** | **À qualifier** | **Prioritaire** | **En cours** 2. **Given** j'ai des idées dans mon workspace **When** j'accède à la vue kanban **Then** les idées sont réparties dans les colonnes selon leur statut : - Idée → `SUBMITTED` (Envoyé) - À qualifier → `IN_REVIEW` (En traitement) - Prioritaire → `ON_AGENDA` (Mis à l'ordre du jour) - En cours → `IN_PROGRESS` (En cours) **And** les idées avec statut `NOT_PRIORITY` sont **exclues** du kanban (jamais affichées, même si `includeNotPriority` n'est pas un filtre disponible sur cette vue) 3. **Given** j'ai des idées réparties dans plusieurs colonnes **When** le kanban se charge **Then** chaque colonne affiche le nombre d'idées dans son en-tête (ex. "Idée · 4") **And** chaque carte affiche : titre (displayTitle), domaine LLM ou badge "À qualifier" si `llmEnrichFailed`, score d'impact ou "-", contributeur (tronqué), date 4. **Given** le kanban est chargé avec des données **When** je regarde les cartes **Then** une carte avec `llmEnrichFailed = true` affiche le badge "À qualifier manuellement" (amber) à la place du domaine/type IA **And** un score LLM présent est accompagné d'un tooltip "Suggestion IA - à ajuster" (NFR18) **And** chaque carte est cliquable et navigue vers `/workspace/[workspaceId]/ideas/[ideaId]` 5. **Given** une colonne ne contient aucune idée **When** le kanban s'affiche **Then** la colonne est visible avec son en-tête et un empty state discret ("Aucune idée ici") **And** toutes les 4 colonnes restent visibles en tout temps (pas de masquage des colonnes vides) 6. **Given** mon workspace ne contient aucune idée active (hors NOT_PRIORITY) **When** j'accède au kanban **Then** les 4 colonnes sont affichées vides avec un empty state central encourageant : "Votre pipeline est vide - invitez des contributeurs pour recevoir vos premières idées." **And** un bouton "Inviter des contributeurs" est présent, pointant vers `/workspace/[workspaceId]/contributors` 7. **Given** les données sont en cours de chargement **When** le kanban se monte **Then** un skeleton est affiché - chaque colonne montre 2 à 3 cartes placeholder pendant `isLoading` **And** jamais de page blanche (NFR5) 8. **Given** je suis sur la vue kanban **When** je regarde la topbar **Then** le toggle Liste / Kanban est visible - "Kanban" est actif (fond violet), "Liste" est inactif **And** cliquer sur "Liste" redirige vers `/workspace/[workspaceId]/backlog` ## Tasks / Subtasks - [x] Task 1 : Utilitaire partagé `src/lib/ideaStatus.ts` (AC: #2, #3, #4) - [x] Subtask 1.1 : Extraire et exporter `STATUS_LABELS`, `STATUS_CLASSES` (actuellement dans `IdeaRow.tsx`) vers `src/lib/ideaStatus.ts` - [x] Subtask 1.2 : Exporter `KANBAN_COLUMNS` - tableau ordonné des 4 colonnes avec leur statut cible, label, couleur de header - [x] Subtask 1.3 : Mettre à jour `IdeaRow.tsx` pour importer depuis `~/lib/ideaStatus` (ne plus dupliquer les constantes) - [x] Task 2 : Page kanban `src/app/(dashboard)/workspace/[workspaceId]/backlog/kanban/page.tsx` (AC: #1, #8) - [x] Subtask 2.1 : Créer le fichier page - Server Component avec `params: { workspaceId: string }` ; vérifier auth via session ; déléguer le rendu à `KanbanBoard` - [x] Subtask 2.2 : Passer `workspaceId` en prop au composant client `KanbanBoard` - [x] Subtask 2.3 : Ajouter `` et métadonnées de page (ex. "Kanban | AImpact Hub") - [x] Task 3 : Composant `KanbanBoard` dans `src/components/backlog/KanbanBoard.tsx` (AC: #2–#8) - [x] Subtask 3.1 : Composant Client (`"use client"`) - appeler `api.idea.getBacklog.useQuery({ workspaceId, sortBy: 'createdAt', sortOrder: 'desc', includeNotPriority: false })` - [x] Subtask 3.2 : Topbar avec toggle Liste / Kanban - "Kanban" actif, lien "Liste" vers `/workspace/${workspaceId}/backlog` - [x] Subtask 3.3 : Pendant `isLoading` → afficher 4 colonnes skeleton (3 cartes placeholder chacune) - [x] Subtask 3.4 : Si `isError` → message d'erreur inline (pas de modale) - [x] Subtask 3.5 : Grouper les idées par statut client-side : `groupByStatus(ideas)` → `Map<string, IdeaRowData[]>` - [x] Subtask 3.6 : Si 0 idée dans toutes les colonnes → afficher `KanbanEmptyState` centré - [x] Subtask 3.7 : Rendre 4 colonnes `KanbanColumn` en grille horizontale responsive (scroll horizontal sur mobile) - [x] Subtask 3.8 : Passer à chaque `KanbanColumn` : `status`, `label`, `headerBg`, `headerText`, `ideas` (tableau filtré) - [x] Task 4 : Composant `KanbanColumn` dans `src/components/backlog/KanbanColumn.tsx` (AC: #3, #5) - [x] Subtask 4.1 : Props : `label: string`, `headerBg: string`, `headerText: string`, `ideas: IdeaRowData[]`, `workspaceId: string`, `isLoading?: boolean` - [x] Subtask 4.2 : En-tête de colonne : label + compteur (ex. "Idée · 4") avec la couleur `headerColor` - [x] Subtask 4.3 : Zone de défilement vertical si > 6 cartes (`overflow-y-auto max-h-[calc(100vh-240px)]`) - [x] Subtask 4.4 : Si `isLoading` → 3 cartes placeholder `<Skeleton>` dans la colonne - [x] Subtask 4.5 : Si `ideas.length === 0` → empty state discret : "Aucune idée ici" (texte gris, fond légèrement plus sombre) - [x] Subtask 4.6 : Rendre un `KanbanCard` par idée - [x] Task 5 : Composant `KanbanCard` dans `src/components/backlog/KanbanCard.tsx` (AC: #3, #4) - [x] Subtask 5.1 : Props : `idea: IdeaRowData`, `workspaceId: string` - [x] Subtask 5.2 : Carte cliquable (`<Link>`) vers `/workspace/[workspaceId]/ideas/[idea.id]` - [x] Subtask 5.3 : Afficher `displayTitle` en titre de carte (`line-clamp-2`) - [x] Subtask 5.4 : Si `llmEnrichFailed` → badge amber "À qualifier manuellement" au lieu de domaine - [x] Subtask 5.5 : Si non enrichi → afficher `llmDomain` et score `llmScoreImpact/5` avec tooltip NFR18 ; si null → "-" - [x] Subtask 5.6 : Footer de carte : `contributorEmail` tronqué (max 28 chars) + date formatée `fr-FR` - [x] Subtask 5.7 : Si pièces jointes → icône `Paperclip` avec compteur - [x] Subtask 5.8 : Design sobre fond blanc, bordure légère, hover `shadow-sm` (palette Livinia) - [x] Task 6 : Modifier `BacklogListView.tsx` - activer le bouton Kanban (AC: #1, #8) - [x] Subtask 6.1 : Remplacer le bouton Kanban `disabled` par un `<Button asChild>` + `<Link href={kanbanHref}>` - [x] Subtask 6.2 : Conserver le style du bouton inactif (`variant="ghost"`, texte gris) - seule suppression du `disabled` et ajout du `href` - [x] Subtask 6.3 : Supprimer le `title="Vue Kanban disponible prochainement"` - [x] Task 7 : Tests (AC: #2, #3, #4, #7) - [x] Subtask 7.1 : Créer `src/components/backlog/KanbanBoard.test.tsx` avec Vitest + RTL - [x] Subtask 7.2 : Test : `groupByStatus` - 5 idées avec statuts variés → répartition correcte dans 4 groupes ; `NOT_PRIORITY` exclus - [x] Subtask 7.3 : Test : skeleton affiché pendant `isLoading` ; `data-testid` sur colonnes skeleton - [x] Subtask 7.4 : Test : si 0 idée → `KanbanEmptyState` rendu ; colonnes sans idées affichent empty state discret - [x] Subtask 7.5 : Créer `src/components/backlog/KanbanCard.test.tsx` - [x] Subtask 7.6 : Test KanbanCard : affiche `llmTitle` si dispo ; affiche troncature si non - [x] Subtask 7.7 : Test KanbanCard : affiche badge "À qualifier manuellement" si `llmEnrichFailed = true` - [x] Subtask 7.8 : Test KanbanCard : affiche score avec tooltip si `llmScoreImpact` présent ## Dev Notes ### Architecture & Décisions techniques **Réutilisation de `idea.getBacklog` - aucune nouvelle procédure tRPC :** La procédure `idea.getBacklog` (Story 3.2) est directement réutilisable pour le kanban : ```typescript const { data: ideas, isLoading, isError } = api.idea.getBacklog.useQuery({ workspaceId, sortBy: "createdAt", sortOrder: "desc", includeNotPriority: false, // NOT_PRIORITY exclues du kanban }); ``` Le groupement par statut se fait côté client, évitant d'ajouter une procédure dédiée. Performance acceptable : max 200 idées (`take: 200`), groupement O(n) négligeable. **Groupement client-side - fonction utilitaire :** ```typescript // src/lib/ideaStatus.ts import type { IdeaRowData } from "~/components/backlog/IdeaRow"; export const KANBAN_COLUMNS = [ { status: "SUBMITTED", label: "Idée", headerBg: "bg-gray-100", headerText: "text-gray-700" }, { status: "IN_REVIEW", label: "À qualifier", headerBg: "bg-blue-100", headerText: "text-blue-700" }, { status: "ON_AGENDA", label: "Prioritaire", headerBg: "bg-violet-100", headerText: "text-violet-700" }, { status: "IN_PROGRESS", label: "En cours", headerBg: "bg-green-100", headerText: "text-green-700" }, ] as const; export function groupByStatus(ideas: IdeaRowData[]): Map<string, IdeaRowData[]> { const map = new Map<string, IdeaRowData[]>(); for (const col of KANBAN_COLUMNS) { map.set(col.status, []); } for (const idea of ideas) { if (map.has(idea.status)) { map.get(idea.status)!.push(idea); } // NOT_PRIORITY et statuts inconnus ignorés } return map; } ``` **Pas de dnd-kit dans cette story :** - Le drag & drop est réservé à **Story 4.3** (FR33, FR34) - architecture.md spécifie `dnd-kit` pour cette feature - Ne pas installer `@dnd-kit/core` ni `@dnd-kit/sortable` dans cette story - Le kanban est en **lecture seule** pour Story 3.3 - pas de déplacement de cartes **Route kanban - structure de dossier :** ``` src/app/(dashboard)/workspace/[workspaceId]/backlog/ ├── page.tsx ← Story 3.2 (vue liste - inchangée) └── kanban/ └── page.tsx ← Story 3.3 (vue kanban - à créer) ``` Pattern cohérent avec l'arborescence définie dans `architecture.md`. **Navigation relative depuis `kanban/page.tsx` vers liste :** - Lien "Liste" dans le toggle = `href="../backlog"` ou path absolu `/workspace/${workspaceId}/backlog` - Privilégier le path absolu pour éviter la confusion avec les chemins relatifs Next.js App Router **`IdeaRowData` - réutilisation de l'interface :** - L'interface `IdeaRowData` est déjà exportée depuis `IdeaRow.tsx` - `KanbanCard` doit importer depuis `~/components/backlog/IdeaRow` - ne pas redéfinir l'interface - À terme (Story 3.4+), envisager déplacement vers `~/lib/ideaTypes.ts` si plus de 2 composants l'utilisent **Pattern `BacklogListView.tsx` - activer le bouton Kanban :** Avant (Story 3.2) : ```typescript <Button variant="ghost" size="sm" className="h-7 gap-1.5 text-xs text-muted-foreground" disabled title="Vue Kanban disponible prochainement" > <Columns className="h-3.5 w-3.5" /> Kanban </Button> ``` Après (Story 3.3) : ```typescript <Button variant="ghost" size="sm" className="h-7 gap-1.5 text-xs text-muted-foreground hover:text-gray-900" asChild > <Link href={`/workspace/${workspaceId}/backlog/kanban`}> <Columns className="h-3.5 w-3.5" /> Kanban </Link> </Button> ``` **Responsive kanban - scroll horizontal sur mobile :** ```typescript // KanbanBoard container <div className="overflow-x-auto pb-4"> <div className="grid min-w-[900px] grid-cols-4 gap-4"> {/* 4 colonnes */} </div> </div> ``` - `min-w-[900px]` garantit que les colonnes ne se rétrécissent pas sur mobile - `overflow-x-auto` sur le parent active le scroll horizontal **Skeleton kanban - pattern cohérent avec Story 3.2 :** ```typescript // KanbanColumn en mode isLoading {isLoading && Array.from({ length: 3 }).map((_, i) => ( <div key={i} className="rounded-lg border bg-white p-3 space-y-2"> <Skeleton className="h-4 w-3/4" /> <Skeleton className="h-3 w-1/2" /> <Skeleton className="h-3 w-2/3" /> </div> ))} ``` Utilise `Skeleton` de `~/components/ui/skeleton` (déjà disponible depuis Story 3.2). **Tooltip NFR18 sur les scores kanban :** - Même pattern que `IdeaRow.tsx` : `<Tooltip>` + `<TooltipTrigger>` + `<TooltipContent>` - `TooltipProvider` déjà dans `providers.tsx` (ajouté en Story 3.2) - Import : `import { Tooltip, TooltipContent, TooltipTrigger } from "~/components/ui/tooltip"` **Palette Livinia Chaleureux - fond backlog :** ```typescript // Fond des cartes kanban "bg-white border border-gray-100 rounded-lg p-3 hover:shadow-sm transition-shadow" // Fond des colonnes "bg-[#f7f5f2] rounded-lg p-3" // légèrement plus sombre que #fefdfb ``` **Statuts et labels - extraction vers `ideaStatus.ts` :** Actuellement dans `IdeaRow.tsx` (non exportés). Story 3.3 nécessite la même logique dans `KanbanCard.tsx`. L'approche correcte : 1. Créer `src/lib/ideaStatus.ts` et y déplacer `STATUS_LABELS`, `STATUS_CLASSES`, `KANBAN_COLUMNS`, `groupByStatus` 2. Mettre à jour `IdeaRow.tsx` pour importer depuis `~/lib/ideaStatus` Cela anticipe correctement la Story 3.4 (fiche détaillée) qui aura besoin des mêmes mappings. ### Schéma Prisma - aucune migration requise Tous les champs nécessaires sont dans le modèle `Idea` (Story 2.2 + Story 3.1) : - `status` (IdeaStatus enum : SUBMITTED, IN_REVIEW, ON_AGENDA, IN_PROGRESS, NOT_PRIORITY) - `llmTitle`, `llmDomain`, `llmAiType`, `llmScoreImpact`, `llmEnrichFailed` (champs LLM - Story 3.1) - `contributorEmail`, `problemDescription`, `createdAt` (soumission - Story 2.2) - Index existants : `@@index([workspaceId, createdAt])`, `@@index([workspaceId, status])` **Aucun `prisma migrate` requis pour cette story.** ### Structure des fichiers | Fichier | Action | |---------|--------| | `src/lib/ideaStatus.ts` | Créer - constantes statuts partagées (`STATUS_LABELS`, `STATUS_CLASSES`, `KANBAN_COLUMNS`, `groupByStatus`) | | `src/app/(dashboard)/workspace/[workspaceId]/backlog/kanban/page.tsx` | Créer - page kanban Server Component | | `src/components/backlog/KanbanBoard.tsx` | Créer - composant principal kanban client | | `src/components/backlog/KanbanColumn.tsx` | Créer - colonne kanban (en-tête, liste cartes, skeleton, empty state) | | `src/components/backlog/KanbanCard.tsx` | Créer - carte kanban (titre, domaine, score, contributeur, date) | | `src/components/backlog/BacklogListView.tsx` | Modifier - activer le bouton Kanban (supprimer `disabled`, ajouter `asChild` + `Link`) | | `src/components/backlog/IdeaRow.tsx` | Modifier - importer `STATUS_LABELS`, `STATUS_CLASSES` depuis `~/lib/ideaStatus` | | `src/components/backlog/KanbanBoard.test.tsx` | Créer - tests Vitest + RTL (groupement, skeleton, empty state) | | `src/components/backlog/KanbanCard.test.tsx` | Créer - tests Vitest + RTL (titre, badge, score) | ### Apprentissages des stories précédentes **Story 3.2 (BacklogListView) - patterns directs à réutiliser :** - `api.idea.getBacklog.useQuery` → même hook, mêmes paramètres, mêmes types retournés - Pattern ownership : la procédure gère déjà la vérification côté serveur - pas de duplication côté client - Pattern skeleton : `Array.from({ length: n }).map((_, i) => ...)` avec `<Skeleton>` shadcn - Pattern empty state : composant dédié avec message rassurant et CTA (réutiliser `BacklogEmptyState` ou créer une variante) - Toggle actif : `variant="default"` + `className="bg-violet-600 text-white"` pour le bouton actif **Story 3.1 (enrichissement LLM) - données `llmEnrichFailed` :** - `llmEnrichFailed = true` → UI "À qualifier manuellement" (badge amber) - déjà dans `IdeaRow.tsx` - `llmScoreImpact = null` quand enrichissement non complété → afficher "-" **Story 1.1 (shadcn/ui) - composants disponibles :** - `Badge`, `Button`, `Skeleton`, `Tooltip` → déjà générés - Pour colonnes avec scroll : pas de composant shadcn dédié - CSS natif suffit - Si besoin d'un `ScrollArea` shadcn : `npx shadcn@latest add scroll-area` **Story 2.4a (LibraryBrowser) - pattern grille :** - Grille de cartes avec Tailwind Grid = pattern éprouvé dans `LibraryBrowser.tsx` ### Séquence d'affichage complète ``` Transformateur clique "Kanban" dans le toggle de BacklogListView → Navigation vers /workspace/[workspaceId]/backlog/kanban → Page Server Component vérifie auth (session NextAuth) → KanbanBoard monté → api.idea.getBacklog.useQuery({ workspaceId, includeNotPriority: false }) → skeleton 4 colonnes × 3 cartes placeholder pendant isLoading → [données reçues] → groupByStatus(ideas) → Map<status, idea[]> → si toutes colonnes vides → KanbanEmptyState centré → sinon → 4 colonnes KanbanColumn en grille → en-tête colonne : label + compteur → si colonne vide → empty state discret "Aucune idée ici" → sinon → liste de KanbanCard → chaque KanbanCard : titre | domaine/badge | score tooltip | email | date [interaction utilisateur] → clic sur carte → navigation vers /workspace/[workspaceId]/ideas/[ideaId] → clic "Liste" dans le toggle → navigation vers /workspace/[workspaceId]/backlog ``` ### NFR concernés - **NFR5** : kanban < 3s pour 200 idées - réutilise `getBacklog` avec `take: 200` + index existants. Groupement client-side O(n) négligeable. - **NFR14** : isolation workspace - filtre `workspaceId` dans `getBacklog` + ownership check (hérité Story 3.2) - **NFR18** : label "Suggestion IA - à ajuster" - tooltip sur chaque score LLM dans les cartes kanban ### Project Structure Notes - La page `/backlog/kanban` est sous `(dashboard)/workspace/[workspaceId]/backlog/kanban/page.tsx` - sous-route de backlog, cohérente avec l'arborescence `architecture.md` - Les composants kanban dans `src/components/backlog/` - dossier feature partagé avec les composants liste (Story 3.2) - `src/lib/ideaStatus.ts` est une extraction de `IdeaRow.tsx` - pas de nouvelle logique métier - Pas de modification du routeur tRPC (`idea.ts`) - réutilisation complète de `getBacklog` - La Story 4.3 (drag & drop) utilisera `@dnd-kit/core` et `@dnd-kit/sortable` - **ne pas anticiper ces imports ici** ### References - [Source: epics.md#Story 3.3 - Vue kanban 4 colonnes (FR23)] - [Source: prd.md#FR23 - 4 colonnes Idée/À qualifier/Prioritaire/En cours ; NOT_PRIORITY hors kanban] - [Source: architecture.md#Frontend Architecture - dnd-kit pour kanban (Story 4.3), pas Story 3.3] - [Source: architecture.md#Backlog (FR22–FR28) - workspace/[workspaceId]/backlog/, components/backlog/*, routers/idea.ts] - [Source: architecture.md#Implementation Patterns - protectedProcedure, filtrer par workspaceId, Zod, TRPCError] - [Source: architecture.md#Naming Patterns - KanbanBoard, KanbanColumn, KanbanCard (PascalCase)] - [Source: architecture.md#Frontend Architecture - shadcn/ui, React Query, pas de Zustand/Redux] - [Source: architecture.md#Structure Patterns - src/components/backlog/ dossier feature] - [Source: implementation-artifacts/3-2-vue-liste-du-backlog-fr22-fr24.md - api.idea.getBacklog, IdeaRowData, STATUS_LABELS, toggle Liste/Kanban, patterns skeleton/empty state] - [Source: implementation-artifacts/3-1-enrichissement-llm-post-soumission-fr18-fr18b-fr21.md - llmEnrichFailed, champs LLM, NFR18] - [Source: prisma/schema.prisma - IdeaStatus enum (SUBMITTED, IN_REVIEW, ON_AGENDA, IN_PROGRESS, NOT_PRIORITY)] - [Source: src/components/backlog/BacklogListView.tsx - toggle désactivé à activer, pattern composant client] - [Source: src/components/backlog/IdeaRow.tsx - IdeaRowData interface, STATUS_LABELS, STATUS_CLASSES à extraire] - [Source: src/components/ui/skeleton.tsx, tooltip.tsx, badge.tsx, button.tsx - composants shadcn disponibles] ## Dev Agent Record ### Agent Model Used claude-4.6-sonnet-medium-thinking (Cursor) ### Debug Log References ### Completion Notes List - ✅ Task 1 : `src/lib/ideaStatus.ts` créé - `STATUS_LABELS`, `STATUS_CLASSES`, `KANBAN_COLUMNS`, `groupByStatus` exportés ; `IdeaRow.tsx` mis à jour pour importer depuis ce module partagé - ✅ Task 2 : Page `backlog/kanban/page.tsx` - Server Component avec auth redirect, metadata "Kanban | AImpact Hub", délègue à `KanbanBoard` - ✅ Task 3 : `KanbanBoard.tsx` - Client Component, `api.idea.getBacklog` réutilisé, toggle Liste/Kanban (Kanban actif), skeleton 4×3, empty state global, grille 4 colonnes responsive - ✅ Task 4 : `KanbanColumn.tsx` - en-tête coloré avec compteur, skeleton 3 cartes, empty state discret "Aucune idée ici", `max-h` scroll vertical, `KanbanCard` par idée - ✅ Task 5 : `KanbanCard.tsx` - lien vers fiche idée, titre `line-clamp-2`, badge amber si `llmEnrichFailed`, score/5 avec tooltip NFR18, email tronqué 28 chars, date fr-FR, icône Paperclip - ✅ Task 6 : `BacklogListView.tsx` - bouton Kanban activé avec `asChild + Link`, `disabled` supprimé, title supprimé - ✅ Task 7 : 22 tests ajoutés - 5 tests `groupByStatus` (fonction pure), 8 tests `KanbanBoard` composant, 13 tests `KanbanCard` composant ; 270/270 tests projet passent, 0 régression - ✅ Code review : 3 findings corrigés (KanbanCard score "-" si null, KanbanColumn format "Label · Count", test domaine+score null) ; 1 action item LOW reporté (IdeaRowData → ideaTypes.ts) ### File List - aimpact-hub/src/lib/ideaStatus.ts (créé - STATUS_LABELS, STATUS_CLASSES, KANBAN_COLUMNS, groupByStatus, KanbanColumnDef) - aimpact-hub/src/app/(dashboard)/workspace/[workspaceId]/backlog/kanban/page.tsx (créé - page kanban Server Component) - aimpact-hub/src/components/backlog/KanbanBoard.tsx (créé - vue kanban principale, toggle, skeleton, empty state, grille) - aimpact-hub/src/components/backlog/KanbanColumn.tsx (créé - colonne kanban, en-tête, skeleton, empty state, cartes) - aimpact-hub/src/components/backlog/KanbanCard.tsx (créé - carte kanban, titre, badge enrichissement, score tooltip, footer) - aimpact-hub/src/components/backlog/BacklogListView.tsx (modifié - bouton Kanban activé, Link ajouté, disabled supprimé) - aimpact-hub/src/components/backlog/IdeaRow.tsx (modifié - import STATUS_LABELS/STATUS_CLASSES depuis ~/lib/ideaStatus) - aimpact-hub/src/components/backlog/KanbanBoard.test.tsx (créé - 13 tests groupByStatus + KanbanBoard ; modifié code review - test format en-têtes) - aimpact-hub/src/components/backlog/KanbanCard.test.tsx (créé - 14 tests KanbanCard ; modifié code review - test domaine+score null) - aimpact-hub/src/components/backlog/KanbanCard.tsx (modifié code review - affichage "-" pour score null même si domaine présent) - aimpact-hub/src/components/backlog/KanbanColumn.tsx (modifié code review - format en-tête "Label · Count") ### Change Log - 2026-02-28 : Implémentation complète Story 3.3 - vue kanban 4 colonnes (FR23), 5 nouveaux fichiers, 2 modifiés, 26 tests ajoutés (269 total, 0 régression) - 2026-02-28 : Code review - 3 findings corrigés (KanbanCard score "-", KanbanColumn format "·", test coverage), 1 action item reporté --- ## Senior Developer Review (AI) **Date:** 2026-02-28 **Outcome:** Approve (après corrections) ### Action Items - [x] **[HIGH]** KanbanCard : quand `llmDomain` existe mais `llmScoreImpact` est null, la carte n'affichait pas "-" pour le score. AC #3 exige "score d'impact ou "-"". Corrigé : affichage systématique de "-" quand score null. [KanbanCard.tsx:53-76] - [x] **[MEDIUM]** KanbanColumn : AC #3 spécifie le format "Idée · 4" (point médian). Implémentation corrigée : `{label} · ${ideas.length}` dans l'en-tête. [KanbanColumn.tsx:33-37] - [x] **[MEDIUM]** Test coverage : ajout test KanbanCard pour domaine présent + score null → affiche "-". [KanbanCard.test.tsx] - [ ] **[LOW]** Architecture : `ideaStatus.ts` importe `IdeaRowData` depuis `IdeaRow.tsx` - couche lib dépend d'un composant. À terme : déplacer `IdeaRowData` vers `~/lib/ideaTypes.ts`. [ideaStatus.ts:1] ### Review Follow-ups (AI) - [ ] [AI-Review][LOW] Déplacer IdeaRowData vers ~/lib/ideaTypes.ts pour éviter la dépendance lib→composant [ideaStatus.ts:1]