feat(rendezvous): libellé explicite des notifications de fin de background task (#91)
Le toast de fin de tâche de fond liée à un rendez-vous inter-agent passe de « Main -> DevBackend completed » à « Appel Main -> DevBackend terminé » (idem en échec / annulé), pour nommer explicitement l'appel plutôt qu'un état brut. Fallback générique conservé quand requester/target sont absents. Validations obtenues avant commit : tests frontend annoncés verts pour #91. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@ -266,7 +266,7 @@ describe("ProjectsView — LS7 conversation viewer integration", () => {
|
||||
});
|
||||
|
||||
const toast = await screen.findByRole("button", {
|
||||
name: /Main -> DevBackend completed/i,
|
||||
name: /Appel Main -> DevBackend terminé/i,
|
||||
});
|
||||
expect(within(toast).getByText("Task task-ren")).toBeTruthy();
|
||||
|
||||
@ -277,10 +277,57 @@ describe("ProjectsView — LS7 conversation viewer integration", () => {
|
||||
).toBeTruthy();
|
||||
expect(await screen.findByText("contenu du fil ouvert")).toBeTruthy();
|
||||
expect(
|
||||
screen.queryByRole("button", { name: /Main -> DevBackend completed/i }),
|
||||
screen.queryByRole("button", { name: /Appel Main -> DevBackend terminé/i }),
|
||||
).toBeNull();
|
||||
});
|
||||
|
||||
it("labels rendezvous failure and cancellation toasts with explicit call attribution", async () => {
|
||||
const project = new MockProjectGateway();
|
||||
const created = await project.createProject("alpha", "/p/a");
|
||||
const agent = new MockAgentGateway();
|
||||
const system = new MockSystemGateway();
|
||||
const requester = await agent.createAgent(created.id, {
|
||||
name: "Main",
|
||||
profileId: "codex",
|
||||
});
|
||||
const target = await agent.createAgent(created.id, {
|
||||
name: "DevBackend",
|
||||
profileId: "codex",
|
||||
});
|
||||
renderView(project, { agent, system });
|
||||
|
||||
await openProjectAndWorkTab("/p/a");
|
||||
system.emit({
|
||||
type: "backgroundTaskChanged",
|
||||
projectId: created.id,
|
||||
agentId: target.id,
|
||||
taskId: "task-rendezvous-failed",
|
||||
state: "failed",
|
||||
requesterAgentId: requester.id,
|
||||
targetAgentId: target.id,
|
||||
});
|
||||
system.emit({
|
||||
type: "backgroundTaskChanged",
|
||||
projectId: created.id,
|
||||
agentId: target.id,
|
||||
taskId: "task-rendezvous-cancelled",
|
||||
state: "cancelled",
|
||||
requesterAgentId: requester.id,
|
||||
targetAgentId: target.id,
|
||||
});
|
||||
|
||||
expect(
|
||||
await screen.findByRole("button", {
|
||||
name: /Appel Main -> DevBackend en échec/i,
|
||||
}),
|
||||
).toBeTruthy();
|
||||
expect(
|
||||
await screen.findByRole("button", {
|
||||
name: /Appel Main -> DevBackend annulé/i,
|
||||
}),
|
||||
).toBeTruthy();
|
||||
});
|
||||
|
||||
it("keeps the generic background-task toast when rendezvous agent ids are absent", async () => {
|
||||
const project = new MockProjectGateway();
|
||||
const created = await project.createProject("alpha", "/p/a");
|
||||
|
||||
Reference in New Issue
Block a user