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.

fix(spaces): app icon gets its own charcoal background, so macOS 26 stops adding a grey plate (CUA-2244) (#5924)

cua-agents[bot]c9a8eadb93fb
diff --git a/.github/workflows/ci-cua-spaces-macos.yml b/.github/workflows/ci-cua-spaces-macos.yml
index affb2c3f8f..58afb55906 100644
--- a/.github/workflows/ci-cua-spaces-macos.yml
+++ b/.github/workflows/ci-cua-spaces-macos.yml
@@ -291,6 +291,15 @@ jobs:
- name: Build the app bundle (and its launch check)
working-directory: apps/cua-spaces-macos
run: scripts/build-app.sh release
+ # macOS 26 puts icons without their own background on a grey plate: the
+ # bundle must carry the compiled Icon Composer icon (CUA-2244).
+ - name: The bundle has the macOS 26 app icon
+ working-directory: apps/cua-spaces-macos
+ run: |
+ app=".build/app/Cua Spaces.app"
+ test -s "$app/Contents/Resources/Assets.car"
+ test -s "$app/Contents/Resources/AppIcon.icns"
+ test "$(/usr/libexec/PlistBuddy -c 'Print :CFBundleIconName' "$app/Contents/Info.plist")" = AppIcon
# Cua Spaces Local (--channel local) runs beside an installed Cua
# Spaces and must not be able to touch it (CUA-1776): the Local bundle
# id, helper, URL scheme and home, staging, and no Sparkle feed. The
diff --git a/apps/cua-spaces-macos/Support/AppIcon.icns b/apps/cua-spaces-macos/Support/AppIcon.icns
index 12e5946e0e..a4c860c618 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/Support/AppIcon.icon/Assets/key.png b/apps/cua-spaces-macos/Support/AppIcon.icon/Assets/key.png
new file mode 100644
index 0000000000..4c914f66e3
Binary files /dev/null and b/apps/cua-spaces-macos/Support/AppIcon.icon/Assets/key.png differ
diff --git a/apps/cua-spaces-macos/Support/AppIcon.icon/icon.json b/apps/cua-spaces-macos/Support/AppIcon.icon/icon.json
new file mode 100644
index 0000000000..4c1957582b
--- /dev/null
+++ b/apps/cua-spaces-macos/Support/AppIcon.icon/icon.json
@@ -0,0 +1,64 @@
+{
+ "fill-specializations": [
+ {
+ "value": {
+ "linear-gradient": [
+ "srgb:0.20392,0.20392,0.22353,1.0",
+ "srgb:0.03529,0.03529,0.04314,1.0"
+ ],
+ "orientation": {
+ "start": {
+ "x": 0.5,
+ "y": 0
+ },
+ "stop": {
+ "x": 0.5,
+ "y": 1
+ }
+ }
+ }
+ },
+ {
+ "appearance": "dark",
+ "value": {
+ "linear-gradient": [
+ "srgb:0.15686,0.15686,0.17647,1.0",
+ "srgb:0.02353,0.02353,0.03137,1.0"
+ ],
+ "orientation": {
+ "start": {
+ "x": 0.5,
+ "y": 0
+ },
+ "stop": {
+ "x": 0.5,
+ "y": 1
+ }
+ }
+ }
+ }
+ ],
+ "groups": [
+ {
+ "name": "key",
+ "layers": [
+ {
+ "name": "key",
+ "image-name": "key.png",
+ "glass": true
+ }
+ ],
+ "shadow": {
+ "kind": "neutral",
+ "opacity": 0.45
+ },
+ "translucency": {
+ "enabled": false,
+ "value": 0.0
+ }
+ }
+ ],
+ "supported-platforms": {
+ "squares": "shared"
+ }
+}
\ No newline at end of file
diff --git a/apps/cua-spaces-macos/Support/Info.plist b/apps/cua-spaces-macos/Support/Info.plist
index 284b268c12..f9007f6bb4 100644
--- a/apps/cua-spaces-macos/Support/Info.plist
+++ b/apps/cua-spaces-macos/Support/Info.plist
@@ -8,6 +8,8 @@
<string>CuaSpacesMac</string>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
+ <key>CFBundleIconName</key>
+ <string>AppIcon</string>
<key>CFBundleIdentifier</key>
<string>com.trycua.spaces.macos</string>
<key>CFBundleInfoDictionaryVersion</key>
diff --git a/apps/cua-spaces-macos/scripts/build-app.sh b/apps/cua-spaces-macos/scripts/build-app.sh
index 3bb35591c8..ccf6f95c0a 100755
--- a/apps/cua-spaces-macos/scripts/build-app.sh
+++ b/apps/cua-spaces-macos/scripts/build-app.sh
@@ -156,6 +156,20 @@ fi
# directory), so the app finds them through ModuleResources instead.
for b in "$bin"/*.bundle; do [ -d "$b" ] && cp -R "$b" "$app/Contents/Resources/"; done
cp "$here/Support/AppIcon.icns" "$app/Contents/Resources/AppIcon.icns"
+# macOS 26 draws icons without their own background on a grey system plate. The
+# Icon Composer source (full-bleed background + key layer, dark/tinted/clear)
+# compiles to Assets.car, found through CFBundleIconName; AppIcon.icns above is
+# the fallback for macOS 15 and older.
+icon_tmp="$(mktemp -d)"
+if xcrun actool "$here/Support/AppIcon.icon" --compile "$icon_tmp" --platform macosx \
+ --minimum-deployment-target 14.0 --app-icon AppIcon --include-all-app-icons \
+ --output-partial-info-plist "$icon_tmp/partial.plist" >/dev/null 2>&1 && [ -s "$icon_tmp/Assets.car" ]; then
+ cp "$icon_tmp/Assets.car" "$app/Contents/Resources/Assets.car"
+else
+ echo "warning: actool (Xcode 26+) could not compile Support/AppIcon.icon; macOS 26 will show the icon on a grey plate" >&2
+ [ -z "${CI:-}" ] || exit 1
+fi
+rm -rf "$icon_tmp"
cp "$icons/tray-template.png" "$app/Contents/Resources/tray-template.png"
cp "$icons/[email protected]" "$app/Contents/Resources/[email protected]"
cp "$here/THIRD_PARTY_NOTICES.md" "$app/Contents/Resources/THIRD_PARTY_NOTICES.md"
diff --git a/apps/cua-spaces-macos/scripts/dmg-art/app-icon.py b/apps/cua-spaces-macos/scripts/dmg-art/app-icon.py
index a1885202df..3c4dfc9de6 100755
--- a/apps/cua-spaces-macos/scripts/dmg-art/app-icon.py
+++ b/apps/cua-spaces-macos/scripts/dmg-art/app-icon.py
@@ -4,39 +4,96 @@
"""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
+ src/app-icon-1024.png the icon, full bleed and opaque: the terracotta koala
+ keycap on its background (no corners, no margin)
+ src/app-icon-small-1024.png the same icon with a larger key and no stars, for
16 to 64 px, where the full art turns to mush
+ ../../Support/AppIcon.icon the macOS 26 Icon Composer source (layers; not built here)
+
+The masters are square; this script shapes them per platform:
+ macOS iconset Apple squircle, 824 px body on a 1024 canvas, soft drop shadow
+ (macOS 15 and older; macOS 26 draws Support/AppIcon.icon instead)
+ tauri set square with rounded corners (22%), 3% margin, for Windows/Linux
app-icon.py iconset DIR icon_16x16.png ... [email protected], for iconutil
+ app-icon.py master FILE icon-1024.png of the rounded-square plate
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 math
import pathlib
import sys
-from PIL import Image, ImageFilter
+from PIL import Image, ImageDraw, 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:
+S = 1024
+
+
+def squircle_mask(body: int, n: float = 5.0, ss: int = 4) -> Image.Image:
+ """Apple-like continuous corners: a superellipse, body px wide, centred on the canvas."""
+ pts = []
+ for i in range(720):
+ t = 2 * math.pi * i / 720
+ c, s = math.cos(t), math.sin(t)
+ x = math.copysign(abs(c) ** (2 / n), c)
+ y = math.copysign(abs(s) ** (2 / n), s)
+ pts.append(((S / 2 + x * body / 2) * ss, (S / 2 + y * body / 2) * ss))
+ m = Image.new("L", (S * ss, S * ss), 0)
+ ImageDraw.Draw(m).polygon(pts, fill=255)
+ return m.resize((S, S), Image.LANCZOS)
+
+
+def rrect_mask(body: int, radius: float, ss: int = 4) -> Image.Image:
+ m = Image.new("L", (S * ss, S * ss), 0)
+ o = (S - body) / 2 * ss
+ ImageDraw.Draw(m).rounded_rectangle((o, o, S * ss - o - 1, S * ss - o - 1), radius * ss, fill=255)
+ return m.resize((S, S), Image.LANCZOS)
+
+
+def shaped(master: Image.Image, kind: str) -> Image.Image:
+ if kind == "squircle":
+ body, mask = 824, squircle_mask(824)
+ else:
+ body, mask = round(S * 0.94), rrect_mask(round(S * 0.94), round(S * 0.94) * 0.22)
+ art = Image.new("RGBA", (S, S), (0, 0, 0, 0))
+ art.paste(master.resize((body, body), Image.LANCZOS), ((S - body) // 2,) * 2)
+ art.putalpha(mask)
+ if kind != "squircle":
+ return art
+ shadow = Image.new("RGBA", (S, S), (0, 0, 0, 0))
+ shadow.putalpha(mask.point(lambda v: int(v * 0.30)))
+ shadow = shadow.filter(ImageFilter.GaussianBlur(14))
+ out = Image.new("RGBA", (S, S), (0, 0, 0, 0))
+ out.alpha_composite(shadow, (0, 10))
+ out.alpha_composite(art)
+ return out
+
+
+SHAPES = {"squircle": (shaped(FULL, "squircle"), shaped(SMALL, "squircle")),
+ "plate": (shaped(FULL, "plate"), shaped(SMALL, "plate"))}
+
+
+def pick(size: int, kind: str = "plate") -> Image.Image:
+ full, small = SHAPES[kind]
if size <= 32:
- return SMALL.resize((size, size), Image.LANCZOS).filter(ImageFilter.UnsharpMask(1, 60, 0))
+ 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)
+ 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")
+ pick(s, "squircle").save(out / f"icon_{s}x{s}.png")
+ pick(s * 2, "squircle").save(out / f"icon_{s}x{s}@2x.png")
def tauri(out: pathlib.Path) -> None:
@@ -52,7 +109,13 @@ def tauri(out: pathlib.Path) -> None:
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"):
+def master(out: pathlib.Path) -> None:
+ SHAPES["plate"][0].save(out)
+
+
+if __name__ == "__main__" and len(sys.argv) == 3 and sys.argv[1] == "master":
+ master(pathlib.Path(sys.argv[2]))
+elif __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)
diff --git a/apps/cua-spaces-macos/scripts/dmg-art/render.sh b/apps/cua-spaces-macos/scripts/dmg-art/render.sh
index 9cc665df8b..5d5ded5899 100755
--- a/apps/cua-spaces-macos/scripts/dmg-art/render.sh
+++ b/apps/cua-spaces-macos/scripts/dmg-art/render.sh
@@ -5,7 +5,9 @@
# 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/AppIcon.icns the legacy (macOS 15 and older) app icon
+# Support/AppIcon.icon NOT built here: the macOS 26 Icon Composer source
+# (background fill + layers); build-app.sh compiles 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
@@ -79,7 +81,7 @@ mkdir -p "$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" master "$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
index 990b0d282f..6214865cd2 100644
Binary files a/apps/cua-spaces-macos/scripts/dmg-art/src/app-icon-1024.png 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
index 65b652868e..81d2d96b4b 100644
Binary files a/apps/cua-spaces-macos/scripts/dmg-art/src/app-icon-small-1024.png and b/apps/cua-spaces-macos/scripts/dmg-art/src/app-icon-small-1024.png differ
diff --git a/apps/cua-spaces/src-tauri/icons/128x128.png b/apps/cua-spaces/src-tauri/icons/128x128.png
index 6a12f226e0..bf4fd1431e 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 5cf15b6ff1..7d986d03ce 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 d4c973a778..e98750ca8d 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 80b6f5b978..f675cb3eeb 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 2962a2cd1b..cbb59c75d4 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 052dc80862..1b1ab9bc23 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 292b851392..19583d6ef6 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 7e3f58688c..092c8a1bc8 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 65de8afeae..034ed9749f 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 0cdb654bbb..53215dca00 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 612df0642b..7fe3b72609 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 21166adbf7..f8db41341f 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 d4190161d3..c29cbe01b3 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 3e3fa1505f..9f9da86920 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 990b0d282f..8a6f123a2e 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 12e5946e0e..a4c860c618 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 28aff03e12..ce1143d2ab 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 0a8a03f534..c0254f2dde 100644
Binary files a/apps/cua-spaces/src-tauri/icons/icon.png and b/apps/cua-spaces/src-tauri/icons/icon.png differ