compose-preview-client

July 18, 2026 · View on GitHub

Mobile + Wear session-viewer clients for compose-preview serve's streaming lane.

Tap a session link → an Android / Wear OS app opens, connects to a live compose-preview serve instance over WS /ws/{previewId}, paints the pushed PNG frames, and forwards your pointer / key / rotary input back into the running composition — so a remote preview behaves like a complete local app.

These apps used to live in yschimke/compose-ai-tools as :clients:{core,mobile,wear}. They were split out because they're a distinct interactive streaming product (with its own Google Play publishing pipeline), separate from that repo's core mission of headless render-@Preview-to-PNG (compose-ai-tools#2533).

Modules

ModuleWhat it is
:corePure-JVM engine — the WS frame protocol, the connection state machine, the composeai:// session-link parser, and the mDNS discovery contract. No Android, no Compose, so it's unit-tested headlessly.
:mobileAndroid phone/tablet app. Compose Material 3.
:wearWear OS app. Wear Compose Material 3, with rotary-bezel input.

:core depends on no internal module and consumes serve purely through a versioned wire contract (WS JSON frame protocol + session-link format + _composeai._tcp mDNS) owned by compose-ai-tools — never a code dependency.

Docs

Building

./gradlew :core:test          # pure-JVM engine tests
./gradlew :mobile:assembleDebug :wear:assembleDebug   # needs an Android SDK

The mobile/wear @Preview chrome is rendered by the ee.schimke.composeai.preview plugin (consumed from Maven Central) to regenerate the Play-store screenshots — see docs/PUBLISHING.md.

Conventions

See CLAUDE.md. Branches are agent/…; commits + PR titles follow Conventional Commits; git history is never attributed to an AI agent. Install the hooks with scripts/install-git-hooks.sh.