Mobile Companion App
Relevant source files
The following files were used as context for generating this wiki page:
The Mobile Companion App is an Expo-based React Native application that allows users to interact with their Rebase desktop environment from a mobile device. It provides mobile access to agent sessions, project files, and source control management. The app synchronizes with the desktop instance to enable remote task management, message history viewing, and Git operations.
Sources: README.md:58-60, mobile/AGENTS.md:1-5, src/features/mobile/model/mobileWorkspace.ts:133-140
Architecture and Technology Stack
The mobile app utilizes Expo and React Native to ensure cross-platform compatibility and performance. It follows a mobile-first pattern and leverages continuous native generation (CNG) for native modules.
Core Technologies
- Framework: Expo (React Native).
- Navigation: Expo Router (File-based routing in
src/app/). - Package Manager: Bun (preferred over npm/npx).
- Styling: Themed styles with light and dark mode support.
Sources: mobile/AGENTS.md:1-25, mobile/src/features/sessions/Markdown.tsx:280-360
Data Flow Overview
The following diagram illustrates how the mobile app interacts with the desktop Rebase instance to retrieve workspace data.
The mobile workspace service aggregates data from various desktop features—including project recents, active sessions, and pilots—into a serialized format suitable for mobile consumption.
Sources: src/features/mobile/model/mobileWorkspace.ts:70-130
Workspace and Session Management
The mobile app mirrors the desktop workspace by organizing content into projects, sessions, and pilots.
Project and Session Discovery
The app identifies projects from three sources: recently opened projects, pinned projects, and projects assigned to Pilots. It generates a "catalog" that includes:
- Project IDs: Encoded paths for identification.
- Session Summaries: Titles, harnesses (providers), models, and current status.
- Visual Identifiers: Mascot icons and tab group colors.
- Activity Status: Indicators for busy states or pending user approvals/questions.
Sources: src/features/mobile/model/mobileWorkspace.ts:70-120
Conversation Handling
The mobile app retrieves conversation history as a series of "turns." It can read sessions directly from the live desktop state or fallback to disk if the session is not currently open.
| Function | Purpose |
|---|---|
mobileCatalog | Aggregates all available projects, sessions, and pilots for the mobile dashboard. |
mobileConversation | Retrieves the transcript and busy state for a specific session or pilot. |
mobileNewSession | Initializes a new session with project defaults and desktop-synced permission modes. |
Sources: src/features/mobile/model/mobileWorkspace.ts:63-180
Content Rendering and Highlighting
The mobile app includes a custom Markdown engine and syntax highlighting system optimized for mobile performance.
Mobile Markdown Engine
The Markdown component in the mobile project parses and renders agent replies. It supports:
- Streaming: Text fades in as it arrives from the model.
- Interactions: Inline code blocks representing files are interactive and link to the file opener.
- Formatting: Supports standard Markdown elements like headings, lists, tables, and blockquotes.
Sources: mobile/src/features/sessions/Markdown.tsx:43-120
Syntax Highlighting
Because full syntax highlighting is computationally expensive, the app uses a tiered approach:
- Immediate Highlight: For small files, it provides colorized runs immediately.
- Background Highlighting: For larger files, it initiates a background job and streams color data in chunks to the mobile UI.
Source Control (Git) Operations
The mobile app allows users to perform critical Git actions remotely, enabling progress on codebases without a desktop interface.
Supported Git Actions
The app provides a commit sheet that exposes information about the current branch status, including ahead/behind counts relative to the upstream and default branches.
| Action Category | Supported Operations |
|---|---|
| Staging | Stage/Unstage specific files or all changes. |
| Committing | Commit staged changes with manual or AI-generated messages. |
| Syncing | Push changes to remote and sync with upstream. |
| Pull Requests | Generate and create GitHub Pull Requests. |
Sources: src/features/mobile/model/mobileWorkspace.ts:580-645
PR and Commit Generation
When generating commit messages or PR content, the app utilizes the harness (AI provider) selected in the mobile composer. This ensures consistency with the desktop's "Changes" panel behavior.
Sources: src/features/mobile/model/mobileWorkspace.ts:640-660
Summary
The Mobile Companion App acts as a remote interface for the Rebase desktop environment. It leverages Expo's modern architecture to provide a performant, cross-platform experience. By integrating deep workspace discovery, interactive Markdown rendering, and comprehensive Git management, it allows developers to maintain their workflow and manage autonomous agents from any mobile device.
Sources: README.md:58-60, src/features/mobile/model/mobileWorkspace.ts:70-130