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(release): drive Cua Spaces releases from the macOS app (#4440)

dduponta605a29f888b
diff --git a/.github/scripts/merge_release_please_manifests.py b/.github/scripts/merge_release_please_manifests.py
index 419c6a881d..6f5f55c407 100644
--- a/.github/scripts/merge_release_please_manifests.py
+++ b/.github/scripts/merge_release_please_manifests.py
@@ -16,7 +16,7 @@ COMPONENT_PATHS = {
"sandbox": "libs/python/cua-sandbox",
"cua-spacesd": "libs/cua-spacesd",
"cua-sdk": "libs/cua",
- "cua-spaces": "apps/cua-spaces",
+ "cua-spaces": "apps/cua-spaces-macos",
}
diff --git a/.github/scripts/resolve_release_please_request.py b/.github/scripts/resolve_release_please_request.py
index 234337b360..1de79677c3 100644
--- a/.github/scripts/resolve_release_please_request.py
+++ b/.github/scripts/resolve_release_please_request.py
@@ -17,7 +17,7 @@ COMPONENT_PATHS = {
"sandbox": "libs/python/cua-sandbox",
"cua-spacesd": "libs/cua-spacesd",
"cua-sdk": "libs/cua",
- "cua-spaces": "apps/cua-spaces",
+ "cua-spaces": "apps/cua-spaces-macos",
}
SEMVER = re.compile(r"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$")
BUMP_TYPES = {"automatic", "patch", "minor", "major"}
diff --git a/.github/scripts/tests/release_please_spaces_preview.cjs b/.github/scripts/tests/release_please_spaces_preview.cjs
new file mode 100644
index 0000000000..edcced0da3
--- /dev/null
+++ b/.github/scripts/tests/release_please_spaces_preview.cjs
@@ -0,0 +1,100 @@
+// Offline: exercise the pinned Release Please engine without a GitHub client.
+// Cua Spaces releases are driven by the macOS SwiftUI app: a commit under
+// apps/cua-spaces-macos must produce a `cua-spaces` release PR that also bumps
+// the Tauri app (apps/cua-spaces) as extra files, and a Tauri-only commit
+// must not.
+const assert = require('node:assert/strict');
+const fs = require('node:fs');
+const path = require('node:path');
+const { buildStrategy } = require('release-please/build/src/factory');
+const { parseConventionalCommits } = require('release-please/build/src/commit');
+const { CommitSplit } = require('release-please/build/src/util/commit-split');
+const { TagName } = require('release-please/build/src/util/tag-name');
+
+const root = path.resolve(__dirname, '../../..');
+const config = JSON.parse(fs.readFileSync(path.join(root, 'release-please-config.json')));
+const manifest = JSON.parse(fs.readFileSync(path.join(root, '.release-please-manifest.json')));
+const packagePath = 'apps/cua-spaces-macos';
+const tauriPath = 'apps/cua-spaces';
+assert.equal(config.packages[packagePath].component, 'cua-spaces');
+assert.equal(config.packages[tauriPath], undefined, 'the Tauri app must not drive releases');
+assert.equal(manifest[tauriPath], undefined);
+const options = Object.fromEntries(
+ Object.entries({ ...config, ...config.packages[packagePath] })
+ .map(([key, value]) => [key.replace(/-([a-z])/g, (_, c) => c.toUpperCase()), value])
+);
+
+// The same split Release Please applies to every commit on main.
+function split(files) {
+ const splitter = new CommitSplit({ packagePaths: Object.keys(config.packages) });
+ return Object.keys(splitter.split([{ sha: 'c'.repeat(40), message: 'fix: x', files }]));
+}
+
+async function preview(message, files, expectedVersion) {
+ const commits = split(files).includes(packagePath)
+ ? [{ sha: 'a'.repeat(40), message, files }]
+ : [];
+ const strategy = await buildStrategy({
+ ...options,
+ path: packagePath,
+ targetBranch: 'main',
+ github: { repository: { owner: 'example', repo: 'repo', defaultBranch: 'main' } },
+ });
+ const release = await strategy.buildReleasePullRequest(parseConventionalCommits(commits), {
+ tag: TagName.parse(`cua-spaces-v${manifest[packagePath]}`),
+ sha: 'b'.repeat(40),
+ notes: '',
+ });
+ if (expectedVersion === null) {
+ assert.equal(release, undefined);
+ console.log(JSON.stringify({ message, files, release: null }));
+ return;
+ }
+ assert.equal(release.version.toString(), expectedVersion);
+ assert.match(release.headRefName, /components--cua-spaces$/);
+ assert.match(release.title.toString(), /cua-spaces/);
+ const updates = Object.fromEntries(release.updates.map(update => [
+ update.path,
+ update.updater.updateContent(fs.readFileSync(path.join(root, update.path), 'utf8')),
+ ]));
+ assert.deepEqual(Object.keys(updates).sort(), [
+ `${packagePath}/CHANGELOG.md`,
+ `${packagePath}/VERSION`,
+ `${packagePath}/Support/Info.plist`,
+ `${tauriPath}/package.json`,
+ `${tauriPath}/src-tauri/Cargo.lock`,
+ `${tauriPath}/src-tauri/Cargo.toml`,
+ `${tauriPath}/src-tauri/tauri.conf.json`,
+ ].sort());
+ assert.equal(updates[`${packagePath}/VERSION`].trim(), expectedVersion);
+ assert.ok(updates[`${packagePath}/CHANGELOG.md`].includes(`cua-spaces-v${expectedVersion}`));
+ const plist = fs.readFileSync(path.join(root, packagePath, 'Support/Info.plist'), 'utf8');
+ assert.equal(updates[`${packagePath}/Support/Info.plist`], plist.replace(
+ /(<key>CFBundleShortVersionString<\/key>\s*<string>)[^<]+(<\/string>)/,
+ (_, prefix, suffix) => `${prefix}${expectedVersion}${suffix}`,
+ ));
+ assert.equal(JSON.parse(updates[`${tauriPath}/package.json`]).version, expectedVersion);
+ assert.equal(JSON.parse(updates[`${tauriPath}/src-tauri/tauri.conf.json`]).version, expectedVersion);
+ assert.ok(updates[`${tauriPath}/src-tauri/Cargo.toml`].includes(`version = "${expectedVersion}"`));
+ const lock = fs.readFileSync(path.join(root, tauriPath, 'src-tauri/Cargo.lock'), 'utf8');
+ assert.equal(updates[`${tauriPath}/src-tauri/Cargo.lock`], lock.replace(
+ /(\[\[package\]\]\nname = "cua-spaces-app"\nversion = ")[^"]+("\n)/,
+ (_, prefix, suffix) => `${prefix}${expectedVersion}${suffix}`,
+ ));
+ console.log(JSON.stringify({ message, files, title: release.title.toString(),
+ version: expectedVersion, tag: `cua-spaces-v${expectedVersion}`, updates: Object.keys(updates) }));
+}
+
+async function main() {
+ const [major, minor, patch] = manifest[packagePath].split('.').map(Number);
+ const swift = [`${packagePath}/Sources/CuaSpacesMacKit/Views/OnboardingView.swift`];
+ await preview('fix(spaces-macos): keep the onboarding window in front', swift,
+ `${major}.${minor}.${patch + 1}`);
+ await preview('feat(spaces-macos): add a menu bar Space switcher', swift,
+ `${major}.${minor + 1}.0`);
+ await preview('docs(spaces-macos): clarify setup', swift, null);
+ // The Tauri app (not shipped) shares the version but never drives a release.
+ await preview('fix(spaces): tauri-only change', [`${tauriPath}/src/main.ts`], null);
+}
+
+main().catch(error => { console.error(error); process.exitCode = 1; });
diff --git a/.github/scripts/tests/test_cua_spaces_release_wiring.py b/.github/scripts/tests/test_cua_spaces_release_wiring.py
new file mode 100644
index 0000000000..ce497ce61a
--- /dev/null
+++ b/.github/scripts/tests/test_cua_spaces_release_wiring.py
@@ -0,0 +1,85 @@
+"""Cua Spaces releases are driven by the shipped macOS app, not the Tauri app."""
+
+import importlib.util
+import json
+from pathlib import Path
+import unittest
+
+
+REPO_ROOT = Path(__file__).resolve().parents[3]
+MACOS = "apps/cua-spaces-macos"
+TAURI = "apps/cua-spaces"
+
+
+def load_script(name: str):
+ spec = importlib.util.spec_from_file_location(
+ name, REPO_ROOT / ".github/scripts" / f"{name}.py"
+ )
+ assert spec is not None and spec.loader is not None
+ module = importlib.util.module_from_spec(spec)
+ spec.loader.exec_module(module)
+ return module
+
+
+class TestCuaSpacesReleaseWiring(unittest.TestCase):
+ def setUp(self) -> None:
+ self.config = json.loads((REPO_ROOT / "release-please-config.json").read_text())
+ self.manifest = json.loads(
+ (REPO_ROOT / ".release-please-manifest.json").read_text()
+ )
+
+ def test_component_lives_on_the_macos_app(self) -> None:
+ packages = self.config["packages"]
+ spaces = [path for path, package in packages.items() if package["component"] == "cua-spaces"]
+ self.assertEqual(spaces, [MACOS])
+ # The Tauri app must not be a package: its commits never open a release PR.
+ self.assertNotIn(TAURI, packages)
+ self.assertNotIn(TAURI, self.manifest)
+ self.assertEqual(
+ self.manifest[MACOS], (REPO_ROOT / MACOS / "VERSION").read_text().strip()
+ )
+ self.assertFalse((REPO_ROOT / TAURI / "VERSION").exists())
+ self.assertTrue((REPO_ROOT / MACOS / "CHANGELOG.md").is_file())
+
+ def test_tauri_app_and_info_plist_share_the_version(self) -> None:
+ package = self.config["packages"][MACOS]
+ self.assertEqual(package["version-file"], "VERSION")
+ self.assertEqual(package["changelog-path"], "CHANGELOG.md")
+ paths = {extra["path"] for extra in package["extra-files"]}
+ self.assertEqual(
+ paths,
+ {
+ "Support/Info.plist",
+ f"/{TAURI}/package.json",
+ f"/{TAURI}/src-tauri/tauri.conf.json",
+ f"/{TAURI}/src-tauri/Cargo.toml",
+ f"/{TAURI}/src-tauri/Cargo.lock",
+ },
+ )
+ for extra in package["extra-files"]:
+ path = extra["path"]
+ on_disk = REPO_ROOT / (path[1:] if path.startswith("/") else f"{MACOS}/{path}")
+ self.assertTrue(on_disk.is_file(), path)
+
+ def test_release_scripts_resolve_every_component_to_its_package(self) -> None:
+ expected = {
+ package["component"]: path for path, package in self.config["packages"].items()
+ }
+ for name in ("resolve_release_please_request", "merge_release_please_manifests"):
+ self.assertEqual(load_script(name).COMPONENT_PATHS, expected, name)
+ self.assertEqual(set(self.manifest), set(self.config["packages"]))
+
+ def test_release_workflow_reads_the_macos_changelog(self) -> None:
+ workflow = (REPO_ROOT / ".github/workflows/cd-cua-spaces.yml").read_text()
+ self.assertIn(f'changelog-notes.py "$VERSION" {MACOS}/CHANGELOG.md', workflow)
+ self.assertNotIn(f"{TAURI}/CHANGELOG.md", workflow)
+ self.assertNotIn(f"{TAURI}/VERSION", workflow)
+
+ def test_ci_runs_the_offline_engine_preview(self) -> None:
+ ci = (REPO_ROOT / ".github/workflows/ci-test-scripts.yml").read_text()
+ self.assertIn("release_please_spaces_preview.cjs", ci)
+ self.assertIn(f'"{MACOS}/VERSION"', ci)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/.github/scripts/tests/test_release_bump_authorization.py b/.github/scripts/tests/test_release_bump_authorization.py
index 1e7915b7ce..7f79636ec2 100644
--- a/.github/scripts/tests/test_release_bump_authorization.py
+++ b/.github/scripts/tests/test_release_bump_authorization.py
@@ -19,11 +19,27 @@ class TestReleaseBumpAuthorization(unittest.TestCase):
self.assertIn(" authorize:\n", workflow)
self.assertIn('ACTOR: ${{ github.actor }}', workflow)
self.assertIn('TRIGGERING_ACTOR: ${{ github.triggering_actor }}', workflow)
- self.assertIn(
- '"f-trycua:f-trycua"|'
- '"cua-release-bot[bot]:cua-release-bot[bot]")',
- workflow,
+ # The gate allows exactly the two release owners (each acting for
+ # themselves, never a re-run by someone else) and the release bot.
+ authorize_job = workflow.split(" authorize:\n", 1)[1].split(
+ " bump-version:\n", 1
+ )[0]
+ allowed = [
+ line.strip()
+ for line in authorize_job.splitlines()
+ if line.strip().startswith('"') and line.strip().endswith(")")
+ ]
+ self.assertEqual(
+ allowed,
+ [
+ '"f-trycua:f-trycua"|'
+ '"ddupont808:ddupont808"|'
+ '"cua-release-bot[bot]:cua-release-bot[bot]")'
+ ],
)
+ self.assertIn('case "$ACTOR:$TRIGGERING_ACTOR" in', authorize_job)
+ self.assertIn(" *)\n", authorize_job)
+ self.assertIn(" exit 1\n", authorize_job)
self.assertNotIn("r33drichards", workflow)
self.assertIn(" bump-version:\n needs: authorize\n", workflow)
self.assertIn(
@@ -42,7 +58,20 @@ class TestReleaseBumpAuthorization(unittest.TestCase):
workflow,
)
self.assertIn("label_was_applied_by_release_owner()", workflow)
- self.assertIn('.actor.login == "f-trycua"', workflow)
+ # Only the two release owners' label events authorize a release.
+ owner_filters = [
+ line.strip()
+ for line in workflow.splitlines()
+ if ".actor.login ==" in line
+ ]
+ self.assertEqual(
+ owner_filters,
+ [
+ '| .event == "labeled" and (.actor.login == "f-trycua" '
+ 'or .actor.login == "ddupont808")'
+ ],
+ )
+ self.assertNotIn("r33drichards", workflow)
self.assertIn(
'label_was_applied_by_release_owner "bump:major"', workflow
)
diff --git a/.github/scripts/tests/test_resolve_release_please_request.py b/.github/scripts/tests/test_resolve_release_please_request.py
index 11a41b3fad..b201a2812b 100644
--- a/.github/scripts/tests/test_resolve_release_please_request.py
+++ b/.github/scripts/tests/test_resolve_release_please_request.py
@@ -21,6 +21,7 @@ class TestResolveReleasePleaseRequest(unittest.TestCase):
"libs/python/cua-sandbox": "0.4.3",
"libs/cua-spacesd": "0.1.0",
"libs/cua": "0.2.0",
+ "apps/cua-spaces-macos": "0.1.0",
}
def test_resolves_each_component_path(self) -> None:
@@ -49,6 +50,12 @@ class TestResolveReleasePleaseRequest(unittest.TestCase):
self.assertEqual(request["path"], "libs/cua")
self.assertEqual(request["release_as"], "0.2.1")
+ def test_resolves_cua_spaces_to_the_macos_app(self) -> None:
+ request = MODULE.resolve_request(self.manifest, "cua-spaces", "patch")
+ self.assertEqual(request["path"], "apps/cua-spaces-macos")
+ self.assertEqual(request["current_version"], "0.1.0")
+ self.assertEqual(request["release_as"], "0.1.1")
+
def test_calculates_patch_minor_and_major_versions(self) -> None:
self.assertEqual(MODULE.bump_version("0.9.0", "patch"), "0.9.1")
self.assertEqual(MODULE.bump_version("0.9.0", "minor"), "0.10.0")
diff --git a/.github/scripts/tests/test_validate_release_versions.py b/.github/scripts/tests/test_validate_release_versions.py
index 707fb99249..f8973c576c 100644
--- a/.github/scripts/tests/test_validate_release_versions.py
+++ b/.github/scripts/tests/test_validate_release_versions.py
@@ -43,7 +43,8 @@ def copy_release_sources(destination: Path) -> None:
"libs/cua/python/src/cua/__init__.py",
"libs/cua/typescript/package.json",
"libs/cua/typescript/package-lock.json",
- "apps/cua-spaces/VERSION",
+ "apps/cua-spaces-macos/VERSION",
+ "apps/cua-spaces-macos/Support/Info.plist",
"apps/cua-spaces/package.json",
"apps/cua-spaces/src-tauri/tauri.conf.json",
"apps/cua-spaces/src-tauri/Cargo.toml",
@@ -342,7 +343,8 @@ SDK_AND_SPACES_SOURCES = (
"libs/cua/python/src/cua/__init__.py",
"libs/cua/typescript/package.json",
"libs/cua/typescript/package-lock.json",
- "apps/cua-spaces/VERSION",
+ "apps/cua-spaces-macos/VERSION",
+ "apps/cua-spaces-macos/Support/Info.plist",
"apps/cua-spaces/package.json",
"apps/cua-spaces/src-tauri/tauri.conf.json",
"apps/cua-spaces/src-tauri/Cargo.toml",
@@ -377,6 +379,20 @@ def test_sdk_and_spaces_version_drift_fails(tmp_path: Path, product: str, relati
assert main(["--repo-root", str(tmp_path), "--product", product]) == 1
+def test_spaces_macos_info_plist_drift_fails(tmp_path: Path):
+ for source in SDK_AND_SPACES_SOURCES:
+ target = tmp_path / source
+ target.parent.mkdir(parents=True, exist_ok=True)
+ shutil.copy(REPO_ROOT / source, target)
+ plist = tmp_path / "apps/cua-spaces-macos/Support/Info.plist"
+ text = plist.read_text()
+ marker = "<key>CFBundleShortVersionString</key>\n\t<string>"
+ assert marker in text
+ plist.write_text(text.replace(marker, marker + "9.9.9-drift", 1))
+ with pytest.raises(VersionError, match="Info.plist"):
+ validate(tmp_path, "spaces")
+
+
@pytest.mark.parametrize(
("source", "expected"),
[
diff --git a/.github/scripts/validate_release_versions.py b/.github/scripts/validate_release_versions.py
index ef5fa018f2..46aa3e0907 100644
--- a/.github/scripts/validate_release_versions.py
+++ b/.github/scripts/validate_release_versions.py
@@ -5,6 +5,7 @@ from __future__ import annotations
import argparse
import json
+import plistlib
from pathlib import Path
import re
import sys
@@ -261,9 +262,14 @@ def sdk_versions(root: Path) -> tuple[str, dict[str, str]]:
def spaces_app_versions(root: Path) -> tuple[str, dict[str, str]]:
- base = root / "apps/cua-spaces"
- expected = (base / "VERSION").read_text().strip()
+ # Release Please drives Cua Spaces from the macOS app (component
+ # `cua-spaces` at apps/cua-spaces-macos); the Tauri app shares its version.
+ macos = root / "apps/cua-spaces-macos"
+ expected = (macos / "VERSION").read_text().strip()
stable_version_tuple(expected)
+ with (macos / "Support/Info.plist").open("rb") as info_file:
+ info = plistlib.load(info_file)
+ base = root / "apps/cua-spaces"
package = json.loads((base / "package.json").read_text())
tauri = json.loads((base / "src-tauri/tauri.conf.json").read_text())
cargo = tomllib.loads((base / "src-tauri/Cargo.toml").read_text())
@@ -272,10 +278,11 @@ def spaces_app_versions(root: Path) -> tuple[str, dict[str, str]]:
if len(locked) != 1:
raise VersionError("Cua Spaces Cargo.lock must lock the app crate exactly once")
return expected, {
- "package.json": str(package["version"]),
- "src-tauri/tauri.conf.json": str(tauri["version"]),
- "src-tauri/Cargo.toml": str(cargo["package"]["version"]),
- "src-tauri/Cargo.lock": str(locked[0]["version"]),
+ "apps/cua-spaces-macos/Support/Info.plist": str(info["CFBundleShortVersionString"]),
+ "apps/cua-spaces/package.json": str(package["version"]),
+ "apps/cua-spaces/src-tauri/tauri.conf.json": str(tauri["version"]),
+ "apps/cua-spaces/src-tauri/Cargo.toml": str(cargo["package"]["version"]),
+ "apps/cua-spaces/src-tauri/Cargo.lock": str(locked[0]["version"]),
}
@@ -332,7 +339,7 @@ def validate(root: Path, product: str) -> None:
require_equal("cua SDK", expected, values)
if product in {"all", "spaces"}:
expected, values = spaces_app_versions(root)
- values[".release-please-manifest.json"] = str(manifest["apps/cua-spaces"])
+ values[".release-please-manifest.json"] = str(manifest["apps/cua-spaces-macos"])
require_equal("Cua Spaces app", expected, values)
diff --git a/.github/workflows/cd-cua-spaces.yml b/.github/workflows/cd-cua-spaces.yml
index b0f00a17b5..11f16da3b3 100644
--- a/.github/workflows/cd-cua-spaces.yml
+++ b/.github/workflows/cd-cua-spaces.yml
@@ -85,8 +85,10 @@ name: "CD: Cua Spaces"
# or Windows updater artifacts. Installer assets and the feed carry keyless
# Sigstore (cosign) bundles, which install.sh / install.ps1 verify.
#
-# Release Please owns the version (component `cua-spaces`, apps/cua-spaces/VERSION)
-# and creates a draft release plus the `cua-spaces-v<version>` tag; this
+# Release Please owns the version (component `cua-spaces`, driven by the macOS
+# app: apps/cua-spaces-macos/VERSION and CHANGELOG.md; the Tauri app in
+# apps/cua-spaces shares it as extra files but never triggers a release) and
+# creates a draft release plus the `cua-spaces-v<version>` tag; this
# workflow fills that release and publishes it. It can also run manually with
# an explicit version. The macOS app takes the tag's version:
# CFBundleShortVersionString X.Y.Z, CFBundleVersion X.Y.Z.<run number>, and
@@ -418,7 +420,7 @@ jobs:
gh release view "cua-spaces-v$VERSION" --repo "$GITHUB_REPOSITORY" --json body --jq .body \
> "$notes" 2>/dev/null || : > "$notes"
if ! grep -q '[^[:space:]]' "$notes" || grep -qx 'Automated Cua Spaces release.' "$notes"; then
- python3 apps/cua-spaces-macos/scripts/changelog-notes.py "$VERSION" apps/cua-spaces/CHANGELOG.md > "$notes"
+ python3 apps/cua-spaces-macos/scripts/changelog-notes.py "$VERSION" apps/cua-spaces-macos/CHANGELOG.md > "$notes"
fi
apps/cua-spaces-macos/scripts/make-appcast.sh \
--dmg "installer-assets/cua-spaces-$VERSION-darwin-universal.dmg" --version "$VERSION" \
diff --git a/.github/workflows/ci-test-scripts.yml b/.github/workflows/ci-test-scripts.yml
index 5567157c93..b91ac65309 100644
--- a/.github/workflows/ci-test-scripts.yml
+++ b/.github/workflows/ci-test-scripts.yml
@@ -34,6 +34,8 @@ on:
- "libs/python/cua-sandbox/pyproject.toml"
- "libs/python/cua-sandbox/uv.lock"
- "libs/python/cua-sandbox/cua_sandbox/__init__.py"
+ - "apps/cua-spaces-macos/VERSION"
+ - "apps/cua-spaces-macos/Support/Info.plist"
- ".github/workflows/ci-test-scripts.yml"
- ".github/workflows/periodic-cua-sandbox-live.yml"
- ".github/workflows/ci-contributor-attribution.yml"
@@ -160,6 +162,8 @@ jobs:
node .github/scripts/tests/release_please_sandbox_preview.cjs
NODE_PATH="$RUNNER_TEMP/sandbox-release-preview/node_modules" \
node .github/scripts/tests/release_please_perception_preview.cjs
+ NODE_PATH="$RUNNER_TEMP/sandbox-release-preview/node_modules" \
+ node .github/scripts/tests/release_please_spaces_preview.cjs
- name: Validate historical release backfill
run: python3 .github/scripts/release_backfill.py validate
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index fa084eacc1..a99b80972c 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -5,5 +5,5 @@
"libs/python/cua-sandbox": "0.9.0",
"libs/cua": "0.2.0",
"libs/cua-spacesd": "0.1.2",
- "apps/cua-spaces": "0.1.0"
+ "apps/cua-spaces-macos": "0.1.0"
}
diff --git a/apps/cua-spaces-macos/CHANGELOG.md b/apps/cua-spaces-macos/CHANGELOG.md
new file mode 100644
index 0000000000..979ccc5109
--- /dev/null
+++ b/apps/cua-spaces-macos/CHANGELOG.md
@@ -0,0 +1,18 @@
+# Changelog
+
+## [0.1.0](https://github.com/trycua/cua/compare/cua-spaces-v0.1.0...cua-spaces-v0.1.0) (2026-10-01)
+
+
+### Features
+
+* merge updated sdk from cua-staging ([#4397](https://github.com/trycua/cua/issues/4397)) ([9166817](https://github.com/trycua/cua/commit/9166817485ae53f3966935c13878a8196d79a399))
+
+## Changelog
+
+Release notes for the Cua Spaces desktop app (`cua-spaces-v*`: the macOS
+installers and the Sparkle update feed, built by
+`.github/workflows/cd-cua-spaces.yml`). Release Please drives the `cua-spaces`
+component from this macOS app (`apps/cua-spaces-macos`) and owns the version
+in `VERSION` and `Support/Info.plist`; the Tauri app in `apps/cua-spaces`
+(`package.json`, `src-tauri/tauri.conf.json`, `src-tauri/Cargo.toml` and
+`src-tauri/Cargo.lock`) shares the version but does not trigger releases.
diff --git a/apps/cua-spaces-macos/README.md b/apps/cua-spaces-macos/README.md
index 5b048524be..9394a95e87 100644
--- a/apps/cua-spaces-macos/README.md
+++ b/apps/cua-spaces-macos/README.md
@@ -158,6 +158,18 @@ cua installed; folders the user edited are skipped) and stops and starts the
running daemon when its executable is inside this bundle, with one notice
only if either failed.
+### Release versions
+
+Release Please drives the `cua-spaces` component from this directory: a
+releasable conventional commit (`fix:`, `feat:`) that touches
+`apps/cua-spaces-macos` opens the `cua-spaces` release PR, which bumps
+`VERSION`, `CHANGELOG.md` and `CFBundleShortVersionString` in
+`Support/Info.plist`, plus the Tauri app's versions in `apps/cua-spaces` (it
+shares the version but its commits never open a release). Release Please
+splits commits by package path and skips a path with no commits (even for a
+targeted bump), so a change only under `libs/spaces-app-swift` does not open
+one on its own: land it with the app change that uses it.
+
### Publishing the appcast (runbook)
1. The key: the `CUA_SPACES_SPARKLE_ED_PRIVATE_KEY` secret (base64 Ed25519
diff --git a/apps/cua-spaces/VERSION b/apps/cua-spaces-macos/VERSION
similarity index 100%
rename from apps/cua-spaces/VERSION
rename to apps/cua-spaces-macos/VERSION
diff --git a/apps/cua-spaces-macos/scripts/changelog-notes.py b/apps/cua-spaces-macos/scripts/changelog-notes.py
index 3c41ba64cb..1ffea9e34a 100755
--- a/apps/cua-spaces-macos/scripts/changelog-notes.py
+++ b/apps/cua-spaces-macos/scripts/changelog-notes.py
@@ -4,7 +4,7 @@
"""Prints one version's section of a Release Please CHANGELOG.md (the
Sparkle appcast's release notes when the release has none of its own).
- changelog-notes.py 0.2.0 apps/cua-spaces/CHANGELOG.md
+ changelog-notes.py 0.2.0 apps/cua-spaces-macos/CHANGELOG.md
"""
import re
import sys
diff --git a/apps/cua-spaces/CHANGELOG.md b/apps/cua-spaces/CHANGELOG.md
deleted file mode 100644
index 3b96ccb41b..0000000000
--- a/apps/cua-spaces/CHANGELOG.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Changelog
-
-## [0.1.0](https://github.com/trycua/cua/compare/cua-spaces-v0.1.0...cua-spaces-v0.1.0) (2026-10-01)
-
-
-### Features
-
-* merge updated sdk from cua-staging ([#4397](https://github.com/trycua/cua/issues/4397)) ([9166817](https://github.com/trycua/cua/commit/9166817485ae53f3966935c13878a8196d79a399))
-
-## Changelog
-
-Release notes for the Cua Spaces desktop app (`cua-spaces-v*`: the macOS,
-Linux and Windows installers and the auto-updater feed, built by
-`.github/workflows/cd-cua-spaces.yml`). Release Please owns the version in
-`VERSION`, `package.json`, `src-tauri/tauri.conf.json` and `src-tauri/Cargo.toml`.
diff --git a/release-please-config.json b/release-please-config.json
index f2bcfb9d41..fb3383d2c7 100644
--- a/release-please-config.json
+++ b/release-please-config.json
@@ -177,35 +177,37 @@
}
]
},
- "apps/cua-spaces": {
+ "apps/cua-spaces-macos": {
"release-type": "simple",
"component": "cua-spaces",
"package-name": "cua-spaces",
"bump-minor-pre-major": true,
"version-file": "VERSION",
"changelog-path": "CHANGELOG.md",
- "exclude-paths": [
- "apps/cua-spaces/docs"
- ],
"extra-files": [
+ {
+ "type": "xml",
+ "path": "Support/Info.plist",
+ "xpath": "//dict/key[text()='CFBundleShortVersionString']/following-sibling::string[1]"
+ },
{
"type": "json",
- "path": "package.json",
+ "path": "/apps/cua-spaces/package.json",
"jsonpath": "$.version"
},
{
"type": "json",
- "path": "src-tauri/tauri.conf.json",
+ "path": "/apps/cua-spaces/src-tauri/tauri.conf.json",
"jsonpath": "$.version"
},
{
"type": "toml",
- "path": "src-tauri/Cargo.toml",
+ "path": "/apps/cua-spaces/src-tauri/Cargo.toml",
"jsonpath": "$.package.version"
},
{
"type": "toml",
- "path": "src-tauri/Cargo.lock",
+ "path": "/apps/cua-spaces/src-tauri/Cargo.lock",
"jsonpath": "$.package[?(@.name.value=='cua-spaces-app')].version"
}
]