Cairn / Docs / Mobile Companion

Mobile Companion

The Mobile Companion Service enables secure, local-network mobile access to your entire Cairn workspace from any phone or tablet without cloud lock-in.

Cairn Mobile Companion UI Mockup

Connection & Setup

The companion service streams the Cairn web application over your local Wi-Fi network directly from your running desktop application. Because everything stays local, no internet connection is required.

Starting the Service

  1. Open Cairn on your desktop and navigate to Settings → Mobile Access.
  2. Toggle the switch to **Enable Network Access**.
  3. A secure connection card will display:
    • Your desktop's local server IP address and port.
    • A scannable QR code encoding the server URL.
    • A randomly generated 4-digit **Single-use Login PIN**.
Persistent Authentication

Once you scan the QR code and input the correct 4-digit PIN on your device, the browser saves a secure cookie session mapped to `mobile-sessions.json` on your desktop. This session persists across application relaunches and updates, meaning you only need to re-authenticate if you explicitly log out or regenerate the PIN.

What a paired phone can do

Since Cairn 3.1.0, Mobile Access is limited to your workspace. A paired phone can read and edit notes, cards, Idea Flow and tags, chat with the agent, and browse code, diffs and git history. It can no longer run anything on your computer or change Cairn's setup: no terminals or shells, file edits in code folders, git commits, pushes or discards, MCP servers, plugins, sync, secrets, approval grants, AI provider and agent settings, automation edits or runs, or Mobile Access settings — do those from the desktop app.

Agent turns started from a paired phone follow your desktop's approval settings and saved AI connections. A phone cannot choose its own approval mode, and new coding sessions from it run only in the project's code directory, which can only be changed on the desktop.

Mobile UI Adaptations

Cairn automatically detects a mobile screen width and adjusts the application's layout to prioritize reading comfort, navigation, and visual clarity.

Touch Interaction Parity

To replace mouse hover and right-click states, the companion implements touch-specific sensor loops across the canvas and board components:

Kanban Board Drag-and-Drop

Standard touch scrolling on a board can accidentally trigger drag states. To resolve this, Cairn utilizes a dedicated touch drag sensor:

Idea Flow Canvas Gestures

Interactive nodes on the Idea Flow canvas are adapted for reliable touch navigation:

PDF Export & Sharing Sheets

Exporting note content to PDF from mobile clients bypasses system print dialogues where possible:

Automated Sync & Live Updates

The companion utilizes Server-Sent Events (SSE) and local database triggers to sync client-state instantly: