Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
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.ymlindex 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-macosrun: 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. Thediff --git a/apps/cua-spaces-macos/Support/AppIcon.icns b/apps/cua-spaces-macos/Support/AppIcon.icnsindex 12e5946e0e..a4c860c618 100644Binary files a/apps/cua-spaces-macos/Support/AppIcon.icns and b/apps/cua-spaces-macos/Support/AppIcon.icns differdiff --git a/apps/cua-spaces-macos/Support/AppIcon.icon/Assets/key.png b/apps/cua-spaces-macos/Support/AppIcon.icon/Assets/key.pngnew file mode 100644index 0000000000..4c914f66e3Binary files /dev/null and b/apps/cua-spaces-macos/Support/AppIcon.icon/Assets/key.png differdiff --git a/apps/cua-spaces-macos/Support/AppIcon.icon/icon.json b/apps/cua-spaces-macos/Support/AppIcon.icon/icon.jsonnew file mode 100644index 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 filediff --git a/apps/cua-spaces-macos/Support/Info.plist b/apps/cua-spaces-macos/Support/Info.plistindex 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.shindex 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/"; donecp "$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.pyindex 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, for16 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/Linuxapp-icon.py iconset DIR icon_16x16.png ... [email protected], for iconutil+ app-icon.py master FILE icon-1024.png of the rounded-square plateapp-icon.py tauri DIR the Tauri / Electron / Linux / Windows set(png sizes, icon.png, icon.ico), no icon.icnsSizes 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 mathimport pathlibimport sys-from PIL import Image, ImageFilter+from PIL import Image, ImageDraw, ImageFilterHERE = pathlib.Path(__file__).resolve().parentFULL = 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.shindex 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.pngindex 990b0d282f..6214865cd2 100644Binary 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 differdiff --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.pngindex 65b652868e..81d2d96b4b 100644Binary 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 differdiff --git a/apps/cua-spaces/src-tauri/icons/128x128.png b/apps/cua-spaces/src-tauri/icons/128x128.pngindex 6a12f226e0..bf4fd1431e 100644Binary files a/apps/cua-spaces/src-tauri/icons/128x128.png and b/apps/cua-spaces/src-tauri/icons/128x128.png differdiff --git a/apps/cua-spaces/src-tauri/icons/[email protected] b/apps/cua-spaces/src-tauri/icons/[email protected]index 5cf15b6ff1..7d986d03ce 100644Binary files a/apps/cua-spaces/src-tauri/icons/[email protected] and b/apps/cua-spaces/src-tauri/icons/[email protected] differdiff --git a/apps/cua-spaces/src-tauri/icons/32x32.png b/apps/cua-spaces/src-tauri/icons/32x32.pngindex d4c973a778..e98750ca8d 100644Binary files a/apps/cua-spaces/src-tauri/icons/32x32.png and b/apps/cua-spaces/src-tauri/icons/32x32.png differdiff --git a/apps/cua-spaces/src-tauri/icons/64x64.png b/apps/cua-spaces/src-tauri/icons/64x64.pngindex 80b6f5b978..f675cb3eeb 100644Binary files a/apps/cua-spaces/src-tauri/icons/64x64.png and b/apps/cua-spaces/src-tauri/icons/64x64.png differdiff --git a/apps/cua-spaces/src-tauri/icons/Square107x107Logo.png b/apps/cua-spaces/src-tauri/icons/Square107x107Logo.pngindex 2962a2cd1b..cbb59c75d4 100644Binary files a/apps/cua-spaces/src-tauri/icons/Square107x107Logo.png and b/apps/cua-spaces/src-tauri/icons/Square107x107Logo.png differdiff --git a/apps/cua-spaces/src-tauri/icons/Square142x142Logo.png b/apps/cua-spaces/src-tauri/icons/Square142x142Logo.pngindex 052dc80862..1b1ab9bc23 100644Binary files a/apps/cua-spaces/src-tauri/icons/Square142x142Logo.png and b/apps/cua-spaces/src-tauri/icons/Square142x142Logo.png differdiff --git a/apps/cua-spaces/src-tauri/icons/Square150x150Logo.png b/apps/cua-spaces/src-tauri/icons/Square150x150Logo.pngindex 292b851392..19583d6ef6 100644Binary files a/apps/cua-spaces/src-tauri/icons/Square150x150Logo.png and b/apps/cua-spaces/src-tauri/icons/Square150x150Logo.png differdiff --git a/apps/cua-spaces/src-tauri/icons/Square284x284Logo.png b/apps/cua-spaces/src-tauri/icons/Square284x284Logo.pngindex 7e3f58688c..092c8a1bc8 100644Binary files a/apps/cua-spaces/src-tauri/icons/Square284x284Logo.png and b/apps/cua-spaces/src-tauri/icons/Square284x284Logo.png differdiff --git a/apps/cua-spaces/src-tauri/icons/Square30x30Logo.png b/apps/cua-spaces/src-tauri/icons/Square30x30Logo.pngindex 65de8afeae..034ed9749f 100644Binary files a/apps/cua-spaces/src-tauri/icons/Square30x30Logo.png and b/apps/cua-spaces/src-tauri/icons/Square30x30Logo.png differdiff --git a/apps/cua-spaces/src-tauri/icons/Square310x310Logo.png b/apps/cua-spaces/src-tauri/icons/Square310x310Logo.pngindex 0cdb654bbb..53215dca00 100644Binary files a/apps/cua-spaces/src-tauri/icons/Square310x310Logo.png and b/apps/cua-spaces/src-tauri/icons/Square310x310Logo.png differdiff --git a/apps/cua-spaces/src-tauri/icons/Square44x44Logo.png b/apps/cua-spaces/src-tauri/icons/Square44x44Logo.pngindex 612df0642b..7fe3b72609 100644Binary files a/apps/cua-spaces/src-tauri/icons/Square44x44Logo.png and b/apps/cua-spaces/src-tauri/icons/Square44x44Logo.png differdiff --git a/apps/cua-spaces/src-tauri/icons/Square71x71Logo.png b/apps/cua-spaces/src-tauri/icons/Square71x71Logo.pngindex 21166adbf7..f8db41341f 100644Binary files a/apps/cua-spaces/src-tauri/icons/Square71x71Logo.png and b/apps/cua-spaces/src-tauri/icons/Square71x71Logo.png differdiff --git a/apps/cua-spaces/src-tauri/icons/Square89x89Logo.png b/apps/cua-spaces/src-tauri/icons/Square89x89Logo.pngindex d4190161d3..c29cbe01b3 100644Binary files a/apps/cua-spaces/src-tauri/icons/Square89x89Logo.png and b/apps/cua-spaces/src-tauri/icons/Square89x89Logo.png differdiff --git a/apps/cua-spaces/src-tauri/icons/StoreLogo.png b/apps/cua-spaces/src-tauri/icons/StoreLogo.pngindex 3e3fa1505f..9f9da86920 100644Binary files a/apps/cua-spaces/src-tauri/icons/StoreLogo.png and b/apps/cua-spaces/src-tauri/icons/StoreLogo.png differdiff --git a/apps/cua-spaces/src-tauri/icons/app-icon.png b/apps/cua-spaces/src-tauri/icons/app-icon.pngindex 990b0d282f..8a6f123a2e 100644Binary files a/apps/cua-spaces/src-tauri/icons/app-icon.png and b/apps/cua-spaces/src-tauri/icons/app-icon.png differdiff --git a/apps/cua-spaces/src-tauri/icons/icon.icns b/apps/cua-spaces/src-tauri/icons/icon.icnsindex 12e5946e0e..a4c860c618 100644Binary files a/apps/cua-spaces/src-tauri/icons/icon.icns and b/apps/cua-spaces/src-tauri/icons/icon.icns differdiff --git a/apps/cua-spaces/src-tauri/icons/icon.ico b/apps/cua-spaces/src-tauri/icons/icon.icoindex 28aff03e12..ce1143d2ab 100644Binary files a/apps/cua-spaces/src-tauri/icons/icon.ico and b/apps/cua-spaces/src-tauri/icons/icon.ico differdiff --git a/apps/cua-spaces/src-tauri/icons/icon.png b/apps/cua-spaces/src-tauri/icons/icon.pngindex 0a8a03f534..c0254f2dde 100644Binary files a/apps/cua-spaces/src-tauri/icons/icon.png and b/apps/cua-spaces/src-tauri/icons/icon.png differ