Skip to content

The open alternative to Salesforce, designed for AI.

Use built Twenty UI in companion (#28184)

Raphaël Bosi47109c62af0a
diff --git a/.github/workflows/ci-companion.yaml b/.github/workflows/ci-companion.yaml
index 654db33da7f..bfdc4ad955f 100644
--- a/.github/workflows/ci-companion.yaml
+++ b/.github/workflows/ci-companion.yaml
@@ -37,6 +37,8 @@ jobs:
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: ./.github/actions/yarn-install
+ - name: Build Twenty UI
+ run: yarn nx build twenty-ui
- name: Typecheck
run: yarn workspace @twentyhq/companion typecheck
- name: Lingui strings
diff --git a/packages/twenty-companion/README.md b/packages/twenty-companion/README.md
index eae45c92703..b2e2f4ee23d 100644
--- a/packages/twenty-companion/README.md
+++ b/packages/twenty-companion/README.md
@@ -74,24 +74,27 @@ Use Node 24 and the repository's Yarn version. Desktop is the `@twentyhq/compani
```sh
yarn install --immutable
+yarn nx build twenty-ui
yarn workspace @twentyhq/companion dev
```
+Desktop consumes Twenty UI's built workspace package, including its stylesheets and types. Build Twenty UI before running `dev`, `preview`, or other direct workspace commands. After editing Twenty UI, rebuild it or run `yarn workspace twenty-ui build --watch` in a separate terminal while developing desktop.
+
`dev` shares the production Electron build configuration and watches main/preload dependencies. A successful rebuild requests a graceful Electron restart; capture startup, active or paused recording, and stopping defer it until idle. Repeated rebuilds use the latest successful output. Failed compilations leave the running app untouched. Renderer edits continue to use Vite. Quitting Electron closes the watcher and Vite server.
`yarn workspace @twentyhq/companion preview` serves the renderer at `http://127.0.0.1:4317`. Use `?preview` for an interactive sample Home, `?preview=welcome` for the full setup, `?preview=permissions` for permission setup, `?preview=denied` for denial, or `?preview=recording` for active capture controls. The native menu is available only in the desktop app. Preview actions simulate state transitions; no audio is captured, no workspace writes or external calls are made. This mode is excluded from production. Stop the preview before running the desktop `dev` command, which uses the same port.
-From the repository root:
+From the repository root, use Nx to build Twenty UI before checks, builds, and packaging:
```sh
-yarn workspace @twentyhq/companion typecheck
-yarn workspace @twentyhq/companion test
-yarn workspace @twentyhq/companion build
-yarn workspace @twentyhq/companion package
+yarn nx typecheck twenty-companion
+yarn nx test twenty-companion
+yarn nx build twenty-companion
+yarn nx package twenty-companion
"packages/twenty-companion/release/Twenty-darwin-arm64/Twenty.app/Contents/MacOS/Twenty" --smoke
```
-The equivalent Nx project targets are `twenty-companion:build`, `:typecheck`, and `:test`. Native packaging targets are uncached and run only when requested. Desktop imports the current Twenty UI workspace source through Vite aliases; its explicit workspace dependency provides the shared dependency graph.
+Native packaging targets `twenty-companion:package` and `twenty-companion:package:archive` are uncached and run only when requested.
Root installs keep native install scripts disabled. `dev`, `start`, `package`, and `package:archive` run `native:setup`, which downloads missing Electron and Recall binaries on Apple Silicon macOS. Typecheck, unit tests, renderer preview, and JavaScript builds do not require these downloads.
diff --git a/packages/twenty-companion/index.html b/packages/twenty-companion/index.html
index bd012265528..067ebd49a49 100644
--- a/packages/twenty-companion/index.html
+++ b/packages/twenty-companion/index.html
@@ -8,6 +8,9 @@
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https: http://localhost:* http://127.0.0.1:*; connect-src 'self' ws://127.0.0.1:4317; object-src 'none'; base-uri 'none'"
/>
<title>Twenty</title>
+ <style>
+ @layer reset, twenty-ui;
+ </style>
</head>
<body>
<div id="root"></div>
diff --git a/packages/twenty-companion/project.json b/packages/twenty-companion/project.json
index b21de7735c8..3987d4a71e8 100644
--- a/packages/twenty-companion/project.json
+++ b/packages/twenty-companion/project.json
@@ -8,7 +8,7 @@
"build": {
"executor": "nx:run-commands",
"cache": true,
- "dependsOn": [],
+ "dependsOn": ["twenty-ui:build"],
"options": {
"cwd": "packages/twenty-companion",
"command": "yarn build"
@@ -19,7 +19,7 @@
"typecheck": {
"executor": "nx:run-commands",
"cache": true,
- "dependsOn": [],
+ "dependsOn": ["twenty-ui:build"],
"options": {
"cwd": "packages/twenty-companion",
"command": "yarn typecheck"
@@ -45,7 +45,7 @@
"test": {
"executor": "nx:run-commands",
"cache": true,
- "dependsOn": [],
+ "dependsOn": ["twenty-ui:build"],
"options": {
"cwd": "packages/twenty-companion",
"command": "yarn test"
@@ -55,7 +55,7 @@
"package": {
"executor": "nx:run-commands",
"cache": false,
- "dependsOn": [],
+ "dependsOn": ["twenty-ui:build"],
"options": {
"cwd": "packages/twenty-companion",
"command": "yarn package"
@@ -64,7 +64,7 @@
"package:archive": {
"executor": "nx:run-commands",
"cache": false,
- "dependsOn": [],
+ "dependsOn": ["twenty-ui:build"],
"options": {
"cwd": "packages/twenty-companion",
"command": "yarn package:archive"
diff --git a/packages/twenty-companion/src/renderer/components/CompanionApp.tsx b/packages/twenty-companion/src/renderer/components/CompanionApp.tsx
index 4b7ce7ac26f..7a155c14fa6 100644
--- a/packages/twenty-companion/src/renderer/components/CompanionApp.tsx
+++ b/packages/twenty-companion/src/renderer/components/CompanionApp.tsx
@@ -1,5 +1,5 @@
import { i18n } from '@lingui/core';
-import { THEME_COMMON } from '@ui/theme/constants/ThemeCommon';
+import { THEME_COMMON } from 'twenty-ui/theme';
import {
IconRefresh,
IconCircleDot,
@@ -9,7 +9,7 @@ import {
import { NavigationModeSwitcher } from './NavigationModeSwitcher';
import { useCompanion } from '../hooks/useCompanion';
import { IS_PREVIEW } from '../constants/IS_PREVIEW';
-import { Button } from '@ui/primitives/input/Button/Button';
+import { Button } from 'twenty-ui/primitives/input';
import { Empty } from './Empty';
import { Notice } from './Notice';
import { RecordingControls } from './RecordingControls';
diff --git a/packages/twenty-companion/src/renderer/components/CompanionTheme.tsx b/packages/twenty-companion/src/renderer/components/CompanionTheme.tsx
index a3cc0b8d006..4ce64514883 100644
--- a/packages/twenty-companion/src/renderer/components/CompanionTheme.tsx
+++ b/packages/twenty-companion/src/renderer/components/CompanionTheme.tsx
@@ -1,7 +1,7 @@
import { type ReactNode, useSyncExternalStore } from 'react';
-import { ThemeProvider } from '@ui/theme/ThemeProvider';
-import '@ui/theme/theme-light.css';
-import '@ui/theme/theme-dark.css';
+import { ThemeProvider } from 'twenty-ui/theme';
+import 'twenty-ui/theme-light.css';
+import 'twenty-ui/theme-dark.css';
import '@fontsource/inter/latin-400.css';
import '@fontsource/inter/latin-500.css';
import '@fontsource/inter/latin-600.css';
diff --git a/packages/twenty-companion/src/renderer/components/Home.tsx b/packages/twenty-companion/src/renderer/components/Home.tsx
index 10b88311303..7387d1bed81 100644
--- a/packages/twenty-companion/src/renderer/components/Home.tsx
+++ b/packages/twenty-companion/src/renderer/components/Home.tsx
@@ -1,10 +1,10 @@
-import { Section } from '@ui/components/layout/Section/Section';
+import { Section } from 'twenty-ui/components/layout';
import { useNow } from '../hooks/useNow';
import { MeetingRow } from './MeetingRow';
import { i18n } from '@lingui/core';
import { SettingsCardContent } from './SettingsCardContent';
-import { THEME_COMMON } from '@ui/theme/constants/ThemeCommon';
-import { Card } from '@ui/primitives/surfaces/Card/Card';
+import { THEME_COMMON } from 'twenty-ui/theme';
+import { Card } from 'twenty-ui/primitives/surfaces';
import { CalendarDayLabel } from './CalendarDayLabel';
import { useState } from 'react';
import {
@@ -13,7 +13,7 @@ import {
IconChevronRight,
} from 'twenty-ui/icon';
import { getUpcomingMeetings } from '../../shared/utils/getUpcomingMeetings';
-import { Button } from '@ui/primitives/input/Button/Button';
+import { Button } from 'twenty-ui/primitives/input';
import { type ActionProps } from '../types/ActionProps';
import { RecordingList } from './RecordingList';
diff --git a/packages/twenty-companion/src/renderer/components/MeetingRow.tsx b/packages/twenty-companion/src/renderer/components/MeetingRow.tsx
index 8b73dc543f6..17953e3b0e4 100644
--- a/packages/twenty-companion/src/renderer/components/MeetingRow.tsx
+++ b/packages/twenty-companion/src/renderer/components/MeetingRow.tsx
@@ -1,8 +1,8 @@
import { Menu } from '@base-ui/react/menu';
import { i18n } from '@lingui/core';
-import { IconButton } from '@ui/components/input/IconButton/IconButton';
-import { MenuItem } from '@ui/components/navigation/MenuItem/MenuItem';
-import { Button } from '@ui/primitives/input/Button/Button';
+import { IconButton } from 'twenty-ui/components/input';
+import { MenuItem } from 'twenty-ui/components/navigation';
+import { Button } from 'twenty-ui/primitives/input';
import {
IconArrowUpRight,
IconCalendarEvent,
diff --git a/packages/twenty-companion/src/renderer/components/NavigationModeSwitcher.module.scss b/packages/twenty-companion/src/renderer/components/NavigationModeSwitcher.module.scss
index 02395d729c9..0ab89f6bb2c 100644
--- a/packages/twenty-companion/src/renderer/components/NavigationModeSwitcher.module.scss
+++ b/packages/twenty-companion/src/renderer/components/NavigationModeSwitcher.module.scss
@@ -20,9 +20,9 @@
height: var(--t-spacing-7);
padding: 0 var(--t-spacing-1_5);
transition:
- background duration(fast) ease,
- color duration(fast) ease,
- gap duration(normal) ease;
+ background calc(var(--t-animation-duration-fast) * 1s) ease,
+ color calc(var(--t-animation-duration-fast) * 1s) ease,
+ gap calc(var(--t-animation-duration-normal) * 1s) ease;
&[data-size='medium'] {
height: var(--t-spacing-8);
}
@@ -54,7 +54,8 @@
.label {
display: grid;
grid-template-columns: 0fr;
- transition: grid-template-columns duration(normal) ease;
+ transition: grid-template-columns
+ calc(var(--t-animation-duration-normal) * 1s) ease;
}
.mode[data-active] .label {
grid-template-columns: 1fr;
diff --git a/packages/twenty-companion/src/renderer/components/NavigationModeSwitcher.tsx b/packages/twenty-companion/src/renderer/components/NavigationModeSwitcher.tsx
index 477012b221d..157fe092099 100644
--- a/packages/twenty-companion/src/renderer/components/NavigationModeSwitcher.tsx
+++ b/packages/twenty-companion/src/renderer/components/NavigationModeSwitcher.tsx
@@ -1,5 +1,5 @@
-import { type IconComponent } from '@ui/icon/types/IconComponent';
-import { THEME_COMMON } from '@ui/theme/constants/ThemeCommon';
+import { type IconComponent } from 'twenty-ui/icon';
+import { THEME_COMMON } from 'twenty-ui/theme';
import styles from './NavigationModeSwitcher.module.scss';
type NavigationModeSwitcherProps = {
diff --git a/packages/twenty-companion/src/renderer/components/Notice.tsx b/packages/twenty-companion/src/renderer/components/Notice.tsx
index 3840900be8d..4acf01af233 100644
--- a/packages/twenty-companion/src/renderer/components/Notice.tsx
+++ b/packages/twenty-companion/src/renderer/components/Notice.tsx
@@ -1,9 +1,9 @@
import { noticeMessage } from '../utils/noticeMessage';
-import { Banner } from '@ui/primitives/feedback/Banner/Banner';
+import { Banner } from 'twenty-ui/primitives/feedback';
import { Notification } from './Notification';
-import { IconButton } from '@ui/components/input/IconButton/IconButton';
+import { IconButton } from 'twenty-ui/components/input';
import { i18n } from '@lingui/core';
-import { Button } from '@ui/primitives/input/Button/Button';
+import { Button } from 'twenty-ui/primitives/input';
import { IconX } from 'twenty-ui/icon';
import { type ActionProps } from '../types/ActionProps';
diff --git a/packages/twenty-companion/src/renderer/components/Notification.tsx b/packages/twenty-companion/src/renderer/components/Notification.tsx
index 1e7a68010a6..a92a7264c83 100644
--- a/packages/twenty-companion/src/renderer/components/Notification.tsx
+++ b/packages/twenty-companion/src/renderer/components/Notification.tsx
@@ -1,4 +1,4 @@
-import { Toast } from '@ui/components/feedback/Toast/Toast';
+import { Toast } from 'twenty-ui/components/feedback';
import styles from './Notification.module.scss';
type NotificationProps = {
diff --git a/packages/twenty-companion/src/renderer/components/Onboarding.tsx b/packages/twenty-companion/src/renderer/components/Onboarding.tsx
index e654f3fec2b..d514364cbea 100644
--- a/packages/twenty-companion/src/renderer/components/Onboarding.tsx
+++ b/packages/twenty-companion/src/renderer/components/Onboarding.tsx
@@ -1,11 +1,10 @@
import { i18n } from '@lingui/core';
-import { THEME_COMMON } from '@ui/theme/constants/ThemeCommon';
+import { THEME_COMMON } from 'twenty-ui/theme';
import { useState } from 'react';
import { type CompanionState } from '../../shared/types/CompanionState';
-import { Field } from '@ui/primitives/input/Field/Field';
-import { MainButton } from '@ui/components/input/MainButton/MainButton';
+import { Field, Button } from 'twenty-ui/primitives/input';
+import { MainButton } from 'twenty-ui/components/input';
import { IconArrowUpRight, IconRefresh } from 'twenty-ui/icon';
-import { Button } from '@ui/primitives/input/Button/Button';
import { type ActionProps } from '../types/ActionProps';
import { SetupHeading } from './SetupHeading';
import { Empty } from './Empty';
diff --git a/packages/twenty-companion/src/renderer/components/Permissions.tsx b/packages/twenty-companion/src/renderer/components/Permissions.tsx
index 2a83b47c9ca..49c90f2af1e 100644
--- a/packages/twenty-companion/src/renderer/components/Permissions.tsx
+++ b/packages/twenty-companion/src/renderer/components/Permissions.tsx
@@ -1,7 +1,7 @@
import { i18n } from '@lingui/core';
-import { THEME_COMMON } from '@ui/theme/constants/ThemeCommon';
-import { Card } from '@ui/primitives/surfaces/Card/Card';
-import { MainButton } from '@ui/components/input/MainButton/MainButton';
+import { THEME_COMMON } from 'twenty-ui/theme';
+import { Card } from 'twenty-ui/primitives/surfaces';
+import { MainButton } from 'twenty-ui/components/input';
import {
IconMicrophone,
IconHeadphones,
@@ -9,10 +9,10 @@ import {
IconArrowUpRight,
IconCircleDot,
} from 'twenty-ui/icon';
-import { Button } from '@ui/primitives/input/Button/Button';
+import { Button } from 'twenty-ui/primitives/input';
import { type ActionProps } from '../types/ActionProps';
import { SetupHeading } from './SetupHeading';
-import { Status } from '@ui/primitives/data-display/Status/Status';
+import { Status } from 'twenty-ui/primitives/data-display';
const PermissionChecklist = ({ state, isPending, command }: ActionProps) => (
<Card.Root
diff --git a/packages/twenty-companion/src/renderer/components/RecordingAvatar.tsx b/packages/twenty-companion/src/renderer/components/RecordingAvatar.tsx
index cb9d8172420..17daec44c5f 100644
--- a/packages/twenty-companion/src/renderer/components/RecordingAvatar.tsx
+++ b/packages/twenty-companion/src/renderer/components/RecordingAvatar.tsx
@@ -1,4 +1,4 @@
-import { Avatar } from '@ui/primitives/data-display/Avatar/Avatar';
+import { Avatar } from 'twenty-ui/primitives/data-display';
import { type Recording } from '../../shared/types/Recording';
export const RecordingAvatar = ({ recording }: { recording: Recording }) => {
diff --git a/packages/twenty-companion/src/renderer/components/RecordingControls.tsx b/packages/twenty-companion/src/renderer/components/RecordingControls.tsx
index cc37fae204f..c8d76d737fb 100644
--- a/packages/twenty-companion/src/renderer/components/RecordingControls.tsx
+++ b/packages/twenty-companion/src/renderer/components/RecordingControls.tsx
@@ -1,8 +1,8 @@
-import { Section } from '@ui/components/layout/Section/Section';
-import { Avatar } from '@ui/primitives/data-display/Avatar/Avatar';
-import { Card } from '@ui/primitives/surfaces/Card/Card';
+import { Section } from 'twenty-ui/components/layout';
+import { Avatar } from 'twenty-ui/primitives/data-display';
+import { Card } from 'twenty-ui/primitives/surfaces';
import { i18n } from '@lingui/core';
-import { Button } from '@ui/primitives/input/Button/Button';
+import { Button } from 'twenty-ui/primitives/input';
import {
IconPlayerPause,
IconPlayerPlay,
diff --git a/packages/twenty-companion/src/renderer/components/RecordingList.tsx b/packages/twenty-companion/src/renderer/components/RecordingList.tsx
index 17db9efa8b7..c736e55c846 100644
--- a/packages/twenty-companion/src/renderer/components/RecordingList.tsx
+++ b/packages/twenty-companion/src/renderer/components/RecordingList.tsx
@@ -1,6 +1,6 @@
import { i18n } from '@lingui/core';
-import { Card } from '@ui/primitives/surfaces/Card/Card';
-import { THEME_COMMON } from '@ui/theme/constants/ThemeCommon';
+import { Card } from 'twenty-ui/primitives/surfaces';
+import { THEME_COMMON } from 'twenty-ui/theme';
import { IconCircleDot } from 'twenty-ui/icon';
import { type ActionProps } from '../types/ActionProps';
import { Empty } from './Empty';
diff --git a/packages/twenty-companion/src/renderer/components/Settings.tsx b/packages/twenty-companion/src/renderer/components/Settings.tsx
index 7cd7cd1bf84..b1c7fd81ce4 100644
--- a/packages/twenty-companion/src/renderer/components/Settings.tsx
+++ b/packages/twenty-companion/src/renderer/components/Settings.tsx
@@ -1,12 +1,12 @@
-import { Section } from '@ui/components/layout/Section/Section';
+import { Section } from 'twenty-ui/components/layout';
import { i18n } from '@lingui/core';
import { SettingsCardContent } from './SettingsCardContent';
-import { THEME_COMMON } from '@ui/theme/constants/ThemeCommon';
-import { Card } from '@ui/primitives/surfaces/Card/Card';
+import { THEME_COMMON } from 'twenty-ui/theme';
+import { Card } from 'twenty-ui/primitives/surfaces';
import { type ReactNode } from 'react';
-import { Switch } from '@ui/primitives/input/Switch/Switch';
-import { Status } from '@ui/primitives/data-display/Status/Status';
-import { SegmentedControl } from '@ui/components/input/SegmentedControl/SegmentedControl';
+import { Switch, Button } from 'twenty-ui/primitives/input';
+import { Status } from 'twenty-ui/primitives/data-display';
+import { SegmentedControl } from 'twenty-ui/components/input';
import {
IconCalendarEvent,
IconCircleDot,
@@ -19,7 +19,6 @@ import {
IconClock,
IconSettings,
} from 'twenty-ui/icon';
-import { Button } from '@ui/primitives/input/Button/Button';
import { type ActionProps } from '../types/ActionProps';
import { ShortcutSetting } from './ShortcutSetting';
import { WorkspaceIcon } from './WorkspaceIcon';
diff --git a/packages/twenty-companion/src/renderer/components/ShortcutSetting.tsx b/packages/twenty-companion/src/renderer/components/ShortcutSetting.tsx
index 2b4e7a31a2b..8f529949dab 100644
--- a/packages/twenty-companion/src/renderer/components/ShortcutSetting.tsx
+++ b/packages/twenty-companion/src/renderer/components/ShortcutSetting.tsx
@@ -1,13 +1,13 @@
import { DEFAULT_SETTINGS } from '../../shared/constants/DEFAULT_SETTINGS';
import { shortcutFromKeyboardEvent } from '../utils/shortcutFromKeyboardEvent';
-import { formatShortcut } from '@ui/primitives/typography/Shortcut/formatShortcut';
+import { formatShortcut } from 'twenty-ui/primitives/typography';
import { i18n } from '@lingui/core';
import { SettingsCardContent } from './SettingsCardContent';
-import { THEME_COMMON } from '@ui/theme/constants/ThemeCommon';
-import { IconButton } from '@ui/components/input/IconButton/IconButton';
+import { THEME_COMMON } from 'twenty-ui/theme';
+import { IconButton } from 'twenty-ui/components/input';
import { useState } from 'react';
import { IconCommand, IconRestore } from 'twenty-ui/icon';
-import { Button } from '@ui/primitives/input/Button/Button';
+import { Button } from 'twenty-ui/primitives/input';
import { type ActionProps } from '../types/ActionProps';
export const ShortcutSetting = ({ state, isPending, command }: ActionProps) => {
diff --git a/packages/twenty-companion/src/renderer/components/Status.tsx b/packages/twenty-companion/src/renderer/components/Status.tsx
index eb88c129fdf..1ea79697ec3 100644
--- a/packages/twenty-companion/src/renderer/components/Status.tsx
+++ b/packages/twenty-companion/src/renderer/components/Status.tsx
@@ -1,4 +1,4 @@
-import { Tag as StatusChip } from '@ui/primitives/data-display/Tag/Tag';
+import { Tag as StatusChip } from 'twenty-ui/primitives/data-display';
import { recordingLabel } from '../utils/recordingLabel';
export const Status = ({ status }: { status: string }) => (
diff --git a/packages/twenty-companion/src/renderer/components/WorkspaceIcon.tsx b/packages/twenty-companion/src/renderer/components/WorkspaceIcon.tsx
index f25328efec8..d0a3590ae0e 100644
--- a/packages/twenty-companion/src/renderer/components/WorkspaceIcon.tsx
+++ b/packages/twenty-companion/src/renderer/components/WorkspaceIcon.tsx
@@ -1,4 +1,4 @@
-import { Avatar } from '@ui/primitives/data-display/Avatar/Avatar';
+import { Avatar } from 'twenty-ui/primitives/data-display';
import { type Agenda } from '../../shared/types/Agenda';
export const WorkspaceIcon = ({
diff --git a/packages/twenty-companion/src/renderer/components/__tests__/Onboarding.test.tsx b/packages/twenty-companion/src/renderer/components/__tests__/Onboarding.test.tsx
index bf436a19160..e8192f45c0d 100644
--- a/packages/twenty-companion/src/renderer/components/__tests__/Onboarding.test.tsx
+++ b/packages/twenty-companion/src/renderer/components/__tests__/Onboarding.test.tsx
@@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event';
import { afterEach, beforeEach, expect, it, vi } from 'vitest';
import { i18n } from '@lingui/core';
import { Onboarding } from '../Onboarding';
-import { ThemeProvider } from '@ui/theme/ThemeProvider';
+import { ThemeProvider } from 'twenty-ui/theme';
import { createInitialState } from '../../../shared/utils/createInitialState';
import { type CompanionState } from '../../../shared/types/CompanionState';
import { messages } from '../../locales/en';
diff --git a/packages/twenty-companion/src/renderer/components/__tests__/sharedControls.test.tsx b/packages/twenty-companion/src/renderer/components/__tests__/sharedControls.test.tsx
index d4d5b44a2f3..e664091d7be 100644
--- a/packages/twenty-companion/src/renderer/components/__tests__/sharedControls.test.tsx
+++ b/packages/twenty-companion/src/renderer/components/__tests__/sharedControls.test.tsx
@@ -2,8 +2,8 @@
import { cleanup, render, screen } from '@testing-library/react';
import { afterEach, expect, it } from 'vitest';
import { IconSettings } from 'twenty-ui/icon';
-import { IconButton } from '@ui/components/input/IconButton/IconButton';
-import { Button } from '@ui/primitives/input/Button/Button';
+import { IconButton } from 'twenty-ui/components/input';
+import { Button } from 'twenty-ui/primitives/input';
afterEach(cleanup);
diff --git a/packages/twenty-companion/src/renderer/components/internal/RecordingEmptyIllustration.module.scss b/packages/twenty-companion/src/renderer/components/internal/RecordingEmptyIllustration.module.scss
index ef4aba3b870..4205c5d4a94 100644
--- a/packages/twenty-companion/src/renderer/components/internal/RecordingEmptyIllustration.module.scss
+++ b/packages/twenty-companion/src/renderer/components/internal/RecordingEmptyIllustration.module.scss
@@ -23,7 +23,7 @@
max-width: 130px;
max-height: 130px;
transform: translate(var(--parallax-x, 0), var(--parallax-y, 0));
- transition: transform duration(normal) ease-out;
+ transition: transform calc(var(--t-animation-duration-normal) * 1s) ease-out;
}
.movingImageLarge {
diff --git a/packages/twenty-companion/src/renderer/components/internal/RecordingEmptyIllustration.tsx b/packages/twenty-companion/src/renderer/components/internal/RecordingEmptyIllustration.tsx
index d594cd38555..b5880afca09 100644
--- a/packages/twenty-companion/src/renderer/components/internal/RecordingEmptyIllustration.tsx
+++ b/packages/twenty-companion/src/renderer/components/internal/RecordingEmptyIllustration.tsx
@@ -1,7 +1,7 @@
import { clsx } from 'clsx';
import { useEffect, useRef } from 'react';
-import { useThemeColorScheme } from '@ui/theme';
+import { useThemeColorScheme } from 'twenty-ui/theme';
import styles from './RecordingEmptyIllustration.module.scss';
diff --git a/packages/twenty-companion/src/renderer/main.tsx b/packages/twenty-companion/src/renderer/main.tsx
index b015953a386..f6ce9b9e3d6 100644
--- a/packages/twenty-companion/src/renderer/main.tsx
+++ b/packages/twenty-companion/src/renderer/main.tsx
@@ -2,6 +2,7 @@ import { i18n } from '@lingui/core';
import { messages } from './locales/en';
import { createRoot } from 'react-dom/client';
import { CompanionApp } from './components/CompanionApp';
+import 'twenty-ui/style.css';
import './style.css';
i18n.load('en', messages);
diff --git a/packages/twenty-companion/src/renderer/style.css b/packages/twenty-companion/src/renderer/style.css
index 9e2d5d6aa19..529b89d9a49 100644
--- a/packages/twenty-companion/src/renderer/style.css
+++ b/packages/twenty-companion/src/renderer/style.css
@@ -11,20 +11,27 @@
color: var(--t-font-color-primary);
background: var(--t-background-primary);
}
-* {
- box-sizing: border-box;
-}
-body {
- margin: 0;
-}
-button,
-input,
-select {
- font: inherit;
- color: inherit;
-}
-button {
- cursor: pointer;
+@layer reset {
+ body {
+ margin: 0;
+ }
+ input,
+ select {
+ font: inherit;
+ color: inherit;
+ }
+ h1,
+ h2,
+ h3,
+ p {
+ margin: 0;
+ }
+ strong {
+ font-weight: var(--t-font-weight-medium);
+ }
+ p {
+ line-height: 1.6;
+ }
}
button,
a,
@@ -38,12 +45,6 @@ select {
outline: 2px solid var(--t-color-blue);
outline-offset: 3px;
}
-h1,
-h2,
-h3,
-p {
- margin: 0;
-}
.setup-card h1 {
font-size: var(--t-font-size-xxl);
line-height: 1.3;
@@ -54,17 +55,11 @@ p {
line-height: 1.35;
letter-spacing: -0.3px;
}
-strong {
- font-weight: var(--t-font-weight-medium);
-}
.setup-heading h1,
.empty h2 {
font-family: var(--t-font-family);
font-weight: var(--t-font-weight-medium);
}
-p {
- line-height: 1.6;
-}
.muted {
color: var(--t-font-color-secondary);
}
@@ -285,10 +280,6 @@ p {
display: grid;
gap: var(--t-spacing-2);
}
-.welcome label {
- font-size: var(--t-font-size-sm);
- font-weight: var(--t-font-weight-medium);
-}
.section {
margin-top: var(--t-spacing-9);
}
diff --git a/packages/twenty-companion/tsconfig.json b/packages/twenty-companion/tsconfig.json
index 33d061e91f3..6c4ceffbb09 100644
--- a/packages/twenty-companion/tsconfig.json
+++ b/packages/twenty-companion/tsconfig.json
@@ -9,14 +9,7 @@
"esModuleInterop": true,
"resolveJsonModule": true,
"noEmit": true,
- "types": ["node", "vite/client"],
- "paths": {
- "twenty-ui/icon": ["../twenty-ui/src/icon/index.ts"],
- "@ui/*": ["../twenty-ui/src/*"],
- "@assets/*": ["../twenty-ui/src/assets/*"],
- "@styles/*": ["../twenty-ui/src/styles/*"],
- "@test-utilities/*": ["../twenty-ui/src/test-utilities/*"]
- }
+ "types": ["node", "vite/client"]
},
"include": ["src", "vite.config.ts"]
}
diff --git a/packages/twenty-companion/vite.config.ts b/packages/twenty-companion/vite.config.ts
index d3543ff19b0..c9beb25c4a1 100644
--- a/packages/twenty-companion/vite.config.ts
+++ b/packages/twenty-companion/vite.config.ts
@@ -1,5 +1,4 @@
import { defineConfig } from 'vite';
-import { fileURLToPath } from 'node:url';
import svgr from 'vite-plugin-svgr';
export default defineConfig({
@@ -9,26 +8,6 @@ export default defineConfig({
plugins: [svgr()],
css: {
modules: { localsConvention: 'camelCaseOnly' },
- preprocessorOptions: {
- scss: {
- loadPaths: [
- fileURLToPath(new URL('../twenty-ui/src/styles', import.meta.url)),
- ],
- additionalData:
- "@use 'abstracts/functions' as *;\n@use 'abstracts/mixins' as *;\n@use 'abstracts/breakpoints' as *;\n",
- },
- },
- },
- resolve: {
- alias: {
- 'twenty-ui/icon': fileURLToPath(
- new URL('../twenty-ui/src/icon/index.ts', import.meta.url),
- ),
- '@assets': fileURLToPath(
- new URL('../twenty-ui/src/assets', import.meta.url),
- ),
- '@ui': fileURLToPath(new URL('../twenty-ui/src', import.meta.url)),
- },
},
build: { outDir: 'dist/renderer', emptyOutDir: true },
server: {