# Upgrading

Source: https://docs.interop.io/browser/getting-started/upgrading/index.html

## Overview

Upgrading your **io.Connect Browser** project may include all or some of the following processes, depending on your specific platform implementation:

- Upgrading the libraries used by the Main app.
- Upgrading any customized io.Connect system apps you may be using, such as the Home App, Workspaces App, Intent Resolver, or widget.
- Upgrading the io.Connect libraries used in your interop-enabled client apps.
- Updating app code, configuration, customizations, or stored data affected by breaking changes.

The latest versions of the io.Connect libraries offer new features, improvements, bug fixes, and security updates. Some new features require changes both in the Main app and in Browser Clients, so you may need to upgrade both to use them.

The **io.Connect Browser** libraries are published in the public [NPM registry](https://www.npmjs.com/org/interopio) under the `@interopio` scope. The [changelog](https://docs.interop.io/browser/getting-started/changelog/index.md) for each platform release lists the corresponding versions of the main and additional libraries. These libraries don't necessarily share the same version number.

Upgrading can be done by skipping versions. It isn't required to upgrade in steps from version to version. For instance, if your current version is 4.1, you can upgrade directly to 5.0. The same is valid for all io.Connect libraries. When skipping versions, apply the relevant upgrade instructions for all releases between your current version and the target version.

## General Upgrade Guide

To upgrade an existing **io.Connect Browser** project to a newer version:

1. Review the [changelog](https://docs.interop.io/browser/getting-started/changelog/index.md) for new features, improvements, and breaking changes in the target release and any releases between your current version and the target version.
2. Update the libraries used by the Main app, customized system apps, and Browser Clients to the applicable versions listed in the changelog for the target release.
3. Apply the migration instructions for the breaking changes that affect your project, including changes to app code, configuration, and customizations.
4. Rebuild and test the updated apps before deploying the upgraded project.

## Version to Version Upgrade

The following sections outline the process of upgrading your platform in steps from version to version. Each section describes any specific actions outside the scope of the [general upgrade guide](#general_upgrade_guide) you may need to take due to breaking changes in the platform or in any of the io.Connect libraries. If there are no breaking changes, follow the general upgrade guide.

### Upgrading from 4.6 to 5.0

#### Browser Requirements

The browsers used by your clients must provide native support for ES modules, `WeakRef`, and `FinalizationRegistry`. Check the additional [browser requirements](https://docs.interop.io/browser/getting-started/requirements-compatibility/index.md) for the features used by your project.

#### Library Imports

The [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser) and [`@interopio/browser-platform`](https://www.npmjs.com/package/@interopio/browser-platform) libraries are published only as ES modules. The `browser.umd.js`, `browser.umd.min.js`, and `browser.platform.umd.js` bundles have been removed.

When using NPM packages, install or update the libraries as project dependencies and import their factory functions from the package roots. Remove UMD script references from your HTML files.

The following example demonstrates importing and initializing the library for the Main app:

```javascript
import IOBrowserPlatform from "@interopio/browser-platform";

const config = { licenseKey: "my-license-key" };
const { io } = await IOBrowserPlatform(config);
```

The following example demonstrates importing and initializing the library for a Browser Client:

```javascript
import IOBrowser from "@interopio/browser";

const io = await IOBrowser();
```

Both packages declare `"type": "module"`. When importing an installed package by name, its `exports` map exposes only the package root and `package.json`. Replace deep package imports such as `@interopio/browser/browser` and `@interopio/browser-platform/browser.platform` with imports from the package roots. This also applies to TypeScript types.

The following example demonstrates importing TypeScript types from the package roots:

```typescript
import { IOConnectBrowser } from "@interopio/browser";
import { IOConnectBrowserPlatform } from "@interopio/browser-platform";
```

If you load a library from a CDN or your own server, use `browser.platform.es.js` for the Main app or `browser.es.js` for a Browser Client. You can import the file URL from a module script or reference it directly in a `<script type="module" src="...">` tag. The `IOBrowserPlatform()` and `IOBrowser()` factory functions are still attached to the global `window` object by default. Existing initialization code can use these globals after the library module has executed.

#### io.Insights

The `otel` configuration object is deprecated, and its settings are no longer applied. In the `IOBrowserPlatform()` configuration, move shared settings from the `otel` top-level key to the `insights` top-level key. Move the metric settings from the `metrics` object under `otel` to the `metrics` object under `insights`. [Enable both **io.Insights** and the required signals](https://docs.interop.io/insights/configuration/io-connect-browser/index.md#enabling_ioinsights).

Replace `getAdditionalAttributes` with `additionalAttributes` both in the `insights` object and in its `metrics` object. The new configuration doesn't support the old property name. You can assign the existing callbacks to the corresponding `additionalAttributes` properties.

The following example demonstrates migrating callbacks for shared and metric attributes and enabling metrics:

```javascript
import IOBrowserPlatform from "@interopio/browser-platform";

const getSharedAttributes = () => ({ environment: "production" });
const getMetricAttributes = () => ({ source: "main-app" });

const config = {
    licenseKey: "my-license-key",
    insights: {
        enabled: true,
        additionalAttributes: getSharedAttributes,
        metrics: {
            enabled: true,
            additionalAttributes: getMetricAttributes,
            url: "https://my-collector.example.com/v1/metrics"
        }
    }
};

const { io } = await IOBrowserPlatform(config);
```

The **io.Insights** signal implementations are optional peer dependencies. Install the base package and the packages for the signals used by your app. The following example demonstrates installing the dependencies for metrics:

```cmd
npm install @interopio/insights-base @interopio/insights-metrics
```

For traces, also install [`@interopio/insights-traces`](https://www.npmjs.com/package/@interopio/insights-traces). The io.Connect library initializes the Insights API internally when you use it via [`io.insights`](https://docs.interop.io/browser/reference/javascript/insights/api/index.md). The Main app uses the top-level `insights` configuration, and the `browser` object doesn't accept separate `insights` settings.

The `IOConnectBrowserPlatform.Otel` namespace has been removed from the TypeScript declarations. Replace references to it with `IOConnectBrowserPlatform.Insights`.

The `type` identifier for the [metric counting started Workspaces](https://docs.interop.io/insights/signals/metrics/io-connect-browser/index.md#workspaces-workspacestarted) has been renamed from `workspace_startup` to `workspace_started`. Update metric filters and overrides that target this counter. The new `workspace_startup` metric [measures startup duration](https://docs.interop.io/insights/signals/metrics/io-connect-browser/index.md#workspaces-workspacestartup), so retaining the old type would target a different measurement.

> ℹ️ *For more details on supported settings, signal enablement, and settings inherited by Browser Clients, see the [Configuration > io.Connect Browser](https://docs.interop.io/insights/configuration/io-connect-browser/index.md) section in the official **io.Insights** documentation.*

#### App Definitions & Stored Data

Replace the removed `workspacesSandbox` property of the `details` object in app definitions with `iframeSandbox`, preserving the configured sandbox restrictions.

When upgrading to **io.Connect Browser** 5.0, clear the local storage, session storage, and IndexedDB data for the platform site before starting the upgraded platform. This prevents reuse of cached app definitions containing the old property, which can cause iframe apps to start without the configured sandbox restrictions.

> ⚠️ *Note that clearing this data will also delete locally stored Layouts and app preferences.*

#### Window Management

The [`close()`](https://docs.interop.io/browser/reference/javascript/windows/webwindow/index.md#WebWindow-close) method of a [`WebWindow`](https://docs.interop.io/browser/reference/javascript/windows/webwindow/index.md) instance now returns a `Promise<boolean>` instead of a `Promise<WebWindow>`. Update code that uses the resolved value to check whether the window was closed. Keep the original window reference if you need to access it after the operation.

The following example demonstrates checking whether a window was closed:

```javascript
const closed = await myWindow.close();

if (closed) {
    console.log("The window has been closed.");
}
```

#### Layouts

The [`restore()`](https://docs.interop.io/browser/reference/javascript/layouts/api/index.md#API-restore) method of the Layouts API now honors closing prevention by windows and [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) instances when called from an app using [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser) 5.0 or later. Use the [`RestoreOptions`](https://docs.interop.io/browser/reference/javascript/layouts/restoreoptions/index.md) object to control closing prevention and user confirmation.

If a window or a `Frame` closing handler prevents closing and the Layout restore operation allows prevention, the operation will be rejected unless a confirmation dialog is requested and the user confirms closing. The dialog will appear in the app initiating the Layout restore or, if that app is a Workspace window, in its Workspaces App instance. If the user cancels the operation or the dialog can't be displayed, the Layout restore will be rejected.

> ⚠️ *Note that displaying a confirmation dialog requires modal resources to be configured in the Main app and [dialogs to be enabled](https://docs.interop.io/browser/capabilities/windows/modals/setup/index.md#enabling_modals) in the app displaying it.*

To force the restore despite closing prevention, configure the `RestoreOptions` object to ignore prevention.

The following example demonstrates restoring a Global Layout regardless of closing prevention:

```javascript
const options = {
    name: "My Layout",
    type: "Global",
    allowPrevent: false
};

await io.layouts.restore(options);
```

Closing handlers will still be invoked, but won't be able to prevent the operation.

> ⚠️ *Note that restore requests from apps using `@interopio/browser` earlier than 5.0 retain the previous behavior - closing handlers won't be able to prevent the Layout restore operation and confirmation dialogs won't be displayed.*

When closing prevention and confirmation are enabled and the restore operation closes existing instances, the custom restore timeout is ignored and an [extended timeout](https://docs.interop.io/browser/capabilities/windows/layouts/layouts-api/index.md#layout_operations-restore-preventing_restore) is used.

#### Channels

The [`add()`](https://docs.interop.io/browser/reference/javascript/channels/api/index.md#API-add) method of the Channels API now accepts a [`ChannelContext`](https://docs.interop.io/browser/reference/javascript/channels/channelcontext/index.md) object instead of a [`ChannelDefinition`](https://docs.interop.io/browser/reference/javascript/channels/channeldefinition/index.md) object. The `data` property is required. Add an empty `data` object to definitions passed to `add()` if the Channel has no initial context.

The following example demonstrates adding a Channel with an empty context:

```javascript
const channel = {
    name: "My Channel",
    meta: { color: "red" },
    data: {}
};

await io.channels.add(channel);
```

The [`onChanged()`](https://docs.interop.io/browser/reference/javascript/channels/api/index.md#API-onChanged) and [`onChannelsChanged()`](https://docs.interop.io/browser/reference/javascript/channels/api/index.md#API-onChannelsChanged) methods now invoke registered handlers immediately with the currently joined Channel or Channels. Review handlers that assume they will run only after a later Channel change. They won't be invoked on registration if the window hasn't joined a Channel.

The return types of [`my()`](https://docs.interop.io/browser/reference/javascript/channels/api/index.md#API-my) and [`current()`](https://docs.interop.io/browser/reference/javascript/channels/api/index.md#API-current) and the Channel argument of the `onChanged()` handler now include `undefined`. This reflects the existing behavior when the window hasn't joined a Channel. Handle that case explicitly in code that uses these values.

#### Notifications

The [`click()`](https://docs.interop.io/browser/reference/javascript/notifications/api/index.md#API-click) method of the Notifications API now closes the notification by default, even when the `clearNotificationOnClick` platform setting is `false`. Previously, calls without click options honored that setting.

To keep a notification open, pass `{ close: false }` as the third argument.

The following example demonstrates clicking a notification action without closing the notification:

```javascript
const id = notification.id;
const action = "openClientPortfolio";
const options = { close: false };

await io.notifications.click(id, action, options);
```

The method now rejects the request if the specified notification action doesn't exist.

#### Intents

Replace the removed `addIntentListener()` method of the Intents API with [`register()`](https://docs.interop.io/browser/reference/javascript/intents/api/index.md#API-register). Replace the renamed `AddIntentListenerRequest` interface with [`RegisterIntentRequest`](https://docs.interop.io/browser/reference/javascript/intents/registerintentrequest/index.md). The removed method returned the subscription object synchronously, while `register()` returns a promise. Await registration before accessing the `unsubscribe` function or performing work that depends on the handler being registered.

The following example demonstrates awaiting registration and retrieving the unsubscribe function:

```javascript
const intent = "ViewChart";
const handler = (context) => {
    console.log(context);
};

const { unsubscribe } = await io.intents.register(intent, handler);
```

Follow the examples for [registering Intent handlers](https://docs.interop.io/browser/capabilities/data-sharing/intents/intents-api/index.md#context).

#### Interop

The declared return type of the [`unregister()`](https://docs.interop.io/browser/reference/javascript/interop/api/index.md#API-unregister) method of the Interop API has been corrected from `void` to `Promise<void>`. The runtime behavior hasn't changed. Update TypeScript code that relies on the old declaration and await the operation where subsequent work depends on its completion.

#### App Preferences

The `lastUpdate` property of the [`AppPreferences`](https://docs.interop.io/browser/reference/javascript/app%20preferences/apppreferences/index.md) object for [app preferences](https://docs.interop.io/browser/capabilities/app-preferences/index.md) is now a `Date` instead of a string. Update code that expects a string representation, using the appropriate `Date` method when a string is needed.

#### Workspaces

The return types of the [`getFrame()`](https://docs.interop.io/browser/reference/javascript/workspaces/api/index.md#API-getFrame), [`getWorkspace()`](https://docs.interop.io/browser/reference/javascript/workspaces/api/index.md#API-getWorkspace), [`getWindow()`](https://docs.interop.io/browser/reference/javascript/workspaces/api/index.md#API-getWindow), and [`getBox()`](https://docs.interop.io/browser/reference/javascript/workspaces/api/index.md#API-getBox) methods of the Workspaces API and of the [`getBox()`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md#Workspace-getBox), [`getRow()`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md#Workspace-getRow), [`getColumn()`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md#Workspace-getColumn), [`getGroup()`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md#Workspace-getGroup), and [`getWindow()`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md#Workspace-getWindow) methods of a [`Workspace`](https://docs.interop.io/browser/reference/javascript/workspaces/workspace/index.md) instance now include `undefined`. This reflects the existing runtime behavior when no element matches the predicate.

TypeScript projects with `strictNullChecks` enabled must handle the `undefined` case explicitly.

The following example demonstrates checking whether a matching [`Frame`](https://docs.interop.io/browser/reference/javascript/workspaces/frame/index.md) instance exists before focusing it:

```javascript
const predicate = frame => frame.id === "frame-id";
const frame = await io.workspaces.getFrame(predicate);

if (frame) {
    await frame.focus();
}
```

#### Platform Styles

Review custom styles for the "Add Apps" and "Add Workspace" popups. The following CSS variables have been removed:

- `--workspace-popup-app-title-margin`.
- `--workspace-popup-app-title-lh`.
- `--workspace-popup-app-placement-section-font-size`.
- `--workspace-popup-app-placement-section-lh`.
- `--workspace-popup-add-workspace-title-lh`.
- `--workspace-popup-app-max-height`, which was unused.

Use the new title padding and color variables for customizing the popup headings. The [available Workspaces CSS variables](https://docs.interop.io/browser/developers/platform-styles/index.md#workspaces) include these replacements and other customization options.

#### FDC3

The [`@interopio/fdc3`](https://www.npmjs.com/package/@interopio/fdc3) 3.0 library conforms to the FDC3 3.0 standard. Update existing calls and types as follows:

| Previous API | Required Change |
|--------------|-----------------|
| `getSystemChannels()` and `joinChannel()`. | Use [`getUserChannels()`](https://fdc3.finos.org/docs/api/ref/DesktopAgent#getuserchannels) and [`joinUserChannel()`](https://fdc3.finos.org/docs/api/ref/DesktopAgent#joinuserchannel). |
| String app targets in [`open()`](https://fdc3.finos.org/docs/api/ref/DesktopAgent#open), [`raiseIntent()`](https://fdc3.finos.org/docs/api/ref/DesktopAgent#raiseintent), and [`raiseIntentForContext()`](https://fdc3.finos.org/docs/api/ref/DesktopAgent#raiseintentforcontext). | Use an [`AppIdentifier`](https://fdc3.finos.org/docs/api/ref/Types#appidentifier) object, e.g., `{ appId: "my-app" }`. |
| [`addContextListener(handler)`](https://fdc3.finos.org/docs/api/ref/DesktopAgent#addcontextlistener). | Use `addContextListener(null, handler)` to listen for all context types. |
| `onAddContextListener()`, `onUnsubscribe()`, and `onDisconnect()` on Private Channels. | Use [`addEventListener()`](https://fdc3.finos.org/docs/api/ref/PrivateChannel#addeventlistener) with the respective event type. |
| The `OriginatingAppMetadata` property of the `optionalFeatures` object in the result of [`getInfo()`](https://fdc3.finos.org/docs/api/ref/DesktopAgent#getinfo). | Remove checks for this removed property. |

The timeout for app initialization and startup context delivery via `open()` has been reduced from 120 to 30 seconds. The request will be rejected with `AppTimeout` if the timeout expires. Account for this shorter interval in apps that receive startup context.

> ℹ️ *For more details on the io.Connect integration and links to the official FDC3 API documentation, see the [FDC3 Compliance](https://docs.interop.io/browser/getting-started/fdc3-compliance/index.md) section.*

For all else, follow the [general upgrade guide](#general_upgrade_guide).

### Upgrading from 4.5 to 4.6

#### Home App

When upgrading [`@interopio/home-ui-react`](https://www.npmjs.com/package/@interopio/home-ui-react), update the `getIcon()` function in the `config` object of the `<Section />` component used for creating [custom Launchpad sections](https://docs.interop.io/browser/capabilities/home-app/library-features/index.md#using_the_components-launchpad-custom_sections). It must now return `{ variant: IconVariant }` for predefined icons or `{ src: string }` for custom icons instead of a string.

The following example demonstrates returning a predefined icon:

```javascript
const getIcon = () => ({ variant: "apps" });
```

The following example demonstrates returning a custom icon:

```javascript
const getIcon = () => ({ src: "https://example.com/icon.svg" });
```

#### Platform Styles

The Layouts panel in the Launchpad has been redesigned, and several CSS variables in [`@interopio/theme`](https://www.npmjs.com/package/@interopio/theme) have been removed or replaced. Update custom styles that use the affected variables:

- Replace the variables for the old Layouts panel with the [CSS variables for the Layouts footer](https://docs.interop.io/browser/getting-started/changelog/4-6/index.md#new_features-interopiotheme-launchpad_layouts_footer): `--launchpad-layouts-check-icon-size`, `--launchpad-layouts-create-button-margin`, `--launchpad-layouts-header-height`, `--launchpad-layouts-header-padding`, `--launchpad-layouts-no-active-padding`, `--launchpad-layouts-separator-color`, `--launchpad-layouts-separator-margin`, `--launchpad-layouts-separator-size`, and `--launchpad-layouts-wrapper-margin`.
- Remove uses of `--launchpad-section-item-actions-desktop-gap`, `--launchpad-section-item-actions-margin`, `--launchpad-section-item-actions-mobile-gap`, and `--workspace-popup-wsp-separator`.
- Replace `--workspace-popup-app-padding` with `--workspace-popup-app-padding-horizontal` and `--workspace-popup-app-padding-vertical`.
- Replace `--workspace-popup-wsp-title-lh` and `--workspace-popup-wsp-title-padding` with `--workspace-popup-add-workspace-title-lh` and `--workspace-popup-add-workspace-title-padding` respectively.
- Replace `--workspace-settings-h-padding` and `--workspace-settings-v-padding` with `--workspace-settings-padding`.

Review the new [CSS variables for Workspace dialogs and popups](https://docs.interop.io/browser/getting-started/changelog/4-6/index.md#new_features-interopiotheme-workspace_dialogs__popups) and the [Workspace Settings panel](https://docs.interop.io/browser/getting-started/changelog/4-6/index.md#new_features-interopiotheme-workspace_settings_panel) when adapting your styles to the redesigned elements.

For all else, follow the [general upgrade guide](#general_upgrade_guide).

### Upgrading from 4.4 to 4.5

Follow the [general upgrade guide](#general_upgrade_guide).

### Upgrading from 4.3 to 4.4

Follow the [general upgrade guide](#general_upgrade_guide).

### Upgrading from 4.2 to 4.3

Follow the [general upgrade guide](#general_upgrade_guide).

### Upgrading from 4.1 to 4.2

Follow the [general upgrade guide](#general_upgrade_guide).

### Upgrading from 4.0 to 4.1

#### Widget

The compact mode of the io.Connect widget and the `mode` property of the [`WidgetConfig`](https://docs.interop.io/browser/reference/javascript/io.connect%20browser/widgetconfig/index.md) object have been deprecated. Remove the deprecated configuration and references to the `WidgetMode` type, which has been removed from the library types.

Replace the deprecated `"top"`, `"bottom"`, `"left"`, and `"right"` positions with the applicable value from [`WidgetPosition`](https://docs.interop.io/browser/reference/javascript/io.connect%20browser/widgetposition/index.md): `"top-left"`, `"top-center"`, `"top-right"`, `"center-left"`, `"center-right"`, `"bottom-left"`, `"bottom-center"`, or `"bottom-right"`. The default position has changed from `"bottom"` to `"bottom-center"`.

The following example demonstrates configuring the widget position when initializing [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser):

```javascript
import IOBrowser from "@interopio/browser";

const config = {
    widget: {
        enable: true,
        position: "top-center"
    }
};

const io = await IOBrowser(config);
```

Apply the same position changes to any default widget configuration in the Main app.

For all else, follow the [general upgrade guide](#general_upgrade_guide).

### Upgrading from 3.5 to 4.0

#### License Keys

License keys generated before 8 November 2024 are no longer supported. Contact `sales@interop.io` to obtain an updated license key and replace the existing key in your Main app configuration. The new license keys are bound to a specific client origin, so ensure that the key covers the origin from which you deploy your platform.

#### Home App

The Home App has been redesigned, which requires changes to custom implementations using [`@interopio/home-ui-react`](https://www.npmjs.com/package/@interopio/home-ui-react).

**Configuration**

The function passed to the `getIOConnectConfig` property of the `config` object for the `<IOConnectHome />` component now accepts an object with `type` and `user` properties instead of the logged in user object directly. Update your callback to retrieve authentication details from the `user` property. The `type` property identifies the configured authentication mechanism. Use the updated [Home App configuration example](https://docs.interop.io/browser/capabilities/home-app/library-features/index.md#using_the_components-home_component) when adapting authentication for the Main app and user details for the Profile panel.

> ⚠️ *Note that enabling the [Modals API](https://docs.interop.io/browser/capabilities/windows/modals/modals-api/index.md) and configuring [modal resources](https://docs.interop.io/browser/capabilities/windows/modals/setup/index.md) is mandatory for using the Launchpad.*

**Components & Styles**

Update custom components and styles to account for the redesigned Home App:

- The Notification Panel is now in the Home App header area, and the notification badge has been removed from the Launchpad. The old User panel has been deprecated and replaced by the Profile panel in the system dropdown menu. The "More" button has been removed from Launchpad sections.
- Replace the deprecated `HeaderLogoArea` property of the `workspaces` object in the Home App configuration with `LogoComponent` in the `header` object under `components` in the same `workspaces` object. Follow the instructions for [customizing the Logo element](https://docs.interop.io/browser/capabilities/home-app/library-features/index.md#using_the_components-workspaces-logo_element).
- The `NotificationsPanel` and `UserPanel` properties of the `launchpad` object have been deprecated. Adapt customizations to the new [Notification Panel](https://docs.interop.io/browser/capabilities/home-app/overview/index.md#using_the_home_app-notification_panel) and [Profile panel](https://docs.interop.io/browser/capabilities/home-app/overview/index.md#using_the_home_app-profile_panel).
- Replace the deprecated `Sections` property of the `launchpad` object with the `sections` array in its `components` object, describing the default and custom Launchpad sections to display.
- The `iconName`, `iconSource`, `displayCount`, and `showAllItems` properties of the `config` object for the `<Section />` component have been deprecated. Update [custom Launchpad sections](https://docs.interop.io/browser/capabilities/home-app/library-features/index.md#using_the_components-launchpad-custom_sections) to use the supported configuration. The `isCollapsible` property now defaults to `true`. Set it explicitly to `false` if your section must remain expanded.
- Replace imports and uses of components that are no longer exported: `<HomeAppWorkspace />`, `<LaunchpadSlidePanel />`, `<LayoutsPanel />`, `<Logo />`, `<NotificationsIcon />`, `<SearchBar />`, `<SearchResults />`, `<SlidePanel />`, `<UserPanel />`, and `<UserPanelIcon />`. Use the supported [Home App components](https://docs.interop.io/browser/capabilities/home-app/library-features/index.md#using_the_components) for the affected customizations.

#### Channels

The [`publish()`](https://docs.interop.io/browser/reference/javascript/channels/api/index.md#API-publish) method no longer throws an error when the current window is joined to multiple Channels but is restricted from publishing to one or more of them. Data is published to each Channel where publishing is allowed. Update code that relies on rejection of the entire operation when one of the joined Channels restricts publishing.

#### Intent Resolver

The [`@interopio/intents-resolver-api`](https://www.npmjs.com/package/@interopio/intents-resolver-api) and [`@interopio/intents-resolver-ui-react`](https://www.npmjs.com/package/@interopio/intents-resolver-ui-react) libraries have been deprecated in **io.Connect Browser** in favor of [`@interopio/intent-resolver-ui`](https://www.npmjs.com/package/@interopio/intent-resolver-ui). The new Intent Resolver is embedded in the client DOM instead of running as a standalone window.

The `intents` property used to configure the legacy Intent Resolver when initializing [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser) has also been deprecated. When migrating to the new resolver, [configure its resources](https://docs.interop.io/browser/capabilities/data-sharing/intents/overview/index.md#intent_resolver-main_app) in the Main app and enable it via the `intentResolver` configuration in the Main app and [Browser Clients](https://docs.interop.io/browser/capabilities/data-sharing/intents/overview/index.md#intent_resolver-browser_clients). Reimplement custom resolver UI using the [custom component mechanism](https://docs.interop.io/browser/capabilities/data-sharing/intents/overview/index.md#extending_the_intent_resolver) of the new library.

> ⚠️ *Note that the legacy Intent Resolver implementations remain supported in **io.Connect Browser** 4.0. Migrating to the new resolver isn't required solely to upgrade the platform.*

#### Widget

The redesigned widget is embedded in the client DOM instead of running as a standalone app. When using this widget, supply its fonts in addition to its bundle and styles. Without the fonts, the widget icons won't be displayed. The fonts are distributed with [`@interopio/widget`](https://www.npmjs.com/package/@interopio/widget).

The following example demonstrates configuring the widget resources when initializing [`@interopio/browser-platform`](https://www.npmjs.com/package/@interopio/browser-platform):

```javascript
import IOBrowserPlatform from "@interopio/browser-platform";

const config = {
    licenseKey: "my-license-key",
    widget: {
        sources: {
            bundle: "https://my-widget/widget-bundle.js",
            styles: ["https://my-widget/styles.css", "https://example.com/custom-styles.css"],
            fonts: ["https://my-widget/fonts.css"]
        }
    }
};

const { io } = await IOBrowserPlatform(config);
```

The legacy widget remains supported in **io.Connect Browser** 4.0.

#### Workspaces

The io.Connect Workspaces have been redesigned, which introduces breaking changes when upgrading [`@interopio/workspaces-ui-react`](https://www.npmjs.com/package/@interopio/workspaces-ui-react) to version 4.0 or later.

These changes affect custom Workspaces Apps that use the affected default components and deployments that customize the default Workspaces App with CSS. If you have entirely replaced the affected components with your own custom components, those component changes won't affect your implementation. If you don't upgrade the library, your existing Workspaces App will still work in **io.Connect Browser** 4.0.

Update affected components and custom styles:

- Replace `<WorkspaceTabV2 />` with `<WorkspaceTab />`. The legacy version 1 of `<WorkspaceTab />` has been removed.
- Replace the removed `<GlueLogo />` component with `<Logo />` and remove imports of the legacy Glue42 CSS files.
- Move customizations of the old "Save Workspace" system popup to the dialog provided by `<WorkspaceTab />`.
- Update styles for the changed CSS classes of `<Logo />`, the background of an empty Workspace, and `<WorkspaceTab />`.
- Account for the changed tab sizing strategy and the position of the "Add Apps" button, which is now to the left of the window group header, after the window tabs.
- Rework custom styles for the restructured HTML and CSS of the "Add Apps" and "Add Workspace" popups using the [Workspaces CSS variables](https://docs.interop.io/browser/developers/platform-styles/index.md#workspaces).

For all else, follow the [general upgrade guide](#general_upgrade_guide).

### Upgrading from 3.4 to 3.5

#### Widget

The widget is now configured via resources supplied by the Main app. You no longer need to install [`@interopio/widget`](https://www.npmjs.com/package/@interopio/widget) in each app or pass the `IOBrowserWidget()` factory function when initializing the Main app or Browser Clients.

Replace the deprecated `channelSelector` property of the widget configuration with `channels`. Move Channel Selector UI settings to the `selector` object under `channels`. Use the `displayMode` property of `channels` to select whether all Channels or only FDC3 Channels are displayed.

To configure the widget in the Main app, use the `widget` property in the configuration object for initializing [`@interopio/browser-platform`](https://www.npmjs.com/package/@interopio/browser-platform). Provide URLs pointing to the widget bundle and styles and any default settings to pass to Browser Clients:

```javascript
import IOBrowserPlatform from "@interopio/browser-platform";

const config = {
    licenseKey: "my-license-key",
    widget: {
        sources: {
            bundle: "https://my-widget/widget-bundle.js",
            styles: ["https://my-widget/styles.css", "https://example.com/custom-styles.css"]
        },
        defaultConfig: {
            position: "top",
            channels: {
                selector: {
                    enable: true,
                    type: "directional"
                }
            }
        },
        blockList: ["https://example.com/*", "https://another-example.com/*"]
    }
};

const { io } = await IOBrowserPlatform(config);
```

To request using the widget in a Browser Client, explicitly enable it in the configuration object for initializing [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser). You can also override the default widget settings from the Main app:

```javascript
import IOBrowser from "@interopio/browser";

const options = {
    widget: {
        enable: true,
        position: "top",
        channels: {
            selector: {
                enable: true,
                type: "default"
            }
        }
    }
};

const io = await IOBrowser(options);
```

For all else, follow the [general upgrade guide](#general_upgrade_guide).

### Upgrading from 3.3 to 3.4

Follow the [general upgrade guide](#general_upgrade_guide).

### Upgrading from 3.2 to 3.3

Follow the [general upgrade guide](#general_upgrade_guide).

### Upgrading from 3.1 to 3.2

Follow the [general upgrade guide](#general_upgrade_guide).

### Upgrading from 3.0 to 3.1

Follow the [general upgrade guide](#general_upgrade_guide).

### Upgrading to 3.0

See the [Migrating to io.Connect Browser](https://docs.interop.io/browser/getting-started/migrating-to-io-connect/index.md) section.
