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
466 changes: 233 additions & 233 deletions Cyrano/package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion apps/lexfiat/client/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
},
"rules": {
"react/prop-types": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
"@typescript-eslint/explicit-module-boundary-types": "off",
"react/react-in-jsx-scope": "off"
},
"overrides": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Brain, AlertTriangle, FolderOpen, Handshake, Gavel, BarChart3, FileText, MessageSquareText, Users, Settings } from "lucide-react";
import { Brain, AlertTriangle, FolderOpen, Handshake, Gavel, BarChart3, FileText, MessageSquareText, Users } from "lucide-react";
import { Skeleton } from "@/components/ui/skeleton";

interface WorkflowModulesProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import WorkflowCustomizer from "./workflow-customizer";

interface WorkflowPipelineProps {
cases: any[];
redFlags: any[];
dashboardStats: any;
cases: unknown[];
redFlags: unknown[];
dashboardStats: Record<string, unknown> | null | undefined;
intakeMetrics?: { today: number; pending: number };
isLoading: boolean;
}
Expand All @@ -24,7 +24,7 @@
}

export default function WorkflowPipeline({
cases,
cases: _cases,

Check warning on line 27 in apps/lexfiat/client/src/components/dashboard/workflow-pipeline.tsx

View check run for this annotation

codefactor.io / CodeFactor

apps/lexfiat/client/src/components/dashboard/workflow-pipeline.tsx#L27

'_cases' is defined but never used. (@typescript-eslint/no-unused-vars)
redFlags,
dashboardStats,
intakeMetrics,
Expand Down Expand Up @@ -56,8 +56,8 @@
icon: Mail,
type: 'intake',
metrics: [
{ label: 'Today', value: intakeMetrics?.today || dashboardStats?.intake_today || 24 },
{ label: 'Pending', value: intakeMetrics?.pending || dashboardStats?.intake_pending || 3 }
{ label: 'Today', value: intakeMetrics?.today ?? (dashboardStats?.intake_today as number) ?? 24 },
{ label: 'Pending', value: intakeMetrics?.pending ?? (dashboardStats?.intake_pending as number) ?? 3 }
]
},
{
Expand All @@ -67,8 +67,8 @@
icon: Brain,
type: 'analysis',
metrics: [
{ label: 'Processing', value: dashboardStats?.analysis_processing || redFlags.length || 5 },
{ label: 'Red Flags', value: redFlags.length || dashboardStats?.red_flags_count || 2 }
{ label: 'Processing', value: (dashboardStats?.analysis_processing as number) ?? redFlags.length ?? 5 },
{ label: 'Red Flags', value: redFlags.length ?? (dashboardStats?.red_flags_count as number) ?? 2 }
]
},
{
Expand All @@ -78,8 +78,8 @@
icon: FileText,
type: 'review',
metrics: [
{ label: 'Drafts Ready', value: dashboardStats?.drafts_ready || 6 },
{ label: 'In Progress', value: dashboardStats?.drafts_in_progress || 3 }
{ label: 'Drafts Ready', value: (dashboardStats?.drafts_ready as number) ?? 6 },
{ label: 'In Progress', value: (dashboardStats?.drafts_in_progress as number) ?? 3 }
]
},
{
Expand All @@ -89,8 +89,8 @@
icon: CheckCircle,
type: 'output',
metrics: [
{ label: 'Awaiting', value: dashboardStats?.awaiting_review || 8 },
{ label: 'Urgent', value: dashboardStats?.urgent_review || redFlags.filter((f: any) => f.priority === 'critical').length || 1 }
{ label: 'Awaiting', value: (dashboardStats?.awaiting_review as number) ?? 8 },
{ label: 'Urgent', value: (dashboardStats?.urgent_review as number) ?? (redFlags as Array<{priority: string}>).filter((f) => f.priority === 'critical').length ?? 1 }
]
}
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@ export default function WorkflowStageItem({
className={`workflow-stage ${stageClass} ${isDragging ? 'dragging' : ''}`}
draggable={true}
data-stage={stageId}
role="button"
tabIndex={0}
onDragStart={onDragStart}
onDragOver={onDragOver}
onDragEnd={onDragEnd}
onClick={onClick}
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') onClick(); }}
>
<div className="track-connector"></div>
<div className="track-shoe"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ import {
CheckCircle2,
Clock,
AlertCircle,
ArrowRight
} from "lucide-react";
import { Button } from "@/components/ui/button";
import { Badge } from "@/components/ui/badge";

interface WorkflowStatusPanelsProps {
Expand Down Expand Up @@ -79,7 +77,10 @@ export function WorkflowStatusPanels({
{/* Panel 1: Incoming */}
<div
className="bg-panel-glass rounded-lg p-6 border border-panel-border hover:border-primary/50 transition-colors cursor-pointer"
role="button"
tabIndex={0}
onClick={() => onActionClick?.("view", "incoming")}
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') onActionClick?.("view", "incoming"); }}
>
<div className="flex items-center justify-between mb-4">
<h3 className="text-lg font-semibold text-foreground flex items-center gap-2">
Expand All @@ -96,10 +97,21 @@ export function WorkflowStatusPanels({
{status?.incomingRespond ? (
<div
className="flex items-center justify-between p-3 bg-muted/20 rounded hover:bg-muted/30 transition-colors"
role="button"
tabIndex={0}
onClick={(e) => {
e.stopPropagation();
onActionClick?.("respond", "incoming");
}}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {
e.stopPropagation();
if (e.key === " ") {
e.preventDefault();
}
onActionClick?.("respond", "incoming");
}
}}
>
<div className="flex items-center gap-2">
<MessageSquare className="h-4 w-4 text-primary" />
Expand All @@ -115,10 +127,13 @@ export function WorkflowStatusPanels({
{status?.incomingReviewForResponse ? (
<div
className="flex items-center justify-between p-3 bg-muted/20 rounded hover:bg-muted/30 transition-colors"
role="button"
tabIndex={0}
onClick={(e) => {
e.stopPropagation();
onActionClick?.("review_for_response", "incoming");
}}
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') onActionClick?.("review_for_response", "incoming"); }}
>
<div className="flex items-center gap-2">
<Eye className="h-4 w-4" style={{ color: 'var(--status-warning)' }} />
Expand All @@ -134,10 +149,13 @@ export function WorkflowStatusPanels({
{status?.incomingReviewAndFwd ? (
<div
className="flex items-center justify-between p-3 bg-muted/20 rounded hover:bg-muted/30 transition-colors"
role="button"
tabIndex={0}
onClick={(e) => {
e.stopPropagation();
onActionClick?.("review_and_fwd", "incoming");
}}
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') onActionClick?.("review_and_fwd", "incoming"); }}
>
<div className="flex items-center gap-2">
<Forward className="h-4 w-4 text-primary" />
Expand All @@ -153,10 +171,13 @@ export function WorkflowStatusPanels({
{status?.incomingReadFyi ? (
<div
className="flex items-center justify-between p-3 bg-muted/20 rounded hover:bg-muted/30 transition-colors"
role="button"
tabIndex={0}
onClick={(e) => {
e.stopPropagation();
onActionClick?.("read_fyi", "incoming");
}}
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') onActionClick?.("read_fyi", "incoming"); }}
>
<div className="flex items-center gap-2">
<FileText className="h-4 w-4 text-muted-foreground" />
Expand All @@ -179,7 +200,10 @@ export function WorkflowStatusPanels({
{/* Panel 2: In Progress */}
<div
className="bg-panel-glass rounded-lg p-6 border border-panel-border hover:border-primary/50 transition-colors cursor-pointer"
role="button"
tabIndex={0}
onClick={() => onActionClick?.("view", "in_progress")}
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') onActionClick?.("view", "in_progress"); }}
>
<div className="flex items-center justify-between mb-4">
<h3 className="text-lg font-semibold text-foreground flex items-center gap-2">
Expand All @@ -196,10 +220,13 @@ export function WorkflowStatusPanels({
{status?.draftsInProgress ? (
<div
className="flex items-center justify-between p-3 bg-muted/20 rounded hover:bg-muted/30 transition-colors"
role="button"
tabIndex={0}
onClick={(e) => {
e.stopPropagation();
onActionClick?.("drafts_in_progress", "in_progress");
}}
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') onActionClick?.("drafts_in_progress", "in_progress"); }}
>
<div className="flex items-center gap-2">
<FileText className="h-4 w-4 text-primary" />
Expand All @@ -215,10 +242,13 @@ export function WorkflowStatusPanels({
{status?.itemsWaitingForReview ? (
<div
className="flex items-center justify-between p-3 bg-muted/20 rounded hover:bg-muted/30 transition-colors"
role="button"
tabIndex={0}
onClick={(e) => {
e.stopPropagation();
onActionClick?.("items_waiting_review", "in_progress");
}}
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') onActionClick?.("items_waiting_review", "in_progress"); }}
>
<div className="flex items-center gap-2">
<Eye className="h-4 w-4" style={{ color: 'var(--status-warning)' }} />
Expand All @@ -241,7 +271,10 @@ export function WorkflowStatusPanels({
{/* Panel 3: Ready */}
<div
className="bg-panel-glass rounded-lg p-6 border border-panel-border hover:border-primary/50 transition-colors cursor-pointer"
role="button"
tabIndex={0}
onClick={() => onActionClick?.("view", "ready")}
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') onActionClick?.("view", "ready"); }}
>
<div className="flex items-center justify-between mb-4">
<h3 className="text-lg font-semibold text-foreground flex items-center gap-2">
Expand All @@ -258,10 +291,13 @@ export function WorkflowStatusPanels({
{status?.draftsReady ? (
<div
className="flex items-center justify-between p-3 bg-muted/20 rounded hover:bg-muted/30 transition-colors"
role="button"
tabIndex={0}
onClick={(e) => {
e.stopPropagation();
onActionClick?.("drafts_ready", "ready");
}}
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') onActionClick?.("drafts_ready", "ready"); }}
>
<div className="flex items-center gap-2">
<FileText className="h-4 w-4" style={{ color: 'var(--status-success)' }} />
Expand All @@ -277,10 +313,13 @@ export function WorkflowStatusPanels({
{status?.reviewsPending ? (
<div
className="flex items-center justify-between p-3 bg-muted/20 rounded hover:bg-muted/30 transition-colors"
role="button"
tabIndex={0}
onClick={(e) => {
e.stopPropagation();
onActionClick?.("reviews_pending", "ready");
}}
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') onActionClick?.("reviews_pending", "ready"); }}
>
<div className="flex items-center gap-2">
<CheckCircle2 className="h-4 w-4" style={{ color: 'var(--status-success)' }} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ import { useQuery } from '@tanstack/react-query';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
import {
Shield,
CheckCircle,
XCircle,
AlertTriangle,
TrendingUp,
FileText,
Filter,
Download,
RefreshCw
} from 'lucide-react';
Expand All @@ -43,7 +41,7 @@ interface EthicsCheck {
blocked: boolean;
complianceScore: number;
warnings: string[];
checkDetails?: any;
checkDetails?: unknown;
}

interface EthicsDashboardProps {
Expand Down
Loading
Loading