Skip to content

refactor(quick-start): align with six-node workflow controller - #215

Merged
nighca merged 13 commits into
1024XEngineer:mainfrom
xyh202131:feat/quick-start-animation-review
Aug 11, 2026
Merged

refactor(quick-start): align with six-node workflow controller#215
nighca merged 13 commits into
1024XEngineer:mainfrom
xyh202131:feat/quick-start-animation-review

Conversation

@xyh202131

Copy link
Copy Markdown
Contributor

重新送审说明

本次更新

  • Quick Start 与 Workflow Editor 共用六节点 Workflow Controller,界面形式不同但推进规则一致。
  • Service 绑定单个 WorkflowRun Session,避免每次操作重新构造 Controller。
  • 支持角色母版上传、动作首帧与完整动画生成、审核以及发布到 Playtest。
  • Generation 与 Media 调用使用统一 Bearer Token,由后端解析用户身份。
  • 发布流程在 Playtest 写入成功后再通过审核,失败可重试;恢复旧 Run 时不再按角色列表顺序猜测绑定。

验证

Closes #95 的后续重新送审。

@xyh202131
xyh202131 requested a review from nighca August 11, 2026 11:12
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
windup Ready Ready Preview Aug 11, 2026 11:12am

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found two correctness issues in paginated character/workflow recovery paths; both can make an otherwise valid Quick Start run fail or create a duplicate run.

Local test execution was unavailable because the checked-out workspace has no executable Vitest/TypeScript binaries.

const run = controller.getWorkflow()
const firstFrame = latestActionFirstFrame(run)
if (!firstFrame || firstFrame.type !== 'action-first-frame') return null
const page = await characterApis.listByProject(run.projectId)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Page through character records when resolving the asset

listByProject(run.projectId) uses the API default page size and only examines that first page. Once a project has more characters than that default, a valid character bound to this run can be omitted, so approveReview() reports WorkflowRun 缺少角色或造型绑定 and publishing fails even though the asset exists. Please paginate until total is covered (or add a server-side lookup by workflowRunId).

if (!workflowRunApis.listByProject) {
throw new Error('工作流列表服务尚未配置,不能为现有角色增加动作')
}
const listed = await workflowRunApis.listByProject(character.projectId, {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Do not cap workflow lookup at the first 100 runs

startAction() searches only this single page for the character's existing run. For a project with more than 100 workflow runs, the matching run may be on a later page; the code then creates a second run for the same character instead of appending to the existing one. That can duplicate the workflow and later make character resolution ambiguous. Please paginate all pages or use a backend query keyed by characterId/workflowRunId.

@nighca nighca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先这样吧

return unauthorizedRecoveryProviders.at(-1)
}

/** 供不能使用 ApiClient 的流式或原始响应适配器复用会话恢复。 */

@nighca nighca Aug 11, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: 不是这个 PR 的问题,不过顺便提一嘴,流式请求也是可以(且应该)走 ApiClient 的,对 ApiClient 进行正确的抽象就行

return stop
}

function createSession(controller: WorkflowController): QuickStartSession {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: 概念越来越多不是个好事儿 🤣

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是这样,我们后面会把概念给简单一点,现在主要是我们和后端对的不是很好,然后导致对概念的不同。

@nighca
nighca merged commit ff8726d into 1024XEngineer:main Aug 11, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants