Repository navigation
新增:导演实时生产流程图 + 修复英文书名/章节标题语言跟随(#333) - #334
ExplosiveCoderflome wants to merge 10 commits into
Conversation
…prompts, and invocation telemetry
…s lanes with high-contrast states
…lock stage covers and illustrated craft view
…h Book Atlas layout
…er with full-width toggle
…iewport drawer over director panel
There was a problem hiding this comment.
Important
A paused auto-director run renders as idle in the new production flow graph: every paused branch keys off cursorStepId, which the control transition clears on pause.
Approach: sound — the graph is a read-only server projection over run control, artifacts and invocation records, reusing the Prompt Workbench flow definitions instead of maintaining a second copy, and the title fix moves language-specific limits out of static Zod schemas into postValidate so English and Chinese each keep their own rules.
Reviewed changes — the full 47-file diff: the new production-flow projection and route plus its client canvas, inspector and output tab; the English book/chapter-title language plumbing across prompts, schemas and repair paths; and the supporting i18n, docs, release notes and tests.
- Production flow projection — new
projectDirectorProductionFlow/readDirectorProductionFlowandGET /director-next/novels/:novelId/production-flow, deriving per-step status from run control, artifacts, live batch phase andLlmInvocationUsageRecord. - Production flow UI — lazily loaded canvas/layout reusing Prompt Workbench flow definitions, right-edge inspector drawer with output/prompts/executions tabs, chapter scoping and 8s polling.
- English title language — language-aware limits and validation in
titleGeneration.shared, both title prompts,chapterTitleDiversity, chapter-list prompt/repair, andwritingLanguageresolution through the volume and director call chains. - Supporting — Prompt Workbench
?promptId=&version=deep links, i18n keys, wiki pages, release notes and two new test files.
Non-blocking
- The flow header's token count is not a book total.
readDirectorProductionFlowsumssummary.totalTokens/totalInvocationsover thetake: 400invocation window (productionFlow.ts#L842), but the header presents it as the book total (ProductionFlowView.tsx#L185). For a full-length book with more than 400 calls the figure silently under-reports; use a separate aggregate query or label it as recent activity. - Chinese chapter summaries lost their 240-character schema cap.
volumeGenerationSchemasraisessummaryto 420 andtitleto 80 for every language (volumeGenerationSchemas.ts#L400); the English-specific rules live inpostValidate, but no Chinese summary limit was added there, so the wiki's "Chinese rules unchanged" claim does not hold for summaries. - Flow node subtitles are Chinese-only. The new
statusReason/outputSummarystrings are hardcoded Chinese (productionFlow.ts#L392) and the client renders them directly, so an English-writing novel sees Chinese subtitles inside an otherwise localized view.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
| if (control?.status === "running" && control.cursorStepId === cursorId) { | ||
| return { status: "running", reason: opts.runningReason ?? "正在执行本步骤", reviewRoute: null }; | ||
| } | ||
| if (control?.status === "paused" && control.cursorStepId === cursorId) { |
There was a problem hiding this comment.
pause clears cursorStepId in applyControlEvent (server/src/modules/director/domain/control.ts), so control.cursorStepId === cursorId is never true while the run is paused. This branch, the paused branch in resolveActiveStepId, and missionPaused / batchPaused can never fire, so a paused run renders as idle and productionFlowStatusPaused (plus the paused CSS states) is unreachable UI.
Technical details
# Paused/failed runs have no node state in the production flow projection
## Affected sites
- `server/src/app/director/workspace/productionFlow.ts:414` — paused check in `liveStatus` never matches.
- `server/src/app/director/workspace/productionFlow.ts:267` — `resolveActiveStepId` paused branch switches on a null cursor.
- `server/src/app/director/workspace/productionFlow.ts:554` and `:598` — `missionPaused` / `batchPaused` require the cleared cursor.
- `server/src/modules/director/domain/control.ts:131` — `pause` sets `cursorStepId = null`; `fail` does the same.
## Required outcome
- A paused run must surface which step is paused (or at least a paused run state) in the flow graph.
- `productionFlowStatusPaused` and the paused node styling should only ship if they are reachable.
## Suggested approach (optional)
- Derive the paused step from `control.pause` plus the last `step_started` event, or map the paused chapter job's `currentStage` the way `readProductionProjection` does for running runs.
## Open questions for the human (optional)
- Should the flow graph represent `failed` runs at all, or is failure intentionally left to the task center?
将
feat/production-flow-graph-and-issue-333合入 beta,包含两部分:1. 新版导演实时生产流程图
2. 修复 #333:英文创作时书名与章节标题仍为中文
Closes #333