删掉节点的「说明」字段 —— 它填得进、存得下,却从来画不出来

`sub` 声称是「画布上的第二行小字」,但画笔里那支只在 `variant !== 'business'`
(步骤图)才走,而全仓的调用点一律是 business:这个字段写了、存了、
一次也没显示过。属性面上那句提示是句假话。

整条清:属性面的一行 · `ProcessNode.sub`(契约) · `FlowNode.sub` ·
图↔包两处映射 · 画笔里那支画不出来的分支(连同它带来的「两种画法」分叉,
现在节点框里就一行活动名) · 节点宽度算法里 `node.sub || node.ghost` 的宽框判据
(sub 没了,只剩 ghost 决定宽窄)。

存量数据不受影响:库里没有一条带 sub 的定义(查过),schema 非严格,
真有旧值也只是解析时被剥掉。

五闸绿;契约快照随本提交入库(去一个可选字段,加法的反面,无下游)。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
2026-07-29 17:48:12 +08:00
co-authored by Claude Opus 5
parent 28623cd1cb
commit 6cff6ab34c
8 changed files with 14 additions and 80 deletions
+1 -2
View File
@@ -29,7 +29,6 @@ export interface FlowNode {
/** Case 节点引用的库案例 id(cases[].id):L2 只是引用,下钻编辑共享库案例。 */
caseRef?: string;
label: string;
sub?: string | undefined;
code?: string;
ghost?: boolean;
note?: string;
@@ -265,7 +264,7 @@ function nodeWidth(node: FlowNode, m: Metrics, shrink: number): number {
case "callout":
return m.calloutW;
case "activity":
return Math.max(80, (node.sub || node.ghost ? m.actWide : m.actW) - shrink);
return Math.max(80, (node.ghost ? m.actWide : m.actW) - shrink);
}
}