Skip to content

[v2] 任务页工作区、用工作流处理(mock)和第 3 段演示镜头 - #353

Merged
EricWvi merged 12 commits into
ora-space:mainfrom
ObsisMc:feat/1003-task-workflow-mock
Nov 10, 2026
Merged

EricWvi merged 12 commits into
ora-space:mainfrom
ObsisMc:feat/1003-task-workflow-mock

Conversation

@ObsisMc

@ObsisMc ObsisMc commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Refs ora-space/circus#1003

v2,不涉及 specs。依赖 #342:本分支包含它的两个提交,#342 合并后这里的差异会自动变小。

改了什么

  • 任务运行的工作区接口:新增 /api/v2/tenants/{tid}/tasks/{taskid}/runs/{rid}/workspace,能读任务的成员都能读。
  • 任务页工作区:页头的「工作区」打开屏幕上这次运行的文件和 diff,占掉右侧属性栏,并标明正在看哪次运行。
  • 用工作流处理(mock):VITE_DEMO_MOCK=1 时,任务负责人可以选工作流、编辑需求后启动。运行是真实的,运行和任务的关联、预填需求是 mock,已登记到 src/lib/demo/registry.ts,跑完由负责人手动提交验收。
  • 运行结果文案:去掉「再跑一次」的提示,只读视图没有这个按钮。这段文案对话页也在用。
  • 第 3 段镜头:team-split、team-human、team-review,登记时替换了 lead-decompose。lead-decompose.ts 保留,video/README.md 还拿它做例子。

出片

镜头共用一个环境连着录,顺序不能换;环境每次启动都会重置数据,改动任何一个镜头都要从 team-split 重录。

# 1. 构建带 mock 的前端
cd frontend-v2 && VITE_DEMO_MOCK=1 npm run build

# 2. 仓库根目录,起合成环境(后端 8190),把它自带的前端移开
ORA_DEMO_WEB_PORT=5199 task v2:demo

# 3. frontend-v2,用构建产物提供页面
V2_SERVER=http://127.0.0.1:8190 VITE_DEMO_MOCK=1 npx vite preview --host 0.0.0.0 --port 5192 --strictPort

# 4. frontend-v2/video,依次录制
export VIDEO_BASE_URL=http://127.0.0.1:5192
npm run record -- team-split
npm run record -- team-human
npm run record -- team-review

# 5. 录完渲染,可以停掉环境
npm run render -- team-split out/team-split.mp4
npm run render -- team-human out/team-human.mp4
npm run render -- team-review out/team-review.mp4

单独改文案、不改操作时也要重录,因为旁白长度决定时间线。只改合成部分(如角标)不用重录,重新渲染即可。

验证

  • frontend-v2 的 npm run check(780 个单测)、frontend-v2/video 的 npm run check 通过;v2-server 只跑了 internal/server、internal/store、internal/taskrun,通过。
  • 按上面的步骤在合入最新 main 的 ce1c9248 上录完三个镜头:team-split 44.4 秒、team-human 45.5 秒、team-review 27.8 秒,共约 118 秒。之后只改了章节页的 03 / 编号,不影响时间线,没有再录。真实运行的耗时每次不同,时长会有几秒浮动。
  • 这次只录制到帧,没有渲染,渲染在此前的版本上走过。录制会提示两处变焦间隔不到 3 秒,以及 team-review 末句定格补 1.7 秒,不影响出片。
  • 本地未跑 npm run e2e,以 CI 为准。

已知问题

  • 390px 手机宽度下工作区布局偏挤,视频不受影响。
  • 工作流运行中也能提交验收,视频里不会碰到。
  • 长 UUID 地址栏和放大时的左侧裁切来自共用录制工具,这里没动。

The run view took its tenant from the chat store, down to the Theater's node sessions, so no
other page could host it. A host now passes its tenant, can show the run read-only and can put its
own control at the start of the header. Chat is unchanged.
A split only said it was running, and nothing listed what a task had run. The task page now has
a 工作流 tab between Agent 运行 and 讨论: a list of the runs, each opening the chat page's run view,
read-only because a run started there would not belong to the task. Starting a split opens its
run; an open run folds the subtasks and hides the composer to give the graph the room. The demo
video's shot opens the folded subtasks.
An Agent run on a task has its own checkout, but only conversations and
workflow runs exposed theirs. Anyone who can read the task can read its
runs, so the same members can read what those runs changed.
The task page could show a run but not what it changed, so reviewing a
task meant leaving it. The header's 工作区 opens the checkout of the run on
screen in place of the side column, and names that run, since every run
has its own checkout. The run view hands its panel to the page hosting it.
The server cannot tie a workflow run to a task yet, so with
VITE_DEMO_MOCK=1 the assignee gets 用工作流处理: pick a workflow, edit the
requirement and start a real run, which the task lists as its own. The
link between run and task is mocked and registered in lib/demo.
A read-only run view has no such button, and the result card shows there
too.
Three shots on one environment: 陈默 splits a requirement and assigns it,
苏芮 handles a task with a workflow and submits it, 陈默 reviews 苏芮's
changes and accepts them.
…flow-mock

# Conflicts:
#	frontend-v2/src/lib/demo/registry.ts
#	frontend-v2/video/src/shots/index.ts
…flow-mock

# Conflicts:
#	frontend-v2/video/src/shots/index.ts
…flow-mock

# Conflicts:
#	frontend-v2/video/src/shots/index.ts
…flow-mock

# Conflicts:
#	frontend-v2/src/features/chat/workflow-run/run-pane.tsx
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