Files
apes-sidebar/tests
Menghuan1918 6c60693e7d test(terminal): #774 收尾——补 bottomOnly 原生承载面的单元判别性守护
独立验证节点实测:把 src/client/native/index.ts 的 sync() 里
`if (descriptor.bottomOnly === true) continue` 删掉后,14 个相关 spec、158 条
断言全绿,只有挂载 lane 能抓住「原生 guide 条目从 0 变 1」——这半边当时只有
部署级守护。

- tests/native-registration.spec.ts 新增「a bottomOnly descriptor never
  reaches the native surface」:断言注册表的**事件日志**里没有该 id、没有它的
  slot,guide 条目只有 files 与 git;正控(其余描述符确实注册了)在前,所以
  这条不会因为「什么都没注册」而空过。实测删掉那行 skip 后:本次相关的 8 个
  spec / 171 条用例中只有这条红(170 绿)。
- tests/terminal-tab.spec.tsx:「已退出只说一次」那条断言原先**不判别**——
  只翻 info.state 时 statusOf 本来就返回 undefined,门在不在都一样。现在把
  phase 也置为 disconnected(statusOf 有自己的一行),断言状态行恰好 1 个、
  唯一按钮是「新建终端」、且不含 disconnected 文案。实测去掉
  TerminalView.tsx 的 `missing || ended` 门即红。
- tests/terminal-tab.spec.tsx 新增「新建终端」的**真实路由**用例:此前被假
  betterSidebar.updateTab 掩盖,现在接真 service,覆盖 surface.update 认领
  与 store.reduce(patchTab) 两半(bottomOnly 类型永远没有原生记录,落 store
  是它唯一的真实路径)。
- src/client/builtins/tabs.tsx:onClose 不再以 `scope?.sessionId ?? ''` 调宿主
  close(),缺 scope 直接 return——空 sessionId 会让宿主 no-op 并让 shell 一直
  挂着一个 per-session 槽位。
2026-10-06 00:06:37 +08:00
..
2026-09-09 11:15:30 +08:00