This document provides instructions for AI agents working on the Jules Mobile Client codebase.
Jules Mobile Client is a React Native/Expo application that provides a mobile interface for Google's Jules AI coding assistant. The app allows users to:
- View and manage coding sessions
- Create new tasks for Jules to work on
- Chat with Jules AI in real-time
- Approve AI-generated plans
| Technology | Version | Purpose |
|---|---|---|
| Expo SDK | 54 | React Native framework |
| React Native | 0.81 | Mobile UI |
| TypeScript | 5.3 | Type safety |
| Expo Router | 4.x | File-based routing |
| Bun | latest | Package manager & runtime |
app/ # Screens (Expo Router)
├── (tabs)/ # Tab navigation
│ ├── index.tsx # Sessions list
│ ├── settings.tsx # Settings
│ └── explore.tsx # (unused)
├── session/[id].tsx # Session detail/chat
├── create-session.tsx # New task creation
└── _layout.tsx # Root layout with providers
components/
├── jules/ # Jules-specific components
│ ├── activity-item.tsx # Chat messages + skeleton
│ ├── session-card.tsx # Session cards + skeleton
│ ├── loading-overlay.tsx # Loading indicator
│ ├── code-block.tsx # Syntax highlighting
│ └── data-renderer.tsx # Debug data display
└── ui/ # Generic UI components
constants/
├── types.ts # TypeScript interfaces
├── i18n.ts # Translations (ja/en)
├── i18n-context.tsx # i18n React context
├── api-key-context.tsx # API key context
└── theme.ts # Colors
hooks/
├── use-jules-api.ts # Jules API communication
├── use-secure-storage.ts # Secure data persistence
├── use-color-scheme.ts # Theme detection
└── use-theme-color.ts # Theme colors
All Jules API calls go through hooks/use-jules-api.ts:
const {
isLoading,
error,
fetchSessions,
fetchActivities,
createSession,
approvePlan,
} = useJulesApi({ apiKey, t });Use the useI18n hook for translations:
const { t, language, setLanguage } = useI18n();
// Usage: t('keyName')Add new keys to both ja and en objects in constants/i18n.ts.
Use skeleton components instead of loading overlays for modern UX:
// Sessions list
{isLoading ? (
<>
<SessionCardSkeleton />
<SessionCardSkeleton />
</>
) : (
sessions.map(s => <SessionCard key={s.name} session={s} />)
)}
// Activity list
{isLoading ? (
<>
<ActivityItemSkeleton isAgent={true} />
<ActivityItemSkeleton isAgent={false} />
</>
) : (
activities.map(a => <ActivityItem key={a.name} activity={a} />)
)}Always support dark mode:
const colorScheme = useColorScheme();
const isDark = colorScheme === 'dark';
<View style={[styles.container, isDark && styles.containerDark]}>API keys and sensitive data use expo-secure-store:
const { saveApiKey, getApiKey } = useSecureStorage();Base URL: https://jules.googleapis.com/v1alpha
| Endpoint | Method | Description |
|---|---|---|
/sources |
GET | List connected repositories |
/sessions |
GET | List all sessions |
/sessions |
POST | Create new session |
/sessions/{id}/activities |
GET | Get session activities |
/sessions/{id}:approvePlan |
POST | Approve a plan |
{
"prompt": "User's task description",
"sourceContext": {
"source": "sources/github/owner/repo",
"githubRepoContext": {
"startingBranch": "main"
}
},
"title": "Short title..."
}- Add key to
constants/i18n.tsin bothjaandenobjects - Use
t('newKey')in components
- Create file in
app/directory - Export default function component
- Add to navigation if needed
- Create in
components/jules/for Jules-specific,components/ui/for generic - Export from
components/jules/index.tsif Jules component - Support dark mode with
useColorScheme
- Create skeleton component with shimmer animation
- Use
Animated.Valuefor opacity animation - Match layout of actual component
- Use functional components with hooks
- TypeScript strict mode enabled
- Use
StyleSheet.createfor styles - Prefer Bun over npm/yarn
- No
anytypes - use proper interfaces fromconstants/types.ts
This project uses Bun as the primary runtime and package manager.
# Install dependencies
bun install
# Start development server
bun start
# Run on specific platforms
bun ios # iOS Simulator
bun android # Android Emulator
bun web # Web browser
# Install Expo-compatible packages
bunx expo install <package-name>
# Example: Add reanimated
bunx expo install react-native-reanimated
# Linting
bun lintbun oxc- Faster installs - Much faster than npm/yarn
- Built-in TypeScript - No compilation needed
- Auto .env loading - No dotenv required
- npm compatible - Works with node_modules
- Always use
bunx expo installfor React Native packages (ensures version compatibility) - Use
bun addfor non-Expo packages - Bun automatically loads
.envfiles
# Run tests
bun test
# Type check
bun run typecheck# Development
bun start
# Android build
eas build --platform android
# iOS build
eas build --platform ios- Check
console.logoutput in Metro bundler - API errors are logged with full response body
- Use
DataRenderercomponent to inspect data structures - Enable React Native Debugger for component inspection