chore: add reference docs, scripts, tests, demo, prototypes

- Reference docs: known issues, user journey, location redesign, mission merge plan
- Scripts: fill_location_state, merge_missions, migrate_location, migrate_state
- Tests: e2e test suite, asset entries unit tests
- Demo: location board, hifi prototypes, test screenshots
- Data backup: asset log entries and state nodes
- Update .gitignore

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-01 15:29:47 +08:00
co-authored by Claude Opus 4.7
parent f4909765af
commit e1d601a774
190 changed files with 11464 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
# Known Issues — Schema Migration + Mission Merge (2026-05-31)
## P0 — Logic Errors
1. `_entry_state_label()` aggregates ALL unique labels from all state nodes in an interval, rather than returning the most recent one at simulation time.
- Merged entries show "Transfer; Exploration" instead of the time-correct state.
2. `_entry_location()` returns the FIRST state node's location (by time), not the most recent one.
3. Merged entries' `state_label` field contains semicolons from `merge_group()`, producing "Transfer > Exploration" via `_display_multi_value_text()`.
## P1 — Missing Data Display
4. Detail page entry table: location and state_label columns are empty (fields dropped from `asset_log_entries`).
5. Timeline: state_labels array is always empty — data isn't propagated from state nodes.
6. Location board: state grouping is broken for ST-01/ST-02/XH-01/XH-02 due to aggregated labels.
## P2 — Form / Edit
7. Event point location is a free-text input instead of dropdown, and value is lost on submit.
8. Edit form: state node location/state dropdowns may not be pre-populated correctly.
## P3 — Data Quality
9. Star Port Station state_label has encoding issues (Chinese garbled text).
10. Some auto-migrated state nodes have raw titles as state_label (e.g. "Reconfiguring to ST-02").
## P4 — Architecture
11. Solar Shuttle 2/3 show "No Active Interval" at 2060-08-11 — needs investigation.
---
## Resolution Status
- P0-P4: Documented 2026-05-31. To be addressed after state/location redesign.
+183
View File
@@ -0,0 +1,183 @@
---
name: ksp-admin-user-journey
description: "Current-state and ideal-state User Journey for the KSP管理后台 admin panel"
metadata:
type: project
---
# KSP管理后台 — User Journey
## 版本
- **v1 (current)**: 2026-05-30, based on codebase audit of 32 routes, 25 templates
- **v2 (ideal)**: in design — sidebar + topbar layout, live mission overview as homepage
## 当前系统架构
```
KSP管理后台 (32 routes, 25 templates)
├── 📊 仪表盘 (/) — 硬编码静态指标
├── 🔧 零件参考库
│ ├── 引擎目录 (/engines) — CRUD + 变体管理
│ ├── 通信部件 (/communications) — CRUD
│ ├── 燃料箱规格 (/tanks) — CRUD
│ └── 载具成本 (/vehicles) — CRUD
├── 🚀 任务运营 (核心)
│ ├── 状态看板 (/mission-preview/status-board)
│ ├── 地点看板 (/mission-preview/location-board)
│ ├── 任务列表 (/missions)
│ ├── 任务资产 (/assets) — 资产CRUD + 日志条目CRUD
│ └── 时间线 (/mission-preview/timeline)
├── 🔧 工具
│ └── 燃料换算 (/fuel-converter)
└── 📡 API (/api/v1/*)
```
## 当前 User Journey (v1)
### Journey 1: 查看任务态势
1. 打开首页 → 看到硬编码静态指标 (Tracked Assets: 14, Active Missions: 6)
2. 点「任务运营」→ 进入 `/mission-preview/status-board`
3. 看到按状态分组的资产卡片
4. 顶部有模拟时间显示和编辑表单
5. 改时间 → Apply Time → 页面刷新
### Journey 2: 管理资产日志
1. 从状态看板点资产 → `/assets/<uuid>`
2. 看到: 当前快照, 未来事件, 日志条目表格(分页)
3. [新增状态区间] → 表单(start_at, end_at, title, state_label, location, note)
4. [新增事件点] → 表单(at_time, title, location, note)
5. 提交 → 回到资产详情
### Journey 3: 全局时间线
1. 任务运营 → 时间线标签
2. 甘特图风格, 按日/月/年缩放
3. 状态区间为色条, 事件为节点
### Journey 4: 零件参考
1. 顶部导航 → 引擎目录/通信部件/燃料箱/载具成本
2. 表格列表(搜索, 排序, 筛选) → 详情 → 编辑
## 当前 UX 痛点
1. 首页硬编码假数据, 无运营价值
2. 导航扁平, 8个同级项, 无主次
3. URL中 `/mission-preview/` 暗示"预览", 实际是正式功能
4. 两套并行看板(status/location)各自独立
5. 模拟时间藏在页面头部, 视觉权重不足
6. 资产CRUD需4层导航
7. 零件库与任务系统无关联
8. 无面包屑, 操作后丢失上下文
9. 视觉风格简陋, 无设计系统
## 理想 User Journey (v2) — 设计决策
### 已确认的设计决策
- **首页**: 实时任务态势总览(整合状态看板 + 即将发生事件 + 关键指标)
- **导航**: 侧边栏(功能导航) + 顶部栏(全局控制)
- **零件库**: 降级为"数据中心"二级模块
### 理想布局
```
┌──────────────────────────────────────────────────┐
│ 顶部栏: [Logo] 🕐 2060-08-11 [编辑] │
├────────────┬─────────────────────────────────────┤
│ 侧边栏 │ 内容区 │
│ │ │
│ 🏠 任务总览│ 关键指标 | 状态看板 | 30天事件 │
│ 📋 任务运营│ │
│ ├ 资产 │ │
│ ├ 列表 │ │
│ └ 时间线 │ │
│ 📊 数据中心│ │
│ ├ 引擎 │ │
│ ├ 通信 │ │
│ ├ 燃料箱 │ │
│ └ 载具 │ │
│ 🔧 工具 │ │
└────────────┴─────────────────────────────────────┘
```
### 理想 Journey 概览
1. 打开系统 → 任务总览(实时指标 + 状态看板 + 30天事件)
2. 调整时间 → 顶部栏编辑 → 全局刷新 → 写入DB
3. 管理资产 → 侧边栏进资产列表 → 搜索筛选 → 详情 → 编辑日志
4. 时间线 → 侧边栏直接进入, 缩放/筛选
5. 参考数据 → 侧边栏数据中心展开 → 各CRUD表格
---
## Asset 面板 — 功能缺口 (v1 → v2 扩展)
### 数据库变更
新增 `docking_events` 表:
```sql
CREATE TABLE docking_events (
id UUID PRIMARY KEY,
parent_asset_id UUID REFERENCES assets(id),
child_asset_id UUID NULL REFERENCES assets(id),
child_label VARCHAR(255) NULL, -- 当对接非追踪Asset时使用
docked_at TIMESTAMPTZ NOT NULL,
undocked_at TIMESTAMPTZ NULL, -- NULL = 仍在对接中
dock_note TEXT NULL,
undock_note TEXT NULL,
created_at TIMESTAMPTZ NOT NULL,
updated_at TIMESTAMPTZ NOT NULL
);
```
### 新增功能
#### 1. 对接载具面板
- 显示当前模拟时间下已对接的载具列表
- 每个载具: 名称(链接) / 对接时间 / 备注 / [移除]按钮
- 查询: `WHERE docked_at <= sim_time AND (undocked_at IS NULL OR undocked_at > sim_time)`
#### 2. "对接到了哪个 Asset" 面板
- 当前 Asset 作为子方对接到的父方 Asset
- 同样基于 docking_events 查询
#### 3. 新增对接流程
输入:
- 对接时间 (默认=模拟时间)
- 对接载具 (两种分支)
- A: 选择已有Asset
- B: 输入字符串
- 备注信息 (可选)
保存逻辑:
- **A (selected asset)**:
- 对**双方Asset**执行:
- 查找覆盖对接时间的日志区间
- 若存在: 在该日志下新增 state node ("X 对接到 Y", detail=备注, at=对接时间)
- 若不存在: 新建以对接时间为起始、end_at=NULL的日志区间 + state node
- **B (string)**:
- 仅对**当前Asset**执行上述操作
- state node title 为 "Echo Shuttle 对接到 <当前Asset名称>"
#### 4. 移除对接流程
输入:
- 分离时间 (默认=模拟时间)
- 备注信息 (可选)
保存逻辑:
- 对**有 selected asset 记录的对接**:
- 查找 docked_at 等于对接时间、undocked_at=NULL 的日志
- 若存在: 新增分离 state node,设置日志 end_at = 分离时间
- 若不存在: 查找覆盖分离时间的日志 → 新增 state node
- 若仍不存在: 新建 event point 记录分离
- 对**字符串记录的对接**:
- 仅对当前Asset执行上述操作
#### 5. 位置快速编辑
- 当前位置从日志派生,仅做展示
- 新增快速编辑入口,直接修改最新活跃日志的 location 字段
### 当前Asset面板已有功能 (保留)
- Asset名称/类别/日志数量/当前状态/当前任务
- 日志列表(分页+筛选)
- 未来事件列表
- 新增 event point / 状态区间
- 编辑日志条目
- 修改Asset名称/类别/退役状态
- 全局时间调节 (DB持久化)
+85
View File
@@ -0,0 +1,85 @@
# Location & State Label 从 Interval 迁移到 State Node
## 设计决策
**`location``state_label` 不再绑定到 `asset_log_entries`state interval),而绑定到 `asset_state_nodes`state node)。**
### 动机
合并 Outbound/Operations/Inbound 后,一个任务条目会跨越多个 location 和 state
- 出发段 → location=Transfer, state=Transfer
- 到达后 → location=Mars, state=Surface Expedition
- 返航段 → location=Transfer, state=Transfer
如果把 location/state_label 保留在 interval 级别,合并后的条目只能有一个 location 和一个 state_label,无法表达任务过程中的变化。
移到 state node 后,每个时间节点可以独立标注位置和状态,时间线渲染也更精准。
### 数据库变更
#### `asset_log_entries` — 删除列
```sql
ALTER TABLE asset_log_entries DROP COLUMN location;
ALTER TABLE asset_log_entries DROP COLUMN state_label;
```
#### `asset_state_nodes` — 新增列
```sql
ALTER TABLE asset_state_nodes ADD COLUMN location VARCHAR(255);
ALTER TABLE asset_state_nodes ADD COLUMN state_label VARCHAR(120);
```
### 数据迁移
现有 interval 的 `location``state_label` 迁移到该 interval 的第一个 state node
- 如果 interval 已有 state node → 将 location/state_label 写入按时间排序的第一个 node
- 如果 interval 无 state node → 创建一个 state nodeat_time = interval.start_at, title = interval.title),写入 location/state_label
### 后端变更
#### Model 层 (`app/models.py`)
```python
# AssetLogEntry: 删除 location 和 state_label 字段
class AssetLogEntry(TimestampMixin, db.Model):
# 删除: location, state_label
...
# AssetStateNode: 新增 location 和 state_label 字段
class AssetStateNode(TimestampMixin, db.Model):
...
location: Mapped[str | None] = mapped_column(String(255))
state_label: Mapped[str | None] = mapped_column(String(120))
```
#### 表单 (`app/templates/asset_entry_form.html`)
- 移除 interval 级别的 location / state_label 输入
- 在 state node 行内增加 location / state_label 输入(每个 node 独立设置)
- Event point 保留 location 字段(作为该时间点的快照)
#### 资产详情 (`app/templates/asset_detail.html`)
- 当前位置:从最近的一个 state node 的 location 派生(而非当前活跃 interval)
- 当前状态:同上,从最近 state node 的 state_label 派生
#### 看板 / 时间线
- 时间线上每个 state node 显示其自身的 location 和 state_label
- 看板按 location/state 分组时,以最新 state node 为准
### 对现有数据的影响
| 表 | 操作 |
|----|------|
| `asset_log_entries` | DROP location, state_label |
| `asset_state_nodes` | ADD location, state_label |
| 现有 interval 数据 | 迁移到首个 state node |
| 表单模板 | 重构 |
| 详情/看板/时间线 | 改为从 state node 读取 |
### 实施顺序
1. **先做合并**mission_merge_plan.md)— 减少条目数,简化后续迁移
2. **再做列迁移**(本文档)— 将 location/state_label 下沉到 state node
3. **最后改前端**— 表单、详情、看板、时间线逐一适配
+445
View File
@@ -0,0 +1,445 @@
# 任务日志合并方案
## 目标
将同一个任务的 Outbound → Operations → Inbound 三条独立日志合并为**一条日志**。Outbound/Inbound 的 transition 事件改为 state node,合并三条日志中原有的 state node。
## 合并规则
### 基本规则
1. **主日志(Operations**为保留对象
-`start_at` 扩展为 Outbound 的 `start_at`
-`end_at` 扩展为 Inbound 的 `end_at`
-`mission_label`, `summary`, `note` 保持不变
-`state_label` 合并三者:`Transfer; <Operations state>; Transfer`(或根据实际节点内容优化)
2. **Outbound 和 Inbound 日志删除**,它们的 state node 迁移到主日志中
3. **关键 transition 事件**以 state node 形式记录在主日志中:
- 从 Outbound 继承:`Crew Arrival`, `Earth Departure`, `<Target> Arrival`
- 从 Inbound 继承:`<Target> Departure`, `Earth Arrival`
4. **特殊处理**
- 如果 Outbound 和 Operations 之间有日期重叠(Outbound end > Operations start),按 Operations start 为准截断 Outbound
- 如果 Inbound 没有 end_at(任务仍在进行中),则保持 end_at 为 NULL
- ST-01 ISSEM-1 包含两个目标(Mercury + Venus),前后两段 transfer → operations → transfer,合并为一个复合任务条目
---
## 受影响资产 & 具体变更
以下用 `>>>` 标记 state node 迁移方向。
---
### 1. XH-01 羲和号
#### 1.1 MMD — Mars Mission Demo
**Before (3 entries):**
```
Outbound 2054-07-10 → 2054-08-21 Transfer Sun [0 nodes]
Ops 2054-08-21 → 2055-01-10 Planetary Ops Mars [0 nodes]
Inbound 2055-01-10 → 2055-02-28 Transfer Sun [1 node]
└─ 2055-02-28: Earth Arrival
```
**After (1 entry):**
```
MMD 2054-07-10 → 2055-02-28 Transfer → Planetary Ops → Transfer Mars
└─ 2055-02-28: Earth Arrival (from Inbound)
```
> 注:Outbound 缺 state node(无 Crew Arrival / Earth Departure / Mars Arrival 记录)。保留空白,后续可补充。
---
#### 1.2 MOCM-1 — Mars One Base Construction Mission 1
**Before:**
```
Outbound 2055-06-15 → 2055-07-30 Transfer Sun [2 nodes]
└─ 2055-06-15: Crew Arrival
└─ 2055-06-18: Earth Departure for Mars
Ops 2055-07-30 → 2056-02-07 Base Construction Mars [0 nodes]
Inbound 2056-02-07 → 2056-03-18 Transfer Sun [1 node]
└─ 2056-03-18: Earth Arrival
```
**After:**
```
MOCM-1 2055-06-15 → 2056-03-18 Transfer → Construction → Transfer Mars
└─ 2055-06-15: Crew Arrival (from Outbound)
└─ 2055-06-18: Earth Departure for Mars (from Outbound)
└─ 2056-03-18: Earth Arrival (from Inbound)
```
---
#### 1.3 MOCM-3 — Mars One Base Construction Mission 3
**Before:**
```
Outbound 2056-07-30 → 2056-09-15 Transfer Sun [2 nodes]
└─ 2056-07-30: Crew Arrival
└─ 2056-08-02: Earth Departure for Mars
Ops 2056-09-15 → 2057-02-12 Base Construction Mars [0 nodes]
Inbound 2057-02-12 → 2057-03-25 Transfer Sun [1 node]
└─ 2057-03-25: Earth Arrival
```
**After:**
```
MOCM-3 2056-07-30 → 2057-03-25 Transfer → Construction → Transfer Mars
└─ 2056-07-30: Crew Arrival (from Outbound)
└─ 2056-08-02: Earth Departure for Mars (from Outbound)
└─ 2057-03-25: Earth Arrival (from Inbound)
```
---
#### 1.4 ME-2 — Mars Expedition 2
**Before:**
```
Outbound 2057-05-05 → 2057-06-22 Transfer Sun [2 nodes]
└─ 2057-05-05: Crew Arrival
└─ 2057-05-09: Earth Departure for Mars
Ops 2057-06-22 → 2058-04-18 Planetary Ops Mars [2 nodes]
└─ 2057-06-25: Mars EDL and surface operations begin
└─ 2058-04-10: Begin Mars Departure preparations
Inbound 2058-04-18 → 2058-05-20 Transfer Sun [2 nodes]
└─ 2058-04-18: Mars Departure for Earth
└─ 2058-05-20: Earth Arrival
```
**After:**
```
ME-2 2057-05-05 → 2058-05-20 Transfer → Planetary Ops → Transfer Mars
└─ 2057-05-05: Crew Arrival (from Outbound)
└─ 2057-05-09: Earth Departure for Mars (from Outbound)
└─ 2057-06-25: Mars EDL and surface operations begin (from Ops)
└─ 2058-04-10: Begin Mars Departure preparations (from Ops)
└─ 2058-04-18: Mars Departure for Earth (from Inbound)
└─ 2058-05-20: Earth Arrival (from Inbound)
```
---
#### 1.5 EE-1 — Europa Expedition 1
**Before:**
```
Outbound 2058-07-10 → 2058-09-25 Transfer Sun [3 nodes]
└─ 2058-07-10: Crew Arrival
└─ 2058-07-12: Earth Departure for Jupiter system
└─ 2058-09-25: Europa Arrival
Ops 2058-09-25 → 2059-07-10 Planetary Ops Jupiter System [7 nodes]
└─ 2058-09-27: Europa descend
└─ 2058-12-15: Europa ascend
└─ 2058-12-20: Begin IO exploration
└─ 2059-01-20: Return to Europa Outpost
└─ 2059-06-20: Begin Europa Outpost departure preparations
└─ 2059-06-25: Crew ascend from Europa Outpost
└─ 2059-07-05: Begin Ganymede exploration
Inbound 2059-07-10 → 2059-11-15 Transfer Sun [0 nodes]
```
**After:**
```
EE-1 2058-07-10 → 2059-11-15 Transfer → Jupiter Exploration → Transfer Jupiter System
└─ 2058-07-10: Crew Arrival (from Outbound)
└─ 2058-07-12: Earth Departure for Jupiter system (from Outbound)
└─ 2058-09-25: Europa Arrival (from Outbound)
└─ 2058-09-27: Europa descend (from Ops)
└─ 2058-12-15: Europa ascend (from Ops)
└─ 2058-12-20: Begin IO exploration (from Ops)
└─ 2059-01-20: Return to Europa Outpost (from Ops)
└─ 2059-06-20: Departure preparations (from Ops)
└─ 2059-06-25: Crew ascend from Europa Outpost (from Ops)
└─ 2059-07-05: Begin Ganymede exploration (from Ops)
```
> 注:Inbound 无 state node,用户已补充:
> - 2059-07-10: Europa DepartureUses standard trajectory with 112km/s of departure burn
> - 2059-11-15: Earth Arrival, parking to Star Port for the first time
> - 2059-11-16: Europa Expedition 1 crew return
---
#### 1.6 EE-3 — Europa Expedition 3 (进行中)
**Before:**
```
Outbound 2060-02-20 → 2060-05-01 Transfer Sun [0 nodes]
Ops 2060-05-01 → (ongoing) Jupiter Exploration Jupiter System [7 nodes]
└─ 2060-05-02: Io Arrival
└─ 2060-05-07: Io descend
└─ 2060-05-09: Io departure
└─ 2060-05-11: Ganymede Arrival
└─ 2060-05-12: Ganymede descend
└─ 2060-05-21: Ganymede Departure for Callisto
└─ 2060-05-25: Callisto Arrival
```
**After:**
```
EE-3 2060-02-20 → (ongoing) Transfer → Jupiter Exploration Jupiter System
└─ (from Ops: all 7 state nodes preserved)
└─ (Outbound 缺 arrival/departure 记录,后续可补充)
```
---
### 2. ST-01 万星源号
#### 2.1 ISSEM-1 — Inner Solar System Exploration Mission 1
**Before (5 entries — 含两个目标):**
```
Mercury Transfer 2055-03-20 → 2055-04-17 Transfer Sun [3 nodes]
└─ 2055-03-20: Crew Arrival
└─ 2055-03-22: Earth Departure for Mercury
└─ 2055-04-17: Mercury Arrival
Mercury Ops 2055-04-18 → 2055-08-14 Planetary Ops Mercury [4 nodes]
└─ 2055-04-18: Orbital Survey of Mercury begins
└─ 2055-06-14: First Crewed Surface Landing on Mercury
└─ 2055-06-15: EVA operations commence
└─ 2055-06-30: Surface operations complete
Venus Transfer 2055-08-15 → 2055-10-01 Transfer Sun [2 nodes]
└─ 2055-08-15: Departure from Mercury for Venus
└─ 2055-10-01: Venus Arrival
Venus Ops 2055-10-01 → 2056-03-24 Planetary Ops Venus [3 nodes]
└─ 2055-10-02: Orbital Survey of Venus begins
└─ 2055-10-10: Landing Probe Deployment
└─ 2055-11-10: Upper Atmosphere Survey via Callisto MPV
Inbound 2056-03-24 → 2056-04-12 Transfer Sun [2 nodes]
└─ 2056-03-24: Departure from Venus for Earth
└─ 2056-04-12: Earth Arrival
```
**After (1 entry):**
```
ISSEM-1 2055-03-20 → 2056-04-12 Planetary Ops Mercury → Venus
└─ 2055-03-20: Crew Arrival (from Mercury Transfer)
└─ 2055-03-22: Earth Departure for Mercury (from Mercury Transfer)
└─ 2055-04-17: Mercury Arrival (from Mercury Transfer)
└─ 2055-04-18: Orbital Survey of Mercury begins (from Mercury Ops)
└─ 2055-06-14: First Crewed Surface Landing on Mercury (from Mercury Ops)
└─ 2055-06-15: EVA operations commence (from Mercury Ops)
└─ 2055-06-30: Surface operations complete (from Mercury Ops)
└─ 2055-08-15: Departure from Mercury for Venus (from Venus Transfer)
└─ 2055-10-01: Venus Arrival (from Venus Transfer)
└─ 2055-10-02: Orbital Survey of Venus begins (from Venus Ops)
└─ 2055-10-10: Landing Probe Deployment (from Venus Ops)
└─ 2055-11-10: Upper Atmosphere Survey (from Venus Ops)
└─ 2056-03-24: Departure from Venus for Earth (from Inbound)
└─ 2056-04-12: Earth Arrival (from Inbound)
```
---
#### 2.2 MOCM-2 — Mars One Construction Mission 2
**Before:**
```
Outbound 2056-06-02 → 2056-07-01 Transfer Sun [4 nodes]
└─ 2056-06-02: Crew Arrival
└─ 2056-06-04: Picking up Mars One construction cargo
└─ 2056-06-06: Earth Departure for Mars
└─ 2056-07-01: Mars Arrival
Ops 2056-07-03 → 2056-10-12 Base Construction Mars [4 nodes]
└─ 2056-07-03: Crew descend to Martian Surface
└─ 2056-07-20: Heavy Cargo Delivery to Surface via Callisto MPV
└─ 2056-09-17: MOCM-3 Crew Arrival via XH-01
└─ 2056-10-12: MOCM-2 Crew ascend to Stellaria
Inbound 2056-10-15 → 2056-11-03 Transfer Sun [2 nodes]
└─ 2056-10-15: Departure from Mars for Earth
└─ 2056-11-03: Earth Arrival
```
**After:**
```
MOCM-2 2056-06-02 → 2056-11-03 Transfer → Construction → Transfer Mars
└─ (合并所有 10 个 state nodes)
```
---
#### 2.3 EOCM-1 — Europa Outpost Construction Mission 1
**Before:**
```
Outbound 2056-12-15 → 2057-02-25 Transfer Sun [4 nodes]
Ops 2057-02-27 → 2057-10-01 Outpost Construction Europa [3 nodes]
Return 2057-10-04 → 2057-12-20 Transfer Europa [2 nodes]
```
**After:** 合并为 1 条目 2056-12-15 → 2057-12-209 个 state node。
---
#### 2.4 SEM-1 — Saturn Exploration Mission 1
**Before:**
```
Outbound 2058-06-01 → 2058-10-12 Transfer Sun [3 nodes]
Ops 2058-10-12 → 2059-07-01 Planetary Ops Saturn System [2 nodes]
Inbound 2059-07-01 → 2059-11-24 Transfer Sun [2 nodes]
```
**After:** 合并为 1 条目 2058-06-01 → 2059-11-247 个 state node。
---
#### 2.5 OSSEM-1 — Outer Solar System Exploration Mission 1 (进行中)
**Before:**
```
Outbound 2060-02-11 → 2060-07-24 Transfer Sun [5 nodes]
└─ 2060-02-11: Leave Star Port
└─ 2060-02-12: Crew and Supply
└─ 2060-02-13: Earth Departure for Neptune
└─ 2060-07-21: Neptune SOI
└─ 2060-07-24: Neptune Arrival Burn
Ops 2060-07-25 → (ongoing) Exploration Neptune [4 nodes]
└─ 2060-07-25: Course Correction Burn
└─ 2060-07-25: Triton Arrival
└─ 2060-08-13: Triton Surface Operation
└─ 2060-11-01: Triton Departure
```
**After:**
```
OSSEM-1 2060-02-11 → (ongoing) Transfer → Exploration Neptune
└─ (合并所有 9 个 state nodes)
```
---
### 3. ST-02 克里斯滕号
#### 3.1 EOCM-2 — Europa Outpost Construction Mission 2
**Before:**
```
Outbound 2057-10-06 → 2058-01-19 Transfer Sun [0 nodes]
Ops 2058-01-19 → 2058-09-06 Outpost Construction Europa [0 nodes]
Inbound 2058-09-06 → 2058-11-08 Transfer Sun [0 nodes]
```
**After:** 合并为 1 条目 2057-10-06 → 2058-11-08,无 state node(所有三段都没有)。
---
#### 3.2 EE-2 — Europa Expedition 2
**Before:**
```
Outbound 2059-04-06 → 2059-06-25 Transfer Sun [3 nodes]
Ops 2059-06-25 → 2060-06-28 Planetary Ops Europa [3 nodes]
Inbound 2060-06-28 → 2060-08-30 Transfer Sun [2 nodes]
```
**After:** 合并为 1 条目 2059-04-06 → 2060-08-308 个 state node。
---
#### 3.3 ME-1 — Mars Expedition 1
这是 ST-02 的一个特例:**只有 Operations 条目,没有 Outbound/Inbound。**
```
Ops 2056-11-19 → 2057-09-08 Planetary Ops Mars [0 nodes]
```
保持不变。
---
### 4. XH-02 太白号
#### 4.1 AEM — Asteroid Exploration Mission
**Before:**
```
Outbound 2057-05-04 → 2057-07-17 Transfer Sun [0 nodes]
Ops 2057-07-17 → 2058-01-04 Asteroid Ops Vesta [0 nodes]
Inbound 2058-01-04 → 2058-04-17 Transfer Sun [0 nodes]
```
**After:** 合并为 1 条目 2057-05-04 → 2058-04-17。
---
#### 4.2 ME-3 — Mars Expedition 3
**Before:**
```
Ops 2058-04-17 → 2059-05-04 Planetary Ops Mars [0 nodes]
Inbound 2059-05-04 → 2059-07-06 Transfer Sun [0 nodes]
```
**After:** 合并为 1 条目 2058-04-17 → 2059-07-06。
> 注:ME-3 没有显式 Outbound(可能 XH-02 在 AEM 返回后直接转入 ME-3)。
---
#### 4.3 ME-4 — Mars Expedition 4 (进行中)
**Before (复杂 — 含两段 outbound/inbound):**
```
ME-3 Inbound 2059-11-04 → 2060-01-06 Transfer Sun [0 nodes]
Uncrewed Outbound 2060-01-22 → 2060-02-27 Transfer Sun [0 nodes]
ME-4 Ops Part 1 2059-10-24 → 2059-11-04 Planetary Ops Mars [2 nodes]
ME-4 Ops Part 2 2060-02-28 → 2060-10-30 Planetary Ops Mars [2 nodes]
ME-4 Outbound 2059-08-04 → 2059-10-24 Transfer Sun [2 nodes]
```
此 case 穿插了 ME-3 返航和无人往返,**单独处理,不纳入本次合并**。
---
### 6. 缺失 Inbound State Node 的条目
以下 Inbound/Return 条目没有任何 state node,需用户补充 departure/arrival 信息:
| Asset | Mission | Inbound 时段 | 备注 |
|-------|---------|-------------|------|
| **XH-01** | EE-1 | 2059-07-10 → 2059-11-15 | ✅ 已补充(见上) |
| **ST-02** | EOCM-2 | 2058-09-06 → 2058-11-08 | 待补充 |
| **XH-02** | AEM | 2058-01-04 → 2058-04-17 | 待补充 |
| **XH-02** | ME-3 (crewed) | 2059-11-04 → 2060-01-06 | 待补充 |
| **XH-02** | ME-3 (uncrewed) | 2059-05-04 → 2059-07-06 | 待补充 |
| **Solar Shuttle 3** | Mars Return | 2060-11-05 → ongoing | 待补充 |
---
### 7. ME-4 (XH-02) — 单独处理
不纳入本次合并。
---
## 汇总
| 受影响 | 条目数 (前 → 后) | 备注 |
|--------|-----------------|------|
| XH-01 | 20 → 8 (+2 已有单条目) | 6 个 merged missions |
| ST-01 | 17 → 6 (+ 若干维护条目) | 5 个 merged (ISSEM-1 五合一) |
| ST-02 | 7 → 3 (+ ME-1 单条) | 2 个 merged |
| XH-02 | 10 → 4 | 2 个 merged (ME-4 待定) |
| JW-01 | 3 → 1 | 1 个 merged |
| Solar Shuttle 2 | 3 → 1 | 1 个 merged |
| **总计** | **~60 → ~23** | **约删 37 条 state 日志** |
---
## 待确认
1. ME-4 (XH-02) 的处理方式 — 它有穿插的时间线和无人往返,需单独讨论
2. Outbound/Inbound 条目中缺失的 arrival/departure state node(如 EE-1 Inbound 完全无 node)是否需要补充?
3. 合并后 title 的命名规则 — 保持 Operations 原 title 还是改用更简洁的命名?
4. state_label 字段 — 合并后是否用分号连接(如 "Transfer; Base Construction; Transfer")还是保留 Operations 的 label