sync: project quota, provider status, todo triage, and full diffs to the phone

Four Mac surfaces the iOS remote couldn't render now ride the wire,
forward-compatibly (decodeIfPresent defaults; unknown HostMsg tags
already decode to .unknown):

- DashboardSnapshot gains `usage` (WireSubscriptionUsage — the Mac's
  5-hour/weekly quota gauges) and `statusFeeds` (WireStatusFeed —
  active provider incidents); the host re-pushes the dashboard when a
  poll changes either.
- WireTodo gains `triage` (raw TriageLevel name); the phone renders
  the Mac's TriageBadge honoring the encouraging/classic label
  setting.
- ClientMsg.fetchDiff / HostMsg.sessionDiff deliver the full worktree
  patch on demand (capped at 512 KB with a truncated flag), gated on
  the new WireCapabilities.canFetchDiff so a new phone never sends it
  to an old host. iOS renders a file list + colored unified patch,
  falling back to the diffstat summary against older hosts.

Round-trip and legacy-decode tests cover the new fields; the full
suite passes apart from the pre-existing fake-backend fixture gaps
and the flaky nvrsion lock-domain test (same failure rate on the
base commit).

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
2026-07-02 16:06:32 -07:00
co-authored by Claude Fable 5
parent a33ab80313
commit 480b29207f
6 changed files with 438 additions and 8 deletions
@@ -138,6 +138,7 @@ struct QuickTodos: View {
}.buttonStyle(.plain)
Text(todo.summary?.isEmpty == false ? todo.summary! : todo.text)
.font(.subheadline).lineLimit(1)
if let triage = todo.triage { TriageBadge(rawLevel: triage) }
Spacer()
if let name = todo.projectName {
Text(name).font(.caption2).foregroundStyle(.secondary)