Cohub
中文Start a Space

Why Cohub builds a thin native shell around one web app

Cohub's official iOS, Android and desktop apps are thin native shells around one web app. The cost: each native feature is built into every shell that offers it.

One blank cream sheet of paper lies on a charcoal board, held at its corners by four thin trays of black lacquer, aluminum, birch and orange enamel.
Who
Anyone who wants Cohub on a phone or desktop and wonders how the app and the web version stay in step.
When
You want Cohub on iPhone, Android or a computer and need web changes to reach it without waiting for an app-store review.
Why
Cohub's official clients keep one web app for the product UI, and each native shell handles only start-up, sign-in and system features.
Each native shell hosts one web app in a WebView and talks to it through the cohub.host.v1 bridge. A browser runs the same web app with no host.
One web app, several shells. The bridge is the only path between them.

Cohub ships official clients for iOS, Android, macOS, Windows, and Linux by wrapping a single web app inside thin platform shells. Keeping Boards, docs, and editors in one shared web surface lets web changes reach every client without waiting for an app-store review, while shifting platform work into a versioned host bridge.

Where the shell stops and the web app starts

All three client READMEs cite the same reason for this split: maintain one implementation of the product UI instead of rebuilding separate interfaces per platform. That choice reflects a team decision rather than a benchmark; this page makes no timing or speed claims.

Layer What it owns Platform runtime details
Shared web app Boards, docs, editors, and core product UI Runs unchanged in any browser; every native path is additive
iOS shell Start-up, sign-in, links, sharing Hosts the web app inside WKWebView
Android shell Start-up, sign-in, links, system features Hosts the product UI in a WebView island
Desktop shells (macOS, Windows, Linux) Start-up, tabs, shortcuts, CLI sign-in Loads the web origin in the system WebView, one per tab

Start-up belongs to the shell so cold launch never shows a blank canvas. Each shell holds its launch screen until the page signals first render via app.ready, up to a 2.5-second cap. On desktop, each tab runs its own WebView and its own bridge instance, so a crash in one page leaves the remaining tabs intact.

Inside the cohub.host.v1 bridge and credential boundary

The web app and native host communicate across the cohub.host.v1 bridge. Each request carries an id, a method, and params; the host answers with a result or an error and can push events back to the page. At start-up the web app queries the host for advertised capabilities. In a regular browser nothing replies, so the site runs as a plain web app.

Two rules in the bridge contract enforce that boundary:

  1. Browser as baseline: The web surface must run unchanged in an ordinary browser, so every native branch sits behind an explicit capability check.
  2. Token isolation: Auth tokens never enter WebView storage. The host retains the sole copy and supplies a token to the page per request.

Sign-in always runs through PKCE in the system browser, never inside a WebView. Device storage and integration follow each platform's own primitives:

  • iPhone (iOS): Sign-in completes in the system browser and the session lives in the device Keychain. Text, links, and files shared from other apps open a new chat populated with the latest share.
  • Android: The session is sealed with AES-256-GCM using a key stored in AndroidKeyStore.
  • Desktop: The bundled CLI performs sign-in, so signing in on desktop also signs in the terminal under the same account. The web app runs in tabs, and the shell intercepts tab keyboard shortcuts before the page receives them.

Four costs you pay for thin shells

  • Per-shell capability work: Adding one native capability requires updating the shared protocol definition, implementing the method in every host that advertises it, and wiring the web-side caller, following the steps in the protocol docs.
  • Additive-only compatibility: Introducing a new capability is safe because pages ignore names they do not recognize. Removing a capability breaks already-shipped web bundles, so hosts pin capability names in tests to stop typos from reaching builds.
  • Intentional platform gaps: Hosts advertise only what they implement. The iOS shell omits notifications and badges because iOS suspends hidden pages within seconds, and it exposes no local device files, so the web UI never offers that control on iOS.
  • Non-native scrolling and gesture stacks: A WebView does not behave like a native list or navigation stack. The iOS shell disables automatic insets, document bounce, link previews, and back swipe so the page manages them directly. On Android the WebView sits in a plain View rather than Compose because it "composites synchronously on the UI thread, so every layer above it costs frames."

Contrasting Cohub with Shopify's return to native

On September 10, 2026, Shopify announced it is moving its mobile apps from React Native back to Swift and Kotlin, citing coding agents having "changed what it costs to build mobile apps twice." Shopify still acknowledges that two platforms mean two sets of work, arguing instead that agents now absorb enough implementation, translation, and review effort that duplication no longer dictates the stack.

Cohub chose the opposite trade: keep one product UI in the web app, keep native code thin, and accept the bridge overhead outlined above. This comparison is architectural discussion rather than a head-to-head measurement—neither side publishes directly comparable figures, so evaluate each direction against your own constraints.

Reference in the docs

This page: Whether a feature belongs in the shared web app, or needs a native method in every shell.

  • CLI: installing the CLI and signing in from a terminal
  • Files & Sandbox: the Space workspace and the Sandbox runtime that serves its files

FAQ

Does a web change reach a native app without a new release?

That is the reason for the design: each shell loads the web origin, so web changes do not wait for an app-store review. A new native capability is different. It needs a method in every shell that offers it, so it reaches users with a new native build.

Can the iOS app read files stored on the phone?

No. The iOS build uses Spaces on Cohub's cloud and on computers that serve them. It does not serve the device's own files, so the web app does not offer that option.

  • Run Claude Code from your phone while execution stays on your computer

    To use Claude Code from your phone, install the Cohub CLI and Claude Code on your computer and sign in to both, run cohub runtime up --harness claude in the project folder, check that cohub runtime status lists claude, then open that Space in your phone's browser, choose Claude Code and send the task; the edits land in your local repository, where git diff shows them.

  • How to publish a running app from an AI sandbox as a live link

    To publish a running app from an AI sandbox in Cohub, run one CLI command, or use the Publish dialog, to point an App at the port your dev server listens on; static output can go out as a folder or a single HTML file instead.

  • Deploy Cohub as a self hosted AI agent platform on your own cluster

    To self-host an AI agent platform with Cohub, provision Kubernetes, Postgres, Redis, shared storage, S3-compatible object storage and an OIDC provider, then deploy each service from the repository's templates.

Sources

Published · Updated