chore: fix frontend build errors and prepare prod configuration
This commit is contained in:
parent
abe47c4bc8
commit
6065b1ff48
13
frontend/package-lock.json
generated
13
frontend/package-lock.json
generated
@ -31,6 +31,7 @@
|
||||
"elkjs": "^0.11.0",
|
||||
"html-to-image": "^1.11.13",
|
||||
"lucide-react": "^0.554.0",
|
||||
"marked": "^17.0.1",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"react-markdown": "^10.1.0",
|
||||
@ -6480,6 +6481,18 @@
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/marked": {
|
||||
"version": "17.0.1",
|
||||
"resolved": "http://npm.repo.lan/marked/-/marked-17.0.1.tgz",
|
||||
"integrity": "sha512-boeBdiS0ghpWcSwoNm/jJBwdpFaMnZWRzjA6SkUMYb40SVaN1x7mmfGKp0jvexGcx+7y2La5zRZsYFZI6Qpypg==",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"marked": "bin/marked.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 20"
|
||||
}
|
||||
},
|
||||
"node_modules/math-intrinsics": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
"elkjs": "^0.11.0",
|
||||
"html-to-image": "^1.11.13",
|
||||
"lucide-react": "^0.554.0",
|
||||
"marked": "^17.0.1",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"react-markdown": "^10.1.0",
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { ChevronRight, ChevronDown, FileText, Folder, FileJson, RefreshCw, GitBranch, GitCommit } from 'lucide-react';
|
||||
import { Card, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { ChevronRight, ChevronDown, FileText, Folder, FileJson, RefreshCw, GitCommit } from 'lucide-react';
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
// Types mirroring the Rust backend
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { useEffect, useCallback, useState } from 'react';
|
||||
import ReactFlow, {
|
||||
Background,
|
||||
Controls,
|
||||
Node,
|
||||
Edge,
|
||||
useNodesState,
|
||||
@ -79,7 +78,7 @@ const useGridLayout = () => {
|
||||
// 1. Topological Sort (Rank-Based Grid)
|
||||
// Calculate Ranks
|
||||
const ranks = new Map<string, number>();
|
||||
const nodeMap = new Map(dagNodes.map(n => [n.id, n]));
|
||||
// const nodeMap = new Map(dagNodes.map(n => [n.id, n])); // Removed unused nodeMap
|
||||
const incomingEdges = new Map<string, string[]>();
|
||||
|
||||
dagNodes.forEach(n => incomingEdges.set(n.id, []));
|
||||
|
||||
@ -81,7 +81,7 @@ export function useSaveAnalysisTemplate() {
|
||||
mutationFn: async ({ id, template }: { id: string, template: AnalysisTemplateSet }) => {
|
||||
return await client.update_template(template, { params: { id } });
|
||||
},
|
||||
onSuccess: (data, variables) => {
|
||||
onSuccess: (_data, variables) => {
|
||||
queryClient.invalidateQueries({ queryKey: ['analysis-templates'] });
|
||||
queryClient.invalidateQueries({ queryKey: ['analysis-template', variables.id] });
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ export async function cropImage(
|
||||
): Promise<string> {
|
||||
const { threshold = 252, padding = 20 } = options; // 252 covers pure white and very light compression artifacts
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
const img = new Image();
|
||||
// Enable CORS if needed, though usually data URLs don't need it
|
||||
img.crossOrigin = "anonymous";
|
||||
|
||||
@ -387,7 +387,7 @@ function OverviewTabContent({ status, tasks, totalTasks, completedTasks }: {
|
||||
)
|
||||
}
|
||||
|
||||
function TaskDetailView({ taskId, task, requestId, mode }: { taskId: string, task?: TaskState, requestId?: string, mode: 'realtime' | 'historical' }) {
|
||||
function TaskDetailView({ taskId, task, requestId }: { taskId: string, task?: TaskState, requestId?: string, mode: 'realtime' | 'historical' }) {
|
||||
const [isInspectorOpen, setIsInspectorOpen] = useState(false);
|
||||
const { setTaskContent } = useWorkflowStore();
|
||||
|
||||
|
||||
@ -190,8 +190,8 @@ export const useWorkflowStore = create<WorkflowStoreState>((set, get) => ({
|
||||
p.status,
|
||||
(p.message === null) ? undefined : p.message,
|
||||
p.progress || undefined,
|
||||
p.input_commit,
|
||||
p.output_commit
|
||||
p.input_commit || undefined, // Explicitly handle null/undefined
|
||||
p.output_commit || undefined
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user