feat: F018 human review queue — 2-panel governance workspace
Replaces the old ad-hoc ReviewQueue page with a full governance-compliant workflow: filterable task list, detail panel with confidence/risk context, role-aware approve/reject/escalate/more-data actions, and persistent notes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+68
-18
@@ -1,29 +1,79 @@
|
||||
// ── Entity Types ──────────────────────────────────────────────────────────────
|
||||
|
||||
export const ReviewEntityType = {
|
||||
FUTURE_SIGNAL: 'FUTURE_SIGNAL',
|
||||
MATCH_EXPLANATION: 'MATCH_EXPLANATION',
|
||||
LOW_CONFIDENCE_MATCH:'LOW_CONFIDENCE_MATCH',
|
||||
CONTACT_RELEASE: 'CONTACT_RELEASE',
|
||||
AI_OUTPUT: 'AI_OUTPUT',
|
||||
PROPERTY_DATA_ISSUE: 'PROPERTY_DATA_ISSUE',
|
||||
} as const
|
||||
export type ReviewEntityType = typeof ReviewEntityType[keyof typeof ReviewEntityType]
|
||||
|
||||
// ── Task Status ───────────────────────────────────────────────────────────────
|
||||
|
||||
export const ReviewTaskStatus = {
|
||||
PENDING: 'PENDING',
|
||||
IN_REVIEW: 'IN_REVIEW',
|
||||
APPROVED: 'APPROVED',
|
||||
REJECTED: 'REJECTED',
|
||||
NEEDS_MORE_DATA: 'NEEDS_MORE_DATA',
|
||||
ESCALATED: 'ESCALATED',
|
||||
} as const
|
||||
export type ReviewTaskStatus = typeof ReviewTaskStatus[keyof typeof ReviewTaskStatus]
|
||||
|
||||
// ── Priority ──────────────────────────────────────────────────────────────────
|
||||
|
||||
export const ReviewPriority = {
|
||||
HIGH: 'HIGH',
|
||||
MEDIUM: 'MEDIUM',
|
||||
LOW: 'LOW',
|
||||
LOW: 'LOW',
|
||||
MEDIUM: 'MEDIUM',
|
||||
HIGH: 'HIGH',
|
||||
CRITICAL: 'CRITICAL',
|
||||
} as const
|
||||
export type ReviewPriority = typeof ReviewPriority[keyof typeof ReviewPriority]
|
||||
|
||||
export const ReviewQueueStatus = {
|
||||
PENDING: 'PENDING',
|
||||
IN_REVIEW: 'IN_REVIEW',
|
||||
COMPLETED: 'COMPLETED',
|
||||
} as const
|
||||
export type ReviewQueueStatus = typeof ReviewQueueStatus[keyof typeof ReviewQueueStatus]
|
||||
// ── Note ──────────────────────────────────────────────────────────────────────
|
||||
|
||||
export interface ReviewQueueItem {
|
||||
export interface ReviewNote {
|
||||
id: string
|
||||
matchId: string
|
||||
needId: string
|
||||
propertyId: string
|
||||
matchScore: number
|
||||
content: string
|
||||
createdBy: string
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
// ── Task ──────────────────────────────────────────────────────────────────────
|
||||
|
||||
export interface ReviewTask {
|
||||
id: string
|
||||
entityType: ReviewEntityType
|
||||
entityId: string
|
||||
title: string
|
||||
description?: string
|
||||
priority: ReviewPriority
|
||||
status: ReviewQueueStatus
|
||||
status: ReviewTaskStatus
|
||||
assignedTo?: string
|
||||
notes?: string
|
||||
dueAt?: string
|
||||
organizationId?: string
|
||||
createdBy: string
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
dueDate?: string
|
||||
reviewNotes: ReviewNote[]
|
||||
relatedOrganizationId?: string
|
||||
// Risk / confidence context
|
||||
confidenceScore?: number
|
||||
riskLevel?: string
|
||||
// AI-output context
|
||||
promptVersion?: string
|
||||
// Legacy compat (match-based items)
|
||||
matchId?: string
|
||||
needId?: string
|
||||
propertyId?: string
|
||||
matchScore?: number
|
||||
}
|
||||
|
||||
// ── Backward-compat aliases ───────────────────────────────────────────────────
|
||||
|
||||
export type ReviewQueueItem = ReviewTask
|
||||
export type ReviewQueueStatus = ReviewTaskStatus
|
||||
|
||||
/** @deprecated use ReviewTaskStatus */
|
||||
export const ReviewQueueStatus = ReviewTaskStatus
|
||||
|
||||
Reference in New Issue
Block a user