feat: F015 shortlist management

3-panel Shortlists page with left list, center detail, right decision brief panel. AddToShortlistDialog wired into result feed cards and match detail. Full DRAFT→REVIEW_READY→FINALIZED workflow, AI-generated decision brief draft, duplicate prevention, and compare-view integration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Sutter
2026-05-16 21:10:06 +02:00
parent 2753d1717c
commit 65130efca7
22 changed files with 1079 additions and 195 deletions
+18 -2
View File
@@ -2,6 +2,7 @@ import { useNavigate } from 'react-router'
import { MatchCardCompact } from '../match-card/MatchCardCompact'
import { buildMatchCardViewModel } from '../../features/matching/matchCardAdapter'
import { useCompareStore } from '../../stores/compareStore'
import { useShortlistStore } from '../../stores/shortlistStore'
import type { UnifiedMatchResult } from '../../domain/unifiedResult'
import type { MatchCardAction } from '../match-card/MatchCardViewModel'
@@ -9,9 +10,17 @@ interface Props {
result: UnifiedMatchResult
}
function getResultTitle(result: UnifiedMatchResult): string {
if (result.resultType !== 'FUTURE_AVAILABILITY') {
return (result as any).property?.title ?? result.matchId
}
return (result as any).signal?.companyName ?? result.matchId
}
export function UnifiedResultCard({ result }: Props) {
const navigate = useNavigate()
const { addToCompare, removeFromCompare, isInCompare, isFull } = useCompareStore()
const { openAddDialog } = useShortlistStore()
const inCompare = isInCompare(result.matchId)
const actions: MatchCardAction[] = [
@@ -20,8 +29,15 @@ export function UnifiedResultCard({ result }: Props) {
label: 'Shortlist',
actionType: 'SAVE_SHORTLIST',
variant: 'secondary',
disabled: true,
onClick: () => {},
onClick: () => openAddDialog({
resultId: result.matchId,
resultType: result.resultType,
title: getResultTitle(result),
matchScore: result.matchScore,
confidenceScore: result.match.confidenceLevel,
sourceLabel: result.resultType,
addedBy: 'admin@ideal-sharing.ch',
}),
},
{
id: 'compare',