Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

feat(spaces): new app icon, the terracotta koala keycap (#5914)

cua-agents[bot]ef78ec837751
diff --git a/apps/cua-spaces-macos/README.md b/apps/cua-spaces-macos/README.md
index bb8c62332a..8035a9cf77 100644
--- a/apps/cua-spaces-macos/README.md
+++ b/apps/cua-spaces-macos/README.md
@@ -497,11 +497,14 @@ the key was, so installing is dragging the key into its place.
`package-dmg.sh` lays the window out with a pinned
[dmgbuild](https://github.com/dmgbuild/dmgbuild) (`scripts/dmg-settings.py`)
and makes the alias with `scripts/make-alias.swift`. The art in
-`Support/dmg` and the app icon `Support/AppIcon.icns` (the key with the Spaces
-mark, the Cua mark in stacked squares, on a slate tile) are drawn from the site's keycap sprites by
-`scripts/dmg-art/render.sh` (headless Chrome), which also writes the same icon
-to `apps/cua-spaces/src-tauri/icons` for the other apps; rerun it only when
-the art changes.
+`Support/dmg` is drawn from the site's keycap sprites by
+`scripts/dmg-art/render.sh` (headless Chrome). The app icon
+`Support/AppIcon.icns` (the terracotta koala keycap) is not drawn: it is built
+from the chosen PNGs in `scripts/dmg-art/src` (`app-icon-1024.png`, plus
+`app-icon-small-1024.png` with a larger print for 16 to 64 px) by
+`render.sh`, which also writes the same icon to `apps/cua-spaces/src-tauri/icons`
+for the other apps. `render.sh --app-icon-only` rebuilds just the icons; rerun
+it only when the art changes.
## Updates (Sparkle)
diff --git a/apps/cua-spaces-macos/Support/AppIcon.icns b/apps/cua-spaces-macos/Support/AppIcon.icns
index ac600272e4..12e5946e0e 100644
Binary files a/apps/cua-spaces-macos/Support/AppIcon.icns and b/apps/cua-spaces-macos/Support/AppIcon.icns differ
diff --git a/apps/cua-spaces-macos/scripts/build-app.sh b/apps/cua-spaces-macos/scripts/build-app.sh
index 7c0435027f..3bb35591c8 100755
--- a/apps/cua-spaces-macos/scripts/build-app.sh
+++ b/apps/cua-spaces-macos/scripts/build-app.sh
@@ -6,7 +6,7 @@
# Cua Spaces app export dylib (libcua_spaces_ffi, which carries the cua SDK;
# staged as libs/cua/swift/lib/libcua_sdk.dylib by
# libs/spaces-app-swift/scripts/stage-library.sh), the app icon
-# (Support/AppIcon.icns, the blue Cua key on slate; scripts/dmg-art draws it)
+# (Support/AppIcon.icns, the terracotta koala keycap; scripts/dmg-art builds it)
# and the menu bar template the Tauri app ships (apps/cua-spaces/src-tauri/
# icons), plus the `cua` CLI next to the executable when one is built
# (the app installs it onto PATH on first launch, like the Tauri app's
diff --git a/apps/cua-spaces-macos/scripts/dmg-art/app-icon.py b/apps/cua-spaces-macos/scripts/dmg-art/app-icon.py
new file mode 100755
index 0000000000..a1885202df
--- /dev/null
+++ b/apps/cua-spaces-macos/scripts/dmg-art/app-icon.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: FSL-1.1-MIT
+# Copyright (c) 2026 Cua AI, Inc.
+
+"""Builds every size of the Cua Spaces app icon from the two chosen masters.
+
+ src/app-icon-1024.png the icon (the terracotta koala keycap)
+ src/app-icon-small-1024.png the same icon redrawn with a larger print, for
+ 16 to 64 px, where the full art turns to mush
+
+ app-icon.py iconset DIR icon_16x16.png ... [email protected], for iconutil
+ app-icon.py tauri DIR the Tauri / Electron / Linux / Windows set
+ (png sizes, icon.png, icon.ico), no icon.icns
+
+Sizes up to 32 px come from the small master, sharpened after downsampling;
+33 to 64 px from the small master as is; larger ones from the full master.
+"""
+import pathlib
+import sys
+
+from PIL import Image, ImageFilter
+
+HERE = pathlib.Path(__file__).resolve().parent
+FULL = Image.open(HERE / "src/app-icon-1024.png").convert("RGBA")
+SMALL = Image.open(HERE / "src/app-icon-small-1024.png").convert("RGBA")
+
+
+def pick(size: int) -> Image.Image:
+ if size <= 32:
+ return SMALL.resize((size, size), Image.LANCZOS).filter(ImageFilter.UnsharpMask(1, 60, 0))
+ if size <= 64:
+ return SMALL.resize((size, size), Image.LANCZOS)
+ return FULL.resize((size, size), Image.LANCZOS)
+
+
+def iconset(out: pathlib.Path) -> None:
+ for s in (16, 32, 128, 256, 512):
+ pick(s).save(out / f"icon_{s}x{s}.png")
+ pick(s * 2).save(out / f"icon_{s}x{s}@2x.png")
+
+
+def tauri(out: pathlib.Path) -> None:
+ names = {
+ "32x32.png": 32, "64x64.png": 64, "128x128.png": 128, "[email protected]": 256, "icon.png": 512,
+ "StoreLogo.png": 50, "Square30x30Logo.png": 30, "Square44x44Logo.png": 44, "Square71x71Logo.png": 71,
+ "Square89x89Logo.png": 89, "Square107x107Logo.png": 107, "Square142x142Logo.png": 142,
+ "Square150x150Logo.png": 150, "Square284x284Logo.png": 284, "Square310x310Logo.png": 310,
+ }
+ for name, s in names.items():
+ pick(s).save(out / name)
+ frames = [pick(s) for s in (16, 24, 32, 48, 64, 256)]
+ frames[-1].save(out / "icon.ico", format="ICO", sizes=[f.size for f in frames], append_images=frames[:-1])
+
+
+if __name__ == "__main__" and len(sys.argv) == 3 and sys.argv[1] in ("iconset", "tauri"):
+ dest = pathlib.Path(sys.argv[2])
+ dest.mkdir(parents=True, exist_ok=True)
+ {"iconset": iconset, "tauri": tauri}[sys.argv[1]](dest)
+else:
+ sys.exit(__doc__)
diff --git a/apps/cua-spaces-macos/scripts/dmg-art/art.html b/apps/cua-spaces-macos/scripts/dmg-art/art.html
index 0b91c99d83..49911ce0a7 100644
--- a/apps/cua-spaces-macos/scripts/dmg-art/art.html
+++ b/apps/cua-spaces-macos/scripts/dmg-art/art.html
@@ -141,13 +141,6 @@
item(e.src, e.x / 100 * WIN.w, e.y / 100 * WIN.h, e.size / 100 * WIN.w, e.rot, { legend: e.legend, z: Math.round(e.depth * 10), soft: e.soft })).join("") +
guides() +
`<div class="copy"><h1>One more key.</h1><p>Drag Cua Spaces into Applications.</p></div>`;
- } else if (mode === "icon") {
- Object.assign(stage.style, { width: ICON + "px", height: ICON + "px" });
- const clip = `path('${squircle(ICON, (ICON - TILE) / 2)}')`;
- // Slate night (variant B): a vertical slate gradient, the key on a soft drop shadow.
- stage.innerHTML = `<div style="position:absolute;inset:0;clip-path:${clip};background:linear-gradient(#33415a, #121a27);overflow:hidden">
- <div style="position:absolute;inset:0;filter:drop-shadow(0 26px 28px rgba(0,0,0,.35))">${iconKey((w) => sprite(TARGET, w, "spaces"))}</div>
- </div>`;
} else if (mode === "alias") {
Object.assign(stage.style, { width: ICON + "px", height: ICON + "px" });
const sp = SPR[TARGET];
diff --git a/apps/cua-spaces-macos/scripts/dmg-art/render.sh b/apps/cua-spaces-macos/scripts/dmg-art/render.sh
index 2bb95d6fa8..9cc665df8b 100755
--- a/apps/cua-spaces-macos/scripts/dmg-art/render.sh
+++ b/apps/cua-spaces-macos/scripts/dmg-art/render.sh
@@ -2,18 +2,22 @@
# SPDX-License-Identifier: FSL-1.1-MIT
# Copyright (c) 2026 Cua AI, Inc.
-# Renders art.html with headless Chrome into the checked-in assets:
+# Builds the checked-in assets. The DMG art is rendered from art.html with
+# headless Chrome; the app icon is not drawn: it comes from the chosen PNGs
+# src/app-icon-1024.png and src/app-icon-small-1024.png (app-icon.py):
# Support/AppIcon.icns the app icon (build-app.sh bundles it)
# Support/dmg/background.png, @2x the DMG window background
# Support/dmg/applications.icns the icon of the DMG's Applications alias
# ../cua-spaces/src-tauri/icons/ app-icon.png (the 1024 px master) and the
# Tauri / Electron / Linux / Windows set
-# (`tauri icon`, via npx), same icon
+# (app-icon.py), same icon
# Only needed when the art changes; releases use the committed files.
#
-# scripts/dmg-art/render.sh [--chrome PATH] [--bg-only]
+# scripts/dmg-art/render.sh [--chrome PATH] [--bg-only | --app-icon-only]
#
# --bg-only redraws just the DMG background (art.html "bg"); the icons stay.
+# --app-icon-only rebuilds just the app icon files (no Chrome, DMG art untouched).
+# To change the app icon, replace the two PNGs in src/ and rerun.
# Keep APP and APPS in art.html equal to icon_locations in dmg-settings.py.
set -euo pipefail
here="$(cd "$(dirname "$0")" && pwd)"
@@ -21,16 +25,18 @@ support="$here/../../Support"
tauri_icons="$here/../../../cua-spaces/src-tauri/icons"
chrome="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
bg_only=0
+icon_only=0
while [ $# -gt 0 ]; do
case "$1" in
--chrome) chrome="$2"; shift ;;
--bg-only) bg_only=1 ;;
- -h | --help) sed -n '5,17p' "$0"; exit 0 ;;
+ --app-icon-only) icon_only=1 ;;
+ -h | --help) sed -n '5,22p' "$0"; exit 0 ;;
*) echo "unknown option: $1" >&2; exit 2 ;;
esac
shift
done
-[ -x "$chrome" ] || { echo "Chrome not found at $chrome (pass --chrome)" >&2; exit 2; }
+[ "$icon_only" = 1 ] || [ -x "$chrome" ] || { echo "Chrome not found at $chrome (pass --chrome)" >&2; exit 2; }
work="$(mktemp -d)"
trap 'rm -rf "$work"' EXIT
@@ -53,22 +59,27 @@ icns() {
iconutil -c icns "$set" -o "$3"
}
-mkdir -p "$support/dmg"
-shot bg 2560 1440 1 "$support/dmg/background.png"
-shot bg 2560 1440 2 "$support/dmg/[email protected]"
-if [ "$bg_only" = 1 ]; then ls -l "$support/dmg"; exit 0; fi
-shot icon 1024 1024 1 "$work/icon.png"
-shot alias 1024 1024 1 "$work/alias.png"
-icns app "$work/icon.png" "$support/AppIcon.icns"
-icns alias "$work/alias.png" "$support/dmg/applications.icns"
+if [ "$icon_only" = 0 ]; then
+ mkdir -p "$support/dmg"
+ shot bg 2560 1440 1 "$support/dmg/background.png"
+ shot bg 2560 1440 2 "$support/dmg/[email protected]"
+ if [ "$bg_only" = 1 ]; then ls -l "$support/dmg"; exit 0; fi
+ shot alias 1024 1024 1 "$work/alias.png"
+ icns alias "$work/alias.png" "$support/dmg/applications.icns"
+fi
-# The other apps ship the same icon. Keep only the files the repo tracks
-# (tauri icon also writes Android and iOS sets).
-cp "$work/icon.png" "$tauri_icons/app-icon.png"
-npx --yes @tauri-apps/cli@^2.5.0 icon "$tauri_icons/app-icon.png" -o "$work/tauri" >/dev/null
-for f in 32x32.png 64x64.png 128x128.png [email protected] icon.png icon.icns icon.ico StoreLogo.png \
- Square30x30Logo.png Square44x44Logo.png Square71x71Logo.png Square89x89Logo.png Square107x107Logo.png \
- Square142x142Logo.png Square150x150Logo.png Square284x284Logo.png Square310x310Logo.png; do
- cp "$work/tauri/$f" "$tauri_icons/$f"
-done
+# app-icon.py needs Pillow: install a pinned one into a throwaway venv.
+python3 -m venv "$work/venv"
+"$work/venv/bin/pip" install --quiet "pillow==11.3.0"
+py="$work/venv/bin/python"
+
+# The app icon: the chosen PNGs, with the larger-print small art at 16 to 64 px.
+mkdir -p "$work/app.iconset"
+"$py" "$here/app-icon.py" iconset "$work/app.iconset"
+iconutil -c icns "$work/app.iconset" -o "$support/AppIcon.icns"
+
+# The other apps ship the same icon. Keep only the files the repo tracks.
+cp "$here/src/app-icon-1024.png" "$tauri_icons/app-icon.png"
+"$py" "$here/app-icon.py" tauri "$tauri_icons"
+cp "$support/AppIcon.icns" "$tauri_icons/icon.icns"
ls -l "$support/AppIcon.icns" "$support/dmg" "$tauri_icons"
diff --git a/apps/cua-spaces-macos/scripts/dmg-art/src/app-icon-1024.png b/apps/cua-spaces-macos/scripts/dmg-art/src/app-icon-1024.png
new file mode 100644
index 0000000000..990b0d282f
Binary files /dev/null and b/apps/cua-spaces-macos/scripts/dmg-art/src/app-icon-1024.png differ
diff --git a/apps/cua-spaces-macos/scripts/dmg-art/src/app-icon-small-1024.png b/apps/cua-spaces-macos/scripts/dmg-art/src/app-icon-small-1024.png
new file mode 100644
index 0000000000..65b652868e
Binary files /dev/null and b/apps/cua-spaces-macos/scripts/dmg-art/src/app-icon-small-1024.png differ
diff --git a/apps/cua-spaces/scripts/icons/gen-icon-svgs.py b/apps/cua-spaces/scripts/icons/gen-icon-svgs.py
index fa49a9a541..33bebacc03 100644
--- a/apps/cua-spaces/scripts/icons/gen-icon-svgs.py
+++ b/apps/cua-spaces/scripts/icons/gen-icon-svgs.py
@@ -4,8 +4,8 @@
"""Writes the Cua Spaces menu bar and onboarding marks from the Cua mark.
-The app / Dock icon (the blue Cua key on slate) is not drawn here:
-apps/cua-spaces-macos/scripts/dmg-art/render.sh renders it to
+The app / Dock icon (the terracotta koala keycap) is not drawn here:
+apps/cua-spaces-macos/scripts/dmg-art/render.sh builds it into
src-tauri/icons/app-icon.png and the icon set beside it.
- src-tauri/icons/tray-template.svg: the menu bar item, the same stack as a
diff --git a/apps/cua-spaces/src-tauri/icons/128x128.png b/apps/cua-spaces/src-tauri/icons/128x128.png
index 417f6743e7..6a12f226e0 100644
Binary files a/apps/cua-spaces/src-tauri/icons/128x128.png and b/apps/cua-spaces/src-tauri/icons/128x128.png differ
diff --git a/apps/cua-spaces/src-tauri/icons/[email protected] b/apps/cua-spaces/src-tauri/icons/[email protected]
index 603a6c9172..5cf15b6ff1 100644
Binary files a/apps/cua-spaces/src-tauri/icons/[email protected] and b/apps/cua-spaces/src-tauri/icons/[email protected] differ
diff --git a/apps/cua-spaces/src-tauri/icons/32x32.png b/apps/cua-spaces/src-tauri/icons/32x32.png
index 70420ff23f..d4c973a778 100644
Binary files a/apps/cua-spaces/src-tauri/icons/32x32.png and b/apps/cua-spaces/src-tauri/icons/32x32.png differ
diff --git a/apps/cua-spaces/src-tauri/icons/64x64.png b/apps/cua-spaces/src-tauri/icons/64x64.png
index 12990a3008..80b6f5b978 100644
Binary files a/apps/cua-spaces/src-tauri/icons/64x64.png and b/apps/cua-spaces/src-tauri/icons/64x64.png differ
diff --git a/apps/cua-spaces/src-tauri/icons/Square107x107Logo.png b/apps/cua-spaces/src-tauri/icons/Square107x107Logo.png
index 59e098da4d..2962a2cd1b 100644
Binary files a/apps/cua-spaces/src-tauri/icons/Square107x107Logo.png and b/apps/cua-spaces/src-tauri/icons/Square107x107Logo.png differ
diff --git a/apps/cua-spaces/src-tauri/icons/Square142x142Logo.png b/apps/cua-spaces/src-tauri/icons/Square142x142Logo.png
index 0e272cbc47..052dc80862 100644
Binary files a/apps/cua-spaces/src-tauri/icons/Square142x142Logo.png and b/apps/cua-spaces/src-tauri/icons/Square142x142Logo.png differ
diff --git a/apps/cua-spaces/src-tauri/icons/Square150x150Logo.png b/apps/cua-spaces/src-tauri/icons/Square150x150Logo.png
index 520d625bdf..292b851392 100644
Binary files a/apps/cua-spaces/src-tauri/icons/Square150x150Logo.png and b/apps/cua-spaces/src-tauri/icons/Square150x150Logo.png differ
diff --git a/apps/cua-spaces/src-tauri/icons/Square284x284Logo.png b/apps/cua-spaces/src-tauri/icons/Square284x284Logo.png
index 19211dcbff..7e3f58688c 100644
Binary files a/apps/cua-spaces/src-tauri/icons/Square284x284Logo.png and b/apps/cua-spaces/src-tauri/icons/Square284x284Logo.png differ
diff --git a/apps/cua-spaces/src-tauri/icons/Square30x30Logo.png b/apps/cua-spaces/src-tauri/icons/Square30x30Logo.png
index 05d6a5c445..65de8afeae 100644
Binary files a/apps/cua-spaces/src-tauri/icons/Square30x30Logo.png and b/apps/cua-spaces/src-tauri/icons/Square30x30Logo.png differ
diff --git a/apps/cua-spaces/src-tauri/icons/Square310x310Logo.png b/apps/cua-spaces/src-tauri/icons/Square310x310Logo.png
index 6cbdb17749..0cdb654bbb 100644
Binary files a/apps/cua-spaces/src-tauri/icons/Square310x310Logo.png and b/apps/cua-spaces/src-tauri/icons/Square310x310Logo.png differ
diff --git a/apps/cua-spaces/src-tauri/icons/Square44x44Logo.png b/apps/cua-spaces/src-tauri/icons/Square44x44Logo.png
index 191ff1a037..612df0642b 100644
Binary files a/apps/cua-spaces/src-tauri/icons/Square44x44Logo.png and b/apps/cua-spaces/src-tauri/icons/Square44x44Logo.png differ
diff --git a/apps/cua-spaces/src-tauri/icons/Square71x71Logo.png b/apps/cua-spaces/src-tauri/icons/Square71x71Logo.png
index b50c0a6f29..21166adbf7 100644
Binary files a/apps/cua-spaces/src-tauri/icons/Square71x71Logo.png and b/apps/cua-spaces/src-tauri/icons/Square71x71Logo.png differ
diff --git a/apps/cua-spaces/src-tauri/icons/Square89x89Logo.png b/apps/cua-spaces/src-tauri/icons/Square89x89Logo.png
index e0aeed5481..d4190161d3 100644
Binary files a/apps/cua-spaces/src-tauri/icons/Square89x89Logo.png and b/apps/cua-spaces/src-tauri/icons/Square89x89Logo.png differ
diff --git a/apps/cua-spaces/src-tauri/icons/StoreLogo.png b/apps/cua-spaces/src-tauri/icons/StoreLogo.png
index ca3a2acba0..3e3fa1505f 100644
Binary files a/apps/cua-spaces/src-tauri/icons/StoreLogo.png and b/apps/cua-spaces/src-tauri/icons/StoreLogo.png differ
diff --git a/apps/cua-spaces/src-tauri/icons/app-icon.png b/apps/cua-spaces/src-tauri/icons/app-icon.png
index 0c90cd364d..990b0d282f 100644
Binary files a/apps/cua-spaces/src-tauri/icons/app-icon.png and b/apps/cua-spaces/src-tauri/icons/app-icon.png differ
diff --git a/apps/cua-spaces/src-tauri/icons/icon.icns b/apps/cua-spaces/src-tauri/icons/icon.icns
index 1b47f3dfce..12e5946e0e 100644
Binary files a/apps/cua-spaces/src-tauri/icons/icon.icns and b/apps/cua-spaces/src-tauri/icons/icon.icns differ
diff --git a/apps/cua-spaces/src-tauri/icons/icon.ico b/apps/cua-spaces/src-tauri/icons/icon.ico
index 1c87edc96d..28aff03e12 100644
Binary files a/apps/cua-spaces/src-tauri/icons/icon.ico and b/apps/cua-spaces/src-tauri/icons/icon.ico differ
diff --git a/apps/cua-spaces/src-tauri/icons/icon.png b/apps/cua-spaces/src-tauri/icons/icon.png
index a1b51336af..0a8a03f534 100644
Binary files a/apps/cua-spaces/src-tauri/icons/icon.png and b/apps/cua-spaces/src-tauri/icons/icon.png differ