Experiments
Settings > Experiments: the switches that hide Cua Volume, your own cloud and sharing until they are turned on.
Settings > Experiments: the switches that hide Cua Volume, your own cloud and sharing until they are turned on.
These APIs are part of the Cua Spaces app export for building Spaces UIs. They are source-available under FSL-1.1-MIT and ship for Swift only (import CuaSpacesFFI); the Rust tab shows the cua-spaces-ffi crate they come from. The open source SDK packages for Python, TypeScript and Kotlin do not include them.
app_experiments_page derives the Experiments tab from the saved AppExperiments; app_settings_choose_experiment applies a switch and saves the New UI choice ("Use classic UI"). app_settings_resolve_new_ui applies the New UI default for the update channel and version. Off only hides a feature: a mounted Volume, a connected cloud and existing shares stay as they are.
app_experiments_from_json#The switches from JSON (fixtures, parity).
func appExperimentsFromJson(json: String) throws -> AppExperiments| Parameter | Type | Default |
|---|---|---|
json | String | required |
Returns AppExperiments ยท Raises CuaError
app_settings_with_storage#The Settings page with Settings, Storage after General while the Cua Volume experiment is on (left out while it is off).
func appSettingsWithStorage(page: AppSettingsPage, storage: AppSettingsSection, experiments: AppExperiments) -> AppSettingsPage| Parameter | Type | Default |
|---|---|---|
page | AppSettingsPage | required |
storage | AppSettingsSection | required |
experiments | AppExperiments | required |
Returns AppSettingsPage
app_settings_resolve_new_ui#The settings with the New UI as a launch of version shows it: the
user's choice, else the default for the update channel and version
(again after the channel changes).
func appSettingsResolveNewUi(settings: AppSettings, version: String) -> AppSettings| Parameter | Type | Default |
|---|---|---|
settings | AppSettings | required |
version | String | required |
Returns AppSettings
app_settings_first_launch_channel#The update channel of an install's first launch, from the file's
channel: Beta for a prerelease, else unchanged.
func appSettingsFirstLaunchChannel(channel: AppUpdateChannel, version: String) -> AppUpdateChannel| Parameter | Type | Default |
|---|---|---|
channel | AppUpdateChannel | required |
version | String | required |
Returns AppUpdateChannel
app_settings_choose_experiment#The settings after a Settings, Experiments row's choice (the switches, and the New UI's "Use classic UI" saved as the user's choice).
func appSettingsChooseExperiment(settings: AppSettings, row: String, option: String) -> AppSettings| Parameter | Type | Default |
|---|---|---|
settings | AppSettings | required |
row | String | required |
option | String | required |
Returns AppSettings
app_telemetry_experiments_changed#The events of a change in Settings, Experiments (call with the switches before and after it).
func appTelemetryExperimentsChanged(before: AppExperiments, after: AppExperiments) -> [AppTelemetrySignal]| Parameter | Type | Default |
|---|---|---|
before | AppExperiments | required |
after | AppExperiments | required |
Returns Vec<AppTelemetrySignal>
app_telemetry_experiments_on#Which experiments are on (at launch).
func appTelemetryExperimentsOn(experiments: AppExperiments) -> [AppTelemetrySignal]| Parameter | Type | Default |
|---|---|---|
experiments | AppExperiments | required |
Returns Vec<AppTelemetrySignal>
AppExperiments record#Returned by app_experiments_choose, app_experiments_from_json.
| Field | Type | Default | Description |
|---|---|---|---|
cua_volume / cuaVolume | bool | Cua Volume in the first run and Settings, Storage. | |
your_cloud / yourCloud | bool | Your own clouds in the New Space wizard. | |
sharing | bool | Sharing a Space with other accounts. | |
web_ui / webUi | 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). |
app_experiments_choose#The switches after a row's choice (on or off).
func appExperimentsChoose(experiments: AppExperiments, row: String, option: String) -> AppExperiments| Parameter | Type | Default |
|---|---|---|
experiments | AppExperiments | required |
row | String | required |
option | String | required |
Returns AppExperiments
app_experiments_page#Settings, Experiments: one switch and one line per experiment.
func appExperimentsPage(experiments: AppExperiments) -> AppSettingsPage| Parameter | Type | Default |
|---|---|---|
experiments | AppExperiments | required |
Returns AppSettingsPage