fix(frontend): refresh immédiat de la liste des agents après ajout — bus d'événements agent-roster (CustomEvent + BroadcastChannel multi-fenêtres) publié à la création d'un agent et écouté par useAgents, LayoutGrid et les panneaux skills/permissions/tâches planifiées/templates/tickets/workstate, plus besoin d'ajouter-retirer une cellule pour forcer le refresh — #361 (QA verte: typecheck OK, vitest agents/singletonAgent OK, npm test 1416 tests OK)

This commit is contained in:
2026-09-16 20:14:51 +02:00
parent 3f6beb149b
commit 1cc842fd8b
13 changed files with 169 additions and 0 deletions

View File

@ -24,6 +24,7 @@ import { useDrift } from "@/features/templates/useDrift";
import { templateProfileLabel } from "@/features/templates/templatePresentation";
import { useGateways } from "@/app/di";
import { useAgents } from "./useAgents";
import { publishAgentRosterChanged } from "./agentRosterEvents";
import { correlateModelServerStatus } from "./modelServerLaunch";
import { AgentLimitBadge } from "./AgentLimitBadge";
import { ModelServerLaunchBadge } from "./ModelServerLaunchBadge";
@ -206,6 +207,7 @@ export function AgentsPanel({ projectId, projectRoot = "" }: AgentsPanelProps) {
name: newName.trim(),
synchronized: true,
});
publishAgentRosterChanged(projectId);
// Refresh the agents list since we bypassed the hook's createAgent path.
await vm.refresh();
} else {