From 2b3e3df4c3acba19c62af3170521f49421982864 Mon Sep 17 00:00:00 2001 From: Charles Vien Date: Fri, 17 Jul 2026 14:21:58 -0700 Subject: [PATCH 1/7] rename app to PostHog --- .github/workflows/code-build-test.yml | 4 +- .github/workflows/code-release.yml | 4 +- .github/workflows/pr-build-installer.yml | 8 +-- apps/code/electron-builder.ts | 8 +-- apps/code/index.html | 2 +- apps/code/package.json | 2 +- apps/code/scripts/dev-update/build-pair.sh | 2 +- .../scripts/dev-update/run-from-ci-forge.sh | 4 +- apps/code/scripts/dev-update/run-from-ci.sh | 10 +-- apps/code/scripts/patch-electron-name.sh | 8 +-- apps/code/src/main/bootstrap.ts | 2 +- apps/code/src/main/index.ts | 8 +-- apps/code/src/main/menu.ts | 8 +-- .../discord-presence/presence-format.ts | 2 +- .../utils/linux-appimage-protocol.test.ts | 2 +- .../src/main/utils/linux-appimage-protocol.ts | 2 +- .../macos-packaged-install-guard.test.ts | 44 ++++++------- .../components/BootErrorBoundary.test.tsx | 4 +- .../renderer/components/BootErrorBoundary.tsx | 2 +- apps/code/src/renderer/main.tsx | 4 +- apps/code/tests/e2e/fixtures/electron.ts | 11 ++-- apps/code/tests/e2e/fixtures/update.ts | 61 ++++++++++++------- .../code/tests/e2e/tests/main-process.spec.ts | 2 +- apps/code/tests/e2e/tests/smoke.spec.ts | 2 +- .../code/tests/e2e/tests/update-forge.spec.ts | 3 +- apps/mobile/README.md | 2 +- apps/mobile/app.json | 2 +- apps/mobile/scripts/push-sim.sh | 2 +- apps/mobile/scripts/send-test-push.sh | 2 +- .../navigation/components/NavDrawer.tsx | 2 +- .../tasks/components/FloatingTasksHeader.tsx | 2 +- .../features/tasks/stores/taskSessionStore.ts | 4 +- apps/mobile/src/lib/posthogUrl.test.ts | 4 +- apps/web/index.html | 2 +- apps/web/package.json | 2 +- .../agent/src/adapters/claude/claude-agent.ts | 2 +- .../permissions/permission-handlers.test.ts | 2 +- .../claude/permissions/permission-handlers.ts | 2 +- .../adapters/claude/session/instructions.ts | 2 +- .../src/adapters/claude/session/rtk.test.ts | 8 +-- .../codex-app-server-agent.ts | 4 +- .../src/adapters/local-tools/tools/speak.ts | 2 +- .../agent/src/adapters/rtk-guidance.test.ts | 6 +- .../src/billing/spendAnalysisPrompt.test.ts | 4 +- .../core/src/billing/spendAnalysisPrompt.ts | 8 +-- packages/core/src/billing/spendSuggestions.ts | 4 +- .../core/src/billing/usageLimitContent.ts | 6 +- packages/core/src/canvas/dashboardsService.ts | 2 +- .../core/src/integrations/connectErrors.ts | 2 +- .../core/src/speech/composeUtterance.test.ts | 20 +++--- packages/core/src/speech/composeUtterance.ts | 4 +- packages/core/src/speech/speech.test.ts | 16 ++--- packages/git/src/worktree.ts | 2 +- packages/shared/src/analytics-events.ts | 2 +- .../components/DeepLinkApprovalModal.tsx | 2 +- .../agent-applications/featureFlag.ts | 2 +- .../features/ai-approval/AiApprovalScreen.tsx | 2 +- .../auth/components/InviteCodeScreen.tsx | 2 +- .../auth/components/ScopeReauthPrompt.tsx | 4 +- .../billing/UsageBillingAnnouncementModal.tsx | 8 +-- .../connectivity/connectivityToast.ts | 2 +- .../features/folder-picker/FolderPicker.tsx | 5 +- .../components/parts/ToolPermissionList.tsx | 2 +- .../notifications/ErrorDetailsDialog.tsx | 2 +- .../features/notifications/notifications.ts | 4 +- .../components/ConnectGitHubStep.tsx | 2 +- .../components/ImportConfigStep.tsx | 2 +- .../onboarding/components/InviteCodeStep.tsx | 2 +- .../features/settings/FolderSettingsView.tsx | 12 ++-- .../sections/DiscordPresencePreview.tsx | 4 +- .../settings/sections/DiscordSettings.tsx | 2 +- .../sections/NotificationsSettings.tsx | 15 +++-- .../settings/sections/PlanUsageSettings.tsx | 6 +- .../sections/SignalSourcesSettings.tsx | 4 +- .../settings/sections/SlackSettings.tsx | 4 +- .../sections/useCustomSoundCapture.ts | 2 +- .../ui/src/features/settings/settingsStore.ts | 2 +- .../sidebar/components/ProjectSwitcher.tsx | 2 +- packages/ui/src/features/skills/SkillCard.tsx | 4 +- .../features/updates/UpdateAvailableModal.tsx | 2 +- .../usage/components/SpendKpiStrip.tsx | 2 +- .../src/services/agent/codex-home.ts | 2 +- .../src/services/agent/discover-plugins.ts | 4 +- .../claude-cli-sessions.ts | 4 +- .../mcp-callback/mcp-callback-server.ts | 4 +- .../services/oauth-callback/oauth-callback.ts | 7 ++- .../src/services/os/os.test.ts | 2 +- .../workspace-server/src/services/os/os.ts | 2 +- .../services/posthog-plugin/codex-mirror.ts | 2 +- .../posthog-plugin/update-skills-saga.ts | 4 +- .../src/services/shell/shell.test.ts | 2 +- .../src/services/shell/shell.ts | 2 +- scripts/clean-posthog-code-macos.sh | 14 ++++- 93 files changed, 246 insertions(+), 236 deletions(-) diff --git a/.github/workflows/code-build-test.yml b/.github/workflows/code-build-test.yml index 65821126c3..a9b68e36f4 100644 --- a/.github/workflows/code-build-test.yml +++ b/.github/workflows/code-build-test.yml @@ -114,9 +114,9 @@ jobs: MATRIX_ARCH: ${{ matrix.arch }} run: | if [[ "$MATRIX_ARCH" == "arm64" ]]; then - APP_BUNDLE="apps/code/out/mac-arm64/PostHog Code.app" + APP_BUNDLE="apps/code/out/mac-arm64/PostHog.app" else - APP_BUNDLE="apps/code/out/mac/PostHog Code.app" + APP_BUNDLE="apps/code/out/mac/PostHog.app" fi RESOURCES="$APP_BUNDLE/Contents/Resources" UNPACKED="$RESOURCES/app.asar.unpacked/node_modules" diff --git a/.github/workflows/code-release.yml b/.github/workflows/code-release.yml index 82aa0be5fb..0df19e0c78 100644 --- a/.github/workflows/code-release.yml +++ b/.github/workflows/code-release.yml @@ -170,9 +170,9 @@ jobs: MATRIX_ARCH: ${{ matrix.arch }} run: | if [[ "$MATRIX_ARCH" == "arm64" ]]; then - APP_BUNDLE="apps/code/out/mac-arm64/PostHog Code.app" + APP_BUNDLE="apps/code/out/mac-arm64/PostHog.app" else - APP_BUNDLE="apps/code/out/mac/PostHog Code.app" + APP_BUNDLE="apps/code/out/mac/PostHog.app" fi RESOURCES="$APP_BUNDLE/Contents/Resources" UNPACKED="$RESOURCES/app.asar.unpacked/node_modules" diff --git a/.github/workflows/pr-build-installer.yml b/.github/workflows/pr-build-installer.yml index 7d3cd8e3f1..152a00a2d1 100644 --- a/.github/workflows/pr-build-installer.yml +++ b/.github/workflows/pr-build-installer.yml @@ -149,15 +149,15 @@ jobs: echo "" echo "**[⬇️ Open this run and download the \`code-macos-arm64\` artifact](${RUN_URL}#artifacts)** (Apple Silicon / M-series)." echo "" - echo "Unzip it to get the \`.dmg\`, open it, and drag **PostHog Code** into **Applications**." + echo "Unzip it to get the \`.dmg\`, open it, and drag **PostHog** into **Applications**." echo "" - echo "This build is **signed but not notarized**, so macOS quarantines it on download and Gatekeeper reports *\"PostHog Code is damaged and can't be opened\"*. That is the missing notarization, not a corrupt file — clear the quarantine flag once and it launches:" + echo "This build is **signed but not notarized**, so macOS quarantines it on download and Gatekeeper reports *\"PostHog is damaged and can't be opened\"*. That is the missing notarization, not a corrupt file — clear the quarantine flag once and it launches:" echo "" echo "\`\`\`sh" - echo "xattr -dr com.apple.quarantine \"/Applications/PostHog Code.app\"" + echo "xattr -dr com.apple.quarantine \"/Applications/PostHog.app\"" echo "\`\`\`" echo "" - echo "Then open **PostHog Code** normally. (Fully notarized, double-click-to-run builds ship only from the tagged release pipeline.)" + echo "Then open **PostHog** normally. (Fully notarized, double-click-to-run builds ship only from the tagged release pipeline.)" echo "" echo "Built from ${GITHUB_SHA} · rebuilds on each push while the \`build-installer\` label is present. Downloading requires being signed in to GitHub with repo access." } > comment-body.md diff --git a/apps/code/electron-builder.ts b/apps/code/electron-builder.ts index d0fd293eb3..398a904b6d 100644 --- a/apps/code/electron-builder.ts +++ b/apps/code/electron-builder.ts @@ -11,8 +11,8 @@ const skipNotarize = const config: Configuration = { // Original release bundle id; changing it breaks existing installs' data dir and Keychain entries. appId: "com.posthog.array", - productName: "PostHog Code", - executableName: "PostHog Code", + productName: "PostHog", + executableName: "PostHog", directories: { output: "out", @@ -61,7 +61,7 @@ const config: Configuration = { protocols: [ { - name: "PostHog Code", + name: "PostHog", schemes: ["posthog-code"], }, ], @@ -81,7 +81,7 @@ const config: Configuration = { // Shown in the macOS microphone-permission prompt when a user records a // custom notification sound. NSMicrophoneUsageDescription: - "PostHog Code uses the microphone to record custom notification sounds.", + "PostHog uses the microphone to record custom notification sounds.", }, notarize: !skipNotarize, }, diff --git a/apps/code/index.html b/apps/code/index.html index 4da71f1607..4fdc0f8ca9 100644 --- a/apps/code/index.html +++ b/apps/code/index.html @@ -5,7 +5,7 @@ - PostHog Code + PostHog diff --git a/apps/code/package.json b/apps/code/package.json index 37961dcd6e..9d2aa0e0a4 100644 --- a/apps/code/package.json +++ b/apps/code/package.json @@ -1,7 +1,7 @@ { "name": "@posthog/code", "version": "0.0.0-dev", - "description": "PostHog Code - desktop task manager", + "description": "PostHog - desktop task manager", "homepage": "https://posthog.com", "main": ".vite/build/bootstrap.js", "versionHash": "dynamic", diff --git a/apps/code/scripts/dev-update/build-pair.sh b/apps/code/scripts/dev-update/build-pair.sh index c4c934afda..029ed5a74f 100644 --- a/apps/code/scripts/dev-update/build-pair.sh +++ b/apps/code/scripts/dev-update/build-pair.sh @@ -30,4 +30,4 @@ pnpm exec electron-builder build --mac zip --arm64 --publish never \ -c.extraMetadata.version="$OLD_VERSION" --config electron-builder.ts echo "==> feed=$FEED_DIR" -echo "==> app=out/mac-arm64/PostHog Code.app ($OLD_VERSION)" +echo "==> app=out/mac-arm64/PostHog.app ($OLD_VERSION)" diff --git a/apps/code/scripts/dev-update/run-from-ci-forge.sh b/apps/code/scripts/dev-update/run-from-ci-forge.sh index e8c93cf56b..388f6ffe9a 100755 --- a/apps/code/scripts/dev-update/run-from-ci-forge.sh +++ b/apps/code/scripts/dev-update/run-from-ci-forge.sh @@ -21,8 +21,8 @@ command -v gh >/dev/null || { exit 1 } -if pgrep -x "PostHog Code" >/dev/null; then - echo "PostHog Code is already running. Quit it first; the test build shares its single-instance lock and data dir." >&2 +if pgrep -x "PostHog Code" >/dev/null || pgrep -x "PostHog" >/dev/null; then + echo "PostHog is already running. Quit it first; the test build shares its single-instance lock and data dir." >&2 exit 1 fi diff --git a/apps/code/scripts/dev-update/run-from-ci.sh b/apps/code/scripts/dev-update/run-from-ci.sh index 2b4ed87445..4c175c13ff 100644 --- a/apps/code/scripts/dev-update/run-from-ci.sh +++ b/apps/code/scripts/dev-update/run-from-ci.sh @@ -20,8 +20,8 @@ command -v gh >/dev/null || { exit 1 } -if pgrep -x "PostHog Code" >/dev/null; then - echo "PostHog Code is already running. Quit it first; the test build shares its single-instance lock and data dir." >&2 +if pgrep -x "PostHog" >/dev/null; then + echo "PostHog is already running. Quit it first; the test build shares its single-instance lock and data dir." >&2 exit 1 fi @@ -57,7 +57,7 @@ FEED_YML="$(find "$TMP/new" -name latest-mac.yml | head -1)" echo "==> old 1.0.0 app -> out/mac-arm64" rm -rf out/mac-arm64 && mkdir -p out/mac-arm64 ditto -x -k "$OLD_ZIP" out/mac-arm64 -xattr -dr com.apple.quarantine "out/mac-arm64/PostHog Code.app" 2>/dev/null || true +xattr -dr com.apple.quarantine "out/mac-arm64/PostHog.app" 2>/dev/null || true echo "==> new 2.0.0 feed -> out/dev-update-feed" rm -rf out/dev-update-feed && mkdir -p out/dev-update-feed @@ -75,12 +75,12 @@ SERVE_PID=$! APP_LOG="out/run-from-ci-app.log" echo -echo "==> launching PostHog Code 1.0.0 (feed http://127.0.0.1:$PORT)" +echo "==> launching PostHog 1.0.0 (feed http://127.0.0.1:$PORT)" echo " In the app: open the update banner, click Download, then Restart." echo " It swaps and relaunches into 2.0.0. Quit the app (or Ctrl+C) to finish." echo " App output: $APP_LOG update log: ~/.posthog-code/logs/main.log" echo POSTHOG_E2E_UPDATE_FEED="http://127.0.0.1:$PORT" \ - "out/mac-arm64/PostHog Code.app/Contents/MacOS/PostHog Code" >"$APP_LOG" 2>&1 || true + "out/mac-arm64/PostHog.app/Contents/MacOS/PostHog" >"$APP_LOG" 2>&1 || true echo "==> app exited; cleaning up" diff --git a/apps/code/scripts/patch-electron-name.sh b/apps/code/scripts/patch-electron-name.sh index 940dbad544..a14b1f3eea 100755 --- a/apps/code/scripts/patch-electron-name.sh +++ b/apps/code/scripts/patch-electron-name.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Patches the Electron binary's Info.plist to show "Array (Development)" in the macOS menu bar +# Patches the Electron binary's Info.plist to show "PostHog (Development)" in the macOS menu bar set -e @@ -10,10 +10,10 @@ if [ ! -f "$PLIST_FILE" ]; then exit 0 fi -if /usr/libexec/PlistBuddy -c "Print :CFBundleName" "$PLIST_FILE" | grep -q "PostHog Code (Development)"; then +if /usr/libexec/PlistBuddy -c "Print :CFBundleName" "$PLIST_FILE" | grep -q "PostHog (Development)"; then exit 0 fi -/usr/libexec/PlistBuddy -c "Set :CFBundleName 'PostHog Code (Development)'" "$PLIST_FILE" -/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName 'PostHog Code (Development)'" "$PLIST_FILE" +/usr/libexec/PlistBuddy -c "Set :CFBundleName 'PostHog (Development)'" "$PLIST_FILE" +/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName 'PostHog (Development)'" "$PLIST_FILE" /usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier 'com.posthog.array.dev'" "$PLIST_FILE" diff --git a/apps/code/src/main/bootstrap.ts b/apps/code/src/main/bootstrap.ts index e025a3c5e5..f7e0eaa8f9 100644 --- a/apps/code/src/main/bootstrap.ts +++ b/apps/code/src/main/bootstrap.ts @@ -38,7 +38,7 @@ const isDev = !app.isPackaged; // Set app name for single-instance lock, crashReporter, etc const appName = isDev ? "posthog-code-dev" : "posthog-code"; -app.setName(isDev ? "PostHog Code (Development)" : "PostHog Code"); +app.setName(isDev ? "PostHog (Development)" : "PostHog"); // Set userData path for @posthog/code const appDataPath = app.getPath("appData"); diff --git a/apps/code/src/main/index.ts b/apps/code/src/main/index.ts index 6249e93ed2..4ef7e467ce 100644 --- a/apps/code/src/main/index.ts +++ b/apps/code/src/main/index.ts @@ -332,10 +332,10 @@ app.whenReady().then(async () => { ); dialog.showMessageBoxSync({ type: "warning", - title: "Move PostHog Code to Applications", - message: `PostHog Code is running from a location with read-only access:\n\n${bundleRoot}`, + title: "Move PostHog to Applications", + message: `PostHog is running from a location with read-only access:\n\n${bundleRoot}`, detail: - "After quitting, move PostHog Code to your Applications folder, then open it from there.", + "After quitting, move PostHog to your Applications folder, then open it from there.", buttons: ["Quit"], defaultId: 0, }); @@ -347,7 +347,7 @@ app.whenReady().then(async () => { const buildDate = __BUILD_DATE__ ?? "dev"; log.info( [ - `PostHog Code electron v${app.getVersion()} booting up`, + `PostHog electron v${app.getVersion()} booting up`, `Commit: ${commit}`, `Date: ${buildDate}`, `Electron: ${process.versions.electron}`, diff --git a/apps/code/src/main/menu.ts b/apps/code/src/main/menu.ts index 99e85af21f..97b11eca18 100644 --- a/apps/code/src/main/menu.ts +++ b/apps/code/src/main/menu.ts @@ -84,18 +84,18 @@ export function buildApplicationMenu(): void { function buildAppMenu(): MenuItemConstructorOptions { return { - label: "PostHog Code", + label: "PostHog", submenu: [ { - label: "About PostHog Code", + label: "About PostHog", click: () => { const info = getSystemInfo(); dialog .showMessageBox({ type: "info", - title: "About PostHog Code", - message: "PostHog Code", + title: "About PostHog", + message: "PostHog", detail: info, buttons: ["Copy", "OK"], defaultId: 1, diff --git a/apps/code/src/main/services/discord-presence/presence-format.ts b/apps/code/src/main/services/discord-presence/presence-format.ts index 8f13167719..3c3936ced8 100644 --- a/apps/code/src/main/services/discord-presence/presence-format.ts +++ b/apps/code/src/main/services/discord-presence/presence-format.ts @@ -54,7 +54,7 @@ export function buildActivity( timestamps: { start: startedAt }, assets: { large_image: LARGE_IMAGE_KEY, - large_text: "PostHog Code", + large_text: "PostHog", small_image: agentRunning ? SMALL_IMAGE_RUNNING : SMALL_IMAGE_IDLE, small_text: smallText, }, diff --git a/apps/code/src/main/utils/linux-appimage-protocol.test.ts b/apps/code/src/main/utils/linux-appimage-protocol.test.ts index 8e11f30a1c..75aed441a0 100644 --- a/apps/code/src/main/utils/linux-appimage-protocol.test.ts +++ b/apps/code/src/main/utils/linux-appimage-protocol.test.ts @@ -101,7 +101,7 @@ describe("buildAppImageDesktopEntry", () => { expect(entry).toContain( "MimeType=x-scheme-handler/posthog-code;x-scheme-handler/twig;x-scheme-handler/array;", ); - expect(entry).toContain("Name=PostHog Code"); + expect(entry).toContain("Name=PostHog"); expect(entry.startsWith("[Desktop Entry]")).toBe(true); }); diff --git a/apps/code/src/main/utils/linux-appimage-protocol.ts b/apps/code/src/main/utils/linux-appimage-protocol.ts index 7965946956..b61ad70ad0 100644 --- a/apps/code/src/main/utils/linux-appimage-protocol.ts +++ b/apps/code/src/main/utils/linux-appimage-protocol.ts @@ -9,7 +9,7 @@ const log = logger.scope("linux-appimage-protocol"); // Stable basename for the desktop entry we write. Used both as the file name in // the applications dir and as the handler id passed to `xdg-mime default`. const DESKTOP_FILE_BASENAME = "posthog-code"; -const PRODUCT_NAME = "PostHog Code"; +const PRODUCT_NAME = "PostHog"; /** * True when the current process is a Linux AppImage. AppImage runtimes export diff --git a/apps/code/src/main/utils/macos-packaged-install-guard.test.ts b/apps/code/src/main/utils/macos-packaged-install-guard.test.ts index 49af40d9fd..a9c362f6bd 100644 --- a/apps/code/src/main/utils/macos-packaged-install-guard.test.ts +++ b/apps/code/src/main/utils/macos-packaged-install-guard.test.ts @@ -13,27 +13,27 @@ describe("isMacosAppTranslocationPath", () => { { case: "appPath is translocated", appPath: - "/private/var/folders/yf/xx/AppTranslocation/C6283C3C-9D6E-4D81-A7D5-8BA2567ED486/d/PostHog Code.app/Contents/Resources/app.asar", - exePath: "/Applications/PostHog Code.app/Contents/MacOS/PostHog Code", + "/private/var/folders/yf/xx/AppTranslocation/C6283C3C-9D6E-4D81-A7D5-8BA2567ED486/d/PostHog.app/Contents/Resources/app.asar", + exePath: "/Applications/PostHog.app/Contents/MacOS/PostHog", expected: true, }, { case: "exePath is translocated", - appPath: "/Applications/PostHog Code.app/Contents/Resources/app.asar", + appPath: "/Applications/PostHog.app/Contents/Resources/app.asar", exePath: - "/private/var/folders/yf/xx/AppTranslocation/C6283C3C/d/PostHog Code.app/Contents/MacOS/PostHog Code", + "/private/var/folders/yf/xx/AppTranslocation/C6283C3C/d/PostHog.app/Contents/MacOS/PostHog", expected: true, }, { case: "neither path is translocated (/Applications)", - appPath: "/Applications/PostHog Code.app/Contents/Resources/app.asar", - exePath: "/Applications/PostHog Code.app/Contents/MacOS/PostHog Code", + appPath: "/Applications/PostHog.app/Contents/Resources/app.asar", + exePath: "/Applications/PostHog.app/Contents/MacOS/PostHog", expected: false, }, { case: "neither path is translocated (/Users)", - appPath: "/Users/dev/PostHog Code.app/Contents/Resources/app.asar", - exePath: "/Users/dev/PostHog Code.app/Contents/MacOS/PostHog Code", + appPath: "/Users/dev/PostHog.app/Contents/Resources/app.asar", + exePath: "/Users/dev/PostHog.app/Contents/MacOS/PostHog", expected: false, }, ])("$case → $expected", ({ appPath, exePath, expected }) => { @@ -107,13 +107,13 @@ describe("isMacosPathOnReadOnlyNonRootMountFromTable", () => { { case: "read-only non-root volume", table: baseTable, - path: "/Volumes/ReadOnlyVol/PostHog Code.app/Contents/MacOS/PostHog Code", + path: "/Volumes/ReadOnlyVol/PostHog.app/Contents/MacOS/PostHog", expected: true, }, { case: "writable non-root volume", table: baseTable, - path: "/Volumes/Writable/out/PostHog Code.app/Contents/MacOS/PostHog Code", + path: "/Volumes/Writable/out/PostHog.app/Contents/MacOS/PostHog", expected: false, }, { @@ -154,33 +154,29 @@ describe("isMacosPackagedUnsafeBundleLocation", () => { { case: "translocated bundle", appPath: - "/private/var/.../AppTranslocation/UUID/d/PostHog Code.app/Contents/Resources/app.asar", - exePath: "/Applications/PostHog Code.app/Contents/MacOS/PostHog Code", + "/private/var/.../AppTranslocation/UUID/d/PostHog.app/Contents/Resources/app.asar", + exePath: "/Applications/PostHog.app/Contents/MacOS/PostHog", readMountTable: () => writableMountTable, expected: true, }, { case: "ordinary non-translocated path on a writable mount", - appPath: - "/Volumes/build/out/PostHog Code.app/Contents/Resources/app.asar", - exePath: - "/Volumes/build/out/PostHog Code.app/Contents/MacOS/PostHog Code", + appPath: "/Volumes/build/out/PostHog.app/Contents/Resources/app.asar", + exePath: "/Volumes/build/out/PostHog.app/Contents/MacOS/PostHog", readMountTable: () => writableMountTable, expected: false, }, { case: "bundle on a read-only non-root volume", - appPath: - "/Volumes/ReadOnlyVol/PostHog Code.app/Contents/Resources/app.asar", - exePath: - "/Volumes/ReadOnlyVol/PostHog Code.app/Contents/MacOS/PostHog Code", + appPath: "/Volumes/ReadOnlyVol/PostHog.app/Contents/Resources/app.asar", + exePath: "/Volumes/ReadOnlyVol/PostHog.app/Contents/MacOS/PostHog", readMountTable: () => readOnlyMountTable, expected: true, }, { case: "mount table cannot be read (degrade to non-blocking)", - appPath: "/Applications/PostHog Code.app/Contents/Resources/app.asar", - exePath: "/Applications/PostHog Code.app/Contents/MacOS/PostHog Code", + appPath: "/Applications/PostHog.app/Contents/Resources/app.asar", + exePath: "/Applications/PostHog.app/Contents/MacOS/PostHog", readMountTable: () => null, expected: false, }, @@ -193,8 +189,8 @@ describe("isMacosPackagedUnsafeBundleLocation", () => { it("short-circuits on translocation without reading the mount table", () => { const readMountTable = vi.fn(() => writableMountTable); isMacosPackagedUnsafeBundleLocation( - "/private/var/.../AppTranslocation/UUID/d/PostHog Code.app/Contents/Resources/app.asar", - "/Applications/PostHog Code.app/Contents/MacOS/PostHog Code", + "/private/var/.../AppTranslocation/UUID/d/PostHog.app/Contents/Resources/app.asar", + "/Applications/PostHog.app/Contents/MacOS/PostHog", readMountTable, ); expect(readMountTable).not.toHaveBeenCalled(); diff --git a/apps/code/src/renderer/components/BootErrorBoundary.test.tsx b/apps/code/src/renderer/components/BootErrorBoundary.test.tsx index 6ba04b9332..f26b1ff190 100644 --- a/apps/code/src/renderer/components/BootErrorBoundary.test.tsx +++ b/apps/code/src/renderer/components/BootErrorBoundary.test.tsx @@ -33,9 +33,7 @@ describe("BootErrorScreen", () => { render(); expect(screen.getByRole("alert")).toBeInTheDocument(); - expect( - screen.getByText("PostHog Code failed to start"), - ).toBeInTheDocument(); + expect(screen.getByText("PostHog failed to start")).toBeInTheDocument(); expect(screen.getByText("kaboom")).toBeInTheDocument(); }); diff --git a/apps/code/src/renderer/components/BootErrorBoundary.tsx b/apps/code/src/renderer/components/BootErrorBoundary.tsx index fb20433b1d..3e95cce0ef 100644 --- a/apps/code/src/renderer/components/BootErrorBoundary.tsx +++ b/apps/code/src/renderer/components/BootErrorBoundary.tsx @@ -57,7 +57,7 @@ export function BootErrorScreen({ error }: { error: unknown }) { const message = error instanceof Error ? error.message : String(error); return (
-

PostHog Code failed to start

+

PostHog failed to start

{message}