Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 30 additions & 4 deletions src/components/ReportDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1398,10 +1398,36 @@ export function ReportDetail({ report, allReportsForTarget, allReports = [], onD
</Badge>
)}
{isEventDeleted && (
<Badge variant="destructive" className="flex items-center gap-1">
<ShieldX className="h-3 w-3" />
Event Deleted
</Badge>
<Tooltip>
<TooltipTrigger asChild>
<Badge variant="destructive" className="flex items-center gap-1 cursor-help">
<ShieldX className="h-3 w-3" />
{decisionLog.isDeleted ? 'Removed by Moderation'
: (decisionLog.isAutoHidden && !decisionLog.isAutoHideRestored) ? 'Auto-Hidden'
: isUserBanned ? 'User Banned'
: moderationStatus.isEventBanned ? 'Event Banned'
: 'Not Found on Relay'}
</Badge>
</TooltipTrigger>
<TooltipContent side="bottom" className="max-w-xs">
{decisionLog.isDeleted ? (
<p className="text-xs">
Deleted via relay admin
{decisionLog.decisions.find(d => d.action === 'delete_event' || d.action === 'delete')?.created_at &&
` on ${new Date(decisionLog.decisions.find(d => d.action === 'delete_event' || d.action === 'delete')!.created_at).toLocaleDateString()}`
}
</p>
) : (decisionLog.isAutoHidden && !decisionLog.isAutoHideRestored) ? (
<p className="text-xs">Auto-hidden by AI classification</p>
) : isUserBanned ? (
<p className="text-xs">User is banned — event removed as part of ban</p>
) : moderationStatus.isEventBanned ? (
<p className="text-xs">Event is in the relay ban list</p>
) : (
<p className="text-xs">Event not found on relay. May have been self-deleted by the author or never stored here.</p>
)}
</TooltipContent>
</Tooltip>
)}
{isPendingReview && (
<Badge variant="outline" className="flex items-center gap-1 border-orange-500 text-orange-600">
Expand Down
1 change: 1 addition & 0 deletions src/hooks/useDecisionLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export function useDecisionLog(targetId: string | null | undefined) {
return getDecisions(targetId);
},
enabled: !!targetId,
staleTime: 30_000, // Cache decisions for 30s when navigating between reports
});

// Check if target has any decisions
Expand Down
Loading