feat(ios,android): P2 wave, git panel, token UX, per-host WS token, docs

App layer, four sequential slices (a shared .xcodeproj means adding files
regenerates it, so these could not run in parallel):

- token UX end to end: pairing prompts for a token when a host 401s, POST /auth
  validates it, and 204-without-Set-Cookie is correctly read as "this server has
  auth disabled" rather than "authenticated". A host paired before the token was
  turned on recovers by re-pairing in place. Remove-host now exists and finally
  gives PushRegistrar.handleHostRemoved a caller.
- project git panel + worktree lifecycle (T-iOS-32) + claude --resume history —
  the parity gap with Android and the web front end.
- terminal search (T-iOS-33) and voice PTT (T-iOS-31) with an epoch guard so a
  session switch between dictation and confirm cannot inject into the wrong
  session.
- theme + Dynamic Type (T-iOS-34) and web ?join= interop (T-iOS-35). RootView no
  longer hard-locks .preferredColorScheme(.dark).

Also unpins SwiftTerm to 1.15.0 by dropping the local hasActiveSelection that
collided with the upstream one, verified green from a fresh derivedDataPath.

Includes the two HIGH fixes the security review found:
- iOS resolved the WS token host-independently, so a token-gated host sitting
  next to an open one could never open a terminal and no on-screen remedy could
  fix it. Now one transport per host; cross-host leakage is structurally
  impossible since both read paths return only that host's own value.
- Android reported the host's own git-credential 401 (git-ops.ts:108, "Push
  authentication required on the host.") as "your access token is wrong", because
  a blanket 401 mapping ran ahead of the per-route one. Git-write routes are now
  ROUTE_DEFINED and keep the server's message.

And the doc sync: README/ios README no longer claim the client is unmerged on
feat/ios-client, the Clients section finally lists Android, and the plan
checkboxes reflect what is actually built.

iOS 534 app tests + 452 package tests; Android 687 tests.
This commit is contained in:
Yaojia Wang
2026-07-30 15:57:41 +02:00
parent 9114630c3a
commit 284cfd193a
70 changed files with 10271 additions and 358 deletions

View File

@@ -52,19 +52,24 @@ packages:
#
# PINNED, not floating (`from:`). The generated .xcodeproj — and with it
# Package.resolved, which lives inside the bundle — is gitignored, so every
# agent/CI run re-resolves from scratch: `from: 1.13.0` silently drifted to
# 1.15.0 and broke the App target, because SwiftTerm v1.14.0 added
# `public var hasActiveSelection` to iOSTerminalView, colliding with the
# same-named property TerminalScreen.swift:328 declares on its subclass
# (`error: overriding non-open property outside of its defining module` —
# unfixable with `override`, since SwiftTerm's is public, not open).
# 1.13.0 is the newest tag whose API the current App source compiles against.
# To raise the pin: first drop TerminalScreen.swift's local
# `hasActiveSelection` and use SwiftTerm's public one (that file is owned by
# the terminal-screen task, not by project.yml).
# agent/CI run re-resolves from scratch, and a floating `from:` would silently
# drift to whatever is newest. An exact pin makes every agent/CI run resolve
# the SAME source (the earlier drift 1.13.0 → 1.15.0 is what broke the App
# target); raising it is a deliberate, verified edit.
#
# History (T-iOS-33/31 root fix): v1.14.0 added `public var hasActiveSelection`
# to iOSTerminalView, which collided with a same-named property the App
# declared on its `TerminalView` subclass — and `override` cannot fix it,
# since upstream's is `public`, not `open`. The fix was to DROP the local
# property and use upstream's (identical semantics: `selection?.active ??
# false`, vs. the local `canPerformAction(copy)` which SwiftTerm answers from
# the same flag). Done in TerminalScreen.swift, so the pin now rides at
# 1.15.0, which also brings `searchMatchSummary` (a "2/14" match counter the
# find bar can adopt later — deliberately not consumed yet, so the pin stays
# revertible).
SwiftTerm:
url: https://github.com/migueldeicaza/SwiftTerm
exactVersion: 1.13.0
exactVersion: 1.15.0
targets:
WebTerm: