Skip to content

Commit 2c342c5

Browse files
vanpeltClaudeclaude
authored
Add Expo mobile app for Catnip workspace management (#189)
## Summary Added a new React Native/Expo mobile application that provides native mobile access to Catnip workspaces and Claude AI interactions. The app connects to the existing CloudFlare worker API at `catnip.run/v1/*` to enable mobile users to manage their development workflows. ## Key Features - **GitHub OAuth authentication** via Expo AuthSession with secure token storage - **Codespace connection** with real-time status updates through Server-Sent Events - **Workspace management** allowing users to view, interact with, and send prompts to Claude - **Modern Expo SDK 52** with file-based routing using Expo Router - **Pure Expo components** with no custom React Native dependencies for maximum compatibility ## Implementation Notes The mobile app mirrors the existing web Mobile components (`WorkspaceMobile.tsx`, `CodespaceAccess.tsx`) while being optimized for native mobile experience. It uses Expo's latest features including SecureStore for encrypted credentials, AuthSession for OAuth flows, and built-in fetch for API communication. The app is ready for deployment to both iOS and Android platforms via Expo's build service. --------- Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent ecdb05b commit 2c342c5

File tree

178 files changed

+179086
-297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+179086
-297
lines changed

.claude/settings.local.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"Bash(vite build)",
66
"Bash(pnpm build:*)",
77
"Bash(git add:*)",
8-
"Bash(git commit:*)"
8+
"Bash(git commit:*)",
9+
"WebFetch(domain:expo.dev)",
10+
"WebSearch"
911
],
1012
"deny": [],
1113
"ask": []

.github/workflows/test-ios.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Test iOS
2+
3+
on:
4+
push:
5+
paths:
6+
- "xcode/**"
7+
- ".github/workflows/test-ios.yml"
8+
9+
jobs:
10+
unit-tests:
11+
runs-on: macos-14
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Select Xcode version
18+
run: sudo xcode-select -s /Applications/Xcode_16.1.app
19+
20+
- name: List available simulators
21+
run: xcrun simctl list devices available iPhone
22+
23+
- name: Build and run unit tests
24+
run: |
25+
xcodebuild test \
26+
-project xcode/catnip.xcodeproj \
27+
-scheme catnip \
28+
-destination 'platform=iOS Simulator,name=iPhone 16,OS=18.1' \
29+
-only-testing:catnipTests \
30+
-enableCodeCoverage YES \
31+
CODE_SIGN_IDENTITY="" \
32+
CODE_SIGNING_REQUIRED=NO
33+
34+
- name: Upload test results
35+
if: always()
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: unit-test-results
39+
path: |
40+
~/Library/Developer/Xcode/DerivedData/*/Logs/Test/*.xcresult
41+
42+
ui-tests:
43+
runs-on: macos-14
44+
if: github.ref == 'refs/heads/main'
45+
46+
steps:
47+
- name: Checkout code
48+
uses: actions/checkout@v4
49+
50+
- name: Select Xcode version
51+
run: sudo xcode-select -s /Applications/Xcode_16.1.app
52+
53+
- name: List available simulators
54+
run: xcrun simctl list devices available iPhone
55+
56+
- name: Build and run UI tests
57+
run: |
58+
xcodebuild test \
59+
-project xcode/catnip.xcodeproj \
60+
-scheme catnip \
61+
-destination 'platform=iOS Simulator,name=iPhone 16,OS=18.1' \
62+
-only-testing:catnipUITests \
63+
CODE_SIGN_IDENTITY="" \
64+
CODE_SIGNING_REQUIRED=NO
65+
66+
- name: Upload test results
67+
if: always()
68+
uses: actions/upload-artifact@v4
69+
with:
70+
name: ui-test-results
71+
path: |
72+
~/Library/Developer/Xcode/DerivedData/*/Logs/Test/*.xcresult

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,6 @@ container/internal/assets/dist/*
5555
!container/internal/assets/dist/index.html
5656
!container/internal/assets/dist/.gitkeep
5757

58+
59+
# Xcode user-specific files
60+
**/xcuserdata/

.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

catnip-mobile/.env.local.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Optional: Custom Catnip API base URL (defaults to https://catnip.run)
2+
# EXPO_PUBLIC_CATNIP_BASE_URL=https://your-custom-domain.com
3+
4+
# Note: No GitHub client ID needed - OAuth is handled server-side via relay
5+
# The mobile app uses secure session tokens provided by the worker

catnip-mobile/.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
2+
3+
# dependencies
4+
node_modules/
5+
6+
# Expo
7+
.expo/
8+
dist/
9+
web-build/
10+
expo-env.d.ts
11+
12+
# Native
13+
*.orig.*
14+
*.jks
15+
*.p8
16+
*.p12
17+
*.key
18+
*.mobileprovision
19+
20+
# Metro
21+
.metro-health-check*
22+
23+
# debug
24+
npm-debug.*
25+
yarn-debug.*
26+
yarn-error.*
27+
28+
# macOS
29+
.DS_Store
30+
*.pem
31+
32+
# local env files
33+
.env*.local
34+
35+
# typescript
36+
*.tsbuildinfo.validate-build/

0 commit comments

Comments
 (0)