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): turn Space sharing on by default (#5218)
Francesco Bonacci8049050559f7
diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swiftindex 7b8e3d317b..c483df6d4b 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppModel.swift@@ -231,7 +231,7 @@ public final class AppModel {onboarding.onLaunchAtLogin = { [weak self] on in self?.setLaunchAtLogin(on) }// Settings, Experiments decide the first run's pages (Cua Volume).onboarding.currentExperiments = { [weak self] in- self?.settings.experiments ?? AppExperiments(cuaVolume: false, yourCloud: false, sharing: false, webUi: false)+ self?.settings.experiments ?? AppExperiments(cuaVolume: false, yourCloud: false, sharing: true, webUi: false)}// Which experiments are on: the day's `cua_app_active` carries them.telemetry?.record(appTelemetryExperimentsOn(experiments: settings.experiments))diff --git a/apps/cua-spaces-web/src/bridge/__tests__/detail.test.ts b/apps/cua-spaces-web/src/bridge/__tests__/detail.test.tsindex b8233124c0..706811952b 100644--- a/apps/cua-spaces-web/src/bridge/__tests__/detail.test.ts+++ b/apps/cua-spaces-web/src/bridge/__tests__/detail.test.ts@@ -180,10 +180,10 @@ describe.skipIf(!wasmBuilt)("a Space's detail as this device sees it (wasm core)expect(spaceDetail(core, local!, null, null, { sharing: true }, NOTICE).access).toBeUndefined();});- it("hides Share while Settings, Experiments, Sharing is off", async () => {+ it("hides Share only while Settings, Experiments, Sharing is turned off", async () => {const core = await testCore();const [studio] = rowsToSpaces(core, [row({})], 0);- expect(spaceDetail(core, studio!, null, null, {}).actions.some((a) => a.id === "share")).toBe(false);+ expect(spaceDetail(core, studio!, null, null, { sharing: false }).actions.some((a) => a.id === "share")).toBe(false);expect(spaceDetail(core, studio!, null, null, { sharing: true }).actions.some((a) => a.id === "share")).toBe(true);});diff --git a/apps/cua-spaces-web/src/bridge/__tests__/experiments-defaults.test.ts b/apps/cua-spaces-web/src/bridge/__tests__/experiments-defaults.test.tsnew file mode 100644index 0000000000..98e521177b--- /dev/null+++ b/apps/cua-spaces-web/src/bridge/__tests__/experiments-defaults.test.ts@@ -0,0 +1,13 @@+// SPDX-License-Identifier: FSL-1.1-MIT+// Copyright (c) 2026 Cua AI, Inc.++import { describe, expect, it } from "vitest";+import { readExperiments } from "../ops/volume";++describe("stored experiments", () => {+ it("reads sharing as on unless it is stored off, and the rest as off", () => {+ expect(readExperiments(undefined)).toEqual({ cuaVolume: false, yourCloud: false, sharing: true, webUi: false });+ expect(readExperiments(JSON.stringify({ cuaVolume: true }))).toMatchObject({ cuaVolume: true, sharing: true });+ expect(readExperiments(JSON.stringify({ sharing: false }))).toMatchObject({ sharing: false });+ });+});diff --git a/apps/cua-spaces-web/src/bridge/adapters/demo/volume.ts b/apps/cua-spaces-web/src/bridge/adapters/demo/volume.tsindex fbb2b35ddf..7be2947cca 100644--- a/apps/cua-spaces-web/src/bridge/adapters/demo/volume.ts+++ b/apps/cua-spaces-web/src/bridge/adapters/demo/volume.ts@@ -39,7 +39,7 @@ export interface DemoVolumeState {export function demoVolumeState(now: number, onboarded: boolean, platform: DemoPlatform = MAC_DEMO_PLATFORM): DemoVolumeState {return {- experiments: { cuaVolume: true, yourCloud: false, sharing: false, webUi: false },+ experiments: { cuaVolume: true, yourCloud: false, sharing: true, webUi: false },requests: [{ id: "req-research", principal: "agent:researcher", prefix: "agents/writer/outputs/", mode: "r", reason: "Cite the launch draft in the weekly summary" },],diff --git a/apps/cua-spaces-web/src/bridge/contracts/volume.ts b/apps/cua-spaces-web/src/bridge/contracts/volume.tsindex 3d5bdc18d2..0bf1d55004 100644--- a/apps/cua-spaces-web/src/bridge/contracts/volume.ts+++ b/apps/cua-spaces-web/src/bridge/contracts/volume.ts@@ -22,7 +22,7 @@ export type { DriveCheckInput, DriveS3Input, DriveStorageInput, DriveStorageUpda/* ---- Experiments ----------------------------------------------------------- */-/** `experiments::Experiments`: Settings, Experiments' switches (all off by default). */+/** `experiments::Experiments`: Settings, Experiments' switches (all off by default except sharing, on unless turned off). */export interface Experiments {cuaVolume?: boolean;yourCloud?: boolean;@@ -30,7 +30,7 @@ export interface Experiments {webUi?: boolean;}-export const NO_EXPERIMENTS: Required<Experiments> = { cuaVolume: false, yourCloud: false, sharing: false, webUi: false };+export const NO_EXPERIMENTS: Required<Experiments> = { cuaVolume: false, yourCloud: false, sharing: true, webUi: false };/* ---- The daemon's answers (volume_*) ---------------------------------------- */diff --git a/apps/cua-spaces-web/src/bridge/ops/volume.ts b/apps/cua-spaces-web/src/bridge/ops/volume.tsindex 2175c8a39c..125b2f8d13 100644--- a/apps/cua-spaces-web/src/bridge/ops/volume.ts+++ b/apps/cua-spaces-web/src/bridge/ops/volume.ts@@ -123,14 +123,14 @@ const list = <T>(v: unknown, key: string): T[] => {return Array.isArray(a) ? (a as T[]) : [];};-/** Settings, Experiments as stored in the Tauri app's UI storage; missing keys read as off. */+/** Settings, Experiments as stored in the Tauri app's UI storage; missing keys read as off (sharing: as on). */export function readExperiments(raw: string | undefined): Experiments {try {const stored = raw ? (JSON.parse(raw) as Partial<Record<keyof Experiments, unknown>>) : {};return {cuaVolume: stored.cuaVolume === true,yourCloud: stored.yourCloud === true,- sharing: stored.sharing === true,+ sharing: stored.sharing !== false,webUi: stored.webUi === true,};} catch {diff --git a/apps/cua-spaces/src/components/SettingsPanel.test.tsx b/apps/cua-spaces/src/components/SettingsPanel.test.tsxindex 6c265d1001..f3550b0e50 100644--- a/apps/cua-spaces/src/components/SettingsPanel.test.tsx+++ b/apps/cua-spaces/src/components/SettingsPanel.test.tsx@@ -442,9 +442,11 @@ describe("SettingsPanel Experiments", () => {renderPanel({ telemetry });await screen.findByText("Share anonymous usage data");const experiments = within(screen.getByRole("region", { name: "Experiments" }));- for (const name of ["Cua Volume", "Your cloud", "Sharing"]) {+ for (const name of ["Cua Volume", "Your cloud"]) {expect(experiments.getByRole("switch", { name })).toHaveAttribute("aria-checked", "false");}+ // Sharing is on by default (cua.ai/pricing lists it).+ expect(experiments.getByRole("switch", { name: "Sharing" })).toHaveAttribute("aria-checked", "true");expect(screen.queryByRole("region", { name: "Storage" })).toBeNull();await user.click(experiments.getByRole("switch", { name: "Cua Volume" }));expect(await screen.findByRole("region", { name: "Storage" })).toBeInTheDocument();@@ -455,7 +457,7 @@ describe("SettingsPanel Experiments", () => {});expect(telemetry.recordSignals).toHaveBeenCalledWith([{ type: "experiment", action: "experiment_on", experiment: "cua_volume" },- { type: "experiments-on", experiments: ["cua_volume"] },+ { type: "experiments-on", experiments: ["cua_volume", "sharing"] },]);});});diff --git a/apps/cua-spaces/src/components/desktop/MainWindow.test.tsx b/apps/cua-spaces/src/components/desktop/MainWindow.test.tsxindex f4685dfb50..7645609795 100644--- a/apps/cua-spaces/src/components/desktop/MainWindow.test.tsx+++ b/apps/cua-spaces/src/components/desktop/MainWindow.test.tsx@@ -377,8 +377,8 @@ describe("MainWindow", () => {const labels = [...document.querySelectorAll(".dw-toolbar-actions button")].map((b) => b.getAttribute("aria-label") ?? b.textContent,);- // No Share without the Sharing experiment (Settings, Experiments).- expect(labels).toEqual(["Teleport an app", "Picture in picture", "Delete Space", "Open"]);+ // Share is on by default (Settings, Experiments, Sharing).+ expect(labels).toEqual(["Teleport an app", "Picture in picture", "Share", "Delete Space", "Open"]);expect(screen.getAllByRole("heading", { level: 2 }).map((h) => h.textContent)).toEqual(["Stream","Agents",@@ -479,7 +479,7 @@ describe("MainWindow", () => {// The toolbar's power button sits right before Delete; the row has one too.const toolbar = document.querySelector(".dw-toolbar-actions")!;const labels = [...toolbar.querySelectorAll("button")].map((b) => b.getAttribute("aria-label") ?? b.textContent);- expect(labels).toEqual(["Teleport an app", "Picture in picture", "Suspend", "Delete Space", "Open"]);+ expect(labels).toEqual(["Teleport an app", "Picture in picture", "Share", "Suspend", "Delete Space", "Open"]);expect(screen.getAllByRole("button", { name: "Suspend" })).toHaveLength(2);// aurora (cloud) cannot be turned off: no power button on its row.expect(document.querySelectorAll(".dw-row-power")).toHaveLength(1);diff --git a/apps/cua-spaces/src/model/experiments.ts b/apps/cua-spaces/src/model/experiments.tsindex 46126efe9f..81105c5f10 100644--- a/apps/cua-spaces/src/model/experiments.ts+++ b/apps/cua-spaces/src/model/experiments.ts@@ -19,7 +19,7 @@ export interface Experiments {sharing: boolean;}-export const NO_EXPERIMENTS: Experiments = { cuaVolume: false, yourCloud: false, sharing: false };+export const NO_EXPERIMENTS: Experiments = { cuaVolume: false, yourCloud: false, sharing: true };/** The Experiments tab: a switch and one line per experiment. */export function experimentsPage(experiments: Experiments): SettingsPage {diff --git a/apps/cua-spaces/src/state/experiments.ts b/apps/cua-spaces/src/state/experiments.tsindex dec4fc0ad6..ef51c8db67 100644--- a/apps/cua-spaces/src/state/experiments.ts+++ b/apps/cua-spaces/src/state/experiments.ts@@ -36,7 +36,7 @@ export function currentExperiments(): Experiments {const value: Experiments = {cuaVolume: stored.cuaVolume === true,yourCloud: stored.yourCloud === true,- sharing: stored.sharing === true,+ sharing: stored.sharing !== false,};cache = { raw, value: { ...NO_EXPERIMENTS, ...value } };return cache.value;diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/experiments.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/experiments.jsonindex fd5f490a4d..90caafead8 100644--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/experiments.json+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/experiments.json@@ -5,6 +5,7 @@"actions": ["teleport: Teleport an app [arrow.down.circle] ?Teleport an app into this Space","pip: Picture in picture [pip.enter] ?Picture in picture",+ "share: Share [person.badge.plus] ?Share this Space","delete: Remove [trash] ?Remove from the list (destructive)","open: Open [-] ?Open the desktop in its own window (primary)"],@@ -88,7 +89,7 @@"- experiment:cua_volume-note note: Memory and files your agents share across every Space.","- experiment:your_cloud toggle: Your cloud {On|*Off}","- experiment:your_cloud-note note: Create Spaces in your own AWS, Google Cloud or Modal account.",- "- experiment:sharing toggle: Sharing {On|*Off}",+ "- experiment:sharing toggle: Sharing {*On|Off}","- experiment:sharing-note note: Share a Space with other Cua accounts.","- experiment:classic_ui toggle: Use classic UI {*On|Off}","- experiment:classic_ui-note note: Open the previous Spaces window instead of the New UI."@@ -114,6 +115,7 @@"actions": ["teleport: Teleport an app [arrow.down.circle] ?Teleport an app into this Space","pip: Picture in picture [pip.enter] ?Picture in picture",+ "share: Share [person.badge.plus] ?Share this Space","delete: Remove [trash] ?Remove from the list (destructive)","open: Open [-] ?Open the desktop in its own window (primary)"],@@ -204,7 +206,8 @@},{"experiments": [- "cua_volume"+ "cua_volume",+ "sharing"],"type": "experiments-on"}@@ -217,7 +220,7 @@"- experiment:cua_volume-note note: Memory and files your agents share across every Space.","- experiment:your_cloud toggle: Your cloud {On|*Off}","- experiment:your_cloud-note note: Create Spaces in your own AWS, Google Cloud or Modal account.",- "- experiment:sharing toggle: Sharing {On|*Off}",+ "- experiment:sharing toggle: Sharing {*On|Off}","- experiment:sharing-note note: Share a Space with other Cua accounts.","- experiment:classic_ui toggle: Use classic UI {*On|Off}","- experiment:classic_ui-note note: Open the previous Spaces window instead of the New UI."@@ -243,6 +246,7 @@"actions": ["teleport: Teleport an app [arrow.down.circle] ?Teleport an app into this Space","pip: Picture in picture [pip.enter] ?Picture in picture",+ "share: Share [person.badge.plus] ?Share this Space","delete: Remove [trash] ?Remove from the list (destructive)","open: Open [-] ?Open the desktop in its own window (primary)"],@@ -334,7 +338,8 @@{"experiments": ["cua_volume",- "your_cloud"+ "your_cloud",+ "sharing"],"type": "experiments-on"}@@ -347,7 +352,7 @@"- experiment:cua_volume-note note: Memory and files your agents share across every Space.","- experiment:your_cloud toggle: Your cloud {*On|Off}","- experiment:your_cloud-note note: Create Spaces in your own AWS, Google Cloud or Modal account.",- "- experiment:sharing toggle: Sharing {On|*Off}",+ "- experiment:sharing toggle: Sharing {*On|Off}","- experiment:sharing-note note: Share a Space with other Cua accounts.","- experiment:classic_ui toggle: Use classic UI {*On|Off}","- experiment:classic_ui-note note: Open the previous Spaces window instead of the New UI."@@ -459,21 +464,7 @@"- telemetry-note note: Features used, sandbox types, durations and error categories. Never paths, names, prompts, screen content or Keyvault items. <What is collected https://cua.ai/docs/cua-sdk/concepts/telemetry>","# AI agents (agents) [Configure all detected agents] (disabled)"],- "signals": [- {- "action": "experiment_on",- "experiment": "sharing",- "type": "experiment"- },- {- "experiments": [- "cua_volume",- "your_cloud",- "sharing"- ],- "type": "experiments-on"- }- ],+ "signals": [],"step": "sharing on","tab": ["= Experiments",diff --git a/libs/cua/crates/cua-spaces-app-core/src/experiments.rs b/libs/cua/crates/cua-spaces-app-core/src/experiments.rsindex aefce1d2ce..35765be6dc 100644--- a/libs/cua/crates/cua-spaces-app-core/src/experiments.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/experiments.rs@@ -2,8 +2,9 @@// Copyright (c) 2026 Cua AI, Inc.//! Settings, Experiments: features still being built, one switch each, all-//! off by default except the New UI, which [`new_ui_default`] turns on for-//! the Beta channel and then for every release.+//! off by default except Sharing (on, as cua.ai/pricing lists it for every+//! plan) and the New UI, which [`new_ui_default`] turns on for the Beta+//! channel and then for every release.//!//! - Cua Volume ([`Experiment::CuaVolume`]): the first run's Volume page//! (and its Done line) and Settings' Storage section;@@ -38,20 +39,32 @@ use crate::settings::{};/// The switches, as stored (`"experiments": {"cuaVolume": true}`).-#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]#[serde(rename_all = "camelCase", default)]pub struct Experiments {/// Cua Volume in the first run and Settings, Storage.pub cua_volume: bool,/// Your own clouds in the New Space wizard.pub your_cloud: bool,- /// Sharing a Space with other accounts.+ /// Sharing a Space with other accounts. On unless turned off: a missing+ /// key reads as on (the plans on cua.ai/pricing list sharing).pub sharing: bool,/// The New UI (the shared web UI) is the main window: the user's choice/// or, without one, [`new_ui_default`] ([`crate::settings::resolve_new_ui`]).pub web_ui: bool,}+impl Default for Experiments {+ fn default() -> Self {+ Self {+ cua_volume: false,+ your_cloud: false,+ sharing: true,+ web_ui: false,+ }+ }+}+/// One experiment.#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]#[serde(rename_all = "snake_case")]@@ -356,7 +369,7 @@ mod tests {use super::*;#[test]- fn every_experiment_is_off_by_default_with_one_line_each() {+ fn every_experiment_but_sharing_is_off_by_default_with_one_line_each() {let p = page(&Experiments::default());assert_eq!(p.title, "Experiments");let ids: Vec<&str> = p.sections[0].rows.iter().map(|r| r.id.as_str()).collect();@@ -375,7 +388,11 @@ mod tests {);for r in switches(&p) {// Off, the New UI shows as "Use classic UI" on.- let shown = if r.id == CLASSIC_UI_ROW { "on" } else { "off" };+ let shown = if r.id == CLASSIC_UI_ROW || r.id == "experiment:sharing" {+ "on"+ } else {+ "off"+ };assert!(r.options.iter().any(|o| o.id == shown && o.active),"{}",@@ -391,19 +408,16 @@ mod tests {#[test]fn a_switch_turns_one_experiment_on_and_off() {- let x = choose(&Experiments::default(), "experiment:sharing", "on");- assert_eq!(- x,- Experiments {- sharing: true,- ..Default::default()- }- );+ let off = Experiments {+ sharing: false,+ ..Default::default()+ };+ let x = choose(&off, "experiment:sharing", "on");+ assert_eq!(x, Experiments::default());assert_eq!(x.on_ids(), ["sharing"]);- assert_eq!(- choose(&x, "experiment:sharing", "off"),- Experiments::default()- );+ assert_eq!(choose(&x, "experiment:sharing", "off"), off);+ let v = choose(&x, "experiment:cua_volume", "on");+ assert_eq!(v.on_ids(), ["cua_volume", "sharing"]);assert_eq!(choose(&x, "notch", "on"), x, "other rows change nothing");assert_eq!(choose(&x, "experiment:nope", "on"), x);assert_eq!(@@ -516,12 +530,16 @@ mod tests {fn stored_keys_are_forward_compatible() {let x: Experiments =serde_json::from_str(r#"{"cuaVolume":true,"someFutureExperiment":true}"#).unwrap();- assert!(x.cua_volume && !x.your_cloud && !x.sharing && !x.web_ui);+ assert!(x.cua_volume && !x.your_cloud && x.sharing && !x.web_ui);let back = serde_json::to_value(x).unwrap();assert_eq!(back,- serde_json::json!({"cuaVolume": true, "yourCloud": false, "sharing": false, "webUi": false})+ serde_json::json!({"cuaVolume": true, "yourCloud": false, "sharing": true, "webUi": false}));+ // Sharing is on unless the key says off (a missing key is not off).+ let off: Experiments = serde_json::from_str(r#"{"sharing":false}"#).unwrap();+ assert!(!off.sharing);+ assert!(Experiments::default().sharing);assert_eq!(serde_json::from_str::<Experiments>("{}").unwrap(),Experiments::default()diff --git a/libs/cua/crates/cua-spaces-app-core/src/spaces/sidebar.rs b/libs/cua/crates/cua-spaces-app-core/src/spaces/sidebar.rsindex c726ea4dc4..74bae156cf 100644--- a/libs/cua/crates/cua-spaces-app-core/src/spaces/sidebar.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/spaces/sidebar.rs@@ -1198,8 +1198,8 @@ mod tests {);}- /// Sharing off (the default): no Share button; on: Share, between- /// Picture in picture and Delete as before.+ /// Sharing on (the default): Share, between+ /// Picture in picture and Delete as before; off: no Share button.#[test]fn the_sharing_experiment_decides_the_share_button() {use crate::experiments::Experiments;@@ -1211,11 +1211,14 @@ mod tests {.map(|a| a.id).collect()};- assert!(!ids(&Experiments::default()).contains(&DetailActionId::Share));- let on = ids(&Experiments {- sharing: true,- ..Default::default()- });+ assert!(+ !ids(&Experiments {+ sharing: false,+ ..Default::default()+ })+ .contains(&DetailActionId::Share)+ );+ let on = ids(&Experiments::default());assert_eq!(on.iter().position(|a| *a == DetailActionId::Share),Some(2),diff --git a/libs/cua/crates/cua-spaces-app-core/src/telemetry.rs b/libs/cua/crates/cua-spaces-app-core/src/telemetry.rsindex 3ac6d71d90..c5dba9d6f7 100644--- a/libs/cua/crates/cua-spaces-app-core/src/telemetry.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/telemetry.rs@@ -1415,11 +1415,11 @@ mod tests {#[test]fn an_experiment_toggle_is_one_event_and_the_set_that_is_on() {use crate::experiments::Experiments;- let off = Experiments::default();- let on = Experiments {- sharing: true,+ let off = Experiments {+ sharing: false,..Default::default()};+ let on = Experiments::default();let signals = experiments_changed(&off, &on);assert_eq!(signals,@@ -1494,12 +1494,16 @@ mod tests {.foreground().build();t.acknowledge_notice();+ let off = Experiments {+ sharing: false,+ ..Default::default()+ };let on = Experiments {cua_volume: true,sharing: true,..Default::default()};- let signals = experiments_changed(&Experiments::default(), &on);+ let signals = experiments_changed(&off, &on);assert_eq!(record(&t, &signals),2,diff --git a/libs/cua/crates/cua-spaces-ffi/src/app_core_types.rs b/libs/cua/crates/cua-spaces-ffi/src/app_core_types.rsindex 35e7e6cd04..0539250018 100644--- a/libs/cua/crates/cua-spaces-ffi/src/app_core_types.rs+++ b/libs/cua/crates/cua-spaces-ffi/src/app_core_types.rs@@ -6361,7 +6361,8 @@ pub struct AppExperiments {pub cua_volume: bool,/// Your own clouds in the New Space wizard.pub your_cloud: bool,- /// Sharing a Space with other accounts.+ /// Sharing a Space with other accounts. On unless turned off: a missing+ /// key reads as on (the plans on cua.ai/pricing list sharing).pub sharing: bool,/// The New UI (the shared web UI) is the main window: the user's choice/// or, without one, [`new_ui_default`] ([`crate::settings::resolve_new_ui`]).