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:
@ -8,9 +8,10 @@ use domain::ports::{
|
||||
IssueStoreError, StoreError,
|
||||
};
|
||||
use domain::{
|
||||
AgentId, AgentManifest, DomainEvent, Issue, IssueActor, IssueCarnet, IssueIndexEntry,
|
||||
IssueListFilter, IssueNumber, IssuePriority, IssueRef, IssueStatus, IssueVersion,
|
||||
ManifestEntry, MarkdownDoc, ProfileId, Project, ProjectId, ProjectPath, RemoteRef,
|
||||
AgentId, AgentManifest, DomainEvent, Issue, IssueActor, IssueAttachmentContent,
|
||||
IssueAttachmentId, IssueCarnet, IssueIndexEntry, IssueListFilter, IssueNumber, IssuePriority,
|
||||
IssueRef, IssueStatus, IssueVersion, LocalPath, ManifestEntry, MarkdownDoc, ProfileId, Project,
|
||||
ProjectId, ProjectPath, RemoteRef,
|
||||
};
|
||||
use uuid::Uuid;
|
||||
|
||||
@ -139,6 +140,42 @@ impl IssueStore for FakeIssues {
|
||||
self.update(_root, &updated, expected_version).await?;
|
||||
self.read_carnet(_root, issue_ref).await
|
||||
}
|
||||
|
||||
async fn add_attachment_from_path(
|
||||
&self,
|
||||
_root: &ProjectPath,
|
||||
_issue_ref: IssueRef,
|
||||
_source: &LocalPath,
|
||||
_attachment_id: IssueAttachmentId,
|
||||
_filename: String,
|
||||
_mime: String,
|
||||
_actor: IssueActor,
|
||||
_now_ms: u64,
|
||||
_expected_version: IssueVersion,
|
||||
) -> Result<Issue, IssueStoreError> {
|
||||
unimplemented!("not needed")
|
||||
}
|
||||
|
||||
async fn read_attachment(
|
||||
&self,
|
||||
_root: &ProjectPath,
|
||||
_issue_ref: IssueRef,
|
||||
_attachment_id: &IssueAttachmentId,
|
||||
) -> Result<IssueAttachmentContent, IssueStoreError> {
|
||||
unimplemented!("not needed")
|
||||
}
|
||||
|
||||
async fn mark_attachment_summarized(
|
||||
&self,
|
||||
_root: &ProjectPath,
|
||||
_issue_ref: IssueRef,
|
||||
_attachment_id: &IssueAttachmentId,
|
||||
_actor: IssueActor,
|
||||
_now_ms: u64,
|
||||
_expected_version: IssueVersion,
|
||||
) -> Result<Issue, IssueStoreError> {
|
||||
unimplemented!("not needed")
|
||||
}
|
||||
}
|
||||
|
||||
struct SeqAllocator(Mutex<u64>);
|
||||
|
||||
@ -4,10 +4,11 @@ use std::sync::{Arc, Mutex};
|
||||
use async_trait::async_trait;
|
||||
use domain::ports::{Clock, EventBus, EventStream, IdGenerator, IssueStore, IssueStoreError};
|
||||
use domain::{
|
||||
DomainEvent, Issue, IssueActor, IssueCarnet, IssueId, IssueIndexEntry, IssueListFilter,
|
||||
IssueNumber, IssuePriority, IssueRef, IssueStatus, IssueVersion, MarkdownDoc, Project,
|
||||
ProjectId, ProjectPath, RemoteRef, Sprint, SprintId, SprintIndexEntry, SprintOrder,
|
||||
SprintStatus, SprintStore, SprintStoreError, SprintVersion,
|
||||
DomainEvent, Issue, IssueActor, IssueAttachmentContent, IssueAttachmentId, IssueCarnet,
|
||||
IssueId, IssueIndexEntry, IssueListFilter, IssueNumber, IssuePriority, IssueRef, IssueStatus,
|
||||
IssueVersion, LocalPath, MarkdownDoc, Project, ProjectId, ProjectPath, RemoteRef, Sprint,
|
||||
SprintId, SprintIndexEntry, SprintOrder, SprintStatus, SprintStore, SprintStoreError,
|
||||
SprintVersion,
|
||||
};
|
||||
use uuid::Uuid;
|
||||
|
||||
@ -198,6 +199,42 @@ impl IssueStore for FakeIssues {
|
||||
) -> Result<IssueCarnet, IssueStoreError> {
|
||||
unimplemented!("not needed")
|
||||
}
|
||||
|
||||
async fn add_attachment_from_path(
|
||||
&self,
|
||||
_root: &ProjectPath,
|
||||
_issue_ref: IssueRef,
|
||||
_source: &LocalPath,
|
||||
_attachment_id: IssueAttachmentId,
|
||||
_filename: String,
|
||||
_mime: String,
|
||||
_actor: IssueActor,
|
||||
_now_ms: u64,
|
||||
_expected_version: IssueVersion,
|
||||
) -> Result<Issue, IssueStoreError> {
|
||||
unimplemented!("not needed")
|
||||
}
|
||||
|
||||
async fn read_attachment(
|
||||
&self,
|
||||
_root: &ProjectPath,
|
||||
_issue_ref: IssueRef,
|
||||
_attachment_id: &IssueAttachmentId,
|
||||
) -> Result<IssueAttachmentContent, IssueStoreError> {
|
||||
unimplemented!("not needed")
|
||||
}
|
||||
|
||||
async fn mark_attachment_summarized(
|
||||
&self,
|
||||
_root: &ProjectPath,
|
||||
_issue_ref: IssueRef,
|
||||
_attachment_id: &IssueAttachmentId,
|
||||
_actor: IssueActor,
|
||||
_now_ms: u64,
|
||||
_expected_version: IssueVersion,
|
||||
) -> Result<Issue, IssueStoreError> {
|
||||
unimplemented!("not needed")
|
||||
}
|
||||
}
|
||||
|
||||
struct SeqIds(Mutex<u128>);
|
||||
|
||||
@ -17,11 +17,11 @@ use domain::profile::StructuredAdapter;
|
||||
use domain::{
|
||||
AgentId, AgentPermissionOverride, AgentProfile, AgentToolPolicy, AgentToolPolicyStore,
|
||||
AssistantContextError, AssistantContextProvider, ContextInjection, DomainEvent, EventBus,
|
||||
EventStream, Issue, IssueActor, IssueCarnet, IssueId, IssueListFilter, IssueNumber,
|
||||
IssuePriority, IssueRef, IssueStatus, IssueStore, IssueStoreError, IssueVersion, MarkdownDoc,
|
||||
NetworkPolicy, PermissionSet, PreparedContext, ProfileId, ProfileStore, Project, ProjectId,
|
||||
ProjectPath, ProjectPermissions, ProjectSystemPermissions, RemoteRef, SessionId,
|
||||
SystemPermissionSet,
|
||||
EventStream, Issue, IssueActor, IssueAttachmentContent, IssueAttachmentId, IssueCarnet,
|
||||
IssueId, IssueListFilter, IssueNumber, IssuePriority, IssueRef, IssueStatus, IssueStore,
|
||||
IssueStoreError, IssueVersion, LocalPath, MarkdownDoc, NetworkPolicy, PermissionSet,
|
||||
PreparedContext, ProfileId, ProfileStore, Project, ProjectId, ProjectPath, ProjectPermissions,
|
||||
ProjectSystemPermissions, RemoteRef, SessionId, SystemPermissionSet,
|
||||
};
|
||||
use uuid::Uuid;
|
||||
|
||||
@ -138,6 +138,42 @@ impl IssueStore for FakeIssues {
|
||||
) -> Result<IssueCarnet, IssueStoreError> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
async fn add_attachment_from_path(
|
||||
&self,
|
||||
_root: &ProjectPath,
|
||||
_issue_ref: IssueRef,
|
||||
_source: &LocalPath,
|
||||
_attachment_id: IssueAttachmentId,
|
||||
_filename: String,
|
||||
_mime: String,
|
||||
_actor: IssueActor,
|
||||
_now_ms: u64,
|
||||
_expected_version: IssueVersion,
|
||||
) -> Result<Issue, IssueStoreError> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
async fn read_attachment(
|
||||
&self,
|
||||
_root: &ProjectPath,
|
||||
_issue_ref: IssueRef,
|
||||
_attachment_id: &IssueAttachmentId,
|
||||
) -> Result<IssueAttachmentContent, IssueStoreError> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
async fn mark_attachment_summarized(
|
||||
&self,
|
||||
_root: &ProjectPath,
|
||||
_issue_ref: IssueRef,
|
||||
_attachment_id: &IssueAttachmentId,
|
||||
_actor: IssueActor,
|
||||
_now_ms: u64,
|
||||
_expected_version: IssueVersion,
|
||||
) -> Result<Issue, IssueStoreError> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
struct FakeProfiles {
|
||||
|
||||
Reference in New Issue
Block a user