# Video Sync Multi-Session · Next Session Pickup (2026-05-21)

> 给下一个新 session AI 接力 Video Sync Multi-Session 任务。**起手前必读本文件 + 链接的真源**。

## 1. 当前状态快照（2026-05-20 收尾）

### Figma 真源（`Micro-Apps-20250923`, fileKey `DtZcMkhNy6qh6jbQQnhreQ`）

| Section / Frame | Node ID | 状态 |
|---|---|---|
| Target page | `4083:8424` | — |
| PRD spec section | `4093:85` | ✅ done（双语 5 卡） |
| **Plan A section**（Mockup v8+） | `4119:198` | ✅ 5 frames + 12 双语 Design Rules card |
| M0 · Single Session | `4139:1376` | ✅ |
| M1 · Multi-Session Default | `4119:199` | ✅ |
| M2 · Row Expanded | `4139:988` | ✅ |
| M3 · OFF Row Selected | `4165:950` | ✅（本 session 主交付 frame） |
| M4 · Sync Completion Event | `4210:1715` | ✅（Toast 用户手动加 + 文案已同步 `Sync session #N`）|
| Design Rules card | `4166:1231` | ✅ 12 双语 rules（含新加 "Session bootstrap"）|
| **Plan B section** | `4186:1478` | ✅ Switch toggle alt |
| ~~M5 Empty State~~ | — | ❌ **不存在**（PP 自动 bootstrap Session #1） |

### 关键决策（已 frozen）

- **2-state model**: ON `Syncing` / OFF `Inactive` — 无 Failed/Done/Idle 独立状态
- **PP page-level 1:N** — LEFT 顶 PP sub-panel 持有
- **Parameters per-session** — RIGHT header `Parameters (Sync session #N)` BRAND 绿绑定
- **Session naming = sequence number** `Sync session #1..#5`（不用 free-text，因此**无需 name 定义入口**）
- **0-session 不存在** — PP 自动 bootstrap Session #1
- **Selected indicator** — 1-side left BRAND rail **4px**（= `--sp-xxs` token）+ Layer_3 fill
- **视觉层级**（最终版）：
  - Row 主标题 = `Sync session #N`（Roboto Medium 14 White，主视觉锚点）
  - Slot 信号 = `Slot N/Ch X-X ⇄ Slot M/Ch Y-Y`（Roboto Regular 12 Text_2 灰，次要详情）
  - A:/B: prefix = Roboto Regular 12 Tips 灰（弱化）
  - Delta = Roboto Mono 28（数字）+ 14（ms）+ trend icon
  - Parameters header = `Parameters` SemiBold 18 White + `(Sync session #N)` Medium 16 **BRAND 绿**

### 本 session 跨帧已同步（手动 fan-out，未抽 component）

每次改动需 propagate 到 M0/M1/M2/M3/M4/PlanB 6 帧 + Parameters/RIGHT 6 header。具体在 handoff doc 中。

## 2. Pending Backlog（按优先级）

### 🟠 (d) **抽 session row file-local component**（高优 architectural）

把当前 6 帧 clone 模式抽成 1 个 file-local component master + variants。一旦抽完，未来改动**一处自动同步全部**，本 session 反复跨帧 fan-out 的痛点消失。

**设计 variant 轴（candidate）**：
- `state` × 2: `ON` / `OFF`
- `selected` × 2: `Yes` / `No`
- `expanded` × 2: `Yes` / `No`
- → 2×2×2 = 8 variants

但不是全 8 都需要：
- ON + expanded → exists (M0/M2)
- ON + collapsed selected → exists (M1)
- OFF + expanded selected → exists (M3)
- OFF + collapsed (with history meta) → exists (M1 rows 3/4)
- OFF + collapsed (never-started) → exists (M1 row 5)

推荐先做 4 个核心 variants：
- `ON-collapsed-selected`
- `ON-expanded-selected`
- `OFF-collapsed-unselected`
- `OFF-expanded-selected`

其余通过 component property override 处理。

**步骤建议**：
1. 在 page 上建 file-local Components SECTION (类似 `3261:1467` MicroApps Local Components section)
2. 基于 M3 Row 3 (4165:1450) 作 OFF-expanded-selected base → 抽 master
3. 复制 + 改 variant property 生成另 3 个 variants → 用 figma.combineAsVariants
4. swap 6 帧的 ~25 个 row clone 为 instance + 设置对应 variant
5. 删 obsolete clone 节点

**风险**：override（session #N 文字 / slot 数字 / meta line）容易出错；需逐 frame 验证 visual 不漂移。

### 🟢 别的 backlog

- **(c)** M4 section auto-fit — 用户手动改 Toast 后如有 bounds 漂移，跑 Q9 fit check
- **(f) 部分续作** — §5.5 中 TVU-general 部分实际迁出到 `tvu-design-system/docs/internal/domain-tvu.md`（本 session 仅加 reference 标注，未实际迁移）

### PM Confirmation Pending

发 PM 邮件已包含 8 项 design decisions 和 4 项 open questions。等回复确认（特别注意 cardinality 1 PP : N sessions / per-session Parameters / 2-state model / Retry semantics 这几条）。

## 3. 起手必读链路（按序）

1. 本文件 ↑
2. `MicroApps/docs/2026-05-20-video-sync-m3-walkthrough-fix.md` ← 本 session 完整 handoff，含视觉层级 2 次翻转 + Parameters header 3 次重设计 + Empty state 取消决策 等所有 decision history
3. `MicroApps/docs/MICROAPPS_PRODUCT_CONTEXT.md` §5.5（layout 硬规则 + 真源 reference note）
4. `tvu-design-system/docs/internal/mockup-conventions.md` 全文（特别 M38 selected indicator + M-FONT + M-TXT-ICON-AUDIT）
5. `tvu-design-system/docs/internal/design-process.md` — **新加** M-PRD-EG / M-CARDINALITY / M-IA-FIRST 3 条
6. `tvu-design-system/docs/internal/figma-component-catalog.md` Badge 段（**新加** ON=BRAND Green Tag=Line entry）
7. `tvu-design-system/docs/internal/figma-technical-reference.md` Q9-Q12

## 4. 新 session 起手协议（必走）

```
Step 1: Read this pickup doc + 起手必读链路 7 步 ↑
Step 2: 跑 5 个 cardinality self-check (M-CARDINALITY 新规则)
        (a) element transient/persistent?
        (b) state count + lifecycle?
        (c) 历史 visibility?
        (d) cardinality 各对象 (1:1 / 1:N / N:M)?
        (e) parent switch 时子对象怎么变?
Step 3: 若 PRD 含 "例如/e.g." → 显式问 user 哪些 in-scope (M-PRD-EG 新规则)
Step 4: Multi-object feature → 先产 IA 树 + Selection model 再开画 (M-IA-FIRST 新规则)
Step 5: 若给 reference image → 产 5-row probe table
Step 6: 进 Phase 0 / 实施
Step 7: post-build audit (M31/M32/M-FONT/M-TXT-ICON-AUDIT/M-LOCAL-COMP/M38 4px rail/Selected indicator unification/Page state label terminology)
Step 8: handoff doc update + ledger append + section auto-fit (Q9)
```

## 5. 关键 ID 速查

| 用途 | Node ID / Key |
|---|---|
| Section | `4119:198` (Plan A) / `4186:1478` (Plan B) |
| Imported library masters | Badge `4db5246d...` / Button/dark M `12b38c8b...` / Tab/Item `2267405386...` / Switch `bf16e8f5...` / Notification `23535120dbdc93bf90af9a118b5091e58b590dc6` / icon/Arrow/Next `d9dfd8e0...` / icon/Arrow/Dropdown `eba15c0b...` / icon/file/synced `bc428d1b...` / icon/Edit/Close `6d8d8ef0...` |
| File-local State Pill SET | `3261:1480` (variants: Inactive `3261:1468` / Preview `3261:1471` / On-air `3261:1474` / Analyzing `3261:1477`) |
| Plan B baseline (clone source) | Top bar `842:24310` / PP select `842:34886` / Stream A/B inner dropdown `861:35252` / Parameters/Video Sync master `915:24487` / Plan B Content `842:34818` |
| TVU dark palette hex | `#141414` L1 / `#1F1F1F` L2 / `#262626` L3 / `#353535` L4+Deep Divider / `#FFFFFF` Head / `#F8F8F8` T1 / `#CCCCCC` T2 / `#9E9E9E` Tips / `#7B7B7B` Placeholder / `#2FB54E` Brand / `#EA4233` Red / `#F68512` Orange / `#3892F3` Blue |
| TVU Spacing tokens | `--sp-xxs:4 / --sp-xs:8 / --sp-s:12 / --sp-m:16 / --sp-l:24 / --sp-xl:32 / --sp-xxl:40 / --sp-xxxl:56` |
| Selected rail 宽度 | **4px (`--sp-xxs`)** — 5 处统一（M0/M1/M2/M3/M4 已对齐） |

## 6. 当前 Figma 状态 spot check（起手验证用）

跑这个 verify 当前 state（确认手上的 Figma file 跟本 pickup doc 同步）：

```js
// 在新 session 起手 use_figma 跑一次：
const m3 = await figma.getNodeByIdAsync('4165:950');
const rail = await figma.getNodeByIdAsync('4165:1450'); // M3 selected row
const paramHeader = await figma.getNodeByIdAsync('I4165:1022;842:24358');
return {
  m3Exists: !!m3,
  railWidth: rail ? rail.strokeLeftWeight : null,  // 应该 = 4
  paramHeaderText: paramHeader ? paramHeader.characters : null  // 应该 = "Parameters (Sync session #3)"
};
```

预期输出：`{ m3Exists: true, railWidth: 4, paramHeaderText: "Parameters (Sync session #3)" }`

不匹配 → 文件可能被人改过，先 ask user 当前状态再继续。
