Skip to content

附录 B:术语、状态机与不变量速查 ​

1. 术语 ​

术语含义
Native Home移动端用原生 HomeContainer 渲染的 Home surface
Home StoreHome 的语义状态、section payload、navigation、shell 和 authority revision 来源
snapshot可序列化的 native display projection
slotReact 内容挂入原生 host 的命名位置
ownerscopeKey + sessionId,标识当前展示上下文
scopeKeywallet/account/network/all-networks 等业务作用域的稳定字符串
sessionId一次 renderer/container session 的身份
handofftab 不在 native inline 渲染,而是发 command 交给另一条 route
critical chunk决定首屏可渲染 shell/navigation 的快照块
authority revisionStore 对某一组 command 的当前版本号
collapse offsetheader/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

只满足“磁盘里有数据”不算命中。

基于 app-monorepo 2026-07-31 源码快照整理 · 非官方文档