Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
f3c3df8
init
skoob13 Dec 9, 2025
11f844c
fix: electron deps
skoob13 Dec 9, 2025
b4de0da
modules
skoob13 Dec 9, 2025
c68999e
deps again
skoob13 Dec 9, 2025
578efd2
auth
skoob13 Dec 9, 2025
0733cfd
Bativewind init
a-lider Dec 9, 2025
8465b1a
fix: nativewind
skoob13 Dec 9, 2025
6449458
Bump reanimated version
a-lider Dec 9, 2025
1fcaadb
wip fonts
skoob13 Dec 9, 2025
80bc59f
Merge branch 'auth' into mobile-app
skoob13 Dec 9, 2025
0be1980
feat: fonts
skoob13 Dec 9, 2025
b58912d
biome
skoob13 Dec 9, 2025
1ed0016
Restructure project
a-lider Dec 9, 2025
173dd77
Fix classname sorting and OAuth callback
a-lider Dec 9, 2025
d7de818
fix OAuth token exchange
a-lider Dec 9, 2025
6db5a5a
streaming wip
skoob13 Dec 9, 2025
8dda38d
Merge branch 'streaming' into mobile-app
skoob13 Dec 9, 2025
ecae512
Update app schema to posthog
a-lider Dec 9, 2025
54f4b2a
streaming
skoob13 Dec 9, 2025
3bc5d58
Merge branch 'mobile-app' of github.com:PostHog/Array into mobile-app
skoob13 Dec 9, 2025
2eef20d
feat: agent chat
jonathanlab Dec 9, 2025
c4156e3
undo mode switch changes
jonathanlab Dec 9, 2025
a4d313c
undo package bumps for array
jonathanlab Dec 9, 2025
25ae735
Add tabs navigation - first draft
a-lider Dec 9, 2025
b25cdf6
Use streaming
a-lider Dec 9, 2025
28f9b8b
Tabs navigation
a-lider Dec 9, 2025
0b9a4c6
Tabs with action button
a-lider Dec 9, 2025
a2f4e56
Create task button on the main screen instead of tabs
a-lider Dec 9, 2025
2e1315c
bump back
jonathanlab Dec 9, 2025
ab6f439
Merge branch 'mobile-app' of github.com:PostHog/Array into mobile-app
jonathanlab Dec 9, 2025
169d400
Chat UI - first draft with components and keyboard-controller
a-lider Dec 9, 2025
992c15a
query
skoob13 Dec 9, 2025
390c309
Merge branch 'mobile-app' of github.com:PostHog/Array into mobile-app
skoob13 Dec 9, 2025
3e78e75
Make both PostHog AI chat and Array tasks
a-lider Dec 9, 2025
e428698
feat: tasks list
skoob13 Dec 10, 2025
0183b9f
feat: list of tasks and convos
skoob13 Dec 10, 2025
d9b3787
feat: render tool calls
skoob13 Dec 10, 2025
fcd82ed
try to fix infinite rerender in virutalizedlist
jonathanlab Dec 10, 2025
2f243d5
Merge branch 'mobile-app' of github.com:PostHog/Array into mobile-app
jonathanlab Dec 10, 2025
43f5aa8
prevent picking up electron react
jonathanlab Dec 10, 2025
007c7f8
Update the styles to match Array app
a-lider Dec 10, 2025
5bcf116
Update loading and streaming styles
a-lider Dec 10, 2025
aea34e5
tasks component
skoob13 Dec 10, 2025
5b491d5
Merge branch 'mobile-app' of github.com:PostHog/Array into mobile-app
skoob13 Dec 10, 2025
5454e3b
new task
skoob13 Dec 10, 2025
f12ae66
cleanup
skoob13 Dec 10, 2025
388a9f8
Liquid glass chat input
a-lider Dec 10, 2025
b0684b3
Liquid glass mic and send button
a-lider Dec 10, 2025
f215bf4
better sync/persistence for sessions
jonathanlab Dec 10, 2025
d39747d
Merge branch 'mobile-app' of github.com:PostHog/Array into mobile-app
jonathanlab Dec 10, 2025
88e2355
voice mode
skoob13 Dec 10, 2025
825a6e6
Merge branch 'mobile-app' of github.com:PostHog/Array into mobile-app
skoob13 Dec 10, 2025
d7a4b51
Refactor to feature folders
a-lider Dec 19, 2025
2b1a54d
Use audio transcription API
a-lider Dec 26, 2025
4805f45
Only show dev region in development builds
a-lider Dec 27, 2025
13069aa
Update EU client ID
a-lider Dec 27, 2025
8cf75fd
Remove sensitive auth logs
a-lider Dec 27, 2025
464e4b0
Clean up console logs
a-lider Dec 29, 2025
ab5c068
Fix relative imports, use alias
a-lider Dec 29, 2025
967b67f
Minor refactoring
a-lider Dec 29, 2025
8244798
Refactor tailwind styles
a-lider Jan 1, 2026
0563e1e
Make adaptive light/dark theme
a-lider Jan 1, 2026
3f8c262
ChatInput with liquid glass
a-lider Jan 12, 2026
1efc11a
Rename ChatInput to Composer
a-lider Jan 12, 2026
3e28da5
Update eas and app config
a-lider Jan 13, 2026
1d4aab5
Merge remote-tracking branch 'origin/main' into mobile-app
a-lider Jan 14, 2026
df31308
Update mobile app dependencies
a-lider Jan 14, 2026
ee649c0
Merge branch 'main' into mobile-app
a-lider Jan 14, 2026
db126d9
App icon and splash screen
a-lider Jan 14, 2026
097002f
Connect GitHub flow
a-lider Jan 14, 2026
752368a
Update settings tab
a-lider Jan 14, 2026
772056a
Use React Query
a-lider Jan 14, 2026
b20f1c6
Thinking animation when streaming
a-lider Jan 14, 2026
0e35580
Fix streaming rendering
a-lider Jan 14, 2026
2e0598b
Fix tasks composer paddings
a-lider Jan 15, 2026
bc5dbcf
Remove activity indicator from task header
a-lider Jan 15, 2026
af5ad13
Set up PostHog autocapture and session replay
a-lider Jan 15, 2026
04fcf14
Add readme and scripts
a-lider Jan 15, 2026
76eeccc
Fix app crash related to posthog initialization
a-lider Jan 15, 2026
39f8902
Merge remote-tracking branch 'origin/main' into mobile-app
a-lider Jan 15, 2026
8ee5e39
Update pnpm-lock with mobile deps
a-lider Jan 15, 2026
fba4a1f
Fix mobile app code quality errors
a-lider Jan 15, 2026
8f83555
Rename Max to PostHog AI
a-lider Jan 16, 2026
d5df4af
Revert non-mobile changes & fix React 19 type errors
a-lider Jan 16, 2026
8c1d160
Revert agent.ts changes
a-lider Jan 16, 2026
7f514d3
Regenerate pnpm lockfile to fix esbuild version mismatch
a-lider Jan 16, 2026
512567b
Upgrade vite version to fix CI
a-lider Jan 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node-linker=hoisted
node-linker=hoisted
shamefully-hoist=true
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

# PostHog Array Monorepo

This is the monorepo for PostHog's Array desktop task manager and the agent framework that powers it.
This is the monorepo for PostHog's Array apps and the agent framework that powers them.

## Projects

- **[apps/array](./apps/array)** - The Array desktop application
- **[apps/array](./apps/array)** - Array desktop application (Electron)
- **[apps/mobile](./apps/mobile)** - PostHog mobile app (React Native / Expo)
- **[packages/agent](./packages/agent)** - The TypeScript agent framework

## Development
Expand Down Expand Up @@ -42,6 +43,24 @@ pnpm dev:agent # Run agent in watch mode
pnpm dev:array # Run array app
```

### Mobile App

```bash
# Install mobile dependencies
pnpm mobile:install

# Build and run on iOS simulator
pnpm mobile:run:ios

# Start development server (without rebuilding again)
pnpm mobile:start

# Submit to TestFlight
pnpm mobile:testflight
```

See [apps/mobile/README.md](./apps/mobile/README.md) for more details on developing the mobile app.

### Other Commands

```bash
Expand All @@ -63,7 +82,8 @@ pnpm test
```
array-monorepo/
├── apps/
│ └── array/ # Electron desktop app
│ ├── array/ # Electron desktop app
│ └── mobile/ # React Native mobile app (Expo)
├── packages/
│ └── agent/ # Agent framework
├── pnpm-workspace.yaml # Workspace configuration
Expand Down
12 changes: 6 additions & 6 deletions apps/array/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/node": "^20.19.21",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@types/react": "^19.1.0",
"@types/react-dom": "^19.1.0",
"@types/uuid": "^9.0.7",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/ui": "^4.0.10",
Expand All @@ -57,11 +57,11 @@
"jsdom": "^26.0.0",
"lint-staged": "^15.5.2",
"postcss": "^8.4.33",
"tailwindcss": "^3.4.1",
"tailwindcss": "^3.4.18",
"tsx": "^4.20.6",
"typed-openapi": "^2.2.2",
"typescript": "^5.9.3",
"vite": "^5.0.12",
"vite": "^6.0.7",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^4.0.10",
"yaml": "^2.8.1"
Expand Down Expand Up @@ -138,8 +138,8 @@
"posthog-js": "^1.283.0",
"posthog-node": "^4.18.0",
"radix-themes-tw": "0.2.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "19.1.0",
"react-dom": "19.1.0",
"react-hook-form": "^7.64.0",
"react-hotkeys-hook": "^4.4.4",
"react-markdown": "^10.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface RawLogsHeaderProps {
onToggleSearch: () => void;
onCopyAll: () => void;
onSearchChange: (query: string) => void;
searchInputRef: RefObject<HTMLInputElement>;
searchInputRef: RefObject<HTMLInputElement | null>;
}

export function RawLogsHeader({
Expand Down
2 changes: 1 addition & 1 deletion apps/array/src/renderer/hooks/useAutoScroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface UseAutoScrollOptions<T extends string> {
}

interface UseAutoScrollReturn {
scrollRef: React.RefObject<HTMLDivElement>;
scrollRef: React.RefObject<HTMLDivElement | null>;
autoScroll: boolean;
setAutoScroll: (value: boolean) => void;
}
Expand Down
41 changes: 41 additions & 0 deletions apps/mobile/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files

# dependencies
node_modules/

# Expo
.expo/
dist/
web-build/
expo-env.d.ts

# Native
.kotlin/
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision

# Metro
.metro-health-check*

# debug
npm-debug.*
yarn-debug.*
yarn-error.*

# macOS
.DS_Store
*.pem

# local env files
.env*.local

# typescript
*.tsbuildinfo

# generated native folders
/ios
/android
218 changes: 218 additions & 0 deletions apps/mobile/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
# PostHog Mobile App

React Native mobile app built with Expo and expo-router.

## Quick Start

From the **repository root**:

```bash
# Install dependencies
pnpm mobile:install

# Build and run on iOS simulator
pnpm mobile:run:ios

# Start the development server (after initial build)
pnpm mobile:start
```

## Tech Stack

- [Expo](https://expo.dev) - Build tooling, native APIs, OTA updates
- [expo-router](https://docs.expo.dev/router/introduction/) - File-based routing
- [NativeWind](https://www.nativewind.dev/) - Tailwind CSS for React Native
- [React Query](https://tanstack.com/query) - Async data fetching and caching
- [Zustand](https://zustand-demo.pmnd.rs/) - Client state management (UI state, selections, local flags)
- [Phosphor Icons](https://phosphoricons.com/) - Icon library

## Architecture

### Feature Folders

Code is organized by feature in `src/features/`. Each feature is self-contained with its own components, hooks, stores, and API logic.

```
src/features/
├── auth/ # Authentication & user session
│ ├── hooks/
│ ├── lib/
│ ├── stores/
│ └── types.ts
├── chat/ # PostHog AI chat interface
│ ├── components/
│ ├── hooks/
│ ├── stores/
│ └── types.ts
├── conversations/ # PostHog AI conversation list & management
│ ├── api.ts
│ ├── components/
│ ├── hooks/
│ └── stores/
└── tasks/ # Task management
├── api.ts
├── components/
├── hooks/
└── stores/
```

### File-Based Routing

Routes for the screens are defined by the file structure in `src/app/` using expo-router.

- `(tabs)/` - Parentheses create a layout group (tab navigator)
- `_layout.tsx` - Configures the navigator for that directory
- `[id].tsx` - Square brackets define dynamic route parameters
- Stacks and modals live outside tab group, configured in `_layout.tsx`

```
src/app/
├── _layout.tsx # Root layout
├── index.tsx # Entry redirect
├── auth.tsx # Auth screen (unauthenticated)
├── (tabs)/ # Tabs group
│ ├── _layout.tsx # Layout for all tabs
│ ├── index.tsx # Home tab (Conversations)
│ ├── tasks.tsx # Tasks tab
│ └── settings.tsx # Settings tab
├── chat/ # Chat stack
│ ├── index.tsx # New chat
│ └── [id].tsx # Chat by ID (dynamic route)
└── task/ # Task stack
├── index.tsx # New task
└── [id].tsx # Task by ID (dynamic route)
```

### Shared Code

```
src/
├── components/ # Reusable UI components (Text, etc.)
└── lib/
├── posthog.ts # Analytics setup
├── queryClient.ts # React Query client
├── theme.ts # Design tokens
└── logger.ts # Logger setup
```

## Prerequisites

- Node.js 22+
- pnpm 10.23.0
- Xcode (for iOS development)
- Android Studio (for Android development)
- EAS CLI: `npm install -g eas-cli`

## Commands

### From Repository Root

**Development server:**
```bash
pnpm mobile:start # Start Expo dev server
pnpm mobile:start:clear # Start with cleared Metro cache
```

**Build and run:**
```bash
pnpm mobile:run:ios # iOS simulator
pnpm mobile:run:ios:device # iOS device (requires Apple Developer account)
pnpm mobile:run:android # Android emulator/device
```

**Native code generation:**
```bash
pnpm mobile:prebuild # Generate ios/ and android/ folders
pnpm mobile:prebuild:clean # Delete and regenerate (when adding native deps)
```

**EAS builds:**
```bash
pnpm mobile:build:dev # Development build (iOS, cloud)
pnpm mobile:build:dev:local # Development build (iOS, local)
pnpm mobile:build:preview # Preview build (iOS)
pnpm mobile:build:production # Production build (iOS)
```

**TestFlight:**
```bash
pnpm mobile:testflight # Submit to TestFlight
```

**Utilities:**
```bash
pnpm mobile:install # Install mobile dependencies
pnpm mobile:lint # Run Biome check
pnpm mobile:format # Run Biome format
```

### From apps/mobile/ Directory

```bash
cd apps/mobile

# Development server
npx expo start
npx expo start --clear

# Build and run
npx expo run:ios
npx expo run:ios --device
npx expo run:android
npx expo run:android --device

# Generate native code
npx expo prebuild
npx expo prebuild --clean

# EAS builds (iOS)
npx eas build --profile development --platform ios
npx eas build --profile development --platform ios --local
npx eas build --profile preview --platform ios
npx eas build --profile production --platform ios

# EAS builds (Android)
npx eas build --profile development --platform android
npx eas build --profile preview --platform android
npx eas build --profile production --platform android

# TestFlight
npx testflight
npx eas submit --platform ios

# Linting
pnpm lint
pnpm lint:fix
pnpm format
```

## Prebuild Explained

`expo prebuild` generates the native `ios/` and `android/` folders from your Expo configuration.

**When to run `prebuild`:**
- First time setting up the project
- After adding/removing native dependencies (e.g., `expo-camera`, `react-native-maps`)
- After changing `app.json` iOS/Android configuration
- After updating Expo SDK version

**When to use `--clean`:**
- Switching between Expo SDK versions
- Native build is failing and you want a fresh start
- You've made manual changes to native files that you want to discard

The `--clean` flag removes existing `ios/` and `android/` directories before regenerating.

## Build Profiles

Defined in `eas.json`:

| Profile | Purpose | Distribution |
|---------|---------|--------------|
| `development` | Dev client with debugging | Internal only |
| `preview` | Production-like for testing | Internal only |
| `production` | App Store / Play Store release | Public |

**Local vs Cloud builds:**
- Cloud (default): Runs on Expo's servers, no local Xcode needed
- Local (`--local`): Runs on your machine, faster iteration, requires Xcode/Android SDK
Loading