feat(governance): attach km archive history to dedupe groups
All checks were successful
Code Review / ai-code-review (push) Successful in 11s
CD Pipeline / tests (push) Successful in 6m56s
Type Sync Check / check-type-sync (push) Successful in 6m51s
CD Pipeline / build-and-deploy (push) Successful in 4m43s
CD Pipeline / post-deploy-checks (push) Successful in 1m47s

This commit is contained in:
Your Name
2026-05-20 10:20:01 +08:00
parent 9b0f68f6c4
commit edb6daef88
6 changed files with 255 additions and 40 deletions

View File

@@ -273,6 +273,7 @@ type KnowledgeReviewDraftDedupeGroup = {
owner_action: string;
writes_on_read: boolean;
can_archive_without_owner_approval: boolean;
archive_history?: GovernanceQueueItem[];
};
type KnowledgeReviewDraftDedupeResponse = {
@@ -789,6 +790,9 @@ function kmArchiveTraceForDedupeGroup(
group: KnowledgeReviewDraftDedupeGroup,
queueItems: GovernanceQueueItem[]
) {
if (group.archive_history?.length) {
return group.archive_history.slice(0, 3);
}
return queueItems
.filter((item) =>
item.governance_event_id === group.governance_event_id &&