docs(plan): schedule the orphan tmux session client parity work

The server half shipped 2026-07-30 as feature A (4892fa7/f6ef19e/d39a0ab) and
both native clients are at zero. This is NOT a regression — OrphanSessionInfo is
deliberately a separate type rather than a flag on LiveSessionInfo, and
src/server.ts:600 names the reason: the clients decode /live-sessions, so a
variant shape there would have broken them.

It is worth planning anyway because SessionManager.shutdown only detaches the
tmux client for tmux-backed sessions (manager.ts:410-417), so a server restart
or a desktop-app quit turns every session into an orphan. The web launcher lists
them and re-adopts on tap; the phone still shows an empty list — which is the
walk-away case this product exists for.

The plan doc carries the eleven traps a client implementer will hit, each one a
shipped review finding or a documented server subtlety — notably that preview
returns cols/rows of literally 0 (both clients currently size thumbnails from
that response), that a 429 must not collapse to "no orphans", and that the
destructive confirmation must come from count-idle rather than card count (that
one nearly ended 33 shells while the dialog said 24).

Also corrects two now-false claims found while cross-referencing: the ROADMAP
row for tmux discovery was half-stale, and ANDROID_CLIENT_PLAN's do-not-consume
list still listed POST /projects/worktree (both clients consume it now) and
GET /sessions (iOS consumes it, Android does not — so "match iOS" now argues
for building it, not against).
This commit is contained in:
Yaojia Wang
2026-07-30 18:25:09 +02:00
parent 97e39949a8
commit f000a9d979
4 changed files with 119 additions and 1 deletions

View File

@@ -598,6 +598,18 @@ W5 验收(report-only, 并行)
Android instrumented 腿(`TinkAccessTokenStoreTest` 是令牌静态加密的唯一证明需真机或模拟器CI 上暂设为
`workflow_dispatch` 触发——理由写在 `android.yml` 文件头:没人见它绿过的腿若设为必过,只会逼出一个假绿)。
### 7.2 已排期未开工 —— 同样不新编 `T-iOS-*` 号
- **`[ ]` 孤儿 tmux 会话feature A 的客户端半边)** · **Effort: M** · 计划见
[`docs/plans/w7-orphan-session-clients.md`](./plans/w7-orphan-session-clients.md)。
服务端 2026-07-30 已上线五条路由(`4892fa7`/`f6ef19e`/`d39a0ab`**iOS 与 Android 均为零接入**。
**不是回归**`OrphanSessionInfo` 被刻意做成独立类型而非 `LiveSessionInfo` 上的 flag`src/server.ts:600`
写明理由就是"两个原生客户端解码 `/live-sessions`,在那里加变体形状会破坏它们"——既有解码器不受影响。
**但值得做**`SessionManager.shutdown` 对 tmux 会话只 `pty.kill()` 断开客户端、不杀 shell
`src/session/manager.ts:410-417`),所以**服务器一重启 / 桌面 app 一退出,所有会话都变成孤儿**。
网页 launcher 已能列出并一键重新接管,**手机上却是一个空列表**——正是本项目"走开后从手机上看"的核心用例。
开工前须按 §7 的 P2 门槛先扩写 RED 清单(写进该计划文档的 `## RED test list` 节),未扩写不得分派。
### P0 — 每日可用("口袋里能开终端、能批准")· 合计 ~13 人天
#### W0 · 基础(串行)