Skip to content

Commit 9842732

Browse files
committed
Merge branch 'main' into inbox-session-problems
2 parents 05757ce + 9d82ec2 commit 9842732

206 files changed

Lines changed: 10739 additions & 3669 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ AGENTS.md
3939
MEMORY.md
4040
.claude-config/
4141
.agent-trigger
42+
.posthog-code/
43+
.claude/worktrees/
4244

4345
# Testing
4446
playwright-results/

.posthog-code/environments/twig.toml

Lines changed: 0 additions & 7 deletions
This file was deleted.

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
## Commands
1515

1616
- `pnpm install` - Install all dependencies
17-
- `pnpm dev` - Run both agent (watch) and code app via mprocs
18-
- `pnpm dev:ph` - Run both agent (watch) and code app via phrocs
17+
- `pnpm dev` - Run both agent (watch) and code app via phrocs
18+
- `pnpm dev:mprocs` - Run both agent (watch) and code app via mprocs
1919
- `pnpm dev:agent` - Run agent package in watch mode only
2020
- `pnpm dev:code` - Run code desktop app only
2121
- `pnpm build` - Build all packages (turbo)

README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ cp .env.example .env
3434

3535
### Running in Development
3636

37-
By default, `pnpm dev` uses [mprocs](https://github.com/pvolok/mprocs) to run the agent and code app in parallel.
37+
By default, `pnpm dev` uses phrocs (our custom process runner) to run the agent and code app in parallel. phrocs auto-installs on first run and reads the `mprocs.yaml` config file. The binary is downloaded to `bin/phrocs` and is git-ignored.
3838

3939
```bash
4040
# Run both agent (watch mode) and code app in parallel
@@ -43,21 +43,13 @@ pnpm dev
4343
# Or run them separately:
4444
pnpm dev:agent # Run agent in watch mode
4545
pnpm dev:code # Run code app
46-
```
47-
48-
### phrocs (alpha)
49-
50-
phrocs is our custom process runner built as a replacement for mprocs. It's currently in alpha and can be used as an alternative dev runner. phrocs does not auto-update — you must manually run the update command to pull the latest version.
51-
52-
```bash
53-
# Run dev with phrocs (auto-installs on first run)
54-
pnpm dev:ph
5546

5647
# Manually update phrocs to the latest version
5748
pnpm update:phrocs
58-
```
5949

60-
phrocs reads the same `mprocs.yaml` config file. The binary is downloaded to `bin/phrocs` and is git-ignored.
50+
# Use mprocs instead of phrocs
51+
pnpm dev:mprocs
52+
```
6153

6254
> **Want to connect to a local PostHog instance?** See [docs/LOCAL-DEVELOPMENT.md](./docs/LOCAL-DEVELOPMENT.md) for OAuth setup and connecting to localhost:8010.
6355

apps/code/build/dmg-background.png

9.49 KB
Loading

apps/code/forge.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,13 @@ const config: ForgeConfig = {
173173
new MakerDMG({
174174
icon: "./build/app-icon.icns",
175175
format: "ULFO",
176+
background: "./build/dmg-background.png",
177+
iconSize: 80,
178+
window: { size: { width: 540, height: 380 } },
179+
contents: (opts) => [
180+
{ x: 135, y: 225, type: "file", path: opts.appPath },
181+
{ x: 405, y: 225, type: "link", path: "/Applications" },
182+
],
176183
...(shouldSignMacApp && appleCodesignIdentity
177184
? {
178185
"code-sign": {

apps/code/package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"@electron-forge/shared-types": "^7.11.1",
5353
"@electron/rebuild": "^4.0.3",
5454
"@playwright/test": "^1.42.0",
55-
"@posthog/rollup-plugin": "^1.2.6",
55+
"@posthog/rollup-plugin": "^1.4.0",
5656
"@storybook/addon-a11y": "10.2.0",
5757
"@storybook/addon-docs": "10.2.0",
5858
"@storybook/react-vite": "10.2.0",
@@ -130,10 +130,7 @@
130130
"@posthog/electron-trpc": "workspace:*",
131131
"@posthog/git": "workspace:*",
132132
"@posthog/hedgehog-mode": "^0.0.48",
133-
"@posthog/quill-blocks": "link:/Users/adamleithp/Dev/posthog/packages/quill/packages/blocks",
134-
"@posthog/quill-components": "link:/Users/adamleithp/Dev/posthog/packages/quill/packages/components",
135-
"@posthog/quill-primitives": "link:/Users/adamleithp/Dev/posthog/packages/quill/packages/primitives",
136-
"@posthog/quill-tokens": "link:/Users/adamleithp/Dev/posthog/packages/quill/packages/tokens",
133+
"@posthog/quill": "0.1.0-alpha.6",
137134
"@posthog/shared": "workspace:*",
138135
"@radix-ui/react-collapsible": "^1.1.12",
139136
"@radix-ui/react-icons": "^1.3.2",
@@ -190,6 +187,7 @@
190187
"rehype-sanitize": "^6.0.0",
191188
"remark-breaks": "^4.0.0",
192189
"remark-gfm": "^4.0.1",
190+
"shadcn": "^4.1.2",
193191
"smol-toml": "^1.6.0",
194192
"sonner": "^2.0.7",
195193
"striptags": "^3.2.0",

apps/code/scripts/patch-electron-name.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ if [ ! -f "$PLIST_FILE" ]; then
1010
exit 0
1111
fi
1212

13-
if /usr/libexec/PlistBuddy -c "Print :CFBundleName" "$PLIST_FILE" | grep -q "Array (Development)"; then
13+
if /usr/libexec/PlistBuddy -c "Print :CFBundleName" "$PLIST_FILE" | grep -q "PostHog Code (Development)"; then
1414
exit 0
1515
fi
1616

17-
/usr/libexec/PlistBuddy -c "Set :CFBundleName 'Array (Development)'" "$PLIST_FILE"
18-
/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName 'Array (Development)'" "$PLIST_FILE"
17+
/usr/libexec/PlistBuddy -c "Set :CFBundleName 'PostHog Code (Development)'" "$PLIST_FILE"
18+
/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName 'PostHog Code (Development)'" "$PLIST_FILE"
1919
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier 'com.posthog.array.dev'" "$PLIST_FILE"

apps/code/src/main/db/repositories/auth-session-repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { CloudRegion } from "@shared/types/oauth";
1+
import type { CloudRegion } from "@shared/types/regions";
22
import { eq } from "drizzle-orm";
33
import { inject, injectable } from "inversify";
44
import { MAIN_TOKENS } from "../../di/tokens";

apps/code/src/main/preload.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { exposeElectronTRPC } from "@posthog/electron-trpc/main";
2+
import { contextBridge, webUtils } from "electron";
23
import "electron-log/preload";
34

5+
contextBridge.exposeInMainWorld("electronUtils", {
6+
getPathForFile: (file: File) => webUtils.getPathForFile(file),
7+
});
8+
49
process.once("loaded", async () => {
510
exposeElectronTRPC();
611
});

0 commit comments

Comments
 (0)