feat(tickets): ajoute les pièces jointes sur tickets (#108)

Stockage flat côté ticket + métadonnées d'attachments, lecture exposée côté
backend/MCP, et UI minimale de liste/ajout dans TicketDetail. Traverse le
domaine (Issue, ports), l'application (usecases + assistant de ticket), les
adaptateurs infra/MCP (issues store, orchestrateur), les DTO backend/web-
server/app-tauri, et le frontend (domain/ports/adapters/hooks/UI).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-29 11:08:45 +02:00
parent 2692b9cc03
commit 8158057b1d
34 changed files with 1722 additions and 102 deletions

View File

@ -54,4 +54,47 @@ describe("TauriTicketGateway invoke payloads", () => {
},
});
});
it("wraps ticket attachment commands in the request DTO", async () => {
const gateway = new TauriTicketGateway();
await gateway.addAttachment(
"proj-1",
"#12",
"/tmp/note.txt",
3,
"text/plain",
);
await gateway.readAttachment("proj-1", "#12", "att-1");
await gateway.markAttachmentSummarized("proj-1", "#12", "att-1", 4);
expect(invoke).toHaveBeenNthCalledWith(1, "ticket_attachment_add", {
request: {
projectId: "proj-1",
ref: "#12",
path: "/tmp/note.txt",
expectedVersion: 3,
mime: "text/plain",
},
});
expect(invoke).toHaveBeenNthCalledWith(2, "ticket_attachment_read", {
request: {
projectId: "proj-1",
ref: "#12",
attachmentId: "att-1",
},
});
expect(invoke).toHaveBeenNthCalledWith(
3,
"ticket_attachment_mark_summarized",
{
request: {
projectId: "proj-1",
ref: "#12",
attachmentId: "att-1",
expectedVersion: 4,
},
},
);
});
});