Native iOS companion app (Liquid Glass) — read-only usage mirror over LAN + iCloud#1979
Native iOS companion app (Liquid Glass) — read-only usage mirror over LAN + iCloud#1979brahimhamichan wants to merge 2 commits into
Conversation
…+ iCloud A read-only iPhone companion (iOS 26) that mirrors the WidgetSnapshot the Mac already aggregates — provider windows, credits, token cost — on the Home Screen, Lock Screen, and (optional, off by default) as a Live Activity. Transport is serverless and user-managed: a LAN fast path (Bonjour + Network.framework) plus a CloudKit private-database backbone that keeps widgets and the Lock Screen fresh in the background. Newest generatedAt wins. No credentials are stored on the phone. macOS side (Sources/CodexBar/MobileSync) is opt-in and a no-op unless `mobileSyncEnabled` is set, so existing users are unaffected. A wire-contract test guards the JSON the phone decodes. Closes steipete#1976. Relates to steipete#439, steipete#319. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
ClawSweeper review: did not complete due to Codex infrastructure failure. Reviewed July 7, 2026, 11:12 PM ET / 03:12 UTC. Summary Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Merge readiness This is a ClawSweeper/Codex infrastructure failure, not a PR readiness or patch-quality verdict. Risk before merge
Maintainer options:
Next step before merge
Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against aa401f1d8b74. Label changesLabel changes:
Evidence reviewedWhat I checked:
Likely related people:
How this review workflow works
Review history (1 earlier review cycle)
|
… sample data - Refresh control next to Settings triggers a manual CloudKit/LAN pull with a rotating symbol while in flight. - Gate the DEBUG sample seed behind the `-seed` launch arg (screenshots only), so the shipped app shows the honest "Waiting for CodexBar" state until a live snapshot arrives — never fabricated numbers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
What
A native iOS 26 Liquid Glass companion that mirrors the usage the Mac already aggregates —
provider windows, credits, token cost — on the Home Screen, Lock Screen, and (optional) Live
Activity. It is a read-only mirror: the Mac ships the same
WidgetSnapshot; no providercredentials on the phone. Opposite approach to the earlier POC in #439.
Closes #1976. Relates to #439, #319.
Transport (serverless, user-managed)
_codexbar-sync._tcp(Bonjour) and streams alength-prefixed JSON
SyncEnvelope. Instant on the same Wi-Fi.Screen / Live Activities fresh in the background, anywhere. No server, no CF Worker.
generatedAtwins.Live Activities are off by default (opt-in; no APNs server, so they refresh locally).
Layout
ios/— XcodeGen project (xcodegen generate).Shared/(Foundation-onlyWidgetSnapshotmirror + transport),
CodexBarMobile/(SwiftUI app + Live Activity),CodexBarMobileWidget/(Home + Lock Screen widgets + Live Activity widget). Reuses the CodexBar icon + provider SVGs.
Sources/CodexBar/MobileSync/— macOS publisher (Bonjour listener + CloudKit push), opt-in:a no-op unless
UserDefaults.standard.bool(forKey: "mobileSyncEnabled"). Hooked intoUsageStore.persistWidgetSnapshot(one line).Tests/CodexBarTests/MobileSyncEnvelopeTests.swift— wire-contract guard for the JSON the phone decodes.Testing
swift build(macOS) — Build complete.swift test --filter MobileSyncEnvelopeTests— passes.full-screen on iPhone 17 Pro Max (iOS 26.5).
_codexbar-sync._tcp→ the appdiscovered it and live-replaced its data over the network.
Notes for reviewers / follow-ups
mobileSyncEnabledstill needs wiring intoSettingsStore(currently a bare UserDefaults key).
.entitlementsare empty so unsigned simulator builds stay green. Real device/signedbuilds need App Group + iCloud/CloudKit + Push + Background-remote-notification (+ macOS
network.server) — documented inios/README.md. CloudKit self-gates at runtime by reading theembedded provisioning profile, so an un-entitled build runs (LAN only) without crashing.
allowlist is a sensible follow-up before wider release.
🤖 Generated with Claude Code