Skip to content

Small Cuts Lite — iOS record → Modal upload (phone + glasses) - #53

Merged
macayaven merged 3 commits into
mainfrom
worktree-small-cuts-lite-mobile
Jun 18, 2026
Merged

macayaven merged 3 commits into
mainfrom
worktree-small-cuts-lite-mobile

Conversation

@macayaven

Copy link
Copy Markdown
Owner

Summary

Small Cuts Lite is a minimal iOS companion app with one mission: record up to 60 s from the phone camera or paired Meta Ray-Ban glasses, then send the finished clip to the Modal /v1/cuts endpoint exactly like the Gradio upload feature. The narrated result is produced server-side and surfaces in the Gradio library via the existing relay + promote flow — 100% capture-agnostic.

Separate app/target (SmallCutsLite, com.macayaven.smallcutslite) from the real-time SmallCuts app — installing one doesn't affect the other.

Components

Area File Notes
Upload Upload/ModalUploadClient.swift + ModalScene.swift submit→poll /v1/cuts (TDD)
Phone capture Capture/PhoneCameraRecorder.swift + CameraPreview.swift AVFoundation → MP4, 60 s cap
Glasses capture Capture/GlassesClipRecorder.swift DAT frames → MP4 via AVAssetWriter (TDD)
DAT session (shared read-only from SmallCuts) FrameSource/GlassesFrameSource/GlassesSessionController/WearablesConfigurator
Identity Auth/IdentityStore.swift optional Sign in with Apple → uploader handle
Config Config/LiteConfig.swift + gitignored Secrets.swift embedded Modal token
UI UI/LiteCaptureView.swift Action!/Cut! + Phone↔Glasses lever + style picker

Usage

See ios/SmallCuts/SmallCutsLite/RUNBOOK.md: paste the Modal token into Secrets.swift, run xcodegen, open the SmallCutsLite scheme on a device, Action! → Cut!.

Test coverage

  • 4 unit tests: ModalUploadClient (submit→poll, missing-scene throws) + GlassesClipRecorder (encodes a playable MP4, no-frames throws). ** TEST SUCCEEDED ** on iPhone 17 / iOS 26.5; arm64 device build succeeds.
  • Build-verified, needs hardware to run: phone capture (no simulator camera) and the glasses DAT session.

Coordination (team-mobile #37)

Contracts-only coupling — a pure consumer of the deployed /v1/cuts, no server/contract changes. Guardrails honored: CaptureCoordinator.swift/ContentView.swift and /v1/cuts untouched; DAT pipeline files shared (referenced) not edited. Rebased on latest main (post #52, viewer-only — no overlap). Refs #51.

Not in this PR (intentional)

  • Android (M2/M4): scaffolding pending a local JDK/Android SDK.
  • Metadata grounding (M5): deferred contract-change to sequence after this lands.
  • Sign in with Apple is optional (falls back to ios-user); enabling it on device is a one-click capability add in Xcode — deliberately kept out of the project so the first install can't be blocked by provisioning.

🤖 Generated with Claude Code

macayaven and others added 3 commits June 16, 2026 19:31
New SmallCutsLite app/target whose only job is: record ≤60s from the phone
camera or paired Meta Ray-Ban glasses, then POST the finished clip to Modal
/v1/cuts — identical to the Gradio upload feature, 100% capture-agnostic. The
narrated result is produced server-side and surfaces in the Gradio library via
the existing relay + promote flow.

- ModalUploadClient: submit→poll /v1/cuts (TDD, unit-tested)
- PhoneCameraRecorder: AVFoundation → MP4, 60s cap
- GlassesClipRecorder: DAT frames → MP4 via AVAssetWriter (TDD, unit-tested)
- Reuses (shares read-only) the DAT session pipeline from the SmallCuts target
- Action!/Cut! UI + Phone↔Glasses lever; optional Sign in with Apple → uploader
  handle; embedded Modal token via gitignored Secrets.swift
- RUNBOOK for install + send

Coordination guardrails: CaptureCoordinator.swift / ContentView.swift and the
/v1/cuts contract are untouched; shared DAT files referenced, not edited.
4/4 iOS unit tests pass; device-arch build succeeds (iPhone 17 / iOS 26.5).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cut-monogram "S" with a gold cinematic cut stroke on ink (chosen from the
candidate set) so the Lite app is unmistakable next to the gold-pill Small
Cuts icon on the home screen. Single-size 1024 asset catalog +
ASSETCATALOG_COMPILER_APPICON_NAME on the SmallCutsLite target.

actool compiles the icon (generates the device sizes from the 1024 source);
4/4 unit tests still green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@macayaven
macayaven merged commit 5069d06 into main Jun 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant