fix: resolve remaining clippy warnings and improve workflow frontend

- Collapse nested if-let in user_service.rs search filter
- Suppress dead_code warning on ApiDoc struct
- Refactor server routing: nest all routes under /api/v1 prefix
- Simplify health check route path
- Improve workflow ProcessDesigner with edit mode and loading states
- Update workflow pages with enhanced UX
- Add Phase 2 implementation plan document
This commit is contained in:
iven
2026-04-11 12:59:43 +08:00
parent 184034ff6b
commit 97d3c9026b
12 changed files with 832 additions and 274 deletions

View File

@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react';
import { useCallback, useEffect, useState } from 'react';
import { Table, Tag } from 'antd';
import type { ColumnsType } from 'antd/es/table';
import { listCompletedTasks, type TaskInfo } from '../../api/workflowTasks';
@@ -15,7 +15,7 @@ export default function CompletedTasks() {
const [page, setPage] = useState(1);
const [loading, setLoading] = useState(false);
const fetch = async () => {
const fetchData = useCallback(async () => {
setLoading(true);
try {
const res = await listCompletedTasks(page, 20);
@@ -24,9 +24,9 @@ export default function CompletedTasks() {
} finally {
setLoading(false);
}
};
}, [page]);
useEffect(() => { fetch(); }, [page]);
useEffect(() => { fetchData(); }, [fetchData]);
const columns: ColumnsType<TaskInfo> = [
{ title: '任务名称', dataIndex: 'node_name', key: 'node_name' },