Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
174e85f
build(frontend): add React Flow dependency
huyanxius Aug 10, 2026
34ae8c3
fix(character): align workflow run ownership
huyanxius Aug 10, 2026
e067459
docs(character): document workflow run ownership
huyanxius Aug 10, 2026
2f29a4f
feat(workflow-editor): compose real workflow session
huyanxius Aug 10, 2026
6636aa1
feat(workflow-editor): render controlled workflow canvas
huyanxius Aug 10, 2026
571633b
feat(app): lazy-load workflow editor route
huyanxius Aug 10, 2026
8463cc2
feat(workflow-controller): accept character setup input
huyanxius Aug 10, 2026
4acd99b
feat(workflow-editor): add character setup form
huyanxius Aug 10, 2026
3f7b927
test(workflow-editor): cover character setup submission
huyanxius Aug 10, 2026
5e11ff7
docs(workflow-editor): add PR screenshots
huyanxius Aug 10, 2026
870b4f2
feat(workflow-editor): publish reviewed character actions
huyanxius Aug 10, 2026
4e42ee2
test(export): cover reviewed action publishing
huyanxius Aug 10, 2026
4aa623d
test(workflow-editor): cover asset publication order
huyanxius Aug 10, 2026
2e13bb2
fix(workflow-editor): make asset publication state explicit
huyanxius Aug 10, 2026
6f2ed41
test(workflow-editor): cover explicit character refresh
huyanxius Aug 10, 2026
f12b2fc
fix(workflow-editor): scope canvas state to nodes, roles and branches
huyanxius Aug 11, 2026
7cfa9c3
refactor(workflow-editor): move page styles to tailwind utilities
huyanxius Aug 11, 2026
89c5c03
perf(workflow-editor): reuse settled generation results across run up…
huyanxius Aug 11, 2026
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion frontend/API_CONTRACT.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ Character

前端只映射后端真实字段:

- Character:`id`、`project_id`、`name`、`description`、`reference_image_url`、`character_data.version`、`status`
- Character:`id`、`project_id`、`workflow_run_id`、`name`、`description`、`reference_image_url`、`character_data.version`、`status`
- Outfit:`id`、`name`、`description`、`preview_url`、`actions`
- Action:`id`、`type`、`name`、`loop`、`fps`、`frame_count`、`frames`
- Frame:`index`、`image_url`、`duration_ms`

Outfit、Action、Frame 没有独立端点。`outfit.characterId` 与 `action.outfitId` 仅由嵌套关系推导;修改任一子项时通过 `PATCH Character` 提交完整 `character_data`。
创建 Character 时必须传入 `workflow_run_id`;编辑器也只读取与当前 WorkflowRun 绑定的角色,不能从同项目角色中按顺序猜测。

## 二、本轮明确不实现

Expand Down
246 changes: 243 additions & 3 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"typecheck": "tsc -b"
},
"dependencies": {
"@xyflow/react": "^12.11.2",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"react-router": "^8.3.0"
Expand Down
18 changes: 15 additions & 3 deletions frontend/src/app/app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { lazy, Suspense } from 'react'
import { BrowserRouter, Navigate, Route, Routes } from 'react-router'

import { AssetLibraryPage } from '@/pages/asset-library'
Expand All @@ -9,10 +10,13 @@ import { ProjectDetailPage } from '@/pages/project-detail'
import { ProjectCreatePage } from '@/pages/project-create'
import { ProjectsPage } from '@/pages/projects'
import { QuickStartPage } from '@/pages/quick-start'
import { WorkflowEditorPage } from '@/pages/workflow-editor'
import { ProtectedRoute } from '@/features/auth-guard'
import { AppShellRoute } from './layout'

const WorkflowEditorPage = lazy(() =>
import('@/pages/workflow-editor').then(({ WorkflowEditorPage: Page }) => ({ default: Page })),
)

/**
* 路由表与全局外壳。
* 页面自己获取所需数据,不再由 app 层构造服务后逐层传入。
Expand All @@ -27,6 +31,14 @@ export function App() {
)
}

function LazyWorkflowEditorPage() {
return (
<Suspense fallback={<div aria-label="正在加载工作流编辑器" />}>
<WorkflowEditorPage />
</Suspense>
)
}

/** 路由声明独立导出,测试用 MemoryRouter 验证直达地址。 */
export function AppRoutes() {
return (
Expand All @@ -38,8 +50,8 @@ export function AppRoutes() {
<Route path="/quick-start/:runId" element={<QuickStartPage />} />
<Route path="/projects" element={<ProjectsPage />} />
<Route path="/projects/new" element={<ProjectCreatePage />} />
<Route path="/workflow-editor/:runId" element={<WorkflowEditorPage />} />
<Route path="/workflow-editor/:runId/:stage" element={<WorkflowEditorPage />} />
<Route path="/workflow-editor/:runId" element={<LazyWorkflowEditorPage />} />
<Route path="/workflow-editor/:runId/:stage" element={<LazyWorkflowEditorPage />} />
<Route path="/playtest/:characterId/:outfitId" element={<PlaytestPage />} />
</Route>
<Route path="*" element={<NotFoundPage />} />
Expand Down
Loading