feat(sprints): interface de création et gestion des sprints (frontend)

Ticket #11 — surface UI de gestion des sprints (frontend pur).

- Nouveau composant SprintManager : création (nom optionnel), édition et
  gestion du cycle de vie d'un sprint, contrôles accessibles (pas de DnD).
- useTickets étendu aux opérations de gestion de sprint ; ports, adaptateurs
  (ticket.ts, mock/index.ts) et TicketsPanel câblés en conséquence.
- Tests Vitest associés (tickets.test.tsx).

Typecheck / vitest (497+ tests) / build verts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-05 21:11:37 +02:00
parent edd5486330
commit fa874b976e
8 changed files with 715 additions and 0 deletions

View File

@ -18,6 +18,7 @@ import type {
import { Button, Input, Panel, Spinner, cn } from "@/shared";
import { useTickets } from "./useTickets";
import { useProjectAgents } from "./useProjectAgents";
import { SprintManager } from "./SprintManager";
import {
PriorityBadge,
StatusBadge,
@ -44,6 +45,7 @@ export function TicketsPanel({ projectId, onOpen }: TicketsPanelProps) {
const vm = useTickets(projectId);
const { agents, nameOf } = useProjectAgents(projectId);
const [showCreate, setShowCreate] = useState(false);
const [showSprints, setShowSprints] = useState(false);
const [newTitle, setNewTitle] = useState("");
const [newPriority, setNewPriority] = useState<TicketPriority>("medium");
@ -90,6 +92,14 @@ export function TicketsPanel({ projectId, onOpen }: TicketsPanelProps) {
>
{showCreate ? "Cancel" : "New"}
</Button>
<Button
size="sm"
variant="ghost"
aria-label="manage sprints"
onClick={() => setShowSprints(true)}
>
Sprints
</Button>
<Button
size="sm"
variant="ghost"
@ -268,6 +278,10 @@ export function TicketsPanel({ projectId, onOpen }: TicketsPanelProps) {
</Button>
</div>
)}
{showSprints && (
<SprintManager vm={vm} onClose={() => setShowSprints(false)} />
)}
</Panel>
);
}