Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(desktop): add a dark appearance to the app icon (#90636)

Charles Vien630826b63bbb
diff --git a/products/desktop/apps/code/build/Icon.icon/Assets/logo-dark.png b/products/desktop/apps/code/build/Icon.icon/Assets/logo-dark.png
new file mode 100644
index 000000000000..1a7433e79730
Binary files /dev/null and b/products/desktop/apps/code/build/Icon.icon/Assets/logo-dark.png differ
diff --git a/products/desktop/apps/code/build/icon.icon/Assets/logo.png b/products/desktop/apps/code/build/Icon.icon/Assets/logo.png
similarity index 100%
rename from products/desktop/apps/code/build/icon.icon/Assets/logo.png
rename to products/desktop/apps/code/build/Icon.icon/Assets/logo.png
diff --git a/products/desktop/apps/code/build/Icon.icon/icon.json b/products/desktop/apps/code/build/Icon.icon/icon.json
new file mode 100644
index 000000000000..c71e65e1359c
--- /dev/null
+++ b/products/desktop/apps/code/build/Icon.icon/icon.json
@@ -0,0 +1,75 @@
+{
+ "fill-specializations": [
+ {
+ "value": {
+ "solid": "display-p3:0.97647,0.93333,0.88235,1.00000"
+ }
+ },
+ {
+ "appearance": "dark",
+ "value": {
+ "solid": "display-p3:0.06667,0.06667,0.07451,1.00000"
+ }
+ }
+ ],
+ "groups": [
+ {
+ "blur-material": null,
+ "layers": [
+ {
+ "glass": false,
+ "image-name": "logo.png",
+ "name": "logo",
+ "opacity-specializations": [
+ {
+ "value": 1
+ },
+ {
+ "appearance": "dark",
+ "value": 0
+ }
+ ]
+ },
+ {
+ "glass": false,
+ "image-name": "logo-dark.png",
+ "name": "logo-dark",
+ "opacity-specializations": [
+ {
+ "value": 0
+ },
+ {
+ "appearance": "dark",
+ "value": 1
+ }
+ ]
+ }
+ ],
+ "lighting": "individual",
+ "shadow-specializations": [
+ {
+ "value": {
+ "kind": "neutral",
+ "opacity": 0.5
+ }
+ },
+ {
+ "appearance": "dark",
+ "value": {
+ "kind": "none",
+ "opacity": 0.5
+ }
+ }
+ ],
+ "specular": true,
+ "translucency": {
+ "enabled": true,
+ "value": 0.5
+ }
+ }
+ ],
+ "supported-platforms": {
+ "circles": ["watchOS"],
+ "squares": "shared"
+ }
+}
diff --git a/products/desktop/apps/code/build/icon.icon/icon.json b/products/desktop/apps/code/build/icon.icon/icon.json
deleted file mode 100644
index 76c74d9b86f7..000000000000
--- a/products/desktop/apps/code/build/icon.icon/icon.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "fill": {
- "solid": "display-p3:0.97647,0.93333,0.88235,1.00000"
- },
- "groups": [
- {
- "blur-material": null,
- "layers": [
- {
- "glass": false,
- "image-name": "logo.png",
- "name": "logo"
- }
- ],
- "lighting": "individual",
- "shadow": {
- "kind": "neutral",
- "opacity": 0.5
- },
- "specular": true,
- "translucency": {
- "enabled": true,
- "value": 0.5
- }
- }
- ],
- "supported-platforms": {
- "circles": ["watchOS"],
- "squares": "shared"
- }
-}
diff --git a/products/desktop/apps/code/package.json b/products/desktop/apps/code/package.json
index aaf42408a0ee..86206eec3586 100644
--- a/products/desktop/apps/code/package.json
+++ b/products/desktop/apps/code/package.json
@@ -16,11 +16,11 @@
"start:debug": "electron-vite dev --watch --inspect=5858",
"compile": "electron-vite build",
"e2e:quick-ask": "tsx --tsconfig scripts/tsconfig.e2e.json scripts/quick-ask-e2e.mts",
- "package": "electron-vite build && electron-builder build --dir --config electron-builder.ts",
- "package:dev": "FORCE_DEV_MODE=1 SKIP_NOTARIZE=1 electron-vite build && electron-builder build --dir --config electron-builder.ts",
- "make": "electron-vite build && electron-builder build --config electron-builder.ts",
+ "package": "bash scripts/compile-glass-icon.sh && electron-vite build && electron-builder build --dir --config electron-builder.ts",
+ "package:dev": "bash scripts/compile-glass-icon.sh && FORCE_DEV_MODE=1 SKIP_NOTARIZE=1 electron-vite build && electron-builder build --dir --config electron-builder.ts",
+ "make": "bash scripts/compile-glass-icon.sh && electron-vite build && electron-builder build --config electron-builder.ts",
"make:linux": "bash scripts/build-linux-docker.sh",
- "publish": "electron-vite build && electron-builder build --publish always --config electron-builder.ts",
+ "publish": "bash scripts/compile-glass-icon.sh && electron-vite build && electron-builder build --publish always --config electron-builder.ts",
"build": "pnpm package",
"build-icons": "bash scripts/generate-icns.sh",
"typecheck": "tsc -p tsconfig.node.json --noEmit && tsc -p tsconfig.web.json --noEmit",
diff --git a/products/desktop/apps/code/scripts/compile-glass-icon.sh b/products/desktop/apps/code/scripts/compile-glass-icon.sh
index ee25a19b92ab..115e28ce2b3d 100755
--- a/products/desktop/apps/code/scripts/compile-glass-icon.sh
+++ b/products/desktop/apps/code/scripts/compile-glass-icon.sh
@@ -11,7 +11,7 @@
set -e
-ICON_PATH="build/icon.icon"
+ICON_PATH="build/Icon.icon"
OUTPUT_PATH="build/Assets.car"
TEMP_DIR=$(mktemp -d)
@@ -20,8 +20,8 @@ if [ ! -d "$ICON_PATH" ]; then
exit 0
fi
-# Check if Assets.car exists and is newer than source
-if [ -f "$OUTPUT_PATH" ] && [ "$OUTPUT_PATH" -nt "$ICON_PATH/icon.json" ]; then
+# Check if Assets.car exists and is newer than every file in the icon bundle
+if [ -f "$OUTPUT_PATH" ] && [ -z "$(find "$ICON_PATH" -type f -newer "$OUTPUT_PATH")" ]; then
echo "✓ Assets.car is up to date"
exit 0
fi
@@ -32,6 +32,8 @@ echo "Compiling liquid glass icon..."
if ! command -v actool &> /dev/null; then
echo "⚠ actool not found - Xcode is required to compile liquid glass icons"
echo " Skipping compilation (app will use standard .icns icon)"
+ # Drop any stale catalog so packaging falls back to the .icns icon
+ rm -f "$OUTPUT_PATH"
exit 0
fi
@@ -53,6 +55,8 @@ if ! actool "$ICON_PATH" \
echo "⚠ actool failed - Xcode is required to compile liquid glass icons"
echo " Skipping compilation (app will use standard .icns icon)"
rm -rf "$TEMP_DIR"
+ # Drop any stale catalog so packaging falls back to the .icns icon
+ rm -f "$OUTPUT_PATH"
exit 0
fi
@@ -62,6 +66,8 @@ if [ -f "$TEMP_DIR/Assets.car" ]; then
echo "✓ Compiled Assets.car to $OUTPUT_PATH"
else
echo "⚠ Assets.car not generated - skipping"
+ # Drop any stale catalog so packaging falls back to the .icns icon
+ rm -f "$OUTPUT_PATH"
fi
# Clean up