Skip to content

Native iOS companion app (Liquid Glass) — read-only usage mirror over LAN + iCloud#1979

Draft
brahimhamichan wants to merge 2 commits into
steipete:mainfrom
brahimhamichan:feat/ios-companion-app
Draft

Native iOS companion app (Liquid Glass) — read-only usage mirror over LAN + iCloud#1979
brahimhamichan wants to merge 2 commits into
steipete:mainfrom
brahimhamichan:feat/ios-companion-app

Conversation

@brahimhamichan

Copy link
Copy Markdown
Contributor

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 provider
credentials on the phone
. Opposite approach to the earlier POC in #439.

Closes #1976. Relates to #439, #319.

Transport (serverless, user-managed)

  • LAN fast path — the Mac advertises _codexbar-sync._tcp (Bonjour) and streams a
    length-prefixed JSON SyncEnvelope. Instant on the same Wi-Fi.
  • iCloud backbone — the Mac writes to the user's private CloudKit DB; keeps widgets / Lock
    Screen / Live Activities fresh in the background, anywhere. No server, no CF Worker.
  • Newest generatedAt wins.

Live Activities are off by default (opt-in; no APNs server, so they refresh locally).

Layout

  • ios/ — XcodeGen project (xcodegen generate). Shared/ (Foundation-only WidgetSnapshot
    mirror + 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 into
    UsageStore.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.
  • iOS app + widget extension build for the iOS 26 simulator; app + all three screens verified
    full-screen on iPhone 17 Pro Max (iOS 26.5).
  • LAN end-to-end verified: a Mac publisher advertising _codexbar-sync._tcp → the app
    discovered it and live-replaced its data over the network.
  • Installed and launched on a physical iPhone via a dev-signed build.

Notes for reviewers / follow-ups

  • Draft. A Preferences toggle for mobileSyncEnabled still needs wiring into SettingsStore
    (currently a bare UserDefaults key).
  • Checked-in .entitlements are empty so unsigned simulator builds stay green. Real device/signed
    builds need App Group + iCloud/CloudKit + Push + Background-remote-notification (+ macOS
    network.server) — documented in ios/README.md. CloudKit self-gates at runtime by reading the
    embedded provisioning profile, so an un-entitled build runs (LAN only) without crashing.
  • No manual pairing yet: LAN discovery is open on the local network. A pairing code / device
    allowlist is a sensible follow-up before wider release.

🤖 Generated with Claude Code

…+ 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

clawsweeper Bot commented Jul 8, 2026

Copy link
Copy Markdown

ClawSweeper review: did not complete due to Codex infrastructure failure. Reviewed July 7, 2026, 11:12 PM ET / 03:12 UTC.

Summary
Review failed before ClawSweeper could summarize the requested change.

Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

Review metrics: none identified.

Merge readiness
Not assessed.
Failure reason: timeout.

This is a ClawSweeper/Codex infrastructure failure, not a PR readiness or patch-quality verdict.
Keep any merge decision on the normal maintainer review path until ClawSweeper can complete a fresh review.

Risk before merge

  • [P1] No close action taken because the review did not complete.

Maintainer options:

  1. Decide the mitigation before merge
    Retry the Codex review after fixing the execution failure.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • Review did not complete, so no work-lane recommendation was made.
Review details

Best 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 changes

Label changes:

  • remove rating: 🧂 unranked krab: Current review failed before PR readiness was assessed, so no rating label should remain.
  • remove status: 📣 needs proof: Current PR status no longer selects a status label.
  • remove P2: Current review triage priority is none.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove merge-risk: 🚨 security-boundary: Current PR review selected no merge-risk labels.
  • remove merge-risk: 🚨 availability: Current PR review selected no merge-risk labels.
Evidence reviewed

What I checked:

  • failure reason: timeout.
  • codex failure detail: Codex review failed for this PR: Codex process timed out after 1200000ms.
  • codex stderr: No stderr captured.
  • codex stdout: (provider: provider, snapshot: $0, now: now) } ?? []\n^a83a83fa (Peter Steinberger 2026-07-07 00:45:58 +0100 57) \n^a83a83fa (Peter Steinberger 2026-07-07 00:45:58 +0100 58) let creditsRemaining: Double?\n^a83a83fa (Peter Steinberger 2026-07-07 00:45:58 +0100 59) let codeReviewRemaining: Double?\n^a83a83fa (Peter Steinberger 2026-07-07 00:45:58 +0100 60) if provider == .codex, let snapshot {\n^a83a83fa (Peter Steinberger 2026-07-07 00:45:58 +0100 61) let projection = self.codexConsumerProjection(\n^a83a83fa (Peter Steinberger 2026-07-07 00:45:58 +0100 62) surface: .widget,\n^a83a83fa (Peter Steinberger 2026-07-07 00:45:58 +0100 63) snapshotOverride: snapshot,\n^a83a83fa (Peter Steinberger 2026-07-07 00:45:58 +0100 64) now: now)\n^a83a83fa (Peter Steinberger 2026-07-07 00:45:58 +0100 65) let displayOnlyExtrasHidden = projection.dashb.
  • process error code: ETIMEDOUT.

Likely related people:

  • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)
How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (1 earlier review cycle)
  • reviewed 2026-07-08T02:15:49.661Z sha 9b2bc81 :: needs real behavior proof before merge. :: [P1] Require pairing before sending LAN snapshots | [P1] Do not decode unknown providers as Codex | [P1] Check CloudKit entitlement before creating the container

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. labels Jul 8, 2026
… 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>
@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native iOS companion app (Liquid Glass) — read-only usage mirror over LAN + iCloud

1 participant