附录 B:术语、状态机与不变量速查
1. 术语
| 术语 | 含义 |
|---|---|
| Native Home | 移动端用原生 HomeContainer 渲染的 Home surface |
| Home Store | Home 的语义状态、section payload、navigation、shell 和 authority revision 来源 |
| snapshot | 可序列化的 native display projection |
| slot | React 内容挂入原生 host 的命名位置 |
| owner | scopeKey + sessionId,标识当前展示上下文 |
| scopeKey | wallet/account/network/all-networks 等业务作用域的稳定字符串 |
| sessionId | 一次 renderer/container session 的身份 |
| handoff | tab 不在 native inline 渲染,而是发 command 交给另一条 route |
| critical chunk | 决定首屏可渲染 shell/navigation 的快照块 |
| authority revision | Store 对某一组 command 的当前版本号 |
| collapse offset | header/tabs 已折叠的垂直距离 |
2. State 不变量
text
owner.scopeKey 非空
owner.sessionId 非空
tab id 非空且唯一
section id 在各 tab 内非空且唯一
selectedTabId 必须存在
selectedTab 必须是 inline
inline tab 不得有 handoffCommandId
handoff tab 必须有非空 handoffCommandId
handoff tab 的 sections 必须为空3. Intent 不变量
text
intentId 非空
intent.owner 合法
selectTab: tabId 必须是支持的 tab
refresh: tabId 合法且 requestId 非空
action: commandId 非空,itemId 可选但必须是 string
handoff: tabId 合法且 commandId 非空4. Owner 变化状态机
5. Refresh 状态机
6. Cache 命中条件
text
route 可解码
manifest current 或 previous 可解码
owner/partition/generation/schema 匹配
critical descriptor 和 raw 的 byteLength 匹配
critical 可解码且不是 loading shell
需要的 source chunks 至少能构造可渲染 display snapshot只满足“磁盘里有数据”不算命中。