Skip to content

The open alternative to Salesforce, designed for AI.

Developers settings page, MCP in AI, Logs toggle, and retire Advanced mode (#28016)

Félix Malfait1d25c3b33c74
diff --git a/packages/twenty-docs/developers/contribute/capabilities/backend-development/zapier.mdx b/packages/twenty-docs/developers/contribute/capabilities/backend-development/zapier.mdx
index 3aed344673c..fed2c4e9942 100644
--- a/packages/twenty-docs/developers/contribute/capabilities/backend-development/zapier.mdx
+++ b/packages/twenty-docs/developers/contribute/capabilities/backend-development/zapier.mdx
@@ -36,7 +36,7 @@ From the `packages/twenty-zapier` folder, run:
```bash
cp .env.example .env
```
-Run the application locally, go to [http://localhost:3000/settings/api-webhooks](http://localhost:3000/settings/api-webhooks), and generate an API key.
+Run the application locally, go to [http://localhost:3000/settings/developers](http://localhost:3000/settings/developers), and generate an API key in the **API** tab.
Replace the **YOUR_API_KEY** value in the `.env` file with the API key you just generated.
diff --git a/packages/twenty-docs/developers/extend/api.mdx b/packages/twenty-docs/developers/extend/api.mdx
index fd772f0ce10..53752c66f28 100644
--- a/packages/twenty-docs/developers/extend/api.mdx
+++ b/packages/twenty-docs/developers/extend/api.mdx
@@ -10,7 +10,7 @@ import { VimeoEmbed } from '/snippets/vimeo-embed.mdx';
There is no static API reference for Twenty. Each workspace has its own schema — when you add a custom object (say `Invoice`), it immediately gets REST and GraphQL endpoints identical to built-in objects like `Company` or `Person`. The API is generated from the schema, so endpoints use your object and field names directly — no opaque IDs.
-Your workspace-specific API documentation is available under **Settings → API & Webhooks** after creating an API key. It includes an interactive playground where you can execute real calls against your data.
+Your workspace-specific API documentation is available under **Settings → Developers → API** after creating an API key. It includes an interactive playground where you can execute real calls against your data.
## Two APIs
@@ -37,7 +37,7 @@ Both are available as REST and GraphQL. GraphQL adds batch upserts and the abili
Authorization: Bearer YOUR_API_KEY
```
-Create an API key in **Settings → API & Webhooks → + Create key**. Copy it immediately — it's shown once. Keys can be scoped to a specific role under **Settings → Members → Roles → Assignment tab** to limit what they can access.
+Create an API key in **Settings → Developers → API → + Create key**. Copy it immediately — it's shown once. Keys can be scoped to a specific role under **Settings → Members → Roles → Assignment tab** to limit what they can access.
<VimeoEmbed videoId="928786722" title="Creating API key" />
diff --git a/packages/twenty-docs/developers/extend/apps/config/application.mdx b/packages/twenty-docs/developers/extend/apps/config/application.mdx
index e8fb6d801db..5dee61795d8 100644
--- a/packages/twenty-docs/developers/extend/apps/config/application.mdx
+++ b/packages/twenty-docs/developers/extend/apps/config/application.mdx
@@ -52,7 +52,7 @@ Notes:
- Both kinds of variable accept `isRequired: true`. A required variable the workspace has not filled in yet leaves the app unconfigured: its settings page shows a banner naming the missing variables, with a button that jumps to the tab where they are set. Mark as required only what the app genuinely cannot run without — an optional variable with a sensible default should stay optional.
- Both kinds of variable accept `isDeprecated: true`. Use it to retire a variable instead of deleting it: keeping the key declared preserves the stored value (deleting it destroys the value the operator entered), and the variable is still injected, so your code can fall back to it — `process.env.NEW_API_KEY ?? process.env.API_KEY`. A deprecated variable disappears from the app's settings once it has no value, and never counts toward the app's configuration check, so `isDeprecated` beats `isRequired`.
- Twenty sets these names for every logic function run, so they are reserved: `TWENTY_API_URL`, `TWENTY_APP_ACCESS_TOKEN`, `TWENTY_APP_APPLICATION_ACCESS_TOKEN`, `TWENTY_API_KEY`, `TWENTY_FUNCTIONS_URL` and `APPLICATION_ID`. A manifest that declares one of them as an application or server variable is rejected when the app is synced or published.
-- To add your own entries to the app's settings menu (in place of the generated **Variables** page), declare a front component and point a [`defineSettingsMenuItem()`](/developers/extend/apps/layout/front-components#settings-menu-items) at it, in its own file. Declare as many as you need and order them with `position`; `scope` puts an item under the workspace settings or under each member's own settings. The system-managed **General** item (auto-upgrade, App URL, connections) always comes first, and App URL only shows with **Advanced mode** on.
+- To add your own entries to the app's settings menu (in place of the generated **Variables** page), declare a front component and point a [`defineSettingsMenuItem()`](/developers/extend/apps/layout/front-components#settings-menu-items) at it, in its own file. Declare as many as you need and order them with `position`; `scope` puts an item under the workspace settings or under each member's own settings. The system-managed **General** item (auto-upgrade, App URL, connections) always comes first, and App URL only shows when the app has HTTP-triggered functions.
## Requested media capabilities
diff --git a/packages/twenty-docs/developers/extend/apps/getting-started/quick-start.mdx b/packages/twenty-docs/developers/extend/apps/getting-started/quick-start.mdx
index 16d6c98fa9c..f4342612423 100644
--- a/packages/twenty-docs/developers/extend/apps/getting-started/quick-start.mdx
+++ b/packages/twenty-docs/developers/extend/apps/getting-started/quick-start.mdx
@@ -81,7 +81,7 @@ For more detailed output (build logs, sync requests, error traces), add `--verbo
<img src="/images/docs/developers/extends/apps/dev.png" alt="Dev mode terminal output" />
</div>
-Open [http://localhost:2020/settings/applications#developer](http://localhost:2020/settings/applications#developer). You should see your app under **Your Apps**.
+Open [http://localhost:2020/settings/developers#apps](http://localhost:2020/settings/developers#apps). You should see your app under **My apps**.
<div style={{textAlign: 'center'}}>
<img src="/images/docs/developers/extends/apps/app-in-ui-1.png" alt="Your Apps list showing My twenty app" />
diff --git a/packages/twenty-docs/developers/extend/apps/layout/front-components.mdx b/packages/twenty-docs/developers/extend/apps/layout/front-components.mdx
index c1c4672a53d..ac12eff48ef 100644
--- a/packages/twenty-docs/developers/extend/apps/layout/front-components.mdx
+++ b/packages/twenty-docs/developers/extend/apps/layout/front-components.mdx
@@ -142,7 +142,7 @@ The menu item points at the front component rather than the component declaring
Each item renders as a tab on the app's page under **Settings > Apps**, after **General**, in `position` order.
-Declare as many as you need. Twenty's own **General** item — auto-upgrade, App URL and connections — always comes first and cannot be overridden by an app; App URL only shows with **Advanced mode** on.
+Declare as many as you need. Twenty's own **General** item — auto-upgrade, App URL and connections — always comes first and cannot be overridden by an app; App URL only shows when the app has HTTP-triggered functions.
### Fields
diff --git a/packages/twenty-docs/developers/extend/apps/operations/publishing.mdx b/packages/twenty-docs/developers/extend/apps/operations/publishing.mdx
index d278b704d57..efb4fd94eee 100644
--- a/packages/twenty-docs/developers/extend/apps/operations/publishing.mdx
+++ b/packages/twenty-docs/developers/extend/apps/operations/publishing.mdx
@@ -69,7 +69,7 @@ yarn twenty app:publish --private
Tarball apps are not listed in the public marketplace, so other workspaces on the same server won't discover them by browsing. To share a deployed app:
-1. Go to **Settings > Applications > Registrations** and open your app
+1. Go to **Settings > Developers > Apps** and open your app under **My apps**
2. In the **Distribution** tab, click **Copy share link**
3. Share this link with users on other workspaces — it takes them directly to the app's install page
@@ -296,7 +296,7 @@ After the package has synced into the catalog, continue with [Claiming your app]
## Claiming your app
-Claiming assigns your app's registration to the Twenty workspace that will manage it. App claiming is available to all workspaces. Your role needs the **Applications** and **MCP & APIs** permissions to claim through the **Developer** tab.
+Claiming assigns your app's registration to the Twenty workspace that will manage it. App claiming is available to all workspaces. Your role needs the **Applications** and **Developers** permissions to claim through the **Apps** tab of **Settings > Developers**.
Ownership is per Twenty instance: claiming on Twenty Cloud does not claim the app on a separate self-hosted server. Other workspaces on the same instance install your app without claiming it themselves.
@@ -309,7 +309,7 @@ Ownership is per Twenty instance: claiming on Twenty Cloud does not claim the ap
### Claim with GitHub
-1. In your intended owner workspace, go to **Settings > Applications > Developer** (`/settings/applications#developer`).
+1. In your intended owner workspace, go to **Settings > Developers > Apps** (`/settings/developers#apps`).
2. In **Claim an application**, enter the exact npm package name, including its scope (for example, `@your-org/twenty-app`), or the app's `universalIdentifier`.
3. Click **Look up** and check that the result is your app. If it is not found, click **Sync catalog** if available, wait for the sync to finish, then look it up again.
4. Click **Claim with GitHub** and authorize Twenty. For an organization-owned repository, grant access to that organization in GitHub's **Organization access** section. Personal repositories do not need an organization grant.
diff --git a/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/http-routes.mdx b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/http-routes.mdx
index 9e6ae750b28..39a457585a9 100644
--- a/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/http-routes.mdx
+++ b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/http-routes.mdx
@@ -117,7 +117,7 @@ content — the same look as the PDF and the in-app preview.
## Try it
With a template and a Person in your workspace, call the route (grab a token from
-**Settings → APIs & Webhooks**):
+**Settings → Developers → API**):
```bash filename="Terminal"
curl -X POST http://localhost:2020/s/documents/generate \
diff --git a/packages/twenty-docs/developers/extend/capabilities/apis.mdx b/packages/twenty-docs/developers/extend/capabilities/apis.mdx
index 08216f01108..08ff1e8e598 100644
--- a/packages/twenty-docs/developers/extend/capabilities/apis.mdx
+++ b/packages/twenty-docs/developers/extend/capabilities/apis.mdx
@@ -16,7 +16,7 @@ Twenty generates APIs specifically for your data model:
- **Custom documentation**: Generated specifically for your workspace's data model
<Note>
-Your personalized API documentation is available under **Settings → API & Webhooks** after creating an API key. Since Twenty generates APIs that match your custom data model, the documentation is unique to your workspace.
+Your personalized API documentation is available under **Settings → Developers → API** after creating an API key. Since Twenty generates APIs that match your custom data model, the documentation is unique to your workspace.
</Note>
## The Two API Types
@@ -65,7 +65,7 @@ Authorization: Bearer YOUR_API_KEY
### Create an API Key
-1. Go to **Settings → APIs & Webhooks**
+1. Go to **Settings → Developers → API**
2. Click **+ Create key**
3. Configure:
- **Name**: Descriptive name for the key
@@ -93,9 +93,9 @@ The key will inherit that role's permissions. See [Permissions](/user-guide/perm
### Manage API Keys
-**Regenerate**: Settings → APIs & Webhooks → Click key → **Regenerate**
+**Regenerate**: Settings → Developers → API → Click key → **Regenerate**
-**Delete**: Settings → APIs & Webhooks → Click key → **Delete**
+**Delete**: Settings → Developers → API → Click key → **Delete**
## API Playground
@@ -103,7 +103,7 @@ Test your APIs directly in the browser with our built-in playground — availabl
### Access the Playground
-1. Go to **Settings → APIs & Webhooks**
+1. Go to **Settings → Developers → API**
2. Create an API key (required)
3. Click on **REST API** or **GraphQL API** to open the playground
diff --git a/packages/twenty-docs/developers/extend/capabilities/webhooks.mdx b/packages/twenty-docs/developers/extend/capabilities/webhooks.mdx
index d22f95a1104..e84f279cd29 100644
--- a/packages/twenty-docs/developers/extend/capabilities/webhooks.mdx
+++ b/packages/twenty-docs/developers/extend/capabilities/webhooks.mdx
@@ -10,7 +10,7 @@ Webhooks push data to your systems in real-time when events occur in Twenty —
## Create a Webhook
-1. Go to **Settings → APIs & Webhooks → Webhooks**
+1. Go to **Settings → Developers → Webhooks**
2. Click **+ Create webhook**
3. Enter your webhook URL (must be publicly accessible)
4. Click **Save**
diff --git a/packages/twenty-docs/developers/extend/webhooks.mdx b/packages/twenty-docs/developers/extend/webhooks.mdx
index 84747af0dac..08c2cf53bff 100644
--- a/packages/twenty-docs/developers/extend/webhooks.mdx
+++ b/packages/twenty-docs/developers/extend/webhooks.mdx
@@ -10,7 +10,7 @@ Twenty sends an HTTP POST to your URL whenever a record is created, updated, or
## Create a Webhook
-1. Go to **Settings → APIs & Webhooks → Webhooks**
+1. Go to **Settings → Developers → Webhooks**
2. Click **+ Create webhook**
3. Enter your webhook URL (must be publicly accessible)
4. Click **Save**
diff --git a/packages/twenty-docs/user-guide/ai/capabilities/mcp.mdx b/packages/twenty-docs/user-guide/ai/capabilities/mcp.mdx
index ef914dcaa72..fd0a5a917d0 100644
--- a/packages/twenty-docs/user-guide/ai/capabilities/mcp.mdx
+++ b/packages/twenty-docs/user-guide/ai/capabilities/mcp.mdx
@@ -68,13 +68,13 @@ If your MCP client does not support OAuth, or you prefer static credentials, pas
Your API key grants access to workspace data. Keep it out of version control and shared dotfiles.
</Warning>
-To create an API key, go to **Settings → MCP & APIs → API → + Create key**. See [APIs](/developers/extend/api#create-an-api-key) for details.
+To create an API key, go to **Settings → Developers → API → + Create key**. See [APIs](/developers/extend/api#create-an-api-key) for details.
## Quick Start
### 1. Copy the config
-Go to **Settings → MCP & APIs → MCP** in Twenty. Choose your authentication method (OAuth or API Key), copy the JSON snippet (it will already use your workspace URL), and paste it into your MCP client's config file.
+Go to **Settings → AI → MCP** in Twenty. Choose your authentication method (OAuth or API Key), copy the JSON snippet (it will already use your workspace URL), and paste it into your MCP client's config file.
| Client | Config file location |
|--------|---------------------|
diff --git a/packages/twenty-docs/user-guide/calendar-emails/overview.mdx b/packages/twenty-docs/user-guide/calendar-emails/overview.mdx
index 483e1e1f1ab..4058e51c271 100644
--- a/packages/twenty-docs/user-guide/calendar-emails/overview.mdx
+++ b/packages/twenty-docs/user-guide/calendar-emails/overview.mdx
@@ -69,10 +69,9 @@ Choose different levels of visibility for your emails:
<Note>When enabled, contacts are automatically linked to their Company records based on their email domain. If the company doesn't exist yet, Twenty creates it for you.</Note>
<Note>
-**Syncing internal emails**: The "internal emails not synced" behavior is the default, but it can be turned off. The toggle lives in advanced settings:
-1. Open **Settings** and enable the **Advanced** toggle at the bottom of the settings page
-2. Go to **General → Security**
-3. Enable the **Sync Internal Emails** toggle to include emails where all participants share the same domain
+**Syncing internal emails**: The "internal emails not synced" behavior is the default, but it can be turned off:
+1. Go to **Settings → Communication**
+2. Enable the **Sync Internal Emails** toggle to include emails where all participants share the same domain
This is a workspace-wide setting (useful for universities or shared-domain organizations).
</Note>
@@ -90,7 +89,7 @@ This gives you precise control over which emails appear in your CRM without sync
**What Gets Synced:**
- **External Emails**: All emails with external contacts from selected folders
-- **Internal Emails**: Not synced by default (same domain emails remain private). Enable the **Advanced** toggle at the bottom of **Settings**, then turn on **Sync Internal Emails** under **General → Security** to include them workspace-wide.
+- **Internal Emails**: Not synced by default (same domain emails remain private). Turn on **Sync Internal Emails** under **Settings → Communication** to include them workspace-wide.
- **Attachments**: Coming in H1 2026
**Note**: We don't provide a CC email address for selective syncing. Instead, use the Message Folder feature above to achieve the same level of control over which emails sync with Twenty.
diff --git a/packages/twenty-docs/user-guide/data-migration/capabilities/field-mapping.mdx b/packages/twenty-docs/user-guide/data-migration/capabilities/field-mapping.mdx
index e0ecd951600..73d31672014 100644
--- a/packages/twenty-docs/user-guide/data-migration/capabilities/field-mapping.mdx
+++ b/packages/twenty-docs/user-guide/data-migration/capabilities/field-mapping.mdx
@@ -156,7 +156,7 @@ For Select, Multi-Select, and Array fields with predefined options, you must use
### How to Find API Names
1. Go to **Settings → Data Model**
2. Select the object and field
-3. Enable **Advanced mode** (toggle at the bottom right of the settings page)
+3. In the options card, open the **⋮** (More options) menu next to **Options** and choose **Show API values**
4. View the API name for each option
<VimeoEmbed videoId="1144910809" title="Video demonstration" />
diff --git a/packages/twenty-docs/user-guide/data-migration/how-tos/fix-import-errors.mdx b/packages/twenty-docs/user-guide/data-migration/how-tos/fix-import-errors.mdx
index d66a8563c3d..ce4f7954957 100644
--- a/packages/twenty-docs/user-guide/data-migration/how-tos/fix-import-errors.mdx
+++ b/packages/twenty-docs/user-guide/data-migration/how-tos/fix-import-errors.mdx
@@ -164,7 +164,7 @@ The data doesn't match the expected format for that field type.
How to find API names:
1. Go to **Settings → Data Model**
2. Select the object and field
-3. Enable **Advanced mode** (toggle at bottom right)
+3. Open the **⋮** menu next to **Options** and choose **Show API values**
4. Use the API name (e.g., `OPTION_1`, not "Option 1")
```
diff --git a/packages/twenty-docs/user-guide/data-migration/how-tos/import-companies-via-csv.mdx b/packages/twenty-docs/user-guide/data-migration/how-tos/import-companies-via-csv.mdx
index 89edd6f2b20..7037aa7b115 100644
--- a/packages/twenty-docs/user-guide/data-migration/how-tos/import-companies-via-csv.mdx
+++ b/packages/twenty-docs/user-guide/data-migration/how-tos/import-companies-via-csv.mdx
@@ -115,7 +115,7 @@ If you have Select or Multi-Select fields:
3. Or create new options if needed
<Note>
-Select options use **API names**, not display labels. Check **Settings → Data Model** → Enable **Advanced mode** to see API names.
+Select options use **API names**, not display labels. To see them, open the field in **Settings → Data Model**, then choose **Show API values** from the **⋮** menu next to **Options**.
</Note>
## Step 6: Review and Fix Errors
diff --git a/packages/twenty-docs/user-guide/data-migration/how-tos/import-contacts-via-csv.mdx b/packages/twenty-docs/user-guide/data-migration/how-tos/import-contacts-via-csv.mdx
index f8cc62534be..3d711fc980d 100644
--- a/packages/twenty-docs/user-guide/data-migration/how-tos/import-contacts-via-csv.mdx
+++ b/packages/twenty-docs/user-guide/data-migration/how-tos/import-contacts-via-csv.mdx
@@ -150,7 +150,7 @@ If you have Select or Multi-Select fields (like Lead Source):
3. Or create new options if needed
<Note>
-Select options use **API names**, not display labels. Check **Settings → Data Model** → Enable **Advanced mode** to see API names.
+Select options use **API names**, not display labels. To see them, open the field in **Settings → Data Model**, then choose **Show API values** from the **⋮** menu next to **Options**.
</Note>
## Step 6: Review and Fix Errors
diff --git a/packages/twenty-docs/user-guide/data-migration/how-tos/import-data-via-api.mdx b/packages/twenty-docs/user-guide/data-migration/how-tos/import-data-via-api.mdx
index e8028fafeaf..c81a0a4df9d 100644
--- a/packages/twenty-docs/user-guide/data-migration/how-tos/import-data-via-api.mdx
+++ b/packages/twenty-docs/user-guide/data-migration/how-tos/import-data-via-api.mdx
@@ -112,7 +112,7 @@ The GraphQL API supports **batch upsert** — update if the record exists, creat
To see available objects and fields:
-1. Go to **Settings → API and Webhooks**
+1. Go to **Settings → Developers → API**
2. Browse the **Metadata API**
3. View all standard and custom objects with their fields
diff --git a/packages/twenty-docs/user-guide/data-migration/how-tos/migrating-from-other-crms.mdx b/packages/twenty-docs/user-guide/data-migration/how-tos/migrating-from-other-crms.mdx
index 3b26045e64c..c379d1ca6fe 100644
--- a/packages/twenty-docs/user-guide/data-migration/how-tos/migrating-from-other-crms.mdx
+++ b/packages/twenty-docs/user-guide/data-migration/how-tos/migrating-from-other-crms.mdx
@@ -223,7 +223,7 @@ After importing data, complete your workspace configuration:
| **Duplicate errors** | Email/domain already exists | Remove duplicates from file, or include unique identifier to update existing records |
| **Relation not found** | Parent record doesn't exist | Import parent objects first (Companies before People) |
| **Missing fields** | Custom field doesn't exist | Create field in Settings → Data Model before importing |
-| **Select field errors** | Using display labels | Use API names (enable Advanced mode in Settings to find them) |
+| **Select field errors** | Using display labels | Use API names (choose **Show API values** in the field's options menu to find them) |
| **User relation empty** | User hasn't accepted invite | Ensure all users accept invitations before importing |
See [How to Fix Import Errors](/user-guide/data-migration/how-tos/fix-import-errors) for detailed troubleshooting steps.
diff --git a/packages/twenty-docs/user-guide/data-migration/how-tos/prepare-your-csv-files.mdx b/packages/twenty-docs/user-guide/data-migration/how-tos/prepare-your-csv-files.mdx
index ddf548abf6f..1f77c77bce2 100644
--- a/packages/twenty-docs/user-guide/data-migration/how-tos/prepare-your-csv-files.mdx
+++ b/packages/twenty-docs/user-guide/data-migration/how-tos/prepare-your-csv-files.mdx
@@ -119,7 +119,7 @@ Use the **API name** of the option, not the display label.
**How to find API names:**
1. Go to **Settings → Data Model**
2. Select the object and field
-3. Enable **Advanced mode** (toggle at bottom right)
+3. Open the **⋮** menu next to **Options** and choose **Show API values**
4. Copy the API name (e.g., `OPTION_1`, not "Option 1")
<Note>New select options are not created automatically. Add them in **Settings → Data Model** before importing.</Note>
diff --git a/packages/twenty-docs/user-guide/data-model/capabilities/fields.mdx b/packages/twenty-docs/user-guide/data-model/capabilities/fields.mdx
index 57f7f9f5995..6f2e7e2ecc1 100644
--- a/packages/twenty-docs/user-guide/data-model/capabilities/fields.mdx
+++ b/packages/twenty-docs/user-guide/data-model/capabilities/fields.mdx
@@ -99,7 +99,7 @@ If you get an error when setting uniqueness, check for duplicate values in your
## Indexes (Advanced)
-Database indexes are managed automatically — adding your own is rarely necessary and easy to get wrong. With Advanced mode on, each object has an **Indexes** section under `Settings → Data Model → <object>` for the cases where you know you need one.
+Database indexes are managed automatically — adding your own is rarely necessary and easy to get wrong. For the cases where you know you need one, open `Settings → Data Model → <object>`, go to the **Settings** tab and click **Manage indexes** in the **Advanced** section.
## Field Configuration Best Practices
diff --git a/packages/twenty-docs/user-guide/data-model/capabilities/relation-fields.mdx b/packages/twenty-docs/user-guide/data-model/capabilities/relation-fields.mdx
index fb4f22b8c3e..0448a9d4693 100644
--- a/packages/twenty-docs/user-guide/data-model/capabilities/relation-fields.mdx
+++ b/packages/twenty-docs/user-guide/data-model/capabilities/relation-fields.mdx
@@ -40,7 +40,7 @@ Many records in Object A can be linked to many records in Object B.
Many-to-many relations use a **junction object** pattern: an intermediate object that connects both sides. With the junction relation feature, Twenty displays the final linked records directly, hiding the intermediate object from the UI.
<Note>
-Configuring a junction relation requires **Advanced mode** to be enabled (toggle at the bottom left of Settings).
+The **This is a relation to a Junction Object** toggle appears on a one-to-many relation field with a single target object, when that target looks like a junction object (its own relations, ignoring system ones, are all many-to-one) and has another relation to point through.
</Note>
See [How to Create Many-to-Many Relations](/user-guide/data-model/how-tos/create-many-to-many-relations) for a complete step-by-step guide.
diff --git a/packages/twenty-docs/user-guide/data-model/how-tos/create-custom-fields.mdx b/packages/twenty-docs/user-guide/data-model/how-tos/create-custom-fields.mdx
index 4032098aab9..096dbab9cdb 100644
--- a/packages/twenty-docs/user-guide/data-model/how-tos/create-custom-fields.mdx
+++ b/packages/twenty-docs/user-guide/data-model/how-tos/create-custom-fields.mdx
@@ -34,7 +34,7 @@ New fields aren't automatically visible. To display:
3. Drag to reorder options
<Note>
-**Use API names for imports.** Enable **Advanced mode** in Settings to see API names. See [Field Mapping](/user-guide/data-migration/capabilities/field-mapping).
+**Use API names for imports.** To see each option's API name, open the **⋮** menu next to **Options** and choose **Show API values**. See [Field Mapping](/user-guide/data-migration/capabilities/field-mapping).
</Note>
### For Currency Fields
diff --git a/packages/twenty-docs/user-guide/data-model/how-tos/create-many-to-many-relations.mdx b/packages/twenty-docs/user-guide/data-model/how-tos/create-many-to-many-relations.mdx
index 736aa68627c..c17d5655272 100644
--- a/packages/twenty-docs/user-guide/data-model/how-tos/create-many-to-many-relations.mdx
+++ b/packages/twenty-docs/user-guide/data-model/how-tos/create-many-to-many-relations.mdx
@@ -6,7 +6,7 @@ description: Connect records where many items on both sides can be linked togeth
Many-to-many relations let you connect multiple records on both sides. For example: many People can work on many Projects, and each Project can have many People.
<Note>
-This feature also requires **Advanced mode** to be enabled (toggle at the bottom left of Settings).
+The **This is a relation to a Junction Object** toggle appears on a one-to-many relation field with a single target object, when that target looks like a junction object (its own relations, ignoring system ones, are all many-to-one) and has another relation to point through.
</Note>
## When to Use Many-to-Many
@@ -35,10 +35,9 @@ When you enable the junction relation toggle, Twenty displays linked records dir
## Prerequisites
-1. **Enable Advanced mode**: Toggle on **Advanced mode** at the bottom left of the Settings sidebar
-2. Plan your data model:
- - Which two objects are you connecting?
- - What should the junction object be called?
+Plan your data model:
+- Which two objects are you connecting?
+- What should the junction object be called?
## Step 1: Create the Junction Object
diff --git a/packages/twenty-docs/user-guide/settings/capabilities/domains-settings.mdx b/packages/twenty-docs/user-guide/settings/capabilities/domains-settings.mdx
index 75e2e264640..b1885fc6860 100644
--- a/packages/twenty-docs/user-guide/settings/capabilities/domains-settings.mdx
+++ b/packages/twenty-docs/user-guide/settings/capabilities/domains-settings.mdx
@@ -36,7 +36,7 @@ This is useful for allowing your entire team to self-register while keeping the
## App Custom Domains
-Configure under **Settings → Apps → your app → General → App URL**. The **App URL** section only appears with **Advanced mode** on (toggle at the bottom left of the Settings sidebar).
+Configure under **Settings → Apps → your app → General → App URL**. The **App URL** section appears when the app has HTTP-triggered functions.
Apps that expose routes on the web are served from a dedicated URL, shown in the **App URL** section. You can serve an app from a domain you own instead.
diff --git a/packages/twenty-docs/user-guide/workflows/how-tos/connect-to-other-tools/generate-pdf-from-twenty.mdx b/packages/twenty-docs/user-guide/workflows/how-tos/connect-to-other-tools/generate-pdf-from-twenty.mdx
index 73882f06fe9..c9e6b4cb311 100644
--- a/packages/twenty-docs/user-guide/workflows/how-tos/connect-to-other-tools/generate-pdf-from-twenty.mdx
+++ b/packages/twenty-docs/user-guide/workflows/how-tos/connect-to-other-tools/generate-pdf-from-twenty.mdx
@@ -16,7 +16,7 @@ This workflow uses a **Manual Trigger** so users can generate a PDF on demand fo
Before setting up the workflow:
-1. **Create an API Key**: Go to **Settings → APIs** and create a new API key. You'll need this token for the Logic Function.
+1. **Create an API Key**: Go to **Settings → Developers → API** and create a new API key. You'll need this token for the Logic Function.
2. **Set up a PDF generation service** (optional): If you want to dynamically generate PDFs (e.g., quotes), use a service like Carbone, PDFMonkey, or DocuSeal to create the PDF and get a download URL.
## Step-by-Step Setup
@@ -61,7 +61,7 @@ export const main = async (
const metadataGraphqlEndpoint = 'https://api.twenty.com/metadata';
const dataGraphqlEndpoint = 'https://api.twenty.com/graphql';
- // Replace with your API key from Settings → APIs
+ // Replace with your API key from Settings → Developers → API
const authToken = 'YOUR_API_KEY';
// Replace with your PDF URL
diff --git a/packages/twenty-e2e-testing/lib/pom/settingsPage.ts b/packages/twenty-e2e-testing/lib/pom/settingsPage.ts
index f51e411659f..a445191fa95 100644
--- a/packages/twenty-e2e-testing/lib/pom/settingsPage.ts
+++ b/packages/twenty-e2e-testing/lib/pom/settingsPage.ts
@@ -13,12 +13,12 @@ export class SettingsPage {
private readonly dataModelLink: Locator;
private readonly integrationsLink: Locator;
private readonly securityLink: Locator;
- private readonly apisLink: Locator;
+ private readonly developersLink: Locator;
private readonly webhooksLink: Locator;
private readonly adminPanelLink: Locator;
private readonly labLink: Locator;
private readonly releasesLink: Locator;
- private readonly advancedToggle: Locator;
+ private readonly logsToggle: Locator;
constructor(public readonly page: Page) {
this.page = page;
@@ -34,12 +34,12 @@ export class SettingsPage {
this.dataModelLink = page.getByRole('link', { name: 'Data model' });
this.integrationsLink = page.getByRole('link', { name: 'Integrations' });
this.securityLink = page.getByRole('link', { name: 'Security' });
- this.apisLink = page.getByRole('link', { name: 'APIs' });
+ this.developersLink = page.getByRole('link', { name: 'Developers' });
this.webhooksLink = page.getByRole('link', { name: 'Webhooks' });
this.adminPanelLink = page.getByRole('link', { name: 'Admin Panel' });
this.labLink = page.getByRole('link', { name: 'Lab' });
this.releasesLink = page.getByRole('link', { name: 'Releases' });
- this.advancedToggle = page.locator('input[type="checkbox"]').first();
+ this.logsToggle = page.getByRole('switch', { name: 'Logs' });
}
async leaveSettingsPage() {
@@ -90,8 +90,8 @@ export class SettingsPage {
await this.securityLink.click();
}
- async goToAPIsSection() {
- await this.apisLink.click();
+ async goToDevelopersSection() {
+ await this.developersLink.click();
}
async goToWebhooksSection() {
@@ -114,7 +114,7 @@ export class SettingsPage {
await this.page.getByText('Logout').click();
}
- async toggleAdvancedSettings() {
- await this.advancedToggle.click();
+ async toggleLogs() {
+ await this.logsToggle.click();
}
}
diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts
index 4751e1a213d..eabda54326a 100644
--- a/packages/twenty-front/src/generated-metadata/graphql.ts
+++ b/packages/twenty-front/src/generated-metadata/graphql.ts
@@ -8370,11 +8370,6 @@ export type FindOneSkillQueryVariables = Exact<{
export type FindOneSkillQuery = { __typename?: 'Query', skill?: { __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isSystem: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string } | null };
-export type FindWorkspaceAiStatsQueryVariables = Exact<{ [key: string]: never; }>;
-
-
-export type FindWorkspaceAiStatsQuery = { __typename?: 'Query', findWorkspaceAiStats: { __typename?: 'WorkspaceAiStats', conversationsCount: number, skillsCount: number, toolsCount: number } };
-
export type GetAgentChatOpenThreadsSummaryQueryVariables = Exact<{ [key: string]: never; }>;
@@ -10936,7 +10931,6 @@ export const FindManySkillsDocument = {"kind":"Document","definitions":[{"kind":
export const FindManySkillsForSuggestionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManySkillsForSuggestion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"skills"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}}]}}]}}]} as unknown as DocumentNode<FindManySkillsForSuggestionQuery, FindManySkillsForSuggestionQueryVariables>;
export const FindOneAgentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneAgent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findOneAgent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AgentFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"triggers"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<FindOneAgentQuery, FindOneAgentQueryVariables>;
export const FindOneSkillDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneSkill"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"skill"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<FindOneSkillQuery, FindOneSkillQueryVariables>;
-export const FindWorkspaceAiStatsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindWorkspaceAiStats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findWorkspaceAiStats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"conversationsCount"}},{"kind":"Field","name":{"kind":"Name","value":"skillsCount"}},{"kind":"Field","name":{"kind":"Name","value":"toolsCount"}}]}}]}}]} as unknown as DocumentNode<FindWorkspaceAiStatsQuery, FindWorkspaceAiStatsQueryVariables>;
export const GetAgentChatOpenThreadsSummaryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAgentChatOpenThreadsSummary"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"agentChatOpenThreadsSummary"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"openThreadCount"}},{"kind":"Field","name":{"kind":"Name","value":"needsInputThreadCount"}},{"kind":"Field","name":{"kind":"Name","value":"hasUnreadOpenThread"}},{"kind":"Field","name":{"kind":"Name","value":"hasUnreadMentionThread"}},{"kind":"Field","name":{"kind":"Name","value":"hasUnreadAssignedThread"}}]}}]}}]} as unknown as DocumentNode<GetAgentChatOpenThreadsSummaryQuery, GetAgentChatOpenThreadsSummaryQueryVariables>;
export const GetAgentRunsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAgentRuns"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"agentId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"agentRuns"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"agentId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"agentId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"threadTitle"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"startedAt"}},{"kind":"Field","name":{"kind":"Name","value":"endedAt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"inputTokens"}},{"kind":"Field","name":{"kind":"Name","value":"outputTokens"}},{"kind":"Field","name":{"kind":"Name","value":"credits"}},{"kind":"Field","name":{"kind":"Name","value":"creatorSource"}},{"kind":"Field","name":{"kind":"Name","value":"creatorName"}},{"kind":"Field","name":{"kind":"Name","value":"input"}},{"kind":"Field","name":{"kind":"Name","value":"reply"}},{"kind":"Field","name":{"kind":"Name","value":"toolNames"}}]}}]}}]} as unknown as DocumentNode<GetAgentRunsQuery, GetAgentRunsQueryVariables>;
export const GetAiChatUsageDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAiChatUsage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"aiChatUsage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"limitValue"}},{"kind":"Field","name":{"kind":"Name","value":"consumedValue"}},{"kind":"Field","name":{"kind":"Name","value":"periodEnd"}},{"kind":"Field","name":{"kind":"Name","value":"kind"}}]}}]}}]} as unknown as DocumentNode<GetAiChatUsageQuery, GetAiChatUsageQueryVariables>;
diff --git a/packages/twenty-front/src/modules/ai/graphql/queries/findWorkspaceAiStats.ts b/packages/twenty-front/src/modules/ai/graphql/queries/findWorkspaceAiStats.ts
deleted file mode 100644
index 4501ef2e67d..00000000000
--- a/packages/twenty-front/src/modules/ai/graphql/queries/findWorkspaceAiStats.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { gql } from '@apollo/client';
-
-export const FIND_WORKSPACE_AI_STATS = gql`
- query FindWorkspaceAiStats {
- findWorkspaceAiStats {
- conversationsCount
- skillsCount
- toolsCount
- }
- }
-`;
diff --git a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx
index 7ce55e956ad..a3f4d41ae81 100644
--- a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx
+++ b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx
@@ -14,6 +14,7 @@ import {
type WorkspaceRouteHandle,
type WorkspaceRouteObject,
} from '@/app/routing/types/WorkspaceRouteObject';
+import { SETTINGS_AI_TABS } from '@/settings/ai/constants/SettingsAiTabs';
import { SettingsProtectedRouteWrapper } from '@/settings/components/SettingsProtectedRouteWrapper';
import { SettingsSkeletonLoader } from '@/settings/components/SettingsSkeletonLoader';
import { SettingPublicDomain } from '@/settings/domains/components/SettingPublicDomain';
@@ -37,22 +38,24 @@ const SettingsRestPlayground = lazy(() =>
),
);
-// TODO: remove these legacy /api-webhooks redirects after 2026-08-04.
-const LEGACY_API_WEBHOOKS_SETTINGS_PATHS = {
- ApiWebhooks: 'api-webhooks',
- NewApiKey: 'api-webhooks/apis/new',
- ApiKeyDetail: 'api-webhooks/apis/:apiKeyId',
- NewWebhook: 'api-webhooks/webhooks/new',
- WebhookDetail: 'api-webhooks/webhooks/:webhookId',
-} as const;
+// TODO: remove these legacy redirects after 2027-01-14.
+const LEGACY_DEVELOPERS_SETTINGS_PATH_PREFIX = 'mcp-apis';
+
+const LEGACY_DEVELOPERS_SETTINGS_PATHS = [
+ { suffix: '', to: SettingsPath.Developers },
+ { suffix: '/apis/new', to: SettingsPath.NewApiKey },
+ { suffix: '/apis/:apiKeyId', to: SettingsPath.ApiKeyDetail },
+ { suffix: '/webhooks/new', to: SettingsPath.NewWebhook },
+ { suffix: '/webhooks/:webhookId', to: SettingsPath.WebhookDetail },
+] as const;
+
+const LEGACY_APPLICATION_REGISTRATION_DETAIL_PATH =
+ 'applications/registrations/:applicationRegistrationId';
type LegacySettingsPathRedirectProps = {
to:
- | SettingsPath.ApiWebhooks
- | SettingsPath.NewApiKey
- | SettingsPath.ApiKeyDetail
- | SettingsPath.NewWebhook
- | SettingsPath.WebhookDetail;
+ | (typeof LEGACY_DEVELOPERS_SETTINGS_PATHS)[number]['to']
+ | SettingsPath.ApplicationRegistrationDetail;
};
const getLegacySettingsPathRedirectPathname = (
@@ -68,7 +71,11 @@ const getLegacySettingsPathRedirectPathname = (
return getSettingsPath(SettingsPath.WebhookDetail, {
webhookId: params.webhookId ?? null,
});
- case SettingsPath.ApiWebhooks:
+ case SettingsPath.ApplicationRegistrationDetail:
+ return getSettingsPath(SettingsPath.ApplicationRegistrationDetail, {
+ applicationRegistrationId: params.applicationRegistrationId ?? null,
+ });
+ case SettingsPath.Developers:
case SettingsPath.NewApiKey:
case SettingsPath.NewWebhook:
return getSettingsPath(to);
@@ -78,6 +85,16 @@ const getLegacySettingsPathRedirectPathname = (
function LegacySettingsPathRedirect({ to }: LegacySettingsPathRedirectProps) {
const location = useLocation();
const params = useParams();
+
+ if (to === SettingsPath.Developers && location.hash === '#mcp') {
+ return (
+ <Navigate
+ to={`${getSettingsPath(SettingsPath.AI)}${location.search}#${SETTINGS_AI_TABS.TABS_IDS.MCP}`}
+ replace
+ />
+ );
+ }
+
const pathname = getLegacySettingsPathRedirectPathname(to, params);
return (
@@ -241,12 +258,10 @@ const SettingsCustomDomainPage = lazy(() =>
),
);
-const SettingsApiWebhooks = lazy(() =>
- import('~/pages/settings/api-webhooks/SettingsApiWebhooks').then(
- (module) => ({
- default: module.SettingsApiWebhooks,
- }),
- ),
+const SettingsDevelopers = lazy(() =>
+ import('~/pages/settings/developers/SettingsDevelopers').then((module) => ({
+ default: module.SettingsDevelopers,
+ })),
);
const SettingsAI = lazy(() =>
@@ -547,6 +562,20 @@ const SettingsObjectFieldEdit = lazy(() =>
),
);
+const SettingsObjectSearch = lazy(() =>
+ import('~/pages/settings/data-model/SettingsObjectSearch').then((module) => ({
+ default: module.SettingsObjectSearch,
+ })),
+);
+
+const SettingsObjectIndexes = lazy(() =>
+ import('~/pages/settings/data-model/SettingsObjectIndexes').then(
+ (module) => ({
+ default: module.SettingsObjectIndexes,
+ }),
+ ),
+);
+
const SettingsObjectTranslations = lazy(() =>
import('~/pages/settings/data-model/SettingsObjectTranslations').then(
(module) => ({
@@ -973,6 +1002,16 @@ const createSettingsRouteElements = ({
element={<SettingsObjectTranslations />}
handle={MAIN_AND_SIDE_PANEL_SETTINGS_ROUTE_HANDLE}
/>
+ <Route
+ path={SettingsPath.ObjectSearch}
+ element={<SettingsObjectSearch />}
+ handle={MAIN_AND_SIDE_PANEL_SETTINGS_ROUTE_HANDLE}
+ />
+ <Route
+ path={SettingsPath.ObjectIndexes}
+ element={<SettingsObjectIndexes />}
+ handle={MAIN_AND_SIDE_PANEL_SETTINGS_ROUTE_HANDLE}
+ />
<Route
path={SettingsPath.ObjectFieldTranslations}
element={<SettingsObjectTranslations />}
@@ -1024,29 +1063,25 @@ const createSettingsRouteElements = ({
/>
}
>
+ {LEGACY_DEVELOPERS_SETTINGS_PATHS.map(({ suffix, to }) => (
+ <Route
+ key={suffix}
+ path={`${LEGACY_DEVELOPERS_SETTINGS_PATH_PREFIX}${suffix}`}
+ element={<LegacySettingsPathRedirect to={to} />}
+ />
+ ))}
+ <Route path={SettingsPath.Developers} element={<SettingsDevelopers />} />
<Route
- path={LEGACY_API_WEBHOOKS_SETTINGS_PATHS.ApiWebhooks}
- element={<LegacySettingsPathRedirect to={SettingsPath.ApiWebhooks} />}
- />
- <Route
- path={LEGACY_API_WEBHOOKS_SETTINGS_PATHS.NewApiKey}
- element={<LegacySettingsPathRedirect to={SettingsPath.NewApiKey} />}
- />
- <Route
- path={LEGACY_API_WEBHOOKS_SETTINGS_PATHS.ApiKeyDetail}
- element={<LegacySettingsPathRedirect to={SettingsPath.ApiKeyDetail} />}
- />
- <Route
- path={LEGACY_API_WEBHOOKS_SETTINGS_PATHS.NewWebhook}
- element={<LegacySettingsPathRedirect to={SettingsPath.NewWebhook} />}
- />
- <Route
- path={LEGACY_API_WEBHOOKS_SETTINGS_PATHS.WebhookDetail}
- element={<LegacySettingsPathRedirect to={SettingsPath.WebhookDetail} />}
+ path={SettingsPath.ApplicationRegistrationDetail}
+ element={<SettingsApplicationRegistrationDetails />}
/>
<Route
- path={SettingsPath.ApiWebhooks}
- element={<SettingsApiWebhooks />}
+ path={LEGACY_APPLICATION_REGISTRATION_DETAIL_PATH}
+ element={
+ <LegacySettingsPathRedirect
+ to={SettingsPath.ApplicationRegistrationDetail}
+ />
+ }
/>
<Route
path={`${SettingsPath.GraphQLPlayground}`}
@@ -1097,10 +1132,6 @@ const createSettingsRouteElements = ({
path={SettingsPath.AvailableApplicationDetail}
element={<SettingsAvailableApplicationDetails />}
/>
- <Route
- path={SettingsPath.ApplicationRegistrationDetail}
- element={<SettingsApplicationRegistrationDetails />}
- />
<Route
path={SettingsPath.ApplicationLogicFunctionDetail}
element={<SettingsLogicFunctionDetail />}
diff --git a/packages/twenty-front/src/modules/command-menu-item/display/hooks/useCommandMenuAppActions.ts b/packages/twenty-front/src/modules/command-menu-item/display/hooks/useCommandMenuAppActions.ts
index d826249aa6f..35f0d32f002 100644
--- a/packages/twenty-front/src/modules/command-menu-item/display/hooks/useCommandMenuAppActions.ts
+++ b/packages/twenty-front/src/modules/command-menu-item/display/hooks/useCommandMenuAppActions.ts
@@ -3,20 +3,18 @@ import { useIsLogConsoleAllowed } from '@/log-console/hooks/useIsLogConsoleAllow
import { logConsoleDisplayModeState } from '@/log-console/states/logConsoleDisplayModeState';
import { useIsSettingsDrawer } from '@/navigation/hooks/useIsSettingsDrawer';
import { useNavigationDrawerTogglePresentation } from '@/ui/navigation/navigation-drawer/hooks/useNavigationDrawerTogglePresentation';
-import { useSetAdvancedMode } from '@/navigation/hooks/useSetAdvancedMode';
+import { useSetIsLogConsoleEnabled } from '@/log-console/hooks/useSetIsLogConsoleEnabled';
import { useToggleNavigationDrawer } from '@/ui/navigation/navigation-drawer/hooks/useToggleNavigationDrawer';
import { sidePanelSearchState } from '@/side-panel/states/sidePanelSearchState';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
+import { isLogConsoleEnabledState } from '@/log-console/states/isLogConsoleEnabledState';
import { isSelectOptionMatchingSearch } from '@/ui/input/components/internal/select/utils/isSelectOptionMatchingSearch';
import { useColorScheme } from '@/workspace-member/hooks/useColorScheme';
import { normalizeSearchText, useIsMobile } from 'twenty-ui/utilities';
import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
-import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
import { useLingui } from '@lingui/react/macro';
import { useContext } from 'react';
-import { IconCode, IconCopy, IconTerminal } from 'twenty-ui/icon';
-import { FeatureFlagKey } from '~/generated-metadata/graphql';
+import { IconCopy, IconTerminal } from 'twenty-ui/icon';
import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';
import { type ColorScheme } from '@/ui/theme/types/ColorScheme';
@@ -33,11 +31,8 @@ export const useCommandMenuAppActions = () => {
);
const { copyToClipboard } = useCopyToClipboard();
const { colorScheme, setColorScheme, colorSchemeList } = useColorScheme();
- const isLogsSettingsSectionEnabled = useIsFeatureEnabled(
- FeatureFlagKey.IS_LOGS_SETTINGS_SECTION_ENABLED,
- );
- const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
- const { setAdvancedMode } = useSetAdvancedMode();
+ const isLogConsoleEnabled = useAtomStateValue(isLogConsoleEnabledState);
+ const { setIsLogConsoleEnabled } = useSetIsLogConsoleEnabled();
const isLogConsoleAllowed = useIsLogConsoleAllowed();
const [logConsoleDisplayMode, setLogConsoleDisplayMode] = useAtomState(
logConsoleDisplayModeState,
@@ -75,21 +70,22 @@ export const useCommandMenuAppActions = () => {
isAvailable: theme.id !== colorScheme,
})),
{
- id: 'turn-on-developer-mode',
+ id: 'show-logs',
section: 'DEVELOPER',
- label: t`Turn on developer mode`,
- searchKeywords: t`logs`,
- Icon: IconCode,
- onClick: () => setAdvancedMode(true),
- isAvailable: isLogsSettingsSectionEnabled && !isAdvancedModeEnabled,
+ label: t`Show logs`,
+ searchKeywords: t`developer`,
+ Icon: IconTerminal,
+ onClick: () => setIsLogConsoleEnabled(true),
+ isAvailable: isLogConsoleAllowed && !isLogConsoleEnabled,
},
{
- id: 'turn-off-developer-mode',
+ id: 'hide-logs',
section: 'DEVELOPER',
- label: t`Turn off developer mode`,
- Icon: IconCode,
- onClick: () => setAdvancedMode(false),
- isAvailable: isLogsSettingsSectionEnabled && isAdvancedModeEnabled,
+ label: t`Hide logs`,
+ searchKeywords: t`developer`,
+ Icon: IconTerminal,
+ onClick: () => setIsLogConsoleEnabled(false),
+ isAvailable: isLogConsoleAllowed && isLogConsoleEnabled,
},
{
id: 'open-log-console',
@@ -100,7 +96,7 @@ export const useCommandMenuAppActions = () => {
onClick: () => setLogConsoleDisplayMode('open'),
isAvailable:
isLogConsoleAllowed &&
- isAdvancedModeEnabled &&
+ isLogConsoleEnabled &&
logConsoleDisplayMode !== 'open',
},
];
diff --git a/packages/twenty-front/src/modules/log-console/components/LogConsole.tsx b/packages/twenty-front/src/modules/log-console/components/LogConsole.tsx
index c3de58b309b..766f15a31cb 100644
--- a/packages/twenty-front/src/modules/log-console/components/LogConsole.tsx
+++ b/packages/twenty-front/src/modules/log-console/components/LogConsole.tsx
@@ -44,7 +44,7 @@ import { TabListRoot } from '@/ui/layout/tab-list/components/TabListRoot';
import { TAB_LIST_HEIGHT } from '@/ui/layout/tab-list/constants/TabListHeight';
import { TAB_LIST_ROW_HEIGHT_CSS_VARIABLE } from '@/ui/layout/tab-list/constants/TabListRowHeightCssVariable';
import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
+import { isLogConsoleEnabledState } from '@/log-console/states/isLogConsoleEnabledState';
import { getUiZoom } from '@/ui/theme/utils/getUiZoom';
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';
@@ -261,7 +261,7 @@ export const LogConsole = () => {
const shouldReduceMotion = useReducedMotion();
const isLogConsoleAllowed = useIsLogConsoleAllowed();
- const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
+ const isLogConsoleEnabled = useAtomStateValue(isLogConsoleEnabledState);
const currentWorkspace = useAtomStateValue(currentWorkspaceState);
const isClickHouseConfigured = useAtomStateValue(isClickHouseConfiguredState);
@@ -297,7 +297,7 @@ export const LogConsole = () => {
const isOpen = logConsoleDisplayMode === 'open';
const isFullScreen = isOpen && isLogConsoleFullScreen;
- const isVisible = isLogConsoleAllowed && isAdvancedModeEnabled;
+ const isVisible = isLogConsoleAllowed && isLogConsoleEnabled;
const [renderedLayout, setRenderedLayout] = useState<LogConsoleLayout | null>(
isVisible ? { isOpen, isFullScreen } : null,
diff --git a/packages/twenty-front/src/modules/log-console/components/__stories__/LogConsole.stories.tsx b/packages/twenty-front/src/modules/log-console/components/__stories__/LogConsole.stories.tsx
index 17b7f0b4642..8c0a9ca3d3c 100644
--- a/packages/twenty-front/src/modules/log-console/components/__stories__/LogConsole.stories.tsx
+++ b/packages/twenty-front/src/modules/log-console/components/__stories__/LogConsole.stories.tsx
@@ -28,7 +28,7 @@ import { SidePanelToggleButton } from '@/side-panel/components/SidePanelToggleBu
import { sseClientState } from '@/sse-db-event/states/sseClientState';
import { PageCardHeader } from '@/ui/layout/page/components/PageCardHeader';
import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
+import { isLogConsoleEnabledState } from '@/log-console/states/isLogConsoleEnabledState';
import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';
import { REACT_APP_SERVER_BASE_URL } from '~/config';
import {
@@ -174,7 +174,7 @@ const meta: Meta<PageDecoratorArgs> = {
timeFormat: TimeFormat.HOUR_24,
}),
);
- jotaiStore.set(isAdvancedModeEnabledState.atom, true);
+ jotaiStore.set(isLogConsoleEnabledState.atom, true);
jotaiStore.set(logConsoleDisplayModeState.atom, 'collapsed');
jotaiStore.set(logConsoleHeightState.atom, null);
jotaiStore.set(isLogConsoleFullScreenState.atom, false);
diff --git a/packages/twenty-front/src/modules/log-console/components/__tests__/LogConsole.test.tsx b/packages/twenty-front/src/modules/log-console/components/__tests__/LogConsole.test.tsx
index 956733ddc6d..a9a63d109e4 100644
--- a/packages/twenty-front/src/modules/log-console/components/__tests__/LogConsole.test.tsx
+++ b/packages/twenty-front/src/modules/log-console/components/__tests__/LogConsole.test.tsx
@@ -18,9 +18,9 @@ import { isLogConsoleFullScreenState } from '@/log-console/states/isLogConsoleFu
import { logConsoleActiveSourceIdState } from '@/log-console/states/logConsoleActiveSourceIdState';
import { logConsoleDisplayModeState } from '@/log-console/states/logConsoleDisplayModeState';
import { logConsoleHeightState } from '@/log-console/states/logConsoleHeightState';
-import { useSetAdvancedMode } from '@/navigation/hooks/useSetAdvancedMode';
+import { useSetIsLogConsoleEnabled } from '@/log-console/hooks/useSetIsLogConsoleEnabled';
+import { isLogConsoleEnabledState } from '@/log-console/states/isLogConsoleEnabledState';
import { PageFocusId } from '@/types/PageFocusId';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
import { focusStackState } from '@/ui/utilities/focus/states/focusStackState';
import { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentType';
import { type FocusStackItem } from '@/ui/utilities/focus/types/FocusStackItem';
@@ -74,16 +74,16 @@ const SETTINGS_PAGE_FOCUS_STACK_ITEM: FocusStackItem = {
},
};
-const DeveloperModeSwitch = () => {
- const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
- const { setAdvancedMode } = useSetAdvancedMode();
+const LogsSwitch = () => {
+ const isLogConsoleEnabled = useAtomStateValue(isLogConsoleEnabledState);
+ const { setIsLogConsoleEnabled } = useSetIsLogConsoleEnabled();
return (
<button
type="button"
- onClick={() => setAdvancedMode(!isAdvancedModeEnabled)}
+ onClick={() => setIsLogConsoleEnabled(!isLogConsoleEnabled)}
>
- Developer mode
+ Logs
</button>
);
};
@@ -104,7 +104,7 @@ const renderWithLogsFeatureFlag = (isLogsFeatureFlagEnabled: boolean) => {
permissionFlags: [PermissionFlagType.SECURITY],
});
jotaiStore.set(isClickHouseConfiguredState.atom, true);
- jotaiStore.set(isAdvancedModeEnabledState.atom, false);
+ jotaiStore.set(isLogConsoleEnabledState.atom, false);
jotaiStore.set(logConsoleDisplayModeState.atom, 'collapsed');
jotaiStore.set(logConsoleActiveSourceIdState.atom, null);
@@ -115,7 +115,7 @@ const renderWithLogsFeatureFlag = (isLogsFeatureFlagEnabled: boolean) => {
<MockedProvider>
<MemoryRouter>
<Suspense fallback={null}>
- <DeveloperModeSwitch />
+ <LogsSwitch />
<LogConsole />
</Suspense>
</MemoryRouter>
@@ -135,7 +135,7 @@ describe('LogConsole', () => {
it('restores the collapsed console when its opening drag is cancelled', () => {
renderWithLogsFeatureFlag(true);
act(() => {
- jotaiStore.set(isAdvancedModeEnabledState.atom, true);
+ jotaiStore.set(isLogConsoleEnabledState.atom, true);
jotaiStore.set(logConsoleDisplayModeState.atom, 'collapsed');
});
act(() => capturedResizeHandleProps?.onResizeStart?.(100));
@@ -157,7 +157,7 @@ describe('LogConsole', () => {
renderWithLogsFeatureFlag(true);
act(() => {
- jotaiStore.set(isAdvancedModeEnabledState.atom, true);
+ jotaiStore.set(isLogConsoleEnabledState.atom, true);
jotaiStore.set(
logConsoleDisplayModeState.atom,
displayModeSavedByEarlierVersion,
@@ -171,7 +171,7 @@ describe('LogConsole', () => {
it('keeps the console open in full screen when its drag is cancelled', () => {
renderWithLogsFeatureFlag(true);
act(() => {
- jotaiStore.set(isAdvancedModeEnabledState.atom, true);
+ jotaiStore.set(isLogConsoleEnabledState.atom, true);
jotaiStore.set(logConsoleDisplayModeState.atom, 'collapsed');
});
act(() => capturedResizeHandleProps?.onResizeStart?.(100));
@@ -189,7 +189,7 @@ describe('LogConsole', () => {
it('restores the collapsed console when the cancel arrives before the drag start renders', () => {
renderWithLogsFeatureFlag(true);
act(() => {
- jotaiStore.set(isAdvancedModeEnabledState.atom, true);
+ jotaiStore.set(isLogConsoleEnabledState.atom, true);
jotaiStore.set(logConsoleDisplayModeState.atom, 'collapsed');
});
const onResizeStart = capturedResizeHandleProps?.onResizeStart;
@@ -206,7 +206,7 @@ describe('LogConsole', () => {
it('opens a collapsed console at its saved height on a small keyboard step', () => {
renderWithLogsFeatureFlag(true);
act(() => {
- jotaiStore.set(isAdvancedModeEnabledState.atom, true);
+ jotaiStore.set(isLogConsoleEnabledState.atom, true);
jotaiStore.set(logConsoleHeightState.atom, 450);
jotaiStore.set(logConsoleDisplayModeState.atom, 'collapsed');
});
@@ -220,7 +220,7 @@ describe('LogConsole', () => {
it('reflects live resizing without saving the console height until commit', () => {
renderWithLogsFeatureFlag(true);
act(() => {
- jotaiStore.set(isAdvancedModeEnabledState.atom, true);
+ jotaiStore.set(isLogConsoleEnabledState.atom, true);
jotaiStore.set(logConsoleHeightState.atom, 450);
jotaiStore.set(logConsoleDisplayModeState.atom, 'open');
});
@@ -239,7 +239,7 @@ describe('LogConsole', () => {
it('starts the resize range of an open console at its minimum height until a drag begins', () => {
renderWithLogsFeatureFlag(true);
act(() => {
- jotaiStore.set(isAdvancedModeEnabledState.atom, true);
+ jotaiStore.set(isLogConsoleEnabledState.atom, true);
jotaiStore.set(logConsoleDisplayModeState.atom, 'open');
});
@@ -252,43 +252,35 @@ describe('LogConsole', () => {
expect(capturedResizeHandleProps?.min).toBe(0);
});
- it('opens when developer mode is turned on', async () => {
+ it('opens when logs is turned on', async () => {
renderWithLogsFeatureFlag(true);
expect(screen.queryByText('Log results')).not.toBeInTheDocument();
- await userEvent.click(
- await screen.findByRole('button', { name: 'Developer mode' }),
- );
+ await userEvent.click(await screen.findByRole('button', { name: 'Logs' }));
expect(await screen.findByText('Log results')).toBeInTheDocument();
});
- it('hides when developer mode is turned off', async () => {
+ it('hides when logs is turned off', async () => {
mockShouldReduceMotion = true;
renderWithLogsFeatureFlag(true);
- await userEvent.click(
- await screen.findByRole('button', { name: 'Developer mode' }),
- );
+ await userEvent.click(await screen.findByRole('button', { name: 'Logs' }));
expect(await screen.findByText('Log results')).toBeInTheDocument();
- await userEvent.click(
- screen.getByRole('button', { name: 'Developer mode' }),
- );
+ await userEvent.click(screen.getByRole('button', { name: 'Logs' }));
expect(
screen.queryByRole('button', { name: 'Collapse' }),
).not.toBeInTheDocument();
});
- it('has no close button, so developer mode is the only way to hide it', async () => {
+ it('has no close button, so logs is the only way to hide it', async () => {
renderWithLogsFeatureFlag(true);
- await userEvent.click(
- await screen.findByRole('button', { name: 'Developer mode' }),
- );
+ await userEvent.click(await screen.findByRole('button', { name: 'Logs' }));
expect(
await screen.findByRole('button', { name: 'Collapse' }),
@@ -301,7 +293,7 @@ describe('LogConsole', () => {
it('reopens on the last selected log source', () => {
renderWithLogsFeatureFlag(true);
act(() => {
- jotaiStore.set(isAdvancedModeEnabledState.atom, true);
+ jotaiStore.set(isLogConsoleEnabledState.atom, true);
jotaiStore.set(logConsoleActiveSourceIdState.atom, 'app-logs');
jotaiStore.set(logConsoleDisplayModeState.atom, 'open');
});
@@ -315,7 +307,7 @@ describe('LogConsole', () => {
it('remembers the log source selected by the user', async () => {
renderWithLogsFeatureFlag(true);
act(() => {
- jotaiStore.set(isAdvancedModeEnabledState.atom, true);
+ jotaiStore.set(isLogConsoleEnabledState.atom, true);
jotaiStore.set(logConsoleDisplayModeState.atom, 'open');
});
@@ -327,7 +319,7 @@ describe('LogConsole', () => {
it('toggles with Mod+J on a page that turns off modifier hotkeys', async () => {
renderWithLogsFeatureFlag(true);
act(() => {
- jotaiStore.set(isAdvancedModeEnabledState.atom, true);
+ jotaiStore.set(isLogConsoleEnabledState.atom, true);
jotaiStore.set(focusStackState.atom, [SETTINGS_PAGE_FOCUS_STACK_ITEM]);
jotaiStore.set(logConsoleDisplayModeState.atom, 'collapsed');
});
@@ -344,7 +336,7 @@ describe('LogConsole', () => {
it('ignores Mod+J while a dialog turns off modifier hotkeys', async () => {
renderWithLogsFeatureFlag(true);
act(() => {
- jotaiStore.set(isAdvancedModeEnabledState.atom, true);
+ jotaiStore.set(isLogConsoleEnabledState.atom, true);
jotaiStore.set(focusStackState.atom, [
SETTINGS_PAGE_FOCUS_STACK_ITEM,
{
@@ -370,9 +362,7 @@ describe('LogConsole', () => {
it('stays hidden when the logs feature flag is off', async () => {
renderWithLogsFeatureFlag(false);
- await userEvent.click(
- await screen.findByRole('button', { name: 'Developer mode' }),
- );
+ await userEvent.click(await screen.findByRole('button', { name: 'Logs' }));
expect(screen.queryByText('Log results')).not.toBeInTheDocument();
});
diff --git a/packages/twenty-front/src/modules/navigation/hooks/useSetAdvancedMode.ts b/packages/twenty-front/src/modules/log-console/hooks/useSetIsLogConsoleEnabled.ts
similarity index 72%
rename from packages/twenty-front/src/modules/navigation/hooks/useSetAdvancedMode.ts
rename to packages/twenty-front/src/modules/log-console/hooks/useSetIsLogConsoleEnabled.ts
index 4bd0012a2d0..7741111feff 100644
--- a/packages/twenty-front/src/modules/navigation/hooks/useSetAdvancedMode.ts
+++ b/packages/twenty-front/src/modules/log-console/hooks/useSetIsLogConsoleEnabled.ts
@@ -1,12 +1,12 @@
+import { isLogConsoleEnabledState } from '@/log-console/states/isLogConsoleEnabledState';
import { isLogConsoleFullScreenState } from '@/log-console/states/isLogConsoleFullScreenState';
import { logConsoleDisplayModeState } from '@/log-console/states/logConsoleDisplayModeState';
import { logConsoleHeightState } from '@/log-console/states/logConsoleHeightState';
import { logConsoleSelectedLogState } from '@/log-console/states/logConsoleSelectedLogState';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
-export const useSetAdvancedMode = () => {
- const setIsAdvancedModeEnabled = useSetAtomState(isAdvancedModeEnabledState);
+export const useSetIsLogConsoleEnabled = () => {
+ const setIsLogConsoleEnabled = useSetAtomState(isLogConsoleEnabledState);
const setLogConsoleDisplayMode = useSetAtomState(logConsoleDisplayModeState);
const setIsLogConsoleFullScreen = useSetAtomState(
isLogConsoleFullScreenState,
@@ -14,8 +14,8 @@ export const useSetAdvancedMode = () => {
const setLogConsoleSelectedLog = useSetAtomState(logConsoleSelectedLogState);
const setLogConsoleHeight = useSetAtomState(logConsoleHeightState);
- const setAdvancedMode = (isEnabled: boolean) => {
- setIsAdvancedModeEnabled(isEnabled);
+ const enableLogConsole = (isEnabled: boolean) => {
+ setIsLogConsoleEnabled(isEnabled);
setLogConsoleSelectedLog(null);
setIsLogConsoleFullScreen(false);
@@ -25,5 +25,5 @@ export const useSetAdvancedMode = () => {
}
};
- return { setAdvancedMode };
+ return { setIsLogConsoleEnabled: enableLogConsole };
};
diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState.ts b/packages/twenty-front/src/modules/log-console/states/isLogConsoleEnabledState.ts
similarity index 63%
rename from packages/twenty-front/src/modules/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState.ts
rename to packages/twenty-front/src/modules/log-console/states/isLogConsoleEnabledState.ts
index a744ad4d96b..a28e315479f 100644
--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState.ts
+++ b/packages/twenty-front/src/modules/log-console/states/isLogConsoleEnabledState.ts
@@ -1,7 +1,7 @@
import { createAtomState } from '@/ui/utilities/state/jotai/utils/createAtomState';
-export const isAdvancedModeEnabledState = createAtomState<boolean>({
- key: 'isAdvancedModeEnabledAtom',
+export const isLogConsoleEnabledState = createAtomState<boolean>({
+ key: 'isLogConsoleEnabledAtom',
defaultValue: false,
useLocalStorage: true,
localStorageOptions: { getOnInit: true },
diff --git a/packages/twenty-front/src/modules/navigation/components/DeveloperModeSwitch.tsx b/packages/twenty-front/src/modules/navigation/components/LogsSwitch.tsx
similarity index 80%
rename from packages/twenty-front/src/modules/navigation/components/DeveloperModeSwitch.tsx
rename to packages/twenty-front/src/modules/navigation/components/LogsSwitch.tsx
index 93d077ef273..54996a98c79 100644
--- a/packages/twenty-front/src/modules/navigation/components/DeveloperModeSwitch.tsx
+++ b/packages/twenty-front/src/modules/navigation/components/LogsSwitch.tsx
@@ -1,11 +1,11 @@
-import { DeveloperModeSwitchLabel } from '@/navigation/components/DeveloperModeSwitchLabel';
-import { DeveloperModeTypingEffect } from '@/navigation/components/DeveloperModeTypingEffect';
-import { useDeveloperModeTypingSequence } from '@/navigation/hooks/useDeveloperModeTypingSequence';
+import { LogsSwitchLabel } from '@/navigation/components/LogsSwitchLabel';
+import { LogsSwitchTypingEffect } from '@/navigation/components/LogsSwitchTypingEffect';
+import { useLogsSwitchTypingSequence } from '@/navigation/hooks/useLogsSwitchTypingSequence';
import { NAVIGATION_DRAWER_COLLAPSED_BUTTON_SIZE } from '@/ui/navigation/navigation-drawer/constants/NavigationDrawerCollapsedButtonSize';
import { styled } from '@linaria/react';
import { useId } from 'react';
import { isDefined } from 'twenty-shared/utils';
-import { IconCode } from 'twenty-ui/icon';
+import { IconTerminal } from 'twenty-ui/icon';
import { Switch } from 'twenty-ui/primitives/input';
import { themeCssVariables, useTheme } from 'twenty-ui/theme';
@@ -31,17 +31,17 @@ const StyledContainer = styled.label<{ isCompact: boolean }>`
}
`;
-type DeveloperModeSwitchProps = {
+type LogsSwitchProps = {
isEnabled: boolean;
onEnabledChange: (isEnabled: boolean) => void;
isCompact?: boolean;
};
-export const DeveloperModeSwitch = ({
+export const LogsSwitch = ({
isEnabled,
onEnabledChange,
isCompact = false,
-}: DeveloperModeSwitchProps) => {
+}: LogsSwitchProps) => {
const theme = useTheme();
const instanceId = useId();
const {
@@ -52,7 +52,7 @@ export const DeveloperModeSwitch = ({
isTyping,
playEnterSequence,
playExitSequence,
- } = useDeveloperModeTypingSequence(isEnabled);
+ } = useLogsSwitchTypingSequence(isEnabled);
const handleCheckedChange = (checked: boolean) => {
onEnabledChange(checked);
@@ -72,19 +72,19 @@ export const DeveloperModeSwitch = ({
title={isCompact ? label : undefined}
>
{isDefined(sequence) && (
- <DeveloperModeTypingEffect
+ <LogsSwitchTypingEffect
sequence={sequence}
onSequenceChange={setSequence}
/>
)}
{!isCompact && (
<>
- <IconCode
+ <IconTerminal
size={theme.icon.size.md}
stroke={theme.icon.stroke.sm}
color={isEnabled ? theme.accent.accent9 : theme.font.color.tertiary}
/>
- <DeveloperModeSwitchLabel
+ <LogsSwitchLabel
label={label}
frame={displayedFrame}
isTyping={isTyping}
diff --git a/packages/twenty-front/src/modules/navigation/components/DeveloperModeSwitchLabel.tsx b/packages/twenty-front/src/modules/navigation/components/LogsSwitchLabel.tsx
similarity index 86%
rename from packages/twenty-front/src/modules/navigation/components/DeveloperModeSwitchLabel.tsx
rename to packages/twenty-front/src/modules/navigation/components/LogsSwitchLabel.tsx
index 96bf77af0ba..e8ef04b4fda 100644
--- a/packages/twenty-front/src/modules/navigation/components/DeveloperModeSwitchLabel.tsx
+++ b/packages/twenty-front/src/modules/navigation/components/LogsSwitchLabel.tsx
@@ -1,4 +1,4 @@
-import { type DeveloperModeTypingFrame } from '@/navigation/types/DeveloperModeTypingFrame';
+import { type LogsSwitchTypingFrame } from '@/navigation/types/LogsSwitchTypingFrame';
import { styled } from '@linaria/react';
import { isDefined } from 'twenty-shared/utils';
import { themeCssVariables } from 'twenty-ui/theme';
@@ -40,17 +40,17 @@ const StyledCaret = styled.span`
}
`;
-type DeveloperModeSwitchLabelProps = {
+type LogsSwitchLabelProps = {
label: string;
- frame: DeveloperModeTypingFrame | null;
+ frame: LogsSwitchTypingFrame | null;
isTyping: boolean;
};
-export const DeveloperModeSwitchLabel = ({
+export const LogsSwitchLabel = ({
label,
frame,
isTyping,
-}: DeveloperModeSwitchLabelProps) => {
+}: LogsSwitchLabelProps) => {
if (!isDefined(frame)) {
return <StyledLabel aria-hidden>{label}</StyledLabel>;
}
diff --git a/packages/twenty-front/src/modules/navigation/components/DeveloperModeTypingEffect.tsx b/packages/twenty-front/src/modules/navigation/components/LogsSwitchTypingEffect.tsx
similarity index 56%
rename from packages/twenty-front/src/modules/navigation/components/DeveloperModeTypingEffect.tsx
rename to packages/twenty-front/src/modules/navigation/components/LogsSwitchTypingEffect.tsx
index 5c8b5577e21..61ab9089867 100644
--- a/packages/twenty-front/src/modules/navigation/components/DeveloperModeTypingEffect.tsx
+++ b/packages/twenty-front/src/modules/navigation/components/LogsSwitchTypingEffect.tsx
@@ -1,15 +1,15 @@
-import { type DeveloperModeTypingSequence } from '@/navigation/types/DeveloperModeTypingSequence';
+import { type LogsSwitchTypingSequence } from '@/navigation/types/LogsSwitchTypingSequence';
import { useEffect } from 'react';
-type DeveloperModeTypingEffectProps = {
- sequence: DeveloperModeTypingSequence;
- onSequenceChange: (sequence: DeveloperModeTypingSequence) => void;
+type LogsSwitchTypingEffectProps = {
+ sequence: LogsSwitchTypingSequence;
+ onSequenceChange: (sequence: LogsSwitchTypingSequence) => void;
};
-export const DeveloperModeTypingEffect = ({
+export const LogsSwitchTypingEffect = ({
sequence,
onSequenceChange,
-}: DeveloperModeTypingEffectProps) => {
+}: LogsSwitchTypingEffectProps) => {
useEffect(() => {
if (sequence.index >= sequence.frames.length - 1) {
return;
diff --git a/packages/twenty-front/src/modules/navigation/components/SettingsNavigationDrawerContent.tsx b/packages/twenty-front/src/modules/navigation/components/SettingsNavigationDrawerContent.tsx
index 0794f03b446..1d424be5bd7 100644
--- a/packages/twenty-front/src/modules/navigation/components/SettingsNavigationDrawerContent.tsx
+++ b/packages/twenty-front/src/modules/navigation/components/SettingsNavigationDrawerContent.tsx
@@ -1,56 +1,41 @@
import { useIsNavigationDrawerContentExpanded } from '@/ui/navigation/navigation-drawer/hooks/useIsNavigationDrawerContentExpanded';
-import { useSetAdvancedMode } from '@/navigation/hooks/useSetAdvancedMode';
-import { DeveloperModeSwitch } from '@/navigation/components/DeveloperModeSwitch';
+import { useSetIsLogConsoleEnabled } from '@/log-console/hooks/useSetIsLogConsoleEnabled';
+import { LogsSwitch } from '@/navigation/components/LogsSwitch';
+import { useIsLogConsoleAllowed } from '@/log-console/hooks/useIsLogConsoleAllowed';
import { MOBILE_NAVIGATION_BAR_CLEARANCE } from '@/navigation/constants/MobileNavigationBarClearance';
import { SettingsNavigationDrawerItems } from '@/settings/components/SettingsNavigationDrawerItems';
-import { AdvancedSettingsSwitch } from '@/ui/input/components/AdvancedSettingsSwitch';
import { NavigationDrawerScrollableContent } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerScrollableContent';
import { TAB_LIST_HEIGHT } from '@/ui/layout/tab-list/constants/TabListHeight';
import { NavigationDrawerSection } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerSection';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
+import { isLogConsoleEnabledState } from '@/log-console/states/isLogConsoleEnabledState';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
-import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
-import { css } from '@linaria/core';
import { styled } from '@linaria/react';
-import { useLingui } from '@lingui/react/macro';
import { themeCssVariables } from 'twenty-ui/theme';
import { useIsMobile } from 'twenty-ui/utilities';
-import { FeatureFlagKey } from '~/generated-metadata/graphql';
-const StyledAdvancedSwitchFixedContent = styled.div<{ isMobile: boolean }>`
+const StyledLogsSwitchFixedContent = styled.div`
border-top: 1px solid ${themeCssVariables.border.color.light};
box-sizing: border-box;
display: flex;
flex-direction: column;
flex-shrink: 0;
- height: ${({ isMobile }) => (isMobile ? 'auto' : TAB_LIST_HEIGHT)};
+ height: ${TAB_LIST_HEIGHT};
justify-content: center;
- margin-bottom: ${({ isMobile }) =>
- isMobile ? '0' : `calc(-1 * ${themeCssVariables.spacing[4]})`};
+ margin-bottom: calc(-1 * ${themeCssVariables.spacing[4]});
margin-top: auto;
- padding-bottom: ${({ isMobile }) =>
- isMobile ? MOBILE_NAVIGATION_BAR_CLEARANCE : '0'};
- padding-left: ${({ isMobile }) =>
- isMobile ? themeCssVariables.spacing[5] : '0'};
- padding-right: ${({ isMobile }) =>
- isMobile ? themeCssVariables.spacing[5] : '0'};
- padding-top: ${({ isMobile }) =>
- isMobile ? themeCssVariables.spacing[2] : '0'};
`;
-const advancedSettingsSwitchClassName = css`
- padding-right: 0;
+const StyledMobileNavigationBarClearance = styled.div`
+ flex-shrink: 0;
+ height: ${MOBILE_NAVIGATION_BAR_CLEARANCE};
`;
export const SettingsNavigationDrawerContent = () => {
- const { t } = useLingui();
const isMobile = useIsMobile();
const isNavigationDrawerExpanded = useIsNavigationDrawerContentExpanded();
- const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
- const { setAdvancedMode } = useSetAdvancedMode();
- const isLogsSettingsSectionEnabled = useIsFeatureEnabled(
- FeatureFlagKey.IS_LOGS_SETTINGS_SECTION_ENABLED,
- );
+ const isLogConsoleEnabled = useAtomStateValue(isLogConsoleEnabledState);
+ const { setIsLogConsoleEnabled } = useSetIsLogConsoleEnabled();
+ const isLogConsoleAllowed = useIsLogConsoleAllowed();
return (
<>
@@ -58,25 +43,18 @@ export const SettingsNavigationDrawerContent = () => {
<SettingsNavigationDrawerItems />
</NavigationDrawerScrollableContent>
- <StyledAdvancedSwitchFixedContent isMobile={isMobile}>
- <NavigationDrawerSection>
- {isLogsSettingsSectionEnabled ? (
- <DeveloperModeSwitch
- isEnabled={isAdvancedModeEnabled}
- onEnabledChange={setAdvancedMode}
- isCompact={!isNavigationDrawerExpanded}
- />
- ) : (
- <AdvancedSettingsSwitch
- className={advancedSettingsSwitchClassName}
- isAdvancedModeEnabled={isAdvancedModeEnabled}
- setIsAdvancedModeEnabled={setAdvancedMode}
- label={t`Advanced`}
+ {isLogConsoleAllowed && (
+ <StyledLogsSwitchFixedContent>
+ <NavigationDrawerSection>
+ <LogsSwitch
+ isEnabled={isLogConsoleEnabled}
+ onEnabledChange={setIsLogConsoleEnabled}
isCompact={!isNavigationDrawerExpanded}
/>
- )}
- </NavigationDrawerSection>
- </StyledAdvancedSwitchFixedContent>
+ </NavigationDrawerSection>
+ </StyledLogsSwitchFixedContent>
+ )}
+ {isMobile && <StyledMobileNavigationBarClearance />}
</>
);
};
diff --git a/packages/twenty-front/src/modules/navigation/components/__stories__/DeveloperModeSwitch.stories.tsx b/packages/twenty-front/src/modules/navigation/components/__stories__/DeveloperModeSwitch.stories.tsx
deleted file mode 100644
index 382ea214abd..00000000000
--- a/packages/twenty-front/src/modules/navigation/components/__stories__/DeveloperModeSwitch.stories.tsx
+++ /dev/null
@@ -1,75 +0,0 @@
-import { DeveloperModeSwitch } from '@/navigation/components/DeveloperModeSwitch';
-import { DEVELOPER_MODE_PHRASES } from '@/navigation/constants/DeveloperModePhrases';
-import { i18n } from '@lingui/core';
-import { styled } from '@linaria/react';
-import { type Meta, type StoryObj } from '@storybook/react-vite';
-import { useState } from 'react';
-import { expect, userEvent, waitFor, within } from 'storybook/test';
-import { ComponentDecorator } from 'twenty-ui/testing';
-
-const StyledSidebarFooter = styled.div`
- width: 204px;
-`;
-
-const DeveloperModeSwitchWithState = () => {
- const [isEnabled, setIsEnabled] = useState(false);
-
- return (
- <StyledSidebarFooter>
- <DeveloperModeSwitch
- isEnabled={isEnabled}
- onEnabledChange={setIsEnabled}
- />
- </StyledSidebarFooter>
- );
-};
-
-const isDeveloperModePhrase = (text: string) =>
- DEVELOPER_MODE_PHRASES.some((phrase) => i18n._(phrase) === text);
-
-const meta: Meta<typeof DeveloperModeSwitch> = {
- title: 'Modules/Navigation/DeveloperModeSwitch',
- component: DeveloperModeSwitch,
- decorators: [ComponentDecorator],
- render: () => <DeveloperModeSwitchWithState />,
-};
-
-export default meta;
-
-type Story = StoryObj<typeof DeveloperModeSwitch>;
-
-export const TypesAPhraseWhenTurnedOn: Story = {
- play: async ({ canvasElement }) => {
- const canvas = within(canvasElement);
-
- await userEvent.click(
- canvas.getByRole('switch', { name: 'Developer mode' }),
- );
-
- expect(
- await canvas.findByText(isDeveloperModePhrase, {}, { timeout: 3000 }),
- ).toBeVisible();
-
- await waitFor(
- () => expect(canvas.getByText('Developer mode')).toBeVisible(),
- { timeout: 6000 },
- );
- },
-};
-
-export const ShowsTheLabelWhenTurnedOffMidAnimation: Story = {
- play: async ({ canvasElement }) => {
- const canvas = within(canvasElement);
- const developerModeSwitch = canvas.getByRole('switch', {
- name: 'Developer mode',
- });
-
- await userEvent.click(developerModeSwitch);
- await canvas.findByText(isDeveloperModePhrase, {}, { timeout: 3000 });
- await userEvent.click(developerModeSwitch);
-
- expect(developerModeSwitch).not.toBeChecked();
- expect(canvas.queryByText(isDeveloperModePhrase)).not.toBeInTheDocument();
- expect(canvas.getByText('Developer mode')).toBeVisible();
- },
-};
diff --git a/packages/twenty-front/src/modules/navigation/components/__stories__/LogsSwitch.stories.tsx b/packages/twenty-front/src/modules/navigation/components/__stories__/LogsSwitch.stories.tsx
new file mode 100644
index 00000000000..307303d371c
--- /dev/null
+++ b/packages/twenty-front/src/modules/navigation/components/__stories__/LogsSwitch.stories.tsx
@@ -0,0 +1,69 @@
+import { LogsSwitch } from '@/navigation/components/LogsSwitch';
+import { LOGS_SWITCH_PHRASES } from '@/navigation/constants/LogsSwitchPhrases';
+import { i18n } from '@lingui/core';
+import { styled } from '@linaria/react';
+import { type Meta, type StoryObj } from '@storybook/react-vite';
+import { useState } from 'react';
+import { expect, userEvent, waitFor, within } from 'storybook/test';
+import { ComponentDecorator } from 'twenty-ui/testing';
+
+const StyledSidebarFooter = styled.div`
+ width: 204px;
+`;
+
+const LogsSwitchWithState = () => {
+ const [isEnabled, setIsEnabled] = useState(false);
+
+ return (
+ <StyledSidebarFooter>
+ <LogsSwitch isEnabled={isEnabled} onEnabledChange={setIsEnabled} />
+ </StyledSidebarFooter>
+ );
+};
+
+const isLogsSwitchPhrase = (text: string) =>
+ LOGS_SWITCH_PHRASES.some((phrase) => i18n._(phrase) === text);
+
+const meta: Meta<typeof LogsSwitch> = {
+ title: 'Modules/Navigation/LogsSwitch',
+ component: LogsSwitch,
+ decorators: [ComponentDecorator],
+ render: () => <LogsSwitchWithState />,
+};
+
+export default meta;
+
+type Story = StoryObj<typeof LogsSwitch>;
+
+export const TypesAPhraseWhenTurnedOn: Story = {
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement);
+
+ await userEvent.click(canvas.getByRole('switch', { name: 'Logs' }));
+
+ expect(
+ await canvas.findByText(isLogsSwitchPhrase, {}, { timeout: 3000 }),
+ ).toBeVisible();
+
+ await waitFor(() => expect(canvas.getByText('Logs')).toBeVisible(), {
+ timeout: 6000,
+ });
+ },
+};
+
+export const ShowsTheLabelWhenTurnedOffMidAnimation: Story = {
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement);
+ const logsSwitchSwitch = canvas.getByRole('switch', {
+ name: 'Logs',
+ });
+
+ await userEvent.click(logsSwitchSwitch);
+ await canvas.findByText(isLogsSwitchPhrase, {}, { timeout: 3000 });
+ await userEvent.click(logsSwitchSwitch);
+
+ expect(logsSwitchSwitch).not.toBeChecked();
+ expect(canvas.queryByText(isLogsSwitchPhrase)).not.toBeInTheDocument();
+ expect(canvas.getByText('Logs')).toBeVisible();
+ },
+};
diff --git a/packages/twenty-front/src/modules/navigation/constants/DeveloperModePhrases.ts b/packages/twenty-front/src/modules/navigation/constants/LogsSwitchPhrases.ts
similarity index 84%
rename from packages/twenty-front/src/modules/navigation/constants/DeveloperModePhrases.ts
rename to packages/twenty-front/src/modules/navigation/constants/LogsSwitchPhrases.ts
index d84f7a00a39..556f0542d23 100644
--- a/packages/twenty-front/src/modules/navigation/constants/DeveloperModePhrases.ts
+++ b/packages/twenty-front/src/modules/navigation/constants/LogsSwitchPhrases.ts
@@ -1,6 +1,6 @@
import { msg } from '@lingui/core/macro';
-export const DEVELOPER_MODE_PHRASES = [
+export const LOGS_SWITCH_PHRASES = [
msg`200 OK`,
msg`418 I'm a teapot`,
msg`rubber duck: on`,
diff --git a/packages/twenty-front/src/modules/navigation/constants/DeveloperModeTypingDelaysInMs.ts b/packages/twenty-front/src/modules/navigation/constants/LogsSwitchTypingDelaysInMs.ts
similarity index 72%
rename from packages/twenty-front/src/modules/navigation/constants/DeveloperModeTypingDelaysInMs.ts
rename to packages/twenty-front/src/modules/navigation/constants/LogsSwitchTypingDelaysInMs.ts
index eea0d4438be..d55a90dc80f 100644
--- a/packages/twenty-front/src/modules/navigation/constants/DeveloperModeTypingDelaysInMs.ts
+++ b/packages/twenty-front/src/modules/navigation/constants/LogsSwitchTypingDelaysInMs.ts
@@ -1,4 +1,4 @@
-export const DEVELOPER_MODE_TYPING_DELAYS_IN_MS = {
+export const LOGS_SWITCH_TYPING_DELAYS_IN_MS = {
codeFontSweepLetter: 25,
codeFontSweepHold: 200,
erasedLetter: 25,
diff --git a/packages/twenty-front/src/modules/navigation/hooks/__tests__/useDeveloperModeTypingSequence.test.tsx b/packages/twenty-front/src/modules/navigation/hooks/__tests__/useLogsSwitchTypingSequence.test.tsx
similarity index 72%
rename from packages/twenty-front/src/modules/navigation/hooks/__tests__/useDeveloperModeTypingSequence.test.tsx
rename to packages/twenty-front/src/modules/navigation/hooks/__tests__/useLogsSwitchTypingSequence.test.tsx
index f48b4044021..4671770b839 100644
--- a/packages/twenty-front/src/modules/navigation/hooks/__tests__/useDeveloperModeTypingSequence.test.tsx
+++ b/packages/twenty-front/src/modules/navigation/hooks/__tests__/useLogsSwitchTypingSequence.test.tsx
@@ -3,7 +3,7 @@ import { I18nProvider } from '@lingui/react';
import { act, renderHook } from '@testing-library/react';
import { type ReactNode } from 'react';
-import { useDeveloperModeTypingSequence } from '@/navigation/hooks/useDeveloperModeTypingSequence';
+import { useLogsSwitchTypingSequence } from '@/navigation/hooks/useLogsSwitchTypingSequence';
jest.mock('framer-motion', () => ({
...jest.requireActual('framer-motion'),
@@ -17,12 +17,12 @@ const Wrapper = ({ children }: { children: ReactNode }) => (
const renderTypingSequence = () =>
renderHook(
({ isEnabled }: { isEnabled: boolean }) =>
- useDeveloperModeTypingSequence(isEnabled),
+ useLogsSwitchTypingSequence(isEnabled),
{ initialProps: { isEnabled: false }, wrapper: Wrapper },
);
-describe('useDeveloperModeTypingSequence', () => {
- it('keeps the animation started by the switch when developer mode turns on', () => {
+describe('useLogsSwitchTypingSequence', () => {
+ it('keeps the animation started by the switch when logs turns on', () => {
const { result, rerender } = renderTypingSequence();
act(() => result.current.playEnterSequence());
@@ -31,7 +31,7 @@ describe('useDeveloperModeTypingSequence', () => {
expect(result.current.isTyping).toBe(true);
});
- it('drops an animation interrupted by turning developer mode off elsewhere', () => {
+ it('drops an animation interrupted by turning logs off elsewhere', () => {
const { result, rerender } = renderTypingSequence();
act(() => result.current.playEnterSequence());
@@ -44,6 +44,6 @@ describe('useDeveloperModeTypingSequence', () => {
rerender({ isEnabled: true });
expect(result.current.isTyping).toBe(false);
- expect(result.current.displayedFrame?.text).toBe('Developer mode');
+ expect(result.current.displayedFrame?.text).toBe('Logs');
});
});
diff --git a/packages/twenty-front/src/modules/navigation/hooks/useDeveloperModeTypingSequence.ts b/packages/twenty-front/src/modules/navigation/hooks/useLogsSwitchTypingSequence.ts
similarity index 56%
rename from packages/twenty-front/src/modules/navigation/hooks/useDeveloperModeTypingSequence.ts
rename to packages/twenty-front/src/modules/navigation/hooks/useLogsSwitchTypingSequence.ts
index 942eca91fdf..426c3bb8f27 100644
--- a/packages/twenty-front/src/modules/navigation/hooks/useDeveloperModeTypingSequence.ts
+++ b/packages/twenty-front/src/modules/navigation/hooks/useLogsSwitchTypingSequence.ts
@@ -1,17 +1,17 @@
-import { DEVELOPER_MODE_PHRASES } from '@/navigation/constants/DeveloperModePhrases';
-import { type DeveloperModeTypingSequence } from '@/navigation/types/DeveloperModeTypingSequence';
-import { getDeveloperModeDisplayedFrame } from '@/navigation/utils/getDeveloperModeDisplayedFrame';
-import { getDeveloperModeEnterFrames } from '@/navigation/utils/getDeveloperModeEnterFrames';
-import { getDeveloperModeExitFrames } from '@/navigation/utils/getDeveloperModeExitFrames';
-import { getNextDeveloperModePhraseIndex } from '@/navigation/utils/getNextDeveloperModePhraseIndex';
+import { LOGS_SWITCH_PHRASES } from '@/navigation/constants/LogsSwitchPhrases';
+import { type LogsSwitchTypingSequence } from '@/navigation/types/LogsSwitchTypingSequence';
+import { getLogsSwitchDisplayedFrame } from '@/navigation/utils/getLogsSwitchDisplayedFrame';
+import { getLogsSwitchEnterFrames } from '@/navigation/utils/getLogsSwitchEnterFrames';
+import { getLogsSwitchExitFrames } from '@/navigation/utils/getLogsSwitchExitFrames';
+import { getNextLogsSwitchPhraseIndex } from '@/navigation/utils/getNextLogsSwitchPhraseIndex';
import { useLingui } from '@lingui/react/macro';
import { useReducedMotion } from 'framer-motion';
import { useState } from 'react';
-export const useDeveloperModeTypingSequence = (isEnabled: boolean) => {
+export const useLogsSwitchTypingSequence = (isEnabled: boolean) => {
const { t } = useLingui();
const shouldReduceMotion = useReducedMotion();
- const [sequence, setSequence] = useState<DeveloperModeTypingSequence | null>(
+ const [sequence, setSequence] = useState<LogsSwitchTypingSequence | null>(
null,
);
const [previousPhraseIndex, setPreviousPhraseIndex] = useState<number | null>(
@@ -27,7 +27,7 @@ export const useDeveloperModeTypingSequence = (isEnabled: boolean) => {
}
}
- const label = t`Developer mode`;
+ const label = t`Logs`;
const isEntering =
sequence?.direction === 'enter' &&
sequence.index < sequence.frames.length - 1;
@@ -38,17 +38,17 @@ export const useDeveloperModeTypingSequence = (isEnabled: boolean) => {
return;
}
- const phraseIndex = getNextDeveloperModePhraseIndex({
- phraseCount: DEVELOPER_MODE_PHRASES.length,
+ const phraseIndex = getNextLogsSwitchPhraseIndex({
+ phraseCount: LOGS_SWITCH_PHRASES.length,
previousPhraseIndex,
});
setPreviousPhraseIndex(phraseIndex);
setSequence({
direction: 'enter',
- frames: getDeveloperModeEnterFrames({
+ frames: getLogsSwitchEnterFrames({
label,
- phrase: t(DEVELOPER_MODE_PHRASES[phraseIndex]),
+ phrase: t(LOGS_SWITCH_PHRASES[phraseIndex]),
}),
index: 0,
});
@@ -62,7 +62,7 @@ export const useDeveloperModeTypingSequence = (isEnabled: boolean) => {
setSequence({
direction: 'exit',
- frames: getDeveloperModeExitFrames(label),
+ frames: getLogsSwitchExitFrames(label),
index: 0,
});
};
@@ -71,7 +71,7 @@ export const useDeveloperModeTypingSequence = (isEnabled: boolean) => {
label,
sequence,
setSequence,
- displayedFrame: getDeveloperModeDisplayedFrame({
+ displayedFrame: getLogsSwitchDisplayedFrame({
isEnabled,
label,
sequence,
diff --git a/packages/twenty-front/src/modules/navigation/types/DeveloperModeTypingSequence.ts b/packages/twenty-front/src/modules/navigation/types/DeveloperModeTypingSequence.ts
deleted file mode 100644
index ff2938089d1..00000000000
--- a/packages/twenty-front/src/modules/navigation/types/DeveloperModeTypingSequence.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { type DeveloperModeTypingFrame } from '@/navigation/types/DeveloperModeTypingFrame';
-
-export type DeveloperModeTypingSequence = {
- direction: 'enter' | 'exit';
- frames: DeveloperModeTypingFrame[];
- index: number;
-};
diff --git a/packages/twenty-front/src/modules/navigation/types/DeveloperModeTypingFrame.ts b/packages/twenty-front/src/modules/navigation/types/LogsSwitchTypingFrame.ts
similarity index 68%
rename from packages/twenty-front/src/modules/navigation/types/DeveloperModeTypingFrame.ts
rename to packages/twenty-front/src/modules/navigation/types/LogsSwitchTypingFrame.ts
index b80afd86b6a..7d0b0fbf45c 100644
--- a/packages/twenty-front/src/modules/navigation/types/DeveloperModeTypingFrame.ts
+++ b/packages/twenty-front/src/modules/navigation/types/LogsSwitchTypingFrame.ts
@@ -1,4 +1,4 @@
-export type DeveloperModeTypingFrame = {
+export type LogsSwitchTypingFrame = {
text: string;
codeFontStart: number;
codeFontEnd: number;
diff --git a/packages/twenty-front/src/modules/navigation/types/LogsSwitchTypingSequence.ts b/packages/twenty-front/src/modules/navigation/types/LogsSwitchTypingSequence.ts
new file mode 100644
index 00000000000..cc4fd65b286
--- /dev/null
+++ b/packages/twenty-front/src/modules/navigation/types/LogsSwitchTypingSequence.ts
@@ -0,0 +1,7 @@
+import { type LogsSwitchTypingFrame } from '@/navigation/types/LogsSwitchTypingFrame';
+
+export type LogsSwitchTypingSequence = {
+ direction: 'enter' | 'exit';
+ frames: LogsSwitchTypingFrame[];
+ index: number;
+};
diff --git a/packages/twenty-front/src/modules/navigation/utils/__tests__/getDeveloperModeDisplayedFrame.test.ts b/packages/twenty-front/src/modules/navigation/utils/__tests__/getLogsSwitchDisplayedFrame.test.ts
similarity index 58%
rename from packages/twenty-front/src/modules/navigation/utils/__tests__/getDeveloperModeDisplayedFrame.test.ts
rename to packages/twenty-front/src/modules/navigation/utils/__tests__/getLogsSwitchDisplayedFrame.test.ts
index 40be6bb227f..cd7b008c655 100644
--- a/packages/twenty-front/src/modules/navigation/utils/__tests__/getDeveloperModeDisplayedFrame.test.ts
+++ b/packages/twenty-front/src/modules/navigation/utils/__tests__/getLogsSwitchDisplayedFrame.test.ts
@@ -1,5 +1,5 @@
-import { type DeveloperModeTypingSequence } from '@/navigation/types/DeveloperModeTypingSequence';
-import { getDeveloperModeDisplayedFrame } from '@/navigation/utils/getDeveloperModeDisplayedFrame';
+import { type LogsSwitchTypingSequence } from '@/navigation/types/LogsSwitchTypingSequence';
+import { getLogsSwitchDisplayedFrame } from '@/navigation/utils/getLogsSwitchDisplayedFrame';
const frame = {
text: 'De',
@@ -9,17 +9,17 @@ const frame = {
};
const buildSequence = (
- direction: DeveloperModeTypingSequence['direction'],
-): DeveloperModeTypingSequence => ({
+ direction: LogsSwitchTypingSequence['direction'],
+): LogsSwitchTypingSequence => ({
direction,
frames: [frame, { ...frame, text: 'Dev', codeFontEnd: 3 }],
index: 0,
});
-describe('getDeveloperModeDisplayedFrame', () => {
- it('shows the label in the code font while developer mode is on and nothing plays', () => {
+describe('getLogsSwitchDisplayedFrame', () => {
+ it('shows the label in the code font while logs is on and nothing plays', () => {
expect(
- getDeveloperModeDisplayedFrame({
+ getLogsSwitchDisplayedFrame({
isEnabled: true,
label: 'Dev',
sequence: null,
@@ -32,9 +32,9 @@ describe('getDeveloperModeDisplayedFrame', () => {
});
});
- it('shows the current frame of the sequence that turns developer mode on', () => {
+ it('shows the current frame of the sequence that turns logs on', () => {
expect(
- getDeveloperModeDisplayedFrame({
+ getLogsSwitchDisplayedFrame({
isEnabled: true,
label: 'Dev',
sequence: buildSequence('enter'),
@@ -42,9 +42,9 @@ describe('getDeveloperModeDisplayedFrame', () => {
).toBe(frame);
});
- it('shows the current frame of the sequence that turns developer mode off', () => {
+ it('shows the current frame of the sequence that turns logs off', () => {
expect(
- getDeveloperModeDisplayedFrame({
+ getLogsSwitchDisplayedFrame({
isEnabled: false,
label: 'Dev',
sequence: buildSequence('exit'),
@@ -52,9 +52,9 @@ describe('getDeveloperModeDisplayedFrame', () => {
).toBe(frame);
});
- it('shows the plain label once developer mode is off', () => {
+ it('shows the plain label once logs is off', () => {
expect(
- getDeveloperModeDisplayedFrame({
+ getLogsSwitchDisplayedFrame({
isEnabled: false,
label: 'Dev',
sequence: buildSequence('enter'),
@@ -66,7 +66,7 @@ describe('getDeveloperModeDisplayedFrame', () => {
const finishedSequence = { ...buildSequence('enter'), index: 1 };
expect(
- getDeveloperModeDisplayedFrame({
+ getLogsSwitchDisplayedFrame({
isEnabled: true,
label: 'Développeur',
sequence: finishedSequence,
@@ -79,9 +79,9 @@ describe('getDeveloperModeDisplayedFrame', () => {
});
});
- it('shows the plain label once the sequence that turns developer mode off has finished', () => {
+ it('shows the plain label once the sequence that turns logs off has finished', () => {
expect(
- getDeveloperModeDisplayedFrame({
+ getLogsSwitchDisplayedFrame({
isEnabled: false,
label: 'Dev',
sequence: { ...buildSequence('exit'), index: 1 },
diff --git a/packages/twenty-front/src/modules/navigation/utils/__tests__/getDeveloperModeEnterFrames.test.ts b/packages/twenty-front/src/modules/navigation/utils/__tests__/getLogsSwitchEnterFrames.test.ts
similarity index 85%
rename from packages/twenty-front/src/modules/navigation/utils/__tests__/getDeveloperModeEnterFrames.test.ts
rename to packages/twenty-front/src/modules/navigation/utils/__tests__/getLogsSwitchEnterFrames.test.ts
index 0f58070e739..9a8b57b3bfe 100644
--- a/packages/twenty-front/src/modules/navigation/utils/__tests__/getDeveloperModeEnterFrames.test.ts
+++ b/packages/twenty-front/src/modules/navigation/utils/__tests__/getLogsSwitchEnterFrames.test.ts
@@ -1,7 +1,7 @@
-import { getDeveloperModeEnterFrames } from '@/navigation/utils/getDeveloperModeEnterFrames';
+import { getLogsSwitchEnterFrames } from '@/navigation/utils/getLogsSwitchEnterFrames';
-describe('getDeveloperModeEnterFrames', () => {
- const frames = getDeveloperModeEnterFrames({ label: 'Dev', phrase: 'hi' });
+describe('getLogsSwitchEnterFrames', () => {
+ const frames = getLogsSwitchEnterFrames({ label: 'Dev', phrase: 'hi' });
it('switches the label to the code font letter by letter before erasing it', () => {
expect(
diff --git a/packages/twenty-front/src/modules/navigation/utils/__tests__/getDeveloperModeExitFrames.test.ts b/packages/twenty-front/src/modules/navigation/utils/__tests__/getLogsSwitchExitFrames.test.ts
similarity index 65%
rename from packages/twenty-front/src/modules/navigation/utils/__tests__/getDeveloperModeExitFrames.test.ts
rename to packages/twenty-front/src/modules/navigation/utils/__tests__/getLogsSwitchExitFrames.test.ts
index 6c100e010e2..3a679d25dac 100644
--- a/packages/twenty-front/src/modules/navigation/utils/__tests__/getDeveloperModeExitFrames.test.ts
+++ b/packages/twenty-front/src/modules/navigation/utils/__tests__/getLogsSwitchExitFrames.test.ts
@@ -1,9 +1,9 @@
-import { getDeveloperModeExitFrames } from '@/navigation/utils/getDeveloperModeExitFrames';
+import { getLogsSwitchExitFrames } from '@/navigation/utils/getLogsSwitchExitFrames';
-describe('getDeveloperModeExitFrames', () => {
+describe('getLogsSwitchExitFrames', () => {
it('switches the label back to the regular font letter by letter', () => {
expect(
- getDeveloperModeExitFrames('Dev').map(
+ getLogsSwitchExitFrames('Dev').map(
({ text, codeFontStart, codeFontEnd }) => [
text,
codeFontStart,
diff --git a/packages/twenty-front/src/modules/navigation/utils/__tests__/getNextDeveloperModePhraseIndex.test.ts b/packages/twenty-front/src/modules/navigation/utils/__tests__/getNextLogsSwitchPhraseIndex.test.ts
similarity index 77%
rename from packages/twenty-front/src/modules/navigation/utils/__tests__/getNextDeveloperModePhraseIndex.test.ts
rename to packages/twenty-front/src/modules/navigation/utils/__tests__/getNextLogsSwitchPhraseIndex.test.ts
index 7d67b55141f..2b5a9702949 100644
--- a/packages/twenty-front/src/modules/navigation/utils/__tests__/getNextDeveloperModePhraseIndex.test.ts
+++ b/packages/twenty-front/src/modules/navigation/utils/__tests__/getNextLogsSwitchPhraseIndex.test.ts
@@ -1,6 +1,6 @@
-import { getNextDeveloperModePhraseIndex } from '@/navigation/utils/getNextDeveloperModePhraseIndex';
+import { getNextLogsSwitchPhraseIndex } from '@/navigation/utils/getNextLogsSwitchPhraseIndex';
-describe('getNextDeveloperModePhraseIndex', () => {
+describe('getNextLogsSwitchPhraseIndex', () => {
afterEach(() => {
jest.restoreAllMocks();
});
@@ -9,7 +9,7 @@ describe('getNextDeveloperModePhraseIndex', () => {
jest.spyOn(Math, 'random').mockReturnValue(0.99);
expect(
- getNextDeveloperModePhraseIndex({
+ getNextLogsSwitchPhraseIndex({
phraseCount: 8,
previousPhraseIndex: null,
}),
@@ -27,7 +27,7 @@ describe('getNextDeveloperModePhraseIndex', () => {
previousPhraseIndex < 8;
previousPhraseIndex++
) {
- const phraseIndex = getNextDeveloperModePhraseIndex({
+ const phraseIndex = getNextLogsSwitchPhraseIndex({
phraseCount: 8,
previousPhraseIndex,
});
diff --git a/packages/twenty-front/src/modules/navigation/utils/getDeveloperModeCodeFontFrame.ts b/packages/twenty-front/src/modules/navigation/utils/getDeveloperModeCodeFontFrame.ts
deleted file mode 100644
index 9a4ad350600..00000000000
--- a/packages/twenty-front/src/modules/navigation/utils/getDeveloperModeCodeFontFrame.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { type DeveloperModeTypingFrame } from '@/navigation/types/DeveloperModeTypingFrame';
-
-export const getDeveloperModeCodeFontFrame = ({
- text,
- delayAfterMs,
-}: {
- text: string;
- delayAfterMs: number;
-}): DeveloperModeTypingFrame => ({
- text,
- codeFontStart: 0,
- codeFontEnd: text.length,
- delayAfterMs,
-});
diff --git a/packages/twenty-front/src/modules/navigation/utils/getDeveloperModeEnterFrames.ts b/packages/twenty-front/src/modules/navigation/utils/getDeveloperModeEnterFrames.ts
deleted file mode 100644
index f8964e1fff8..00000000000
--- a/packages/twenty-front/src/modules/navigation/utils/getDeveloperModeEnterFrames.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-import { DEVELOPER_MODE_TYPING_DELAYS_IN_MS } from '@/navigation/constants/DeveloperModeTypingDelaysInMs';
-import { type DeveloperModeTypingFrame } from '@/navigation/types/DeveloperModeTypingFrame';
-import { getDeveloperModeCodeFontFrame } from '@/navigation/utils/getDeveloperModeCodeFontFrame';
-
-const getCodeFontSweepFrames = (text: string): DeveloperModeTypingFrame[] =>
- Array.from({ length: text.length }, (_, index) => ({
- text,
- codeFontStart: 0,
- codeFontEnd: index + 1,
- delayAfterMs: DEVELOPER_MODE_TYPING_DELAYS_IN_MS.codeFontSweepLetter,
- }));
-
-const getTypedFrames = (text: string) =>
- Array.from({ length: text.length }, (_, index) =>
- getDeveloperModeCodeFontFrame({
- text: text.slice(0, index + 1),
- delayAfterMs: DEVELOPER_MODE_TYPING_DELAYS_IN_MS.typedLetter,
- }),
- );
-
-const getErasedFrames = (text: string) =>
- Array.from({ length: text.length }, (_, index) =>
- getDeveloperModeCodeFontFrame({
- text: text.slice(0, text.length - index - 1),
- delayAfterMs: DEVELOPER_MODE_TYPING_DELAYS_IN_MS.erasedLetter,
- }),
- );
-
-const holdLastFrame = ({
- frames,
- holdMs,
-}: {
- frames: DeveloperModeTypingFrame[];
- holdMs: number;
-}): DeveloperModeTypingFrame[] =>
- frames.map((frame, index) =>
- index === frames.length - 1 ? { ...frame, delayAfterMs: holdMs } : frame,
- );
-
-export const getDeveloperModeEnterFrames = ({
- label,
- phrase,
-}: {
- label: string;
- phrase: string;
-}): DeveloperModeTypingFrame[] => [
- ...holdLastFrame({
- frames: getCodeFontSweepFrames(label),
- holdMs: DEVELOPER_MODE_TYPING_DELAYS_IN_MS.codeFontSweepHold,
- }),
- ...holdLastFrame({
- frames: getErasedFrames(label),
- holdMs: DEVELOPER_MODE_TYPING_DELAYS_IN_MS.erasedHold,
- }),
- ...holdLastFrame({
- frames: getTypedFrames(phrase),
- holdMs: DEVELOPER_MODE_TYPING_DELAYS_IN_MS.phraseHold,
- }),
- ...holdLastFrame({
- frames: getErasedFrames(phrase),
- holdMs: DEVELOPER_MODE_TYPING_DELAYS_IN_MS.erasedHold,
- }),
- ...getTypedFrames(label),
-];
diff --git a/packages/twenty-front/src/modules/navigation/utils/getDeveloperModeExitFrames.ts b/packages/twenty-front/src/modules/navigation/utils/getDeveloperModeExitFrames.ts
deleted file mode 100644
index 97655372d5f..00000000000
--- a/packages/twenty-front/src/modules/navigation/utils/getDeveloperModeExitFrames.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { DEVELOPER_MODE_TYPING_DELAYS_IN_MS } from '@/navigation/constants/DeveloperModeTypingDelaysInMs';
-import { type DeveloperModeTypingFrame } from '@/navigation/types/DeveloperModeTypingFrame';
-
-export const getDeveloperModeExitFrames = (
- label: string,
-): DeveloperModeTypingFrame[] =>
- Array.from({ length: label.length + 1 }, (_, index) => ({
- text: label,
- codeFontStart: index,
- codeFontEnd: label.length,
- delayAfterMs: DEVELOPER_MODE_TYPING_DELAYS_IN_MS.codeFontSweepLetter,
- }));
diff --git a/packages/twenty-front/src/modules/navigation/utils/getLogsSwitchCodeFontFrame.ts b/packages/twenty-front/src/modules/navigation/utils/getLogsSwitchCodeFontFrame.ts
new file mode 100644
index 00000000000..d541a6064ef
--- /dev/null
+++ b/packages/twenty-front/src/modules/navigation/utils/getLogsSwitchCodeFontFrame.ts
@@ -0,0 +1,14 @@
+import { type LogsSwitchTypingFrame } from '@/navigation/types/LogsSwitchTypingFrame';
+
+export const getLogsSwitchCodeFontFrame = ({
+ text,
+ delayAfterMs,
+}: {
+ text: string;
+ delayAfterMs: number;
+}): LogsSwitchTypingFrame => ({
+ text,
+ codeFontStart: 0,
+ codeFontEnd: text.length,
+ delayAfterMs,
+});
diff --git a/packages/twenty-front/src/modules/navigation/utils/getDeveloperModeDisplayedFrame.ts b/packages/twenty-front/src/modules/navigation/utils/getLogsSwitchDisplayedFrame.ts
similarity index 52%
rename from packages/twenty-front/src/modules/navigation/utils/getDeveloperModeDisplayedFrame.ts
rename to packages/twenty-front/src/modules/navigation/utils/getLogsSwitchDisplayedFrame.ts
index 2d7a6070fe2..f81d0ffd4a8 100644
--- a/packages/twenty-front/src/modules/navigation/utils/getDeveloperModeDisplayedFrame.ts
+++ b/packages/twenty-front/src/modules/navigation/utils/getLogsSwitchDisplayedFrame.ts
@@ -1,17 +1,17 @@
-import { type DeveloperModeTypingFrame } from '@/navigation/types/DeveloperModeTypingFrame';
-import { type DeveloperModeTypingSequence } from '@/navigation/types/DeveloperModeTypingSequence';
-import { getDeveloperModeCodeFontFrame } from '@/navigation/utils/getDeveloperModeCodeFontFrame';
+import { type LogsSwitchTypingFrame } from '@/navigation/types/LogsSwitchTypingFrame';
+import { type LogsSwitchTypingSequence } from '@/navigation/types/LogsSwitchTypingSequence';
+import { getLogsSwitchCodeFontFrame } from '@/navigation/utils/getLogsSwitchCodeFontFrame';
import { isDefined } from 'twenty-shared/utils';
-export const getDeveloperModeDisplayedFrame = ({
+export const getLogsSwitchDisplayedFrame = ({
isEnabled,
label,
sequence,
}: {
isEnabled: boolean;
label: string;
- sequence: DeveloperModeTypingSequence | null;
-}): DeveloperModeTypingFrame | null => {
+ sequence: LogsSwitchTypingSequence | null;
+}): LogsSwitchTypingFrame | null => {
const isSequenceRunning =
isDefined(sequence) && sequence.index < sequence.frames.length - 1;
const sequenceFrame = isSequenceRunning
@@ -28,5 +28,5 @@ export const getDeveloperModeDisplayedFrame = ({
return sequenceFrame;
}
- return getDeveloperModeCodeFontFrame({ text: label, delayAfterMs: 0 });
+ return getLogsSwitchCodeFontFrame({ text: label, delayAfterMs: 0 });
};
diff --git a/packages/twenty-front/src/modules/navigation/utils/getLogsSwitchEnterFrames.ts b/packages/twenty-front/src/modules/navigation/utils/getLogsSwitchEnterFrames.ts
new file mode 100644
index 00000000000..efd50c67caa
--- /dev/null
+++ b/packages/twenty-front/src/modules/navigation/utils/getLogsSwitchEnterFrames.ts
@@ -0,0 +1,64 @@
+import { LOGS_SWITCH_TYPING_DELAYS_IN_MS } from '@/navigation/constants/LogsSwitchTypingDelaysInMs';
+import { type LogsSwitchTypingFrame } from '@/navigation/types/LogsSwitchTypingFrame';
+import { getLogsSwitchCodeFontFrame } from '@/navigation/utils/getLogsSwitchCodeFontFrame';
+
+const getCodeFontSweepFrames = (text: string): LogsSwitchTypingFrame[] =>
+ Array.from({ length: text.length }, (_, index) => ({
+ text,
+ codeFontStart: 0,
+ codeFontEnd: index + 1,
+ delayAfterMs: LOGS_SWITCH_TYPING_DELAYS_IN_MS.codeFontSweepLetter,
+ }));
+
+const getTypedFrames = (text: string) =>
+ Array.from({ length: text.length }, (_, index) =>
+ getLogsSwitchCodeFontFrame({
+ text: text.slice(0, index + 1),
+ delayAfterMs: LOGS_SWITCH_TYPING_DELAYS_IN_MS.typedLetter,
+ }),
+ );
+
+const getErasedFrames = (text: string) =>
+ Array.from({ length: text.length }, (_, index) =>
+ getLogsSwitchCodeFontFrame({
+ text: text.slice(0, text.length - index - 1),
+ delayAfterMs: LOGS_SWITCH_TYPING_DELAYS_IN_MS.erasedLetter,
+ }),
+ );
+
+const holdLastFrame = ({
+ frames,
+ holdMs,
+}: {
+ frames: LogsSwitchTypingFrame[];
+ holdMs: number;
+}): LogsSwitchTypingFrame[] =>
+ frames.map((frame, index) =>
+ index === frames.length - 1 ? { ...frame, delayAfterMs: holdMs } : frame,
+ );
+
+export const getLogsSwitchEnterFrames = ({
+ label,
+ phrase,
+}: {
+ label: string;
+ phrase: string;
+}): LogsSwitchTypingFrame[] => [
+ ...holdLastFrame({
+ frames: getCodeFontSweepFrames(label),
+ holdMs: LOGS_SWITCH_TYPING_DELAYS_IN_MS.codeFontSweepHold,
+ }),
+ ...holdLastFrame({
+ frames: getErasedFrames(label),
+ holdMs: LOGS_SWITCH_TYPING_DELAYS_IN_MS.erasedHold,
+ }),
+ ...holdLastFrame({
+ frames: getTypedFrames(phrase),
+ holdMs: LOGS_SWITCH_TYPING_DELAYS_IN_MS.phraseHold,
+ }),
+ ...holdLastFrame({
+ frames: getErasedFrames(phrase),
+ holdMs: LOGS_SWITCH_TYPING_DELAYS_IN_MS.erasedHold,
+ }),
+ ...getTypedFrames(label),
+];
diff --git a/packages/twenty-front/src/modules/navigation/utils/getLogsSwitchExitFrames.ts b/packages/twenty-front/src/modules/navigation/utils/getLogsSwitchExitFrames.ts
new file mode 100644
index 00000000000..b269212e722
--- /dev/null
+++ b/packages/twenty-front/src/modules/navigation/utils/getLogsSwitchExitFrames.ts
@@ -0,0 +1,12 @@
+import { LOGS_SWITCH_TYPING_DELAYS_IN_MS } from '@/navigation/constants/LogsSwitchTypingDelaysInMs';
+import { type LogsSwitchTypingFrame } from '@/navigation/types/LogsSwitchTypingFrame';
+
+export const getLogsSwitchExitFrames = (
+ label: string,
+): LogsSwitchTypingFrame[] =>
+ Array.from({ length: label.length + 1 }, (_, index) => ({
+ text: label,
+ codeFontStart: index,
+ codeFontEnd: label.length,
+ delayAfterMs: LOGS_SWITCH_TYPING_DELAYS_IN_MS.codeFontSweepLetter,
+ }));
diff --git a/packages/twenty-front/src/modules/navigation/utils/getNextDeveloperModePhraseIndex.ts b/packages/twenty-front/src/modules/navigation/utils/getNextLogsSwitchPhraseIndex.ts
similarity index 89%
rename from packages/twenty-front/src/modules/navigation/utils/getNextDeveloperModePhraseIndex.ts
rename to packages/twenty-front/src/modules/navigation/utils/getNextLogsSwitchPhraseIndex.ts
index 11614203efa..108b072de0d 100644
--- a/packages/twenty-front/src/modules/navigation/utils/getNextDeveloperModePhraseIndex.ts
+++ b/packages/twenty-front/src/modules/navigation/utils/getNextLogsSwitchPhraseIndex.ts
@@ -1,6 +1,6 @@
import { isDefined } from 'twenty-shared/utils';
-export const getNextDeveloperModePhraseIndex = ({
+export const getNextLogsSwitchPhraseIndex = ({
phraseCount,
previousPhraseIndex,
}: {
diff --git a/packages/twenty-front/src/modules/object-core/agents/hooks/__tests__/useCoreAgents.test.tsx b/packages/twenty-front/src/modules/object-core/agents/hooks/__tests__/useCoreAgents.test.tsx
index 14a7834bcfc..5d5d1bc255e 100644
--- a/packages/twenty-front/src/modules/object-core/agents/hooks/__tests__/useCoreAgents.test.tsx
+++ b/packages/twenty-front/src/modules/object-core/agents/hooks/__tests__/useCoreAgents.test.tsx
@@ -4,7 +4,7 @@ import { Provider as JotaiProvider } from 'jotai';
import { type ReactNode } from 'react';
import { useCoreAgents } from '@/object-core/agents/hooks/useCoreAgents';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
+import { shouldShowSystemCoreAgentsState } from '@/object-core/agents/states/shouldShowSystemCoreAgentsState';
import {
jotaiStore,
resetJotaiStore,
@@ -69,9 +69,9 @@ const Wrapper = ({ children }: { children: ReactNode }) => (
</JotaiProvider>
);
-const renderCoreAgents = (isAdvancedModeEnabled: boolean) => {
+const renderCoreAgents = (includeSystem: boolean) => {
resetJotaiStore();
- jotaiStore.set(isAdvancedModeEnabledState.atom, isAdvancedModeEnabled);
+ jotaiStore.set(shouldShowSystemCoreAgentsState.atom, includeSystem);
return renderHook(() => useCoreAgents({ tableId: 'core-agents-test' }), {
wrapper: Wrapper,
@@ -79,7 +79,7 @@ const renderCoreAgents = (isAdvancedModeEnabled: boolean) => {
};
describe('useCoreAgents', () => {
- it('leaves system agents out outside developer mode', async () => {
+ it('leaves system agents out by default', async () => {
const { result } = renderCoreAgents(false);
await waitFor(() => expect(result.current.isInitialLoading).toBe(false));
@@ -87,9 +87,10 @@ describe('useCoreAgents', () => {
expect(result.current.coreAgents.map(({ label }) => label)).toEqual([
'Lead qualifier',
]);
+ expect(result.current.hasSystemAgents).toBe(true);
});
- it('lists system agents in developer mode, most recently updated first', async () => {
+ it('lists system agents once the system filter is removed, most recently updated first', async () => {
const { result } = renderCoreAgents(true);
await waitFor(() => expect(result.current.isInitialLoading).toBe(false));
diff --git a/packages/twenty-front/src/modules/object-core/agents/hooks/useCoreAgents.ts b/packages/twenty-front/src/modules/object-core/agents/hooks/useCoreAgents.ts
index 9d0edee7693..ad03b60da3c 100644
--- a/packages/twenty-front/src/modules/object-core/agents/hooks/useCoreAgents.ts
+++ b/packages/twenty-front/src/modules/object-core/agents/hooks/useCoreAgents.ts
@@ -3,11 +3,11 @@ import { useMemo } from 'react';
import { isDefined } from 'twenty-shared/utils';
import { CORE_AGENT_TABLE_COLUMNS } from '@/object-core/agents/constants/CoreAgentTableColumns';
+import { shouldShowSystemCoreAgentsState } from '@/object-core/agents/states/shouldShowSystemCoreAgentsState';
import { type CoreAgent } from '@/object-core/agents/types/CoreAgent';
import { useSortedArray } from '@/ui/layout/table/hooks/useSortedArray';
import { type TableFieldMetadata } from '@/ui/layout/table/types/TableFieldMetadata';
import { type TableSortValue } from '@/ui/layout/table/types/TableSortValue';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { FindManyAgentsDocument } from '~/generated-metadata/graphql';
@@ -28,7 +28,9 @@ export const useCoreAgents = ({
}: {
tableId?: string;
} = {}) => {
- const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
+ const shouldShowSystemCoreAgents = useAtomStateValue(
+ shouldShowSystemCoreAgentsState,
+ );
// Workflow steps and the agent page create and delete agents without touching this query's cache
const { data, loading, error } = useQuery(FindManyAgentsDocument, {
@@ -38,9 +40,13 @@ export const useCoreAgents = ({
const listedAgents = useMemo(
() =>
(data?.findManyAgents ?? []).filter(
- (agent) => !agent.isSystem || isAdvancedModeEnabled,
+ (agent) => !agent.isSystem || shouldShowSystemCoreAgents,
),
- [data?.findManyAgents, isAdvancedModeEnabled],
+ [data?.findManyAgents, shouldShowSystemCoreAgents],
+ );
+
+ const hasSystemAgents = (data?.findManyAgents ?? []).some(
+ (agent) => agent.isSystem,
);
const tableMetadata = useMemo(
@@ -56,6 +62,7 @@ export const useCoreAgents = ({
return {
coreAgents,
+ hasSystemAgents,
isInitialLoading: loading && !isDefined(data),
error,
};
diff --git a/packages/twenty-front/src/modules/object-core/agents/states/shouldShowSystemCoreAgentsState.ts b/packages/twenty-front/src/modules/object-core/agents/states/shouldShowSystemCoreAgentsState.ts
new file mode 100644
index 00000000000..1dd332738f3
--- /dev/null
+++ b/packages/twenty-front/src/modules/object-core/agents/states/shouldShowSystemCoreAgentsState.ts
@@ -0,0 +1,6 @@
+import { createAtomState } from '@/ui/utilities/state/jotai/utils/createAtomState';
+
+export const shouldShowSystemCoreAgentsState = createAtomState<boolean>({
+ key: 'shouldShowSystemCoreAgentsState',
+ defaultValue: false,
+});
diff --git a/packages/twenty-front/src/modules/object-core/components/CoreObjectSystemFilterChip.tsx b/packages/twenty-front/src/modules/object-core/components/CoreObjectSystemFilterChip.tsx
new file mode 100644
index 00000000000..3b3360d482d
--- /dev/null
+++ b/packages/twenty-front/src/modules/object-core/components/CoreObjectSystemFilterChip.tsx
@@ -0,0 +1,24 @@
+import { useLingui } from '@lingui/react/macro';
+import { IconSettings } from 'twenty-ui/icon';
+
+import { SortOrFilterChip } from '@/views/components/SortOrFilterChip';
+
+type CoreObjectSystemFilterChipProps = {
+ onRemove: () => void;
+};
+
+export const CoreObjectSystemFilterChip = ({
+ onRemove,
+}: CoreObjectSystemFilterChipProps) => {
+ const { t } = useLingui();
+
+ return (
+ <SortOrFilterChip
+ type="filter"
+ labelValue={t`Not system`}
+ Icon={IconSettings}
+ testId="core-object-system-filter"
+ onRemove={onRemove}
+ />
+ );
+};
diff --git a/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowsFilterBar.tsx b/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowsFilterBar.tsx
index 3283fa3b879..2c47e8647ca 100644
--- a/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowsFilterBar.tsx
+++ b/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowsFilterBar.tsx
@@ -4,9 +4,11 @@ import { IconFilter } from 'twenty-ui/icon';
import { IconButton } from 'twenty-ui/components/input';
import { themeCssVariables } from 'twenty-ui/theme';
+import { CoreObjectSystemFilterChip } from '@/object-core/components/CoreObjectSystemFilterChip';
import { findCoreWorkflowFilterField } from '@/object-core/workflows/utils/findCoreWorkflowFilterField';
import { useOpenCoreWorkflowFiltersSidePanel } from '@/object-core/workflows/hooks/useOpenCoreWorkflowFiltersSidePanel';
import { coreWorkflowsFilterSettingsState } from '@/object-core/workflows/states/coreWorkflowsFilterSettingsState';
+import { shouldShowSystemCoreWorkflowsState } from '@/object-core/workflows/states/shouldShowSystemCoreWorkflowsState';
import { getCoreWorkflowFilterChipLabel } from '@/object-core/workflows/utils/getCoreWorkflowFilterChipLabel';
import { isUsableCoreWorkflowFilterRule } from '@/object-core/workflows/utils/isUsableCoreWorkflowFilterRule';
import { MAX_CORE_WORKFLOW_FILTER_RULES } from 'twenty-shared/constants';
@@ -30,6 +32,8 @@ export const CoreWorkflowsFilterBar = () => {
const [coreWorkflowsFilterSettings, setCoreWorkflowsFilterSettings] =
useAtomState(coreWorkflowsFilterSettingsState);
+ const [shouldShowSystemCoreWorkflows, setShouldShowSystemCoreWorkflows] =
+ useAtomState(shouldShowSystemCoreWorkflowsState);
const { userTimezone } = useUserTimezone();
const appliedStepFilters = (coreWorkflowsFilterSettings.stepFilters ?? [])
@@ -38,6 +42,11 @@ export const CoreWorkflowsFilterBar = () => {
return (
<StyledContainer>
+ {!shouldShowSystemCoreWorkflows && (
+ <CoreObjectSystemFilterChip
+ onRemove={() => setShouldShowSystemCoreWorkflows(true)}
+ />
+ )}
{appliedStepFilters.map((stepFilter) => (
<SortOrFilterChip
key={stepFilter.id}
diff --git a/packages/twenty-front/src/modules/object-core/workflows/hooks/useCoreWorkflows.ts b/packages/twenty-front/src/modules/object-core/workflows/hooks/useCoreWorkflows.ts
index 39bd97b5772..0043c4c8f86 100644
--- a/packages/twenty-front/src/modules/object-core/workflows/hooks/useCoreWorkflows.ts
+++ b/packages/twenty-front/src/modules/object-core/workflows/hooks/useCoreWorkflows.ts
@@ -5,12 +5,12 @@ import { isDefined } from 'twenty-shared/utils';
import { getToastOptionsFromError } from '@/error-handler/utils/getToastOptionsFromError';
import { coreWorkflowsFilterSettingsState } from '@/object-core/workflows/states/coreWorkflowsFilterSettingsState';
+import { shouldShowSystemCoreWorkflowsState } from '@/object-core/workflows/states/shouldShowSystemCoreWorkflowsState';
import { buildCoreWorkflowFilterInput } from '@/object-core/workflows/utils/buildCoreWorkflowFilterInput';
import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient';
import { useUserTimezone } from '@/ui/input/components/internal/date/hooks/useUserTimezone';
import { sortedFieldByTableFamilyState } from '@/ui/layout/table/states/sortedFieldByTableFamilyState';
import { type TableSortValue } from '@/ui/layout/table/types/TableSortValue';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { useToast } from 'twenty-ui/components/feedback';
@@ -87,7 +87,9 @@ export const useCoreWorkflows = ({
coreWorkflowsFilterSettingsState,
);
- const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
+ const shouldShowSystemCoreWorkflows = useAtomStateValue(
+ shouldShowSystemCoreWorkflowsState,
+ );
const { userTimezone } = useUserTimezone();
const filter = buildCoreWorkflowFilterInput({
@@ -108,7 +110,7 @@ export const useCoreWorkflows = ({
orderBy,
orderByDirection,
filter,
- includeSystem: isAdvancedModeEnabled,
+ includeSystem: shouldShowSystemCoreWorkflows,
},
},
);
diff --git a/packages/twenty-front/src/modules/object-core/workflows/states/shouldShowSystemCoreWorkflowsState.ts b/packages/twenty-front/src/modules/object-core/workflows/states/shouldShowSystemCoreWorkflowsState.ts
new file mode 100644
index 00000000000..4a761c2a22e
--- /dev/null
+++ b/packages/twenty-front/src/modules/object-core/workflows/states/shouldShowSystemCoreWorkflowsState.ts
@@ -0,0 +1,6 @@
+import { createAtomState } from '@/ui/utilities/state/jotai/utils/createAtomState';
+
+export const shouldShowSystemCoreWorkflowsState = createAtomState<boolean>({
+ key: 'shouldShowSystemCoreWorkflowsState',
+ defaultValue: false,
+});
diff --git a/packages/twenty-front/src/modules/settings/ai/constants/SettingsAiTabs.ts b/packages/twenty-front/src/modules/settings/ai/constants/SettingsAiTabs.ts
index 5161ae631fd..539a9680816 100644
--- a/packages/twenty-front/src/modules/settings/ai/constants/SettingsAiTabs.ts
+++ b/packages/twenty-front/src/modules/settings/ai/constants/SettingsAiTabs.ts
@@ -1,7 +1,7 @@
export const SETTINGS_AI_TABS = {
COMPONENT_INSTANCE_ID: 'settings-ai-tab-list',
TABS_IDS: {
- OVERVIEW: 'overview',
+ MCP: 'mcp',
MODELS: 'models',
SKILLS: 'skills',
TOOLS: 'tools',
diff --git a/packages/twenty-front/src/modules/settings/components/AdvancedSettingsContentWrapperWithDot.tsx b/packages/twenty-front/src/modules/settings/components/AdvancedSettingsContentWrapperWithDot.tsx
deleted file mode 100644
index c32fadeb2b7..00000000000
--- a/packages/twenty-front/src/modules/settings/components/AdvancedSettingsContentWrapperWithDot.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import { styled } from '@linaria/react';
-import { IconPoint } from 'twenty-ui/icon';
-import { useTheme, themeCssVariables } from 'twenty-ui/theme';
-
-const StyledWrapper = styled.div`
- position: relative;
- width: 100%;
-`;
-type DotPosition = 'top' | 'centered';
-
-type AdvancedSettingsContentWrapperWithDotProps = {
- children: React.ReactNode;
- hideDot?: boolean;
- dotPosition?: DotPosition;
-};
-
-const StyledDotContainer = styled.div<{ dotPosition: DotPosition }>`
- align-items: ${({ dotPosition }) =>
- dotPosition === 'top' ? 'stretch' : 'center'};
- display: flex;
- height: 100%;
- left: calc(-1 * ${themeCssVariables.spacing[5]});
-
- position: absolute;
- top: ${({ dotPosition }) => (dotPosition === 'top' ? '0' : 'auto')};
-`;
-
-const StyledIconPointContainer = styled.span`
- align-items: center;
- display: flex;
- margin-right: 0;
-`;
-
-export const AdvancedSettingsContentWrapperWithDot = ({
- children,
- hideDot = false,
- dotPosition = 'centered',
-}: AdvancedSettingsContentWrapperWithDotProps) => {
- const theme = useTheme();
-
- return (
- <StyledWrapper>
- {!hideDot && (
- <StyledDotContainer dotPosition={dotPosition}>
- <StyledIconPointContainer>
- <IconPoint
- size={12}
- color={theme.color.yellow}
- fill={theme.color.yellow}
- />
- </StyledIconPointContainer>
- </StyledDotContainer>
- )}
- {children}
- </StyledWrapper>
- );
-};
diff --git a/packages/twenty-front/src/modules/settings/components/AdvancedSettingsWrapper.tsx b/packages/twenty-front/src/modules/settings/components/AdvancedSettingsWrapper.tsx
deleted file mode 100644
index ce2fb0097f3..00000000000
--- a/packages/twenty-front/src/modules/settings/components/AdvancedSettingsWrapper.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import { AdvancedSettingsContentWrapperWithDot } from '@/settings/components/AdvancedSettingsContentWrapperWithDot';
-import { ADVANCED_SETTINGS_ANIMATION_DURATION } from '@/settings/constants/AdvancedSettingsAnimationDurations';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
-import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
-import { styled } from '@linaria/react';
-import { Collapsible } from 'twenty-ui/primitives/layout';
-
-const StyledContainer = styled.div`
- display: contents;
-
- // The collapsed panel unmounts but leaves its empty root, which would still
- // take a gap in the parent's layout. It stays rendered, out of the flow, so
- // the panel can measure its height when it opens again.
- > :empty {
- position: absolute;
- }
-`;
-
-const StyledContent = styled.div`
- width: 100%;
-`;
-
-type DotPosition = 'top' | 'centered';
-
-type AdvancedSettingsWrapperProps = {
- children: React.ReactNode;
- animationDimension?: 'width' | 'height';
- hideDot?: boolean;
- dotPosition?: DotPosition;
-};
-
-export const AdvancedSettingsWrapper = ({
- children,
- hideDot = false,
- dotPosition = 'centered',
- animationDimension = 'height',
-}: AdvancedSettingsWrapperProps) => {
- const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
-
- return (
- <StyledContainer>
- <Collapsible.Root open={isAdvancedModeEnabled}>
- <Collapsible.Panel
- dimension={animationDimension}
- style={{
- transitionDuration: `${ADVANCED_SETTINGS_ANIMATION_DURATION.size}s, ${ADVANCED_SETTINGS_ANIMATION_DURATION.opacity}s`,
- }}
- containAnimation={false}
- >
- <AdvancedSettingsContentWrapperWithDot
- hideDot={hideDot}
- dotPosition={dotPosition}
- >
- <StyledContent>{children}</StyledContent>
- </AdvancedSettingsContentWrapperWithDot>
- </Collapsible.Panel>
- </Collapsible.Root>
- </StyledContainer>
- );
-};
diff --git a/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItem.tsx b/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItem.tsx
index 9df0d0dbb10..0eda9cea861 100644
--- a/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItem.tsx
+++ b/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItem.tsx
@@ -1,6 +1,5 @@
import { useMatch, useResolvedPath } from 'react-router-dom';
-import { AdvancedSettingsWrapper } from '@/settings/components/AdvancedSettingsWrapper';
import { type SettingsNavigationItem } from '@/settings/hooks/useSettingsNavigationItems';
import { NavigationDrawerItem } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerItem';
import { type NavigationDrawerSubItemState } from '@/ui/navigation/navigation-drawer/types/NavigationDrawerSubItemState';
@@ -30,23 +29,6 @@ export const SettingsNavigationDrawerItem = ({
return null;
}
- if (isDefined(item.isAdvanced) && item.isAdvanced) {
- return (
- <AdvancedSettingsWrapper>
- <NavigationDrawerItem
- indentationLevel={item.indentationLevel}
- subItemState={subItemState}
- label={item.label}
- to={href}
- Icon={item.Icon}
- active={isActive}
- modifier={item.modifier}
- onClick={item.onClick}
- />
- </AdvancedSettingsWrapper>
- );
- }
-
return (
<NavigationDrawerItem
indentationLevel={item.indentationLevel}
diff --git a/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItems.tsx b/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItems.tsx
index 6fa11ae5476..7fe0e0b32db 100644
--- a/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItems.tsx
+++ b/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItems.tsx
@@ -1,4 +1,3 @@
-import { AdvancedSettingsWrapper } from '@/settings/components/AdvancedSettingsWrapper';
import { SettingsNavigationDrawerItem } from '@/settings/components/SettingsNavigationDrawerItem';
import {
type SettingsNavigationItem,
@@ -114,15 +113,6 @@ export const SettingsNavigationDrawerItems = () => {
key={section.label}
sectionId={`settings/${section.label}`}
label={section.label}
- wrapTitle={
- section.isAdvanced
- ? (titleNode) => (
- <AdvancedSettingsWrapper hideDot>
- {titleNode}
- </AdvancedSettingsWrapper>
- )
- : undefined
- }
>
{section.items.map((item, index) =>
renderSectionItem(
diff --git a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSwitch.tsx b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSwitch.tsx
index 9c10b057d5a..c23a4387974 100644
--- a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSwitch.tsx
+++ b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSwitch.tsx
@@ -13,12 +13,6 @@ import { type IconComponent } from 'twenty-ui/icon';
import { Switch } from 'twenty-ui/primitives/input';
import { themeCssVariables } from 'twenty-ui/theme';
-const StyledSwitch = styled(Switch)`
- &[data-advanced-mode] {
- color: ${themeCssVariables.color.yellow};
- }
-`;
-
const StyledSettingsCardSwitchContent = styled.div<{ disabled?: boolean }>`
align-items: center;
background-color: ${themeCssVariables.background.secondary};
@@ -53,7 +47,6 @@ type SettingsOptionCardContentSwitchProps = {
description?: string;
divider?: boolean;
disabled?: boolean;
- advancedMode?: boolean;
checked: boolean;
onChange: (checked: boolean) => void;
};
@@ -64,7 +57,6 @@ export const SettingsOptionCardContentSwitch = ({
description,
divider,
disabled = false,
- advancedMode = false,
checked,
onChange,
}: SettingsOptionCardContentSwitchProps) => {
@@ -92,13 +84,12 @@ export const SettingsOptionCardContentSwitch = ({
)}
</StyledSettingsCardTextContainer>
<StyledSettingsCardSwitchButtonContainer>
- <StyledSwitch
+ <Switch
id={switchId}
checked={checked}
onCheckedChange={onChange}
disabled={disabled}
size="sm"
- data-advanced-mode={advancedMode || undefined}
/>
</StyledSettingsCardSwitchButtonContainer>
</StyledSettingsCardSwitchContent>
diff --git a/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentSwitch.stories.tsx b/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentSwitch.stories.tsx
index 7fe08869c3c..9d84cd10598 100644
--- a/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentSwitch.stories.tsx
+++ b/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentSwitch.stories.tsx
@@ -2,7 +2,7 @@ import { SettingsOptionCardContentSwitch } from '@/settings/components/SettingsO
import { styled } from '@linaria/react';
import { type Meta, type StoryObj } from '@storybook/react-vite';
import { useState } from 'react';
-import { IconBell, IconLock, IconRobot, IconUsers } from 'twenty-ui/icon';
+import { IconBell, IconLock, IconUsers } from 'twenty-ui/icon';
import { ComponentDecorator } from 'twenty-ui/testing';
const StyledContainer = styled.div`
@@ -24,7 +24,6 @@ const SettingsOptionCardContentSwitchWrapper = (
description={args.description}
divider={args.divider}
disabled={args.disabled}
- advancedMode={args.advancedMode}
/>
</StyledContainer>
);
@@ -65,16 +64,6 @@ export const Disabled: Story = {
},
};
-export const AdvancedMode: Story = {
- args: {
- Icon: IconRobot,
- title: 'Advanced Features',
- description: 'Enable experimental features',
- checked: true,
- advancedMode: true,
- },
-};
-
export const WithoutIcon: Story = {
args: {
title: 'Simple Switch',
diff --git a/packages/twenty-front/src/modules/settings/constants/AdvancedSettingsAnimationDurations.ts b/packages/twenty-front/src/modules/settings/constants/AdvancedSettingsAnimationDurations.ts
deleted file mode 100644
index 2f40f4d08e6..00000000000
--- a/packages/twenty-front/src/modules/settings/constants/AdvancedSettingsAnimationDurations.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export const ADVANCED_SETTINGS_ANIMATION_DURATION = {
- opacity: 0.2,
- size: 0.4,
-};
diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIconLabelForm.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIconLabelForm.tsx
index 96a6108d8c9..2adf66a971a 100644
--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIconLabelForm.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIconLabelForm.tsx
@@ -5,8 +5,6 @@ import { type z } from 'zod';
import { useGetIsMetadataItemCustom } from '@/object-metadata/hooks/useGetIsMetadataItemCustom';
import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';
import { fieldMetadataItemSchema } from '@/object-metadata/validation-schemas/fieldMetadataItemSchema';
-import { AdvancedSettingsContentWrapperWithDot } from '@/settings/components/AdvancedSettingsContentWrapperWithDot';
-import { AdvancedSettingsWrapper } from '@/settings/components/AdvancedSettingsWrapper';
import { SettingsOptionCardContentSwitch } from '@/settings/components/SettingsOptions/SettingsOptionCardContentSwitch';
import { IDENTIFIER_MAX_CHAR_LENGTH } from 'twenty-shared/metadata';
import { getErrorMessageFromError } from '@/object-metadata/utils/metadataLabelErrorMessages';
@@ -17,6 +15,7 @@ import { useLingui } from '@lingui/react/macro';
import { FieldMetadataType } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
import { IconInfoCircle, IconRefresh } from 'twenty-ui/icon';
+import { Collapsible } from 'twenty-ui/primitives/layout';
import { Card, Tooltip } from 'twenty-ui/primitives/surfaces';
import { useTheme, themeCssVariables } from 'twenty-ui/theme';
import { computeMetadataNameFromLabel } from '@/object-metadata/utils/computeMetadataNameFromLabel';
@@ -50,23 +49,12 @@ const StyledInputsContainer = styled.div`
width: 100%;
`;
-const StyledAdvancedSettingsSectionInputWrapper = styled.div`
- display: flex;
- flex: 1;
- flex-direction: column;
- gap: ${themeCssVariables.spacing[4]};
- width: 100%;
-`;
-
-const StyledAdvancedSettingsOuterContainer = styled.div`
+const StyledApiSettingsContainer = styled.div`
padding-top: ${themeCssVariables.spacing[4]};
`;
-const StyledAdvancedSettingsContainer = styled.div`
- display: flex;
- gap: ${themeCssVariables.spacing[2]};
- position: relative;
- width: 100%;
+const StyledApiNameInputContainer = styled.div`
+ padding-top: ${themeCssVariables.spacing[4]};
`;
type SettingsDataModelFieldIconLabelFormProps = {
@@ -109,10 +97,6 @@ export const SettingsDataModelFieldIconLabelForm = ({
? fieldMetadataItem.isLabelSyncedWithName
: true);
- const apiNameTooltipText = isLabelSyncedWithName
- ? t`Deactivate "Synchronize Objects Labels and API Names" to set a custom API name`
- : t`Input must be in camel case and cannot start with a number`;
-
const fillNameFromLabel = (label: string) => {
isDefined(label) &&
setValue('name', computeMetadataNameFromLabel(label), {
@@ -129,9 +113,6 @@ export const SettingsDataModelFieldIconLabelForm = ({
const canToggleSyncLabelWithName =
!isCreationMode && isCustomButNotRelationField;
- const isNameEditEnabled =
- isLabelSyncedWithName === false && isCustomButNotRelationField;
-
const isLabelEditEnabled =
isCreationMode ||
(!isCreationMode &&
@@ -182,93 +163,69 @@ export const SettingsDataModelFieldIconLabelForm = ({
/>
</StyledInputsContainer>
{canToggleSyncLabelWithName && (
- <AdvancedSettingsWrapper hideDot>
- <StyledAdvancedSettingsOuterContainer>
- <StyledAdvancedSettingsContainer>
- <StyledAdvancedSettingsSectionInputWrapper>
- <StyledInputsContainer>
- <Controller
- name="name"
- control={control}
- defaultValue={fieldMetadataItem?.name}
- render={({ field: { onChange, value } }) => (
- <SettingsTextInput
- instanceId={nameTextInputId}
- label={t`API Name`}
- placeholder={t`employees`}
- value={value}
- onChange={onChange}
- readOnly={readonly}
- disabled={!isNameEditEnabled}
- fullWidth
- maxLength={IDENTIFIER_MAX_CHAR_LENGTH}
- RightIcon={() =>
- apiNameTooltipText && (
- <>
- <Tooltip
- content={apiNameTooltipText}
- sideOffset={5}
- side="bottom"
- positionMethod="fixed"
- delay={TooltipDelay.shortDelay}
- >
- <IconInfoCircle
- id="info-circle-id-name"
- size={theme.icon.size.md}
- color={theme.font.color.tertiary}
- style={{ outline: 'none' }}
- />
- </Tooltip>
- </>
- )
- }
- />
- )}
- />
- </StyledInputsContainer>
+ <StyledApiSettingsContainer>
+ <Controller
+ name="isLabelSyncedWithName"
+ control={control}
+ defaultValue={fieldMetadataItem?.isLabelSyncedWithName ?? true}
+ render={({ field: { onChange, value } }) => (
+ <Card.Root rounded>
+ <SettingsOptionCardContentSwitch
+ Icon={IconRefresh}
+ title={t`Synchronize Field Label and API Name`}
+ description={t`Should changing a field's label also change the API name?`}
+ checked={value ?? true}
+ disabled={readonly}
+ onChange={(value) => {
+ onChange(value);
+ if (value) {
+ fillNameFromLabel(label);
+ }
+ }}
+ />
+ </Card.Root>
+ )}
+ />
+ <Collapsible.Root open={!isLabelSyncedWithName}>
+ <Collapsible.Panel dimension="height" containAnimation={false}>
+ <StyledApiNameInputContainer>
<Controller
- name="isLabelSyncedWithName"
+ name="name"
control={control}
- defaultValue={
- fieldMetadataItem?.isLabelSyncedWithName ?? true
- }
+ defaultValue={fieldMetadataItem?.name}
render={({ field: { onChange, value } }) => (
- <AdvancedSettingsContentWrapperWithDot
- hideDot={false}
- dotPosition="centered"
- >
- <Card.Root rounded>
- <SettingsOptionCardContentSwitch
- Icon={IconRefresh}
- title={t`Synchronize Field Label and API Name`}
- description={t`Should changing a field's label also change the API name?`}
- checked={value ?? true}
- disabled={readonly}
- advancedMode
- onChange={(value) => {
- onChange(value);
- if (!isDefined(fieldMetadataItem)) {
- return;
- }
-
- if (value === false) {
- return;
- }
-
- if (isCustomField && !isRelation) {
- fillNameFromLabel(label);
- return;
- }
- }}
- />
- </Card.Root>
- </AdvancedSettingsContentWrapperWithDot>
+ <SettingsTextInput
+ instanceId={nameTextInputId}
+ label={t`API Name`}
+ placeholder={t`employees`}
+ value={value}
+ onChange={onChange}
+ readOnly={readonly}
+ fullWidth
+ maxLength={IDENTIFIER_MAX_CHAR_LENGTH}
+ RightIcon={() => (
+ <Tooltip
+ content={t`Input must be in camel case and cannot start with a number`}
+ sideOffset={5}
+ side="bottom"
+ positionMethod="fixed"
+ delay={TooltipDelay.shortDelay}
+ >
+ <IconInfoCircle
+ id="info-circle-id-name"
+ size={theme.icon.size.md}
+ color={theme.font.color.tertiary}
+ style={{ outline: 'none' }}
+ />
+ </Tooltip>
+ )}
+ />
)}
/>
- </StyledAdvancedSettingsSectionInputWrapper>
- </StyledAdvancedSettingsContainer>
- </StyledAdvancedSettingsOuterContainer>
- </AdvancedSettingsWrapper>
+ </StyledApiNameInputContainer>
+ </Collapsible.Panel>
+ </Collapsible.Root>
+ </StyledApiSettingsContainer>
)}
</>
);
diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsx
index 2ee81dc3fa0..c0fc2bddf00 100644
--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsx
@@ -5,7 +5,6 @@ import { validateCustomDateFormat } from '@/localization/utils/validateCustomDat
import { FieldDateDisplayFormat } from '@/object-record/record-field/ui/types/FieldMetadata';
import { isDateFieldCustomDisplayFormat } from '@/object-record/record-field/ui/types/guards/isDateFieldCustomDisplayFormat';
import { SettingsOptionCardContentSelect } from '@/settings/components/SettingsOptions/SettingsOptionCardContentSelect';
-import { ADVANCED_SETTINGS_ANIMATION_DURATION } from '@/settings/constants/AdvancedSettingsAnimationDurations';
import { useDateSettingsFormInitialValues } from '@/settings/data-model/fields/forms/date/hooks/useDateSettingsFormInitialValues';
import { getDisplayFormatLabel } from '@/settings/data-model/fields/forms/date/utils/getDisplayFormatLabel';
import { Select } from '@/ui/input/components/Select';
@@ -106,13 +105,7 @@ export const SettingsDataModelFieldDateForm = ({
)}
/>
<Collapsible.Root open={showCustomFormatTextInput}>
- <Collapsible.Panel
- dimension="height"
- style={{
- transitionDuration: `${ADVANCED_SETTINGS_ANIMATION_DURATION.size}s, ${ADVANCED_SETTINGS_ANIMATION_DURATION.opacity}s`,
- }}
- containAnimation={false}
- >
+ <Collapsible.Panel dimension="height" containAnimation={false}>
<Controller
name="settings.customUnicodeDateFormat"
control={control}
diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationJunctionForm.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationJunctionForm.tsx
index dc39e8f6f54..7156b35198e 100644
--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationJunctionForm.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationJunctionForm.tsx
@@ -8,12 +8,11 @@ import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadata
import { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadataItems';
import { useFieldMetadataItemById } from '@/object-metadata/hooks/useFieldMetadataItemById';
import { findFieldMetadataItemByFieldMetadataId } from '@/object-metadata/utils/findFieldMetadataItemByFieldMetadataId';
+import { getFieldRelations } from '@/object-record/record-field/ui/utils/junction/getFieldRelations';
import { isValidJunctionTargetField } from '@/object-record/record-field/ui/utils/junction/isValidJunctionTargetField';
import { SettingsOptionCardContentSelect } from '@/settings/components/SettingsOptions/SettingsOptionCardContentSelect';
import { SettingsOptionCardContentSwitch } from '@/settings/components/SettingsOptions/SettingsOptionCardContentSwitch';
import { Select } from '@/ui/input/components/Select';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
-import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { RelationType } from '~/generated-metadata/graphql';
import { type SettingsDataModelFieldEditFormValues } from '@/settings/data-model/types/SettingsDataModelFieldEditFormValues';
@@ -32,8 +31,6 @@ export const SettingsDataModelFieldRelationJunctionForm = ({
const { watch, setValue } =
useFormContext<SettingsDataModelFieldEditFormValues>();
- const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
-
const { objectMetadataItem: sourceObjectMetadataItem } =
useObjectMetadataItem({ objectNameSingular });
@@ -47,7 +44,6 @@ export const SettingsDataModelFieldRelationJunctionForm = ({
const junctionTargetFieldId = currentSettings?.junctionTargetFieldId;
if (
- !isAdvancedModeEnabled ||
relationType !== RelationType.ONE_TO_MANY ||
targetObjectIds.length !== 1
) {
@@ -113,7 +109,18 @@ export const SettingsDataModelFieldRelationJunctionForm = ({
({ value }) => value === selectedJunctionTargetFieldId,
);
- if (junctionFieldOptions.length === 0 && !isJunctionConfigEnabled) {
+ const isJunctionLikeObject = junctionObjectMetadataItem.fields.every(
+ (field) =>
+ field.isSystem === true ||
+ getFieldRelations(field).every(
+ ({ type }) => type === RelationType.MANY_TO_ONE,
+ ),
+ );
+
+ if (
+ !isJunctionConfigEnabled &&
+ (junctionFieldOptions.length === 0 || !isJunctionLikeObject)
+ ) {
return null;
}
@@ -166,7 +173,6 @@ export const SettingsDataModelFieldRelationJunctionForm = ({
onChange={handleJunctionToggle}
disabled={disabled}
divider={isJunctionConfigEnabled && junctionFieldOptions.length > 0}
- advancedMode
/>
{isJunctionConfigEnabled && junctionFieldOptions.length > 0 && (
diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectForm.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectForm.tsx
index a86e9afd5e9..4083743f6ba 100644
--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectForm.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectForm.tsx
@@ -20,13 +20,11 @@ import { toSpliced } from '~/utils/array/toSpliced';
import { applySimpleQuotesToString } from '~/utils/string/applySimpleQuotesToString';
import { useFieldMetadataItemById } from '@/object-metadata/hooks/useFieldMetadataItemById';
-import { AdvancedSettingsWrapper } from '@/settings/components/AdvancedSettingsWrapper';
+import { computeOptionValueFromLabel } from '@/object-metadata/utils/computeOptionValueFromLabel';
import { TextArea } from '@/ui/input/components/TextArea';
import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';
import { DropdownRoot } from '@/ui/layout/dropdown/components/DropdownRoot';
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
-import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { t } from '@lingui/core/macro';
import { useEffect, useState } from 'react';
import { useSearchParams } from 'react-router-dom';
@@ -34,15 +32,16 @@ import { isDefined } from 'twenty-shared/utils';
import { LightButton, LightIconButton } from 'twenty-ui/components/input';
import { Dropdown } from 'twenty-ui/components/navigation';
import {
+ IconApi,
IconDotsVertical,
IconPencil,
IconPlus,
- IconPoint,
IconTrash,
} from 'twenty-ui/icon';
+import { Collapsible } from 'twenty-ui/primitives/layout';
import { Card } from 'twenty-ui/primitives/surfaces';
-import { useTheme, themeCssVariables } from 'twenty-ui/theme';
+import { themeCssVariables } from 'twenty-ui/theme';
import { SettingsDataModelFieldSelectFormOptionRow } from './SettingsDataModelFieldSelectFormOptionRow';
export const settingsDataModelFieldSelectFormSchema = z.object({
@@ -73,36 +72,30 @@ const StyledContainerWrapper = styled.div`
`;
const StyledOptionsLabel = styled.div<{
- isAdvancedModeEnabled: boolean;
+ isApiValuesVisible: boolean;
isBulkInputMode: boolean;
}>`
color: ${themeCssVariables.font.color.light};
font-size: ${themeCssVariables.font.size.xs};
font-weight: ${themeCssVariables.font.weight.semiBold};
margin-bottom: ${themeCssVariables.spacing['1.5']};
- margin-left: ${({ isAdvancedModeEnabled, isBulkInputMode }) =>
- isAdvancedModeEnabled && !isBulkInputMode
+ margin-left: ${({ isApiValuesVisible, isBulkInputMode }) =>
+ isApiValuesVisible && !isBulkInputMode
? themeCssVariables.spacing[10]
: themeCssVariables.spacing[0]};
margin-top: ${themeCssVariables.spacing[1]};
width: 100%;
`;
-const StyledApiKeyContainer = styled.div`
- display: flex;
- gap: ${themeCssVariables.spacing[2]};
- width: 100%;
-`;
-
-const StyledApiKey = styled.span`
+const StyledApiValuesLabel = styled.span`
color: ${themeCssVariables.font.color.light};
+ display: block;
font-size: ${themeCssVariables.font.size.xs};
font-weight: ${themeCssVariables.font.weight.semiBold};
margin-bottom: ${themeCssVariables.spacing['1.5']};
margin-top: ${themeCssVariables.spacing[1]};
+ padding-left: ${themeCssVariables.spacing[5]};
white-space: nowrap;
-
- width: 100%;
`;
const StyledLabelContainer = styled.div`
@@ -111,21 +104,6 @@ const StyledLabelContainer = styled.div`
width: 100%;
`;
-const StyledIconContainer = styled.div`
- align-items: center;
- border-right: 1px solid ${themeCssVariables.color.yellow};
- display: flex;
-
- margin-bottom: ${themeCssVariables.spacing['1.5']};
- margin-top: ${themeCssVariables.spacing[1]};
-`;
-
-const StyledIconPointContainer = styled.span`
- align-items: center;
- display: flex;
- margin-right: ${themeCssVariables.spacing['0.5']};
-`;
-
const StyledFooter = styled(Card.Footer)`
background-color: ${themeCssVariables.background.secondary};
padding: ${themeCssVariables.spacing[1]};
@@ -163,7 +141,6 @@ export const SettingsDataModelFieldSelectForm = ({
fieldType,
disabled = false,
}: SettingsDataModelFieldSelectFormProps) => {
- const theme = useTheme();
const { initialDefaultValue, initialOptions } =
useSelectSettingsFormInitialValues({
fieldMetadataId: existingFieldMetadataId,
@@ -173,8 +150,6 @@ export const SettingsDataModelFieldSelectForm = ({
);
const isNullable = fieldMetadataItem?.isNullable;
- const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
-
const [searchParams] = useSearchParams();
const {
@@ -187,6 +162,11 @@ export const SettingsDataModelFieldSelectForm = ({
const [hasAppliedNewOption, setHasAppliedNewOption] = useState(false);
const [isBulkInputMode, setIsBulkInputMode] = useState(false);
const [bulkInputText, setBulkInputText] = useState('');
+ const [isApiValuesVisible, setIsApiValuesVisible] = useState(() =>
+ initialOptions.some(
+ (option) => option.value !== computeOptionValueFromLabel(option.label),
+ ),
+ );
const OPTIONS_DROPDOWN_ID =
'settings-data-model-field-select-options-dropdown';
@@ -333,27 +313,18 @@ export const SettingsDataModelFieldSelectForm = ({
<Card.Content>
<StyledOptionsHeaderContainer>
<StyledLabelContainer>
- {!isBulkInputMode && (
- <AdvancedSettingsWrapper
- animationDimension="width"
- hideDot
+ <Collapsible.Root
+ open={isApiValuesVisible && !isBulkInputMode}
+ >
+ <Collapsible.Panel
+ dimension="width"
+ containAnimation={false}
>
- <StyledApiKeyContainer>
- <StyledIconContainer>
- <StyledIconPointContainer>
- <IconPoint
- size={12}
- color={theme.color.yellow}
- fill={theme.color.yellow}
- />
- </StyledIconPointContainer>
- </StyledIconContainer>
- <StyledApiKey>{t`API values`}</StyledApiKey>
- </StyledApiKeyContainer>
- </AdvancedSettingsWrapper>
- )}
+ <StyledApiValuesLabel>{t`API values`}</StyledApiValuesLabel>
+ </Collapsible.Panel>
+ </Collapsible.Root>
<StyledOptionsLabel
- isAdvancedModeEnabled={isAdvancedModeEnabled}
+ isApiValuesVisible={isApiValuesVisible}
isBulkInputMode={isBulkInputMode}
>
{t`Options`}
@@ -391,6 +362,21 @@ export const SettingsDataModelFieldSelectForm = ({
>
{isBulkInputMode ? t`Single edit` : t`Bulk edit`}
</Dropdown.ActionItem>
+ {!isBulkInputMode && (
+ <Dropdown.ActionItem
+ startIcon={<IconApi />}
+ onClick={() =>
+ setIsApiValuesVisible(
+ (currentIsApiValuesVisible) =>
+ !currentIsApiValuesVisible,
+ )
+ }
+ >
+ {isApiValuesVisible
+ ? t`Hide API values`
+ : t`Show API values`}
+ </Dropdown.ActionItem>
+ )}
<Dropdown.ActionItem
color="danger"
startIcon={<IconTrash />}
@@ -449,6 +435,7 @@ export const SettingsDataModelFieldSelectForm = ({
key={option.id}
option={option}
isNewRow={index === options.length - 1}
+ isApiValueVisible={isApiValuesVisible}
onChange={(nextOption) => {
if (disabled) {
return;
diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectFormOptionRow.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectFormOptionRow.tsx
index b3172b48624..73530b745f5 100644
--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectFormOptionRow.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectFormOptionRow.tsx
@@ -1,5 +1,4 @@
import { type FieldMetadataItemOption } from '@/object-metadata/types/FieldMetadataItem';
-import { AdvancedSettingsWrapper } from '@/settings/components/AdvancedSettingsWrapper';
import { OPTION_VALUE_MAXIMUM_LENGTH } from '@/settings/data-model/constants/OptionValueMaximumLength';
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';
@@ -17,6 +16,7 @@ import {
IconX,
} from 'twenty-ui/icon';
import { ColorSample } from 'twenty-ui/primitives/data-display';
+import { Collapsible } from 'twenty-ui/primitives/layout';
import { MAIN_COLOR_NAMES, useTheme, themeCssVariables } from 'twenty-ui/theme';
import { computeOptionValueFromLabel } from '@/object-metadata/utils/computeOptionValueFromLabel';
@@ -52,6 +52,7 @@ const useColorLabels = (): ColorLabels => ({
type SettingsDataModelFieldSelectFormOptionRowProps = {
className?: string;
isDefault?: boolean;
+ isApiValueVisible: boolean;
onChange: (value: FieldMetadataItemOption) => void;
onRemove?: () => void;
onSetAsDefault?: () => void;
@@ -103,6 +104,7 @@ const StyledLightIconButtonContainer = styled.span`
export const SettingsDataModelFieldSelectFormOptionRow = ({
className,
isDefault,
+ isApiValueVisible,
onChange,
onRemove,
onSetAsDefault,
@@ -135,22 +137,24 @@ export const SettingsDataModelFieldSelectFormOptionRow = ({
color={theme.font.color.extraLight}
/>
</StyledIconGripVerticalContainer>
- <AdvancedSettingsWrapper animationDimension="width" hideDot>
- <StyledOptionInputContainer>
- <SettingsTextInput
- instanceId={`select-option-value-${option.id}`}
- value={option.value}
- onChange={(input) =>
- onChange({
- ...option,
- value: computeOptionValueFromLabel(input),
- })
- }
- RightIcon={isDefault ? IconCheck : undefined}
- maxLength={OPTION_VALUE_MAXIMUM_LENGTH}
- />
- </StyledOptionInputContainer>
- </AdvancedSettingsWrapper>
+ <Collapsible.Root open={isApiValueVisible}>
+ <Collapsible.Panel dimension="width" containAnimation={false}>
+ <StyledOptionInputContainer>
+ <SettingsTextInput
+ instanceId={`select-option-value-${option.id}`}
+ value={option.value}
+ onChange={(input) =>
+ onChange({
+ ...option,
+ value: computeOptionValueFromLabel(input),
+ })
+ }
+ RightIcon={isDefault ? IconCheck : undefined}
+ maxLength={OPTION_VALUE_MAXIMUM_LENGTH}
+ />
+ </StyledOptionInputContainer>
+ </Collapsible.Panel>
+ </Collapsible.Root>
<DropdownRoot dropdownId={SELECT_COLOR_DROPDOWN_ID} type="picker">
<Dropdown.Trigger
render={<StyledColorSampleContainer />}
diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldTable.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldTable.tsx
index f687b313fba..0ef6b49014c 100644
--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldTable.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldTable.tsx
@@ -16,9 +16,7 @@ import { TableHeader } from '@/ui/layout/table/components/TableHeader';
import { TableRow } from '@/ui/layout/table/components/TableRow';
import { useSortedArray } from '@/ui/layout/table/hooks/useSortedArray';
import { type TableMetadata } from '@/ui/layout/table/types/TableMetadata';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';
-import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtomFamilyState';
import { styled } from '@linaria/react';
import { msg } from '@lingui/core/macro';
@@ -91,8 +89,6 @@ export const SettingsObjectFieldTable = ({
skip: mode !== 'view',
});
- const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
-
const tableMetadata = SETTINGS_OBJECT_FIELD_TABLE_METADATA;
const { mapFieldMetadataItemToSettingsObjectDetailTableItem } =
@@ -203,15 +199,13 @@ export const SettingsObjectFieldTable = ({
checked={showOnlyMostlyEmpty}
>{t`Mostly empty`}</SettingsRow>
)}
- {isAdvancedModeEnabled && (
- <SettingsRow
- startElement={<IconSettings />}
- onCheckedChange={() =>
- setShowSystemFields(!showSystemFields)
- }
- checked={showSystemFields}
- >{t`System fields`}</SettingsRow>
- )}
+ <SettingsRow
+ startElement={<IconSettings />}
+ onCheckedChange={() =>
+ setShowSystemFields(!showSystemFields)
+ }
+ checked={showSystemFields}
+ >{t`System fields`}</SettingsRow>
</Dropdown.Section>
</DropdownContent>
</DropdownRoot>
diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsx
index 929e5ef4219..8c251e3c7e4 100644
--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsx
@@ -14,8 +14,6 @@ import { TableHeader } from '@/ui/layout/table/components/TableHeader';
import { TableRow } from '@/ui/layout/table/components/TableRow';
import { useSortedArray } from '@/ui/layout/table/hooks/useSortedArray';
import { type TableMetadata } from '@/ui/layout/table/types/TableMetadata';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
-import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { styled } from '@linaria/react';
import { msg } from '@lingui/core/macro';
import { useLingui } from '@lingui/react/macro';
@@ -24,7 +22,12 @@ import { FieldMetadataType } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
import { Dropdown } from 'twenty-ui/components/navigation';
import { SettingsRow } from 'twenty-ui/components/settings';
-import { IconArchive, IconFilter, IconSearch } from 'twenty-ui/icon';
+import {
+ IconArchive,
+ IconFilter,
+ IconSearch,
+ IconSettings,
+} from 'twenty-ui/icon';
import { Button } from 'twenty-ui/primitives/input';
import { themeCssVariables } from 'twenty-ui/theme';
import {
@@ -109,8 +112,7 @@ export const SettingsObjectRelationsTable = ({
const { t } = useLingui();
const [searchTerm, setSearchTerm] = useState('');
const [showInactive, setShowInactive] = useState(true);
-
- const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
+ const [showSystemRelations, setShowSystemRelations] = useState(false);
const tableMetadata = SETTINGS_OBJECT_RELATION_TABLE_METADATA;
@@ -139,11 +141,11 @@ export const SettingsObjectRelationsTable = ({
);
return (
- isAdvancedModeEnabled ||
+ showSystemRelations ||
(!isHiddenSystemField(field) && !isRelationToSystemObject)
);
});
- }, [objectMetadataItem.fields, isAdvancedModeEnabled, objectMetadataItems]);
+ }, [objectMetadataItem.fields, showSystemRelations, objectMetadataItems]);
const sortedRelationFields = useSortedArray(relationFields, tableMetadata);
@@ -227,6 +229,13 @@ export const SettingsObjectRelationsTable = ({
onCheckedChange={() => setShowInactive(!showInactive)}
checked={showInactive}
>{t`Inactive`}</SettingsRow>
+ <SettingsRow
+ startElement={<IconSettings />}
+ onCheckedChange={() =>
+ setShowSystemRelations(!showSystemRelations)
+ }
+ checked={showSystemRelations}
+ >{t`System relations`}</SettingsRow>
</Dropdown.Section>
</DropdownContent>
</DropdownRoot>
diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectSettings.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectSettings.tsx
index 9f9e2670339..faf0cc778b2 100644
--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectSettings.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectSettings.tsx
@@ -6,12 +6,10 @@ import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/Enriche
import { getObjectColorWithFallback } from '@/object-metadata/utils/getObjectColorWithFallback';
import { isShareableObjectMetadataItem } from '@/object-record/record-sharing/utils/isShareableObjectMetadataItem';
import { isObjectMetadataReadOnly } from '@/object-record/read-only/utils/isObjectMetadataReadOnly';
-import { AdvancedSettingsWrapper } from '@/settings/components/AdvancedSettingsWrapper';
+import { SettingsCard } from '@/settings/components/SettingsCard';
import { SettingsEnterpriseFeatureGateCard } from '@/settings/components/SettingsEnterpriseFeatureGateCard';
import { SettingsUpdateDataModelObjectAboutForm } from '@/settings/data-model/object-details/components/SettingsUpdateDataModelObjectAboutForm';
-import { SettingsObjectIndexesSection } from '@/settings/data-model/object-details/components/tabs/SettingsObjectIndexesSection';
import { ObjectSharingReachPicker } from '@/settings/data-model/object-details/components/tabs/ObjectSharingReachPicker';
-import { SettingsObjectSearchSection } from '@/settings/data-model/object-details/components/tabs/SettingsObjectSearchSection';
import { SettingsObjectValidationRulesSection } from '@/settings/data-model/object-details/components/tabs/SettingsObjectValidationRulesSection';
import { SettingsDataModelObjectSettingsFormCard } from '@/settings/data-model/objects/forms/components/SettingsDataModelObjectSettingsFormCard';
import { OrganizationAdornment } from '@/settings/enterprise/components/OrganizationAdornment';
@@ -22,6 +20,7 @@ import {
import { SettingsTranslationsCard } from '@/settings/translations/components/SettingsTranslationsCard';
import { ConfirmationDialog } from '@/ui/layout/dialog/components/ConfirmationDialog';
import { useDialog } from '@/ui/layout/dialog/hooks/useDialog';
+import { UndecoratedLink } from '@/ui/navigation/link/components/UndecoratedLink/UndecoratedLink';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { useHasValidationRulesEntitlement } from '@/validation-rules/hooks/useHasValidationRulesEntitlement';
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
@@ -30,12 +29,12 @@ import { styled } from '@linaria/react';
import { useLingui } from '@lingui/react/macro';
import { useForm } from 'react-hook-form';
import { SettingsPath } from 'twenty-shared/types';
-import { isEmptyObject } from 'twenty-shared/utils';
+import { getSettingsPath, isEmptyObject } from 'twenty-shared/utils';
import { useToast } from 'twenty-ui/components/feedback';
import { Section } from 'twenty-ui/components/layout';
-import { IconArchive, IconTrash } from 'twenty-ui/icon';
+import { IconArchive, IconBolt, IconSearch, IconTrash } from 'twenty-ui/icon';
import { Button } from 'twenty-ui/primitives/input';
-import { themeCssVariables } from 'twenty-ui/theme';
+import { themeCssVariables, useTheme } from 'twenty-ui/theme';
import { FeatureFlagKey } from '~/generated-metadata/graphql';
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
@@ -57,6 +56,12 @@ const StyledFormSectionContainer = styled.div`
}
`;
+const StyledLinkCardsContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: ${themeCssVariables.spacing[2]};
+`;
+
const StyledDangerButtonsContainer = styled.div`
display: flex;
gap: ${themeCssVariables.spacing[2]};
@@ -70,6 +75,7 @@ export const ObjectSettings = ({
setIsDeleting,
}: ObjectSettingsProps) => {
const { t } = useLingui();
+ const theme = useTheme();
const navigate = useNavigateSettings();
const getIsMetadataItemCustom = useGetIsMetadataItemCustom();
const { updateOneObjectMetadataItem } = useUpdateOneObjectMetadataItem();
@@ -167,18 +173,6 @@ export const ObjectSettings = ({
/>
</Section.Root>
</StyledFormSectionContainer>
- <StyledFormSectionContainer>
- <Section.Root>
- <Section.Header
- title={t`Translations`}
- description={t`What each language displays for this object's labels`}
- />
- <SettingsTranslationsCard
- objectNamePlural={objectMetadataItem.namePlural}
- disabled={hasUnsavedAboutEdits}
- />
- </Section.Root>
- </StyledFormSectionContainer>
{isRecordCreationFormEnabled &&
!objectMetadataItem.isRemote &&
!objectMetadataItem.isSystem && (
@@ -219,34 +213,40 @@ export const ObjectSettings = ({
</Section.Root>
</StyledFormSectionContainer>
)}
- <AdvancedSettingsWrapper>
- <StyledFormSectionContainer>
- <Section.Root>
- <Section.Header
- title={t`Search`}
- description={t`Configure how this object appears in search results`}
- />
- <SettingsObjectSearchSection
- objectMetadataItem={objectMetadataItem}
- isReadOnly={isReadOnly}
- />
- </Section.Root>
- </StyledFormSectionContainer>
- </AdvancedSettingsWrapper>
- <AdvancedSettingsWrapper>
- <StyledFormSectionContainer>
- <Section.Root>
- <Section.Header
- title={t`Indexes`}
- description={t`Speed up reads on the fields you filter or sort by most. Each index also slows down writes and uses disk space, so add them with intent.`}
- />
- <SettingsObjectIndexesSection
- objectMetadataItem={objectMetadataItem}
- isReadOnly={isReadOnly}
+ <StyledFormSectionContainer>
+ <Section.Root>
+ <Section.Header
+ title={t`Advanced`}
+ description={t`Settings most workspaces never need to change`}
+ />
+ <StyledLinkCardsContainer>
+ <SettingsTranslationsCard
+ objectNamePlural={objectMetadataItem.namePlural}
+ disabled={hasUnsavedAboutEdits}
/>
- </Section.Root>
- </StyledFormSectionContainer>
- </AdvancedSettingsWrapper>
+ <UndecoratedLink
+ to={getSettingsPath(SettingsPath.ObjectSearch, {
+ objectNamePlural: objectMetadataItem.namePlural,
+ })}
+ >
+ <SettingsCard
+ Icon={<IconSearch size={theme.icon.size.md} />}
+ title={t`Configure search`}
+ />
+ </UndecoratedLink>
+ <UndecoratedLink
+ to={getSettingsPath(SettingsPath.ObjectIndexes, {
+ objectNamePlural: objectMetadataItem.namePlural,
+ })}
+ >
+ <SettingsCard
+ Icon={<IconBolt size={theme.icon.size.md} />}
+ title={t`Manage indexes`}
+ />
+ </UndecoratedLink>
+ </StyledLinkCardsContainer>
+ </Section.Root>
+ </StyledFormSectionContainer>
{!isReadOnly && (
<StyledFormSectionContainer>
<Section.Root>
diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectSearchSection.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectSearchSection.tsx
index 228b0149d20..b970f332970 100644
--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectSearchSection.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectSearchSection.tsx
@@ -190,7 +190,6 @@ export const SettingsObjectSearchSection = ({
title={t`Global search`}
description={t`Show this object's records in the command menu (${formatShortcut({ shortcut: ['Mod', 'K'] })}).`}
checked={isSearchable}
- advancedMode
onChange={handleToggleSearchable}
/>
</Card.Root>
diff --git a/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx b/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
index c956bd885d5..cd0e56324d4 100644
--- a/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
@@ -1,7 +1,6 @@
import { useGetIsMetadataItemCustom } from '@/object-metadata/hooks/useGetIsMetadataItemCustom';
import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';
import { getObjectColorWithFallback } from '@/object-metadata/utils/getObjectColorWithFallback';
-import { AdvancedSettingsWrapper } from '@/settings/components/AdvancedSettingsWrapper';
import { SettingsOptionCardContentSwitch } from '@/settings/components/SettingsOptions/SettingsOptionCardContentSwitch';
import { OBJECT_NAME_MAXIMUM_LENGTH } from '@/settings/data-model/constants/ObjectNameMaximumLength';
import { type SettingsDataModelObjectAboutFormValues } from '@/settings/data-model/validation-schemas/settingsDataModelObjectAboutFormSchema';
@@ -17,6 +16,7 @@ import { SettingsPath } from 'twenty-shared/types';
import { capitalize, isDefined } from 'twenty-shared/utils';
import { InlineBanner } from 'twenty-ui/components/feedback';
import { IconInfoCircle, IconLink, IconRefresh } from 'twenty-ui/icon';
+import { Collapsible } from 'twenty-ui/primitives/layout';
import { Card, Tooltip } from 'twenty-ui/primitives/surfaces';
import { useTheme, themeCssVariables } from 'twenty-ui/theme';
import { type StringKeyOf } from 'type-fest';
@@ -42,23 +42,19 @@ const StyledInputContainer = styled.div`
flex-direction: column;
`;
-const StyledAdvancedSettingsSectionInputWrapper = styled.div`
+const StyledApiSettingsContainer = styled.div`
display: flex;
- flex: 1;
flex-direction: column;
gap: ${themeCssVariables.spacing[4]};
- width: 100%;
-`;
-
-const StyledAdvancedSettingsOuterContainer = styled.div`
padding-top: ${themeCssVariables.spacing[4]};
+ width: 100%;
`;
-const StyledAdvancedSettingsContainer = styled.div`
+const StyledApiNameInputsContainer = styled.div`
display: flex;
- gap: ${themeCssVariables.spacing[2]};
- position: relative;
- width: 100%;
+ flex-direction: column;
+ gap: ${themeCssVariables.spacing[4]};
+ padding-top: ${themeCssVariables.spacing[4]};
`;
const StyledLabel = styled.span`
@@ -102,14 +98,6 @@ export const SettingsDataModelObjectAboutForm = ({
color: objectIconColor,
});
- const apiNameTooltipText =
- !isDefined(objectMetadataItem) ||
- getIsMetadataItemCustom(objectMetadataItem)
- ? isLabelSyncedWithName
- ? t`Deactivate "Synchronize Objects Labels and API Names" to set a custom API name`
- : t`Input must be in camel case and cannot start with a number`
- : t`Can't change API names for standard objects`;
-
const fillLabelPlural = (labelSingular: string | undefined) => {
if (!isDefined(labelSingular)) return;
@@ -259,60 +247,67 @@ export const SettingsDataModelObjectAboutForm = ({
/>
)}
/>
- <StyledAdvancedSettingsOuterContainer>
- <StyledAdvancedSettingsContainer>
- <StyledAdvancedSettingsSectionInputWrapper>
- {isDefined(conflictingObjectMetadataItem) && (
- <InlineBanner
- status="info"
- action={
- <InlineBanner.Action
- onClick={() =>
- navigateSettings(SettingsPath.ObjectDetail, {
- objectNamePlural:
- conflictingObjectMetadataItem.namePlural,
- })
- }
- >{t`Open`}</InlineBanner.Action>
+ <StyledApiSettingsContainer>
+ {isDefined(conflictingObjectMetadataItem) && (
+ <InlineBanner
+ status="info"
+ action={
+ <InlineBanner.Action
+ onClick={() =>
+ navigateSettings(SettingsPath.ObjectDetail, {
+ objectNamePlural: conflictingObjectMetadataItem.namePlural,
+ })
}
- >{t`An object with this name already exists`}</InlineBanner>
- )}
- {[
- {
- label: t`API Name (Singular)`,
- fieldName:
- 'nameSingular' as const satisfies StringKeyOf<EnrichedObjectMetadataItem>,
- placeholder: `listing`,
- defaultValue: objectMetadataItem?.nameSingular ?? '',
- disableEdition:
- isStandardObject || disableEdition || isLabelSyncedWithName,
- tooltip: apiNameTooltipText,
- },
- {
- label: t`API Name (Plural)`,
- fieldName:
- 'namePlural' as const satisfies StringKeyOf<EnrichedObjectMetadataItem>,
- placeholder: `listings`,
- defaultValue: objectMetadataItem?.namePlural ?? '',
- disableEdition:
- isStandardObject || disableEdition || isLabelSyncedWithName,
- tooltip: apiNameTooltipText,
- },
- ].map(
- ({
- fieldName,
- label,
- placeholder,
- disableEdition,
- tooltip,
- defaultValue,
- }) => (
- <AdvancedSettingsWrapper
- key={`object-${fieldName}-text-input`}
- dotPosition="top"
- >
- <StyledInputContainer>
+ >{t`Open`}</InlineBanner.Action>
+ }
+ >{t`An object with this name already exists`}</InlineBanner>
+ )}
+ {!isStandardObject && (
+ <div>
+ <Controller
+ name="isLabelSyncedWithName"
+ control={control}
+ defaultValue={objectMetadataItem?.isLabelSyncedWithName}
+ render={({ field: { onChange, value } }) => (
+ <Card.Root rounded>
+ <SettingsOptionCardContentSwitch
+ Icon={IconRefresh}
+ title={t`Synchronize Objects Labels and API Names`}
+ description={t`Should changing an object's label also change the API?`}
+ checked={value ?? true}
+ disabled={disableEdition}
+ onChange={(value) => {
+ onChange(value);
+ if (value) {
+ fillNamesFromLabels(labelSingular, labelPlural);
+ }
+ onNewDirtyField?.();
+ }}
+ />
+ </Card.Root>
+ )}
+ />
+ <Collapsible.Root open={isLabelSyncedWithName === false}>
+ <Collapsible.Panel dimension="height" containAnimation={false}>
+ <StyledApiNameInputsContainer>
+ {[
+ {
+ label: t`API Name (Singular)`,
+ fieldName:
+ 'nameSingular' as const satisfies StringKeyOf<EnrichedObjectMetadataItem>,
+ placeholder: `listing`,
+ defaultValue: objectMetadataItem?.nameSingular ?? '',
+ },
+ {
+ label: t`API Name (Plural)`,
+ fieldName:
+ 'namePlural' as const satisfies StringKeyOf<EnrichedObjectMetadataItem>,
+ placeholder: `listings`,
+ defaultValue: objectMetadataItem?.namePlural ?? '',
+ },
+ ].map(({ fieldName, label, placeholder, defaultValue }) => (
<Controller
+ key={`object-${fieldName}-text-input`}
name={fieldName}
control={control}
defaultValue={defaultValue}
@@ -320,112 +315,67 @@ export const SettingsDataModelObjectAboutForm = ({
field: { onChange, value },
formState: { errors },
}) => (
- <>
- <SettingsTextInput
- instanceId={`${objectMetadataItem?.id}-${fieldName}`}
- label={label}
- placeholder={placeholder}
- value={value}
- onChange={onChange}
- disabled={disableEdition}
- fullWidth
- maxLength={OBJECT_NAME_MAXIMUM_LENGTH}
- onBlur={() => onNewDirtyField?.()}
- error={errors[fieldName]?.message}
- // TODO we should discuss on how to notify user about form validation schema issue, from now just displaying red borders
- noErrorHelper={true}
- RightIcon={() =>
- tooltip && (
- <>
- <Tooltip
- content={tooltip}
- sideOffset={5}
- side="bottom"
- positionMethod="fixed"
- delay={TooltipDelay.shortDelay}
- >
- <IconInfoCircle
- id={infoCircleElementId + fieldName}
- size={theme.icon.size.md}
- color={theme.font.color.tertiary}
- style={{ outline: 'none' }}
- />
- </Tooltip>
- </>
- )
- }
- />
- </>
+ <SettingsTextInput
+ instanceId={`${objectMetadataItem?.id}-${fieldName}`}
+ label={label}
+ placeholder={placeholder}
+ value={value}
+ onChange={onChange}
+ disabled={disableEdition}
+ fullWidth
+ maxLength={OBJECT_NAME_MAXIMUM_LENGTH}
+ onBlur={() => onNewDirtyField?.()}
+ error={errors[fieldName]?.message}
+ // TODO we should discuss on how to notify user about form validation schema issue, from now just displaying red borders
+ noErrorHelper={true}
+ RightIcon={() => (
+ <Tooltip
+ content={t`Input must be in camel case and cannot start with a number`}
+ sideOffset={5}
+ side="bottom"
+ positionMethod="fixed"
+ delay={TooltipDelay.shortDelay}
+ >
+ <IconInfoCircle
+ id={infoCircleElementId + fieldName}
+ size={theme.icon.size.md}
+ color={theme.font.color.tertiary}
+ style={{ outline: 'none' }}
+ />
+ </Tooltip>
+ )}
+ />
)}
/>
- </StyledInputContainer>
- </AdvancedSettingsWrapper>
- ),
- )}
- {!isStandardObject && (
- <AdvancedSettingsWrapper>
- <Controller
- name="isLabelSyncedWithName"
- control={control}
- defaultValue={objectMetadataItem?.isLabelSyncedWithName}
- render={({ field: { onChange, value } }) => (
- <Card.Root rounded>
- <SettingsOptionCardContentSwitch
- Icon={IconRefresh}
- title={t`Synchronize Objects Labels and API Names`}
- description={t`Should changing an object's label also change the API?`}
- checked={value ?? true}
- advancedMode
- disabled={disableEdition}
- onChange={(value) => {
- onChange(value);
- const isCustomObject =
- isDefined(objectMetadataItem) &&
- getIsMetadataItemCustom(objectMetadataItem);
- const isbeingCreatedObject =
- !isDefined(objectMetadataItem);
- if (
- value === true &&
- (isCustomObject || isbeingCreatedObject)
- ) {
- fillNamesFromLabels(labelSingular, labelPlural);
- }
- onNewDirtyField?.();
- }}
- />
- </Card.Root>
- )}
- />
- </AdvancedSettingsWrapper>
- )}
- {!isDefined(objectMetadataItem) && (
- <AdvancedSettingsWrapper>
- <Controller
- name="skipNameField"
- control={control}
- defaultValue={false}
- render={({ field: { onChange, value } }) => (
- <Card.Root rounded>
- <SettingsOptionCardContentSwitch
- Icon={IconLink}
- title={t`Skip creating a Name field `}
- description={t`Useful for pivot/junction tables`}
- checked={value ?? false}
- advancedMode
- disabled={disableEdition}
- onChange={(value) => {
- onChange(value);
- onNewDirtyField?.();
- }}
- />
- </Card.Root>
- )}
+ ))}
+ </StyledApiNameInputsContainer>
+ </Collapsible.Panel>
+ </Collapsible.Root>
+ </div>
+ )}
+ {!isDefined(objectMetadataItem) && (
+ <Controller
+ name="skipNameField"
+ control={control}
+ defaultValue={false}
+ render={({ field: { onChange, value } }) => (
+ <Card.Root rounded>
+ <SettingsOptionCardContentSwitch
+ Icon={IconLink}
+ title={t`Skip creating a Name field `}
+ description={t`Useful for pivot/junction tables`}
+ checked={value ?? false}
+ disabled={disableEdition}
+ onChange={(value) => {
+ onChange(value);
+ onNewDirtyField?.();
+ }}
/>
- </AdvancedSettingsWrapper>
+ </Card.Root>
)}
- </StyledAdvancedSettingsSectionInputWrapper>
- </StyledAdvancedSettingsContainer>
- </StyledAdvancedSettingsOuterContainer>
+ />
+ )}
+ </StyledApiSettingsContainer>
</>
);
};
diff --git a/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/__stories__/SettingsDataModelObjectAboutForm.stories.tsx b/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/__stories__/SettingsDataModelObjectAboutForm.stories.tsx
index 2174ba07d9e..e28101a323b 100644
--- a/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/__stories__/SettingsDataModelObjectAboutForm.stories.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/__stories__/SettingsDataModelObjectAboutForm.stories.tsx
@@ -1,13 +1,11 @@
import { styled } from '@linaria/react';
import { type Meta, type StoryObj } from '@storybook/react-vite';
-import { expect, waitFor, within } from 'storybook/test';
+import { expect, userEvent, waitFor, within } from 'storybook/test';
import { FormProviderDecorator } from '~/testing/decorators/FormProviderDecorator';
import { IconsProviderDecorator } from '~/testing/decorators/IconsProviderDecorator';
import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';
import { SettingsDataModelObjectAboutForm } from '@/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
-import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';
import { ComponentDecorator } from 'twenty-ui/testing';
import { getTestEnrichedObjectMetadataItemsMock } from '~/testing/utils/getTestEnrichedObjectMetadataItemsMock';
@@ -38,16 +36,23 @@ const meta: Meta<typeof SettingsDataModelObjectAboutForm> = {
parameters: {
container: { width: 520 },
},
- beforeEach: () => {
- jotaiStore.set(isAdvancedModeEnabledState.atom, true);
+};
- return () => {
- jotaiStore.set(isAdvancedModeEnabledState.atom, false);
- };
- },
+export default meta;
+type Story = StoryObj<typeof SettingsDataModelObjectAboutForm>;
+
+export const Default: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
+ const syncSwitch = await canvas.findByRole('switch', {
+ name: 'Synchronize Objects Labels and API Names',
+ });
+
+ expect(canvas.queryByText('API Name (Singular)')).not.toBeInTheDocument();
+
+ await userEvent.click(syncSwitch);
+
await waitFor(() => {
expect(canvas.getByText('API Name (Singular)')).toBeVisible();
expect(canvas.getByText('API Name (Plural)')).toBeVisible();
@@ -55,11 +60,6 @@ const meta: Meta<typeof SettingsDataModelObjectAboutForm> = {
},
};
-export default meta;
-type Story = StoryObj<typeof SettingsDataModelObjectAboutForm>;
-
-export const Default: Story = {};
-
export const WithDefaultValues: Story = {
args: {
objectMetadataItem: mockedCompanyObjectMetadataItem,
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/cover-dark.png b/packages/twenty-front/src/modules/settings/developers/assets/cover-dark.png
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/cover-dark.png
rename to packages/twenty-front/src/modules/settings/developers/assets/cover-dark.png
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/cover-light.png b/packages/twenty-front/src/modules/settings/developers/assets/cover-light.png
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/cover-light.png
rename to packages/twenty-front/src/modules/settings/developers/assets/cover-light.png
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/GraphQLPlayground.tsx b/packages/twenty-front/src/modules/settings/developers/components/GraphQLPlayground.tsx
similarity index 92%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/components/GraphQLPlayground.tsx
rename to packages/twenty-front/src/modules/settings/developers/components/GraphQLPlayground.tsx
index 30d2141f494..7f00af70a59 100644
--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/GraphQLPlayground.tsx
+++ b/packages/twenty-front/src/modules/settings/developers/components/GraphQLPlayground.tsx
@@ -1,8 +1,8 @@
import {
isPlaygroundApiKeyFresh,
playgroundApiKeyState,
-} from '@/settings/mcp-and-apis/states/playgroundApiKeyState';
-import { PlaygroundSchemas } from '@/settings/mcp-and-apis/types/PlaygroundSchemas';
+} from '@/settings/developers/states/playgroundApiKeyState';
+import { PlaygroundSchemas } from '@/settings/developers/types/PlaygroundSchemas';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { styled } from '@linaria/react';
import { explorerPlugin } from '@graphiql/plugin-explorer';
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/PlaygroundSetupForm.tsx b/packages/twenty-front/src/modules/settings/developers/components/PlaygroundSetupForm.tsx
similarity index 89%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/components/PlaygroundSetupForm.tsx
rename to packages/twenty-front/src/modules/settings/developers/components/PlaygroundSetupForm.tsx
index 023f307a072..a72d61f7537 100644
--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/PlaygroundSetupForm.tsx
+++ b/packages/twenty-front/src/modules/settings/developers/components/PlaygroundSetupForm.tsx
@@ -1,7 +1,7 @@
-import { useOpenPlayground } from '@/settings/mcp-and-apis/hooks/useOpenPlayground';
-import { SETTINGS_PLAYGROUND_FORM_SCHEMA_SELECT_OPTIONS } from '@/settings/mcp-and-apis/constants/SettingsPlaygroundFormSchemaSelectOptions';
-import { PlaygroundSchemas } from '@/settings/mcp-and-apis/types/PlaygroundSchemas';
-import { PlaygroundTypes } from '@/settings/mcp-and-apis/types/PlaygroundTypes';
+import { useOpenPlayground } from '@/settings/developers/hooks/useOpenPlayground';
+import { SETTINGS_PLAYGROUND_FORM_SCHEMA_SELECT_OPTIONS } from '@/settings/developers/constants/SettingsPlaygroundFormSchemaSelectOptions';
+import { PlaygroundSchemas } from '@/settings/developers/types/PlaygroundSchemas';
+import { PlaygroundTypes } from '@/settings/developers/types/PlaygroundTypes';
import { Select } from '@/ui/input/components/Select';
import { styled } from '@linaria/react';
import { zodResolver } from '@hookform/resolvers/zod';
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/RestPlayground.tsx b/packages/twenty-front/src/modules/settings/developers/components/RestPlayground.tsx
similarity index 92%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/components/RestPlayground.tsx
rename to packages/twenty-front/src/modules/settings/developers/components/RestPlayground.tsx
index 05d7fe3fcaf..6ea76feec2d 100644
--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/RestPlayground.tsx
+++ b/packages/twenty-front/src/modules/settings/developers/components/RestPlayground.tsx
@@ -1,10 +1,10 @@
import { SkeletonLine } from '@/ui/feedback/skeleton/components/SkeletonLine';
-import { RestPlaygroundSchemaFetchEffect } from '@/settings/mcp-and-apis/components/RestPlaygroundSchemaFetchEffect';
+import { RestPlaygroundSchemaFetchEffect } from '@/settings/developers/components/RestPlaygroundSchemaFetchEffect';
import {
isPlaygroundApiKeyFresh,
playgroundApiKeyState,
-} from '@/settings/mcp-and-apis/states/playgroundApiKeyState';
-import { type PlaygroundSchemas } from '@/settings/mcp-and-apis/types/PlaygroundSchemas';
+} from '@/settings/developers/states/playgroundApiKeyState';
+import { type PlaygroundSchemas } from '@/settings/developers/types/PlaygroundSchemas';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { useState, lazy, Suspense } from 'react';
import { styled } from '@linaria/react';
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/RestPlaygroundSchemaFetchEffect.tsx b/packages/twenty-front/src/modules/settings/developers/components/RestPlaygroundSchemaFetchEffect.tsx
similarity index 92%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/components/RestPlaygroundSchemaFetchEffect.tsx
rename to packages/twenty-front/src/modules/settings/developers/components/RestPlaygroundSchemaFetchEffect.tsx
index 79ebc3d5f2a..ea9c4d5e11c 100644
--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/RestPlaygroundSchemaFetchEffect.tsx
+++ b/packages/twenty-front/src/modules/settings/developers/components/RestPlaygroundSchemaFetchEffect.tsx
@@ -1,4 +1,4 @@
-import { type PlaygroundSchemas } from '@/settings/mcp-and-apis/types/PlaygroundSchemas';
+import { type PlaygroundSchemas } from '@/settings/developers/types/PlaygroundSchemas';
import { useEffect } from 'react';
import { REACT_APP_SERVER_BASE_URL } from '~/config';
diff --git a/packages/twenty-front/src/modules/settings/developers/components/SettingsDevelopersWebhookForm.tsx b/packages/twenty-front/src/modules/settings/developers/components/SettingsDevelopersWebhookForm.tsx
index 750c32b302d..f828d6c5b82 100644
--- a/packages/twenty-front/src/modules/settings/developers/components/SettingsDevelopersWebhookForm.tsx
+++ b/packages/twenty-front/src/modules/settings/developers/components/SettingsDevelopersWebhookForm.tsx
@@ -23,7 +23,7 @@ import { Section } from 'twenty-ui/components/layout';
import { IconTrash } from 'twenty-ui/icon';
import { Button } from 'twenty-ui/primitives/input';
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
-import { SETTINGS_API_WEBHOOKS_TABS } from '@/settings/developers/constants/SettingsApiWebhooksTabs';
+import { SETTINGS_DEVELOPERS_TABS } from '@/settings/developers/constants/SettingsDevelopersTabs';
import { SettingsDatabaseEventsForm } from '@/settings/components/SettingsDatabaseEventsForm';
const DELETE_WEBHOOK_MODAL_ID = 'delete-webhook-modal';
@@ -90,12 +90,12 @@ export const SettingsDevelopersWebhookForm = ({
href: getSettingsPath(SettingsPath.General),
},
{
- children: t`MCP & APIs`,
+ children: t`Developers`,
href: getSettingsPath(
- SettingsPath.ApiWebhooks,
+ SettingsPath.Developers,
undefined,
undefined,
- SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.WEBHOOKS,
+ SETTINGS_DEVELOPERS_TABS.TABS_IDS.WEBHOOKS,
),
},
{ children: isCreationMode ? t`New` : getTitle() },
@@ -106,11 +106,11 @@ export const SettingsDevelopersWebhookForm = ({
isCancelDisabled={formConfig.formState.isSubmitting}
onCancel={() =>
navigate(
- SettingsPath.ApiWebhooks,
+ SettingsPath.Developers,
undefined,
undefined,
undefined,
- SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.WEBHOOKS,
+ SETTINGS_DEVELOPERS_TABS.TABS_IDS.WEBHOOKS,
)
}
onSave={formConfig.handleSubmit(handleSave)}
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/GraphQLPlayground.stories.tsx b/packages/twenty-front/src/modules/settings/developers/components/__stories__/GraphQLPlayground.stories.tsx
similarity index 91%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/GraphQLPlayground.stories.tsx
rename to packages/twenty-front/src/modules/settings/developers/components/__stories__/GraphQLPlayground.stories.tsx
index 4b7e143f28f..fdbe754eea7 100644
--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/GraphQLPlayground.stories.tsx
+++ b/packages/twenty-front/src/modules/settings/developers/components/__stories__/GraphQLPlayground.stories.tsx
@@ -1,5 +1,5 @@
-import { GraphQLPlayground } from '@/settings/mcp-and-apis/components/GraphQLPlayground';
-import { playgroundApiKeyState } from '@/settings/mcp-and-apis/states/playgroundApiKeyState';
+import { GraphQLPlayground } from '@/settings/developers/components/GraphQLPlayground';
+import { playgroundApiKeyState } from '@/settings/developers/states/playgroundApiKeyState';
import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
import { type Meta, type StoryObj } from '@storybook/react-vite';
import { type Environment } from 'monaco-editor';
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/PlaygroundSetupForm.stories.tsx b/packages/twenty-front/src/modules/settings/developers/components/__stories__/PlaygroundSetupForm.stories.tsx
similarity index 89%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/PlaygroundSetupForm.stories.tsx
rename to packages/twenty-front/src/modules/settings/developers/components/__stories__/PlaygroundSetupForm.stories.tsx
index 0d5be98a3d0..00960b66a2b 100644
--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/PlaygroundSetupForm.stories.tsx
+++ b/packages/twenty-front/src/modules/settings/developers/components/__stories__/PlaygroundSetupForm.stories.tsx
@@ -1,4 +1,4 @@
-import { PlaygroundSetupForm } from '@/settings/mcp-and-apis/components/PlaygroundSetupForm';
+import { PlaygroundSetupForm } from '@/settings/developers/components/PlaygroundSetupForm';
import { type Meta, type StoryObj } from '@storybook/react-vite';
import { ComponentDecorator } from 'twenty-ui/testing';
import { ToastDecorator } from '~/testing/decorators/ToastDecorator';
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/RestPlayground.stories.tsx b/packages/twenty-front/src/modules/settings/developers/components/__stories__/RestPlayground.stories.tsx
similarity index 92%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/RestPlayground.stories.tsx
rename to packages/twenty-front/src/modules/settings/developers/components/__stories__/RestPlayground.stories.tsx
index 54664b2b39b..98d489012a9 100644
--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/RestPlayground.stories.tsx
+++ b/packages/twenty-front/src/modules/settings/developers/components/__stories__/RestPlayground.stories.tsx
@@ -1,6 +1,6 @@
-import { RestPlayground } from '@/settings/mcp-and-apis/components/RestPlayground';
-import { playgroundApiKeyState } from '@/settings/mcp-and-apis/states/playgroundApiKeyState';
-import { PlaygroundSchemas } from '@/settings/mcp-and-apis/types/PlaygroundSchemas';
+import { RestPlayground } from '@/settings/developers/components/RestPlayground';
+import { playgroundApiKeyState } from '@/settings/developers/states/playgroundApiKeyState';
+import { PlaygroundSchemas } from '@/settings/developers/types/PlaygroundSchemas';
import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
import { type Meta, type StoryObj } from '@storybook/react-vite';
import { HttpResponse, http } from 'msw';
diff --git a/packages/twenty-front/src/modules/settings/developers/constants/SettingsApiWebhooksTabs.ts b/packages/twenty-front/src/modules/settings/developers/constants/SettingsApiWebhooksTabs.ts
deleted file mode 100644
index d62ea660d7e..00000000000
--- a/packages/twenty-front/src/modules/settings/developers/constants/SettingsApiWebhooksTabs.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export const SETTINGS_API_WEBHOOKS_TABS = {
- COMPONENT_INSTANCE_ID: 'settings-api-webhooks-tabs',
- TABS_IDS: {
- API: 'api',
- MCP: 'mcp',
- WEBHOOKS: 'webhooks',
- },
-} as const;
diff --git a/packages/twenty-front/src/modules/settings/developers/constants/SettingsDevelopersTabs.ts b/packages/twenty-front/src/modules/settings/developers/constants/SettingsDevelopersTabs.ts
new file mode 100644
index 00000000000..cf89adaa9f3
--- /dev/null
+++ b/packages/twenty-front/src/modules/settings/developers/constants/SettingsDevelopersTabs.ts
@@ -0,0 +1,8 @@
+export const SETTINGS_DEVELOPERS_TABS = {
+ COMPONENT_INSTANCE_ID: 'settings-developers-tabs',
+ TABS_IDS: {
+ API: 'api',
+ WEBHOOKS: 'webhooks',
+ APPS: 'apps',
+ },
+} as const;
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/constants/SettingsPlaygroundFormSchemaSelectOptions.ts b/packages/twenty-front/src/modules/settings/developers/constants/SettingsPlaygroundFormSchemaSelectOptions.ts
similarity index 81%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/constants/SettingsPlaygroundFormSchemaSelectOptions.ts
rename to packages/twenty-front/src/modules/settings/developers/constants/SettingsPlaygroundFormSchemaSelectOptions.ts
index 2e083f58c62..671bf1e8cad 100644
--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/constants/SettingsPlaygroundFormSchemaSelectOptions.ts
+++ b/packages/twenty-front/src/modules/settings/developers/constants/SettingsPlaygroundFormSchemaSelectOptions.ts
@@ -1,4 +1,4 @@
-import { PlaygroundSchemas } from '@/settings/mcp-and-apis/types/PlaygroundSchemas';
+import { PlaygroundSchemas } from '@/settings/developers/types/PlaygroundSchemas';
import { msg } from '@lingui/core/macro';
import { IconBracketsAngle, IconFolderRoot } from 'twenty-ui/icon';
export const SETTINGS_PLAYGROUND_FORM_SCHEMA_SELECT_OPTIONS = [
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/hooks/useOpenPlayground.ts b/packages/twenty-front/src/modules/settings/developers/hooks/useOpenPlayground.ts
similarity index 89%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/hooks/useOpenPlayground.ts
rename to packages/twenty-front/src/modules/settings/developers/hooks/useOpenPlayground.ts
index 9e713dc3aeb..e7281b88d80 100644
--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/hooks/useOpenPlayground.ts
+++ b/packages/twenty-front/src/modules/settings/developers/hooks/useOpenPlayground.ts
@@ -7,9 +7,9 @@ import { isDefined } from 'twenty-shared/utils';
import {
isPlaygroundApiKeyFresh,
playgroundApiKeyState,
-} from '@/settings/mcp-and-apis/states/playgroundApiKeyState';
-import { type PlaygroundSchemas } from '@/settings/mcp-and-apis/types/PlaygroundSchemas';
-import { PlaygroundTypes } from '@/settings/mcp-and-apis/types/PlaygroundTypes';
+} from '@/settings/developers/states/playgroundApiKeyState';
+import { type PlaygroundSchemas } from '@/settings/developers/types/PlaygroundSchemas';
+import { PlaygroundTypes } from '@/settings/developers/types/PlaygroundTypes';
import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';
import { useToast } from 'twenty-ui/components/feedback';
import { GeneratePlaygroundTokenDocument } from '~/generated-metadata/graphql';
diff --git a/packages/twenty-front/src/modules/settings/developers/hooks/useWebhookForm.ts b/packages/twenty-front/src/modules/settings/developers/hooks/useWebhookForm.ts
index c2fac3d3862..741d64141f9 100644
--- a/packages/twenty-front/src/modules/settings/developers/hooks/useWebhookForm.ts
+++ b/packages/twenty-front/src/modules/settings/developers/hooks/useWebhookForm.ts
@@ -25,7 +25,7 @@ import {
UpdateWebhookDocument,
} from '~/generated-metadata/graphql';
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
-import { SETTINGS_API_WEBHOOKS_TABS } from '@/settings/developers/constants/SettingsApiWebhooksTabs';
+import { SETTINGS_DEVELOPERS_TABS } from '@/settings/developers/constants/SettingsDevelopersTabs';
type UseWebhookFormProps = {
webhookId?: string;
@@ -106,13 +106,11 @@ export const useWebhookForm = ({ webhookId, mode }: UseWebhookFormProps) => {
});
navigate(
- createdWebhook ? SettingsPath.WebhookDetail : SettingsPath.ApiWebhooks,
+ createdWebhook ? SettingsPath.WebhookDetail : SettingsPath.Developers,
createdWebhook ? { webhookId: createdWebhook.id } : undefined,
undefined,
undefined,
- createdWebhook
- ? undefined
- : SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.WEBHOOKS,
+ createdWebhook ? undefined : SETTINGS_DEVELOPERS_TABS.TABS_IDS.WEBHOOKS,
);
} catch (error) {
enqueueToast(getToastOptionsFromError({ error }));
@@ -202,11 +200,11 @@ export const useWebhookForm = ({ webhookId, mode }: UseWebhookFormProps) => {
});
navigate(
- SettingsPath.ApiWebhooks,
+ SettingsPath.Developers,
undefined,
undefined,
undefined,
- SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.WEBHOOKS,
+ SETTINGS_DEVELOPERS_TABS.TABS_IDS.WEBHOOKS,
);
} catch (error) {
enqueueToast(getToastOptionsFromError({ error }));
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/states/playgroundApiKeyState.ts b/packages/twenty-front/src/modules/settings/developers/states/playgroundApiKeyState.ts
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/states/playgroundApiKeyState.ts
rename to packages/twenty-front/src/modules/settings/developers/states/playgroundApiKeyState.ts
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/types/PlaygroundSchemas.ts b/packages/twenty-front/src/modules/settings/developers/types/PlaygroundSchemas.ts
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/types/PlaygroundSchemas.ts
rename to packages/twenty-front/src/modules/settings/developers/types/PlaygroundSchemas.ts
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/types/PlaygroundTypes.ts b/packages/twenty-front/src/modules/settings/developers/types/PlaygroundTypes.ts
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/types/PlaygroundTypes.ts
rename to packages/twenty-front/src/modules/settings/developers/types/PlaygroundTypes.ts
diff --git a/packages/twenty-front/src/modules/settings/emailing-domains/components/SettingsEmailingDomainAiSetup.tsx b/packages/twenty-front/src/modules/settings/emailing-domains/components/SettingsEmailingDomainAiSetup.tsx
index fdd60061d81..0555154a496 100644
--- a/packages/twenty-front/src/modules/settings/emailing-domains/components/SettingsEmailingDomainAiSetup.tsx
+++ b/packages/twenty-front/src/modules/settings/emailing-domains/components/SettingsEmailingDomainAiSetup.tsx
@@ -5,11 +5,11 @@ import { IconX } from 'twenty-ui/icon';
import { Tooltip } from 'twenty-ui/primitives/surfaces';
import { themeCssVariables, useTheme } from 'twenty-ui/theme';
-import ClaudeLogo from '@/settings/mcp-and-apis/assets/mcp-clients/claude-color.png';
-import CursorLogo from '@/settings/mcp-and-apis/assets/mcp-clients/cursor.svg';
-import GeminiCliLogo from '@/settings/mcp-and-apis/assets/mcp-clients/gemini-cli.svg';
-import OpenAiLogo from '@/settings/mcp-and-apis/assets/mcp-clients/openai.svg';
-import { McpClientLogo } from '@/settings/mcp-and-apis/components/McpClientLogo';
+import ClaudeLogo from '@/settings/mcp/assets/mcp-clients/claude-color.png';
+import CursorLogo from '@/settings/mcp/assets/mcp-clients/cursor.svg';
+import GeminiCliLogo from '@/settings/mcp/assets/mcp-clients/gemini-cli.svg';
+import OpenAiLogo from '@/settings/mcp/assets/mcp-clients/openai.svg';
+import { McpClientLogo } from '@/settings/mcp/components/McpClientLogo';
import { buildEmailingDomainAiSetupPrompt } from '@/settings/emailing-domains/utils/buildEmailingDomainAiSetupPrompt';
import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';
diff --git a/packages/twenty-front/src/modules/settings/event-logs/components/SettingsOpenLogConsoleCard.tsx b/packages/twenty-front/src/modules/settings/event-logs/components/SettingsOpenLogConsoleCard.tsx
index d1572d7dbe7..a60a237324d 100644
--- a/packages/twenty-front/src/modules/settings/event-logs/components/SettingsOpenLogConsoleCard.tsx
+++ b/packages/twenty-front/src/modules/settings/event-logs/components/SettingsOpenLogConsoleCard.tsx
@@ -2,9 +2,9 @@ import { useLingui } from '@lingui/react/macro';
import { isLogConsoleFullScreenState } from '@/log-console/states/isLogConsoleFullScreenState';
import { logConsoleDisplayModeState } from '@/log-console/states/logConsoleDisplayModeState';
-import { useSetAdvancedMode } from '@/navigation/hooks/useSetAdvancedMode';
+import { useSetIsLogConsoleEnabled } from '@/log-console/hooks/useSetIsLogConsoleEnabled';
import { SettingsOptionCardContentButton } from '@/settings/components/SettingsOptions/SettingsOptionCardContentButton';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
+import { isLogConsoleEnabledState } from '@/log-console/states/isLogConsoleEnabledState';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
import { IconHistory, IconTerminal } from 'twenty-ui/icon';
@@ -13,16 +13,16 @@ import { Card } from 'twenty-ui/primitives/surfaces';
export const SettingsOpenLogConsoleCard = () => {
const { t } = useLingui();
- const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
- const { setAdvancedMode } = useSetAdvancedMode();
+ const isLogConsoleEnabled = useAtomStateValue(isLogConsoleEnabledState);
+ const { setIsLogConsoleEnabled } = useSetIsLogConsoleEnabled();
const setLogConsoleDisplayMode = useSetAtomState(logConsoleDisplayModeState);
const setIsLogConsoleFullScreen = useSetAtomState(
isLogConsoleFullScreenState,
);
const openLogConsole = () => {
- if (!isAdvancedModeEnabled) {
- setAdvancedMode(true);
+ if (!isLogConsoleEnabled) {
+ setIsLogConsoleEnabled(true);
return;
}
diff --git a/packages/twenty-front/src/modules/settings/event-logs/components/__stories__/SettingsOpenLogConsoleCard.stories.tsx b/packages/twenty-front/src/modules/settings/event-logs/components/__stories__/SettingsOpenLogConsoleCard.stories.tsx
index ccbf35546e3..0bd5bcb9c35 100644
--- a/packages/twenty-front/src/modules/settings/event-logs/components/__stories__/SettingsOpenLogConsoleCard.stories.tsx
+++ b/packages/twenty-front/src/modules/settings/event-logs/components/__stories__/SettingsOpenLogConsoleCard.stories.tsx
@@ -2,7 +2,7 @@ import { isLogConsoleFullScreenState } from '@/log-console/states/isLogConsoleFu
import { logConsoleDisplayModeState } from '@/log-console/states/logConsoleDisplayModeState';
import { logConsoleHeightState } from '@/log-console/states/logConsoleHeightState';
import { SettingsOpenLogConsoleCard } from '@/settings/event-logs/components/SettingsOpenLogConsoleCard';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
+import { isLogConsoleEnabledState } from '@/log-console/states/isLogConsoleEnabledState';
import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';
import { type Meta, type StoryObj } from '@storybook/react-vite';
import { expect, userEvent, waitFor, within } from 'storybook/test';
@@ -13,7 +13,7 @@ const meta: Meta<typeof SettingsOpenLogConsoleCard> = {
component: SettingsOpenLogConsoleCard,
decorators: [ComponentDecorator],
beforeEach: () => {
- jotaiStore.set(isAdvancedModeEnabledState.atom, false);
+ jotaiStore.set(isLogConsoleEnabledState.atom, false);
jotaiStore.set(logConsoleDisplayModeState.atom, 'collapsed');
jotaiStore.set(isLogConsoleFullScreenState.atom, true);
},
@@ -30,16 +30,16 @@ export const OpensLogConsole: Story = {
);
await waitFor(() => {
- expect(jotaiStore.get(isAdvancedModeEnabledState.atom)).toBe(true);
+ expect(jotaiStore.get(isLogConsoleEnabledState.atom)).toBe(true);
expect(jotaiStore.get(logConsoleDisplayModeState.atom)).toBe('open');
expect(jotaiStore.get(isLogConsoleFullScreenState.atom)).toBe(false);
});
},
};
-export const KeepsConsoleHeightWhenDeveloperModeIsOn: Story = {
+export const KeepsConsoleHeightWhenLogsSwitchIsOn: Story = {
beforeEach: () => {
- jotaiStore.set(isAdvancedModeEnabledState.atom, true);
+ jotaiStore.set(isLogConsoleEnabledState.atom, true);
jotaiStore.set(logConsoleHeightState.atom, 450);
},
play: async ({ canvasElement }) => {
diff --git a/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsx b/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsx
index f3cace2da53..51282fd8779 100644
--- a/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsx
+++ b/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsx
@@ -18,6 +18,7 @@ import {
IconApps,
IconAt,
IconCalendarEvent,
+ IconCode,
IconColorSwatch,
type IconComponent,
IconCreditCard,
@@ -27,7 +28,6 @@ import {
IconMail,
IconMessage,
IconMessageCircle,
- IconPlug,
IconServer,
IconSettings2,
IconSparkles,
@@ -43,7 +43,6 @@ import { openUrlInNewTab } from '~/utils/openUrlInNewTab';
export type SettingsNavigationSection = {
label: string;
items: SettingsNavigationItem[];
- isAdvanced?: boolean;
};
export type SettingsNavigationItem = {
@@ -55,7 +54,6 @@ export type SettingsNavigationItem = {
matchSubPages?: boolean;
isHidden?: boolean;
subItems?: SettingsNavigationItem[];
- isAdvanced?: boolean;
modifier?: NavigationDrawerItemModifier;
};
@@ -157,9 +155,9 @@ const useSettingsNavigationItems = (): SettingsNavigationSection[] => {
!permissionFlagMap[PermissionFlagType.WORKSPACE],
},
{
- label: t`MCP & APIs`,
- path: SettingsPath.ApiWebhooks,
- Icon: IconPlug,
+ label: t`Developers`,
+ path: SettingsPath.Developers,
+ Icon: IconCode,
isHidden:
!permissionFlagMap[PermissionFlagType.API_KEYS_AND_WEBHOOKS],
},
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/amazon-q.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/amazon-q.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/amazon-q.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/amazon-q.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/augment-code.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/augment-code.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/augment-code.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/augment-code.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/claude-color.png b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/claude-color.png
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/claude-color.png
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/claude-color.png
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/cline.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/cline.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/cline.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/cline.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/cursor.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/cursor.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/cursor.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/cursor.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/gemini-cli.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/gemini-cli.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/gemini-cli.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/gemini-cli.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/goose.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/goose.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/goose.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/goose.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/jetbrains.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/jetbrains.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/jetbrains.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/jetbrains.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/librechat.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/librechat.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/librechat.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/librechat.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/lm-studio.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/lm-studio.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/lm-studio.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/lm-studio.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/openai.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/openai.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/openai.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/openai.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/raycast.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/raycast.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/raycast.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/raycast.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/replit.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/replit.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/replit.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/replit.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/vs-code.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/vs-code.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/vs-code.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/vs-code.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/warp.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/warp.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/warp.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/warp.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/windsurf.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/windsurf.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/windsurf.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/windsurf.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/zed.svg b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/zed.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-clients/zed.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-clients/zed.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-cover-dark.png b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-cover-dark.png
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-cover-dark.png
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-cover-dark.png
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-cover-light.png b/packages/twenty-front/src/modules/settings/mcp/assets/mcp-cover-light.png
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/mcp-cover-light.png
rename to packages/twenty-front/src/modules/settings/mcp/assets/mcp-cover-light.png
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/assets/model-context-protocol-logo.svg b/packages/twenty-front/src/modules/settings/mcp/assets/model-context-protocol-logo.svg
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/assets/model-context-protocol-logo.svg
rename to packages/twenty-front/src/modules/settings/mcp/assets/model-context-protocol-logo.svg
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/McpClientLogo.tsx b/packages/twenty-front/src/modules/settings/mcp/components/McpClientLogo.tsx
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/components/McpClientLogo.tsx
rename to packages/twenty-front/src/modules/settings/mcp/components/McpClientLogo.tsx
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetup.tsx b/packages/twenty-front/src/modules/settings/mcp/components/SettingsMcpSetup.tsx
similarity index 90%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetup.tsx
rename to packages/twenty-front/src/modules/settings/mcp/components/SettingsMcpSetup.tsx
index 48e79db9933..8ebaefb601c 100644
--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetup.tsx
+++ b/packages/twenty-front/src/modules/settings/mcp/components/SettingsMcpSetup.tsx
@@ -3,14 +3,14 @@ import { t } from '@lingui/core/macro';
import { Fragment } from 'react';
import { LightCopyIconButton } from '@/ui/input/components/LightCopyIconButton';
-import ModelContextProtocolLogo from '@/settings/mcp-and-apis/assets/model-context-protocol-logo.svg?react';
-import { SettingsMcpSetupCard } from '@/settings/mcp-and-apis/components/SettingsMcpSetupCard';
-import { buildMcpSetupCategories } from '@/settings/mcp-and-apis/utils/buildMcpSetupCategories';
+import ModelContextProtocolLogo from '@/settings/mcp/assets/model-context-protocol-logo.svg?react';
+import { SettingsMcpSetupCard } from '@/settings/mcp/components/SettingsMcpSetupCard';
+import { buildMcpSetupCategories } from '@/settings/mcp/utils/buildMcpSetupCategories';
import {
buildMcpConfig,
buildMcpServerUrl,
isHttpsUrl,
-} from '@/settings/mcp-and-apis/utils/mcpSetup';
+} from '@/settings/mcp/utils/mcpSetup';
import { Section } from 'twenty-ui/components/layout';
import { CodeEditor, CodeEditorHeader } from 'twenty-ui/components/code-editor';
import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetupCard.tsx b/packages/twenty-front/src/modules/settings/mcp/components/SettingsMcpSetupCard.tsx
similarity index 98%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetupCard.tsx
rename to packages/twenty-front/src/modules/settings/mcp/components/SettingsMcpSetupCard.tsx
index a4a48b3db67..839de054f70 100644
--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetupCard.tsx
+++ b/packages/twenty-front/src/modules/settings/mcp/components/SettingsMcpSetupCard.tsx
@@ -1,7 +1,7 @@
import { styled } from '@linaria/react';
import { isDefined } from 'twenty-shared/utils';
-import { type McpSetupCard } from '@/settings/mcp-and-apis/types/McpSetup';
+import { type McpSetupCard } from '@/settings/mcp/types/McpSetup';
import { TooltipDelay } from '@/ui/layout/tooltip/constants/TooltipDelay';
import { IconExternalLink } from 'twenty-ui/icon';
import { Badge } from 'twenty-ui/primitives/data-display';
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/SettingsMcpSetup.stories.tsx b/packages/twenty-front/src/modules/settings/mcp/components/__stories__/SettingsMcpSetup.stories.tsx
similarity index 81%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/SettingsMcpSetup.stories.tsx
rename to packages/twenty-front/src/modules/settings/mcp/components/__stories__/SettingsMcpSetup.stories.tsx
index 9ab1c844a9c..eda7500a359 100644
--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/__stories__/SettingsMcpSetup.stories.tsx
+++ b/packages/twenty-front/src/modules/settings/mcp/components/__stories__/SettingsMcpSetup.stories.tsx
@@ -1,10 +1,10 @@
-import { SettingsMcpSetup } from '@/settings/mcp-and-apis/components/SettingsMcpSetup';
+import { SettingsMcpSetup } from '@/settings/mcp/components/SettingsMcpSetup';
import { type Meta, type StoryObj } from '@storybook/react-vite';
import { ComponentDecorator } from 'twenty-ui/testing';
import { ToastDecorator } from '~/testing/decorators/ToastDecorator';
const meta: Meta<typeof SettingsMcpSetup> = {
- title: 'Modules/Settings/Playground/SettingsMcpSetup',
+ title: 'Modules/Settings/Mcp/SettingsMcpSetup',
component: SettingsMcpSetup,
decorators: [ComponentDecorator, ToastDecorator],
parameters: {
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/constants/McpSetup.ts b/packages/twenty-front/src/modules/settings/mcp/constants/McpSetup.ts
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/constants/McpSetup.ts
rename to packages/twenty-front/src/modules/settings/mcp/constants/McpSetup.ts
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/types/McpSetup.ts b/packages/twenty-front/src/modules/settings/mcp/types/McpSetup.ts
similarity index 100%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/types/McpSetup.ts
rename to packages/twenty-front/src/modules/settings/mcp/types/McpSetup.ts
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/utils/__tests__/mcpSetup.test.ts b/packages/twenty-front/src/modules/settings/mcp/utils/__tests__/mcpSetup.test.ts
similarity index 98%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/utils/__tests__/mcpSetup.test.ts
rename to packages/twenty-front/src/modules/settings/mcp/utils/__tests__/mcpSetup.test.ts
index fd176d48a88..4e4071cf4a2 100644
--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/utils/__tests__/mcpSetup.test.ts
+++ b/packages/twenty-front/src/modules/settings/mcp/utils/__tests__/mcpSetup.test.ts
@@ -9,7 +9,7 @@ import {
buildRemoteMcpServerConfig,
buildVsCodeInstallLink,
isHttpsUrl,
-} from '@/settings/mcp-and-apis/utils/mcpSetup';
+} from '@/settings/mcp/utils/mcpSetup';
const mcpServerUrl = 'https://api.twenty.com/mcp';
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx b/packages/twenty-front/src/modules/settings/mcp/utils/buildMcpSetupCategories.tsx
similarity index 79%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
rename to packages/twenty-front/src/modules/settings/mcp/utils/buildMcpSetupCategories.tsx
index 45ed0244c29..74004f811e7 100644
--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/utils/buildMcpSetupCategories.tsx
+++ b/packages/twenty-front/src/modules/settings/mcp/utils/buildMcpSetupCategories.tsx
@@ -1,25 +1,25 @@
import { t } from '@lingui/core/macro';
-import AmazonQLogo from '@/settings/mcp-and-apis/assets/mcp-clients/amazon-q.svg';
-import AugmentCodeLogo from '@/settings/mcp-and-apis/assets/mcp-clients/augment-code.svg';
-import ClaudeLogo from '@/settings/mcp-and-apis/assets/mcp-clients/claude-color.png';
-import ClineLogo from '@/settings/mcp-and-apis/assets/mcp-clients/cline.svg';
-import CursorLogo from '@/settings/mcp-and-apis/assets/mcp-clients/cursor.svg';
-import GeminiCliLogo from '@/settings/mcp-and-apis/assets/mcp-clients/gemini-cli.svg';
-import GooseLogo from '@/settings/mcp-and-apis/assets/mcp-clients/goose.svg';
-import JetBrainsLogo from '@/settings/mcp-and-apis/assets/mcp-clients/jetbrains.svg';
-import LibreChatLogo from '@/settings/mcp-and-apis/assets/mcp-clients/librechat.svg';
-import LmStudioLogo from '@/settings/mcp-and-apis/assets/mcp-clients/lm-studio.svg';
-import OpenAiLogo from '@/settings/mcp-and-apis/assets/mcp-clients/openai.svg';
-import RaycastLogo from '@/settings/mcp-and-apis/assets/mcp-clients/raycast.svg';
-import ReplitLogo from '@/settings/mcp-and-apis/assets/mcp-clients/replit.svg';
-import VsCodeLogo from '@/settings/mcp-and-apis/assets/mcp-clients/vs-code.svg';
-import WarpLogo from '@/settings/mcp-and-apis/assets/mcp-clients/warp.svg';
-import WindsurfLogo from '@/settings/mcp-and-apis/assets/mcp-clients/windsurf.svg';
-import ZedLogo from '@/settings/mcp-and-apis/assets/mcp-clients/zed.svg';
-import { McpClientLogo } from '@/settings/mcp-and-apis/components/McpClientLogo';
-import { MCP_SETUP } from '@/settings/mcp-and-apis/constants/McpSetup';
-import { type McpSetupCategory } from '@/settings/mcp-and-apis/types/McpSetup';
+import AmazonQLogo from '@/settings/mcp/assets/mcp-clients/amazon-q.svg';
+import AugmentCodeLogo from '@/settings/mcp/assets/mcp-clients/augment-code.svg';
+import ClaudeLogo from '@/settings/mcp/assets/mcp-clients/claude-color.png';
+import ClineLogo from '@/settings/mcp/assets/mcp-clients/cline.svg';
+import CursorLogo from '@/settings/mcp/assets/mcp-clients/cursor.svg';
+import GeminiCliLogo from '@/settings/mcp/assets/mcp-clients/gemini-cli.svg';
+import GooseLogo from '@/settings/mcp/assets/mcp-clients/goose.svg';
+import JetBrainsLogo from '@/settings/mcp/assets/mcp-clients/jetbrains.svg';
+import LibreChatLogo from '@/settings/mcp/assets/mcp-clients/librechat.svg';
+import LmStudioLogo from '@/settings/mcp/assets/mcp-clients/lm-studio.svg';
+import OpenAiLogo from '@/settings/mcp/assets/mcp-clients/openai.svg';
+import RaycastLogo from '@/settings/mcp/assets/mcp-clients/raycast.svg';
+import ReplitLogo from '@/settings/mcp/assets/mcp-clients/replit.svg';
+import VsCodeLogo from '@/settings/mcp/assets/mcp-clients/vs-code.svg';
+import WarpLogo from '@/settings/mcp/assets/mcp-clients/warp.svg';
+import WindsurfLogo from '@/settings/mcp/assets/mcp-clients/windsurf.svg';
+import ZedLogo from '@/settings/mcp/assets/mcp-clients/zed.svg';
+import { McpClientLogo } from '@/settings/mcp/components/McpClientLogo';
+import { MCP_SETUP } from '@/settings/mcp/constants/McpSetup';
+import { type McpSetupCategory } from '@/settings/mcp/types/McpSetup';
import {
buildClaudeInstallLink,
buildCursorInstallLink,
@@ -27,7 +27,7 @@ import {
buildLmStudioInstallLink,
buildReplitInstallLink,
buildVsCodeInstallLink,
-} from '@/settings/mcp-and-apis/utils/mcpSetup';
+} from '@/settings/mcp/utils/mcpSetup';
type BuildMcpSetupCategoriesParams = {
isHttpsInstallLinkEnabled: boolean;
diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/utils/mcpSetup.ts b/packages/twenty-front/src/modules/settings/mcp/utils/mcpSetup.ts
similarity index 97%
rename from packages/twenty-front/src/modules/settings/mcp-and-apis/utils/mcpSetup.ts
rename to packages/twenty-front/src/modules/settings/mcp/utils/mcpSetup.ts
index deb05d56d6d..fb2573aff26 100644
--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/utils/mcpSetup.ts
+++ b/packages/twenty-front/src/modules/settings/mcp/utils/mcpSetup.ts
@@ -1,4 +1,4 @@
-import { MCP_SETUP } from '@/settings/mcp-and-apis/constants/McpSetup';
+import { MCP_SETUP } from '@/settings/mcp/constants/McpSetup';
export const buildMcpServerUrl = (serverBaseUrl: string) =>
`${serverBaseUrl.replace(/\/+$/, '')}/mcp`;
diff --git a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentEntityPickerDropdown.tsx b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentEntityPickerDropdown.tsx
index 7f8548b8d61..9ecedcf4caa 100644
--- a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentEntityPickerDropdown.tsx
+++ b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentEntityPickerDropdown.tsx
@@ -1,8 +1,6 @@
import { useLingui } from '@lingui/react/macro';
import { useMemo, useState } from 'react';
import { useQuery } from '@apollo/client/react';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
-import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { Dropdown } from 'twenty-ui/components/navigation';
import {
type Agent,
@@ -29,7 +27,7 @@ export const SettingsRoleAssignmentEntityPickerDropdown = ({
const { t } = useLingui();
const isAgent = entityType === 'agent';
- const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
+ const shouldShowSystemAgents = searchFilter !== '';
const { data: agentsData, loading: agentsLoading } = useQuery(
FindManyAgentsDocument,
@@ -50,14 +48,14 @@ export const SettingsRoleAssignmentEntityPickerDropdown = ({
return ((isAgent
? agentsData?.findManyAgents.filter(
(agent) =>
- agent.isCustom && (!agent.isSystem || isAdvancedModeEnabled),
+ agent.isCustom && (!agent.isSystem || shouldShowSystemAgents),
)
: apiKeysData?.apiKeys) || []) as EntityData[];
}, [
isAgent,
agentsData?.findManyAgents,
apiKeysData?.apiKeys,
- isAdvancedModeEnabled,
+ shouldShowSystemAgents,
]);
const placeholder = isAgent ? t`Search agents` : t`Search API keys`;
diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/hooks/useSettingsRolePermissionFlagConfig.ts b/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/hooks/useSettingsRolePermissionFlagConfig.ts
index 7793a9ae2b4..87953e198cd 100644
--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/hooks/useSettingsRolePermissionFlagConfig.ts
+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/hooks/useSettingsRolePermissionFlagConfig.ts
@@ -8,7 +8,7 @@ import {
IconKey,
IconAppWindow,
IconLock,
- IconPlug,
+ IconCode,
IconSettings,
IconSettingsAutomation,
IconShield,
@@ -41,9 +41,9 @@ export const useSettingsRolePermissionFlagConfig = ({
const allPermissions: SettingsRolePermissionsSettingPermission[] = [
{
key: PermissionFlagType.API_KEYS_AND_WEBHOOKS,
- name: t`MCP & APIs`,
- description: t`Manage MCP, API keys, and webhooks`,
- Icon: IconPlug,
+ name: t`Developers`,
+ description: t`Manage API keys, webhooks, and apps`,
+ Icon: IconCode,
isRelevantForAgents: true,
isRelevantForApiKeys: true,
isRelevantForUsers: true,
diff --git a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthBypassOptionsList.tsx b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthBypassOptionsList.tsx
index 77f32744dea..d658391cb41 100644
--- a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthBypassOptionsList.tsx
+++ b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthBypassOptionsList.tsx
@@ -89,7 +89,6 @@ export const SettingsSecurityAuthBypassOptionsList = () => {
title={t`Google`}
description={t`Allow Google-based login for users with SSO bypass permissions.`}
checked={currentWorkspace.isGoogleAuthBypassEnabled}
- advancedMode
divider
onChange={() => toggleAuthBypassMethod('google')}
/>
@@ -100,7 +99,6 @@ export const SettingsSecurityAuthBypassOptionsList = () => {
title={t`Microsoft`}
description={t`Allow Microsoft-based login for users with SSO bypass permissions.`}
checked={currentWorkspace.isMicrosoftAuthBypassEnabled}
- advancedMode
divider
onChange={() => toggleAuthBypassMethod('microsoft')}
/>
@@ -111,7 +109,6 @@ export const SettingsSecurityAuthBypassOptionsList = () => {
title={t`Password`}
description={t`Allow email & password login for SSO bypass users.`}
checked={currentWorkspace.isPasswordAuthBypassEnabled}
- advancedMode
onChange={() => toggleAuthBypassMethod('password')}
/>
)}
diff --git a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthProvidersOptionsList.tsx b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthProvidersOptionsList.tsx
index 7866c777e35..76230ce3484 100644
--- a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthProvidersOptionsList.tsx
+++ b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthProvidersOptionsList.tsx
@@ -204,7 +204,6 @@ export const SettingsSecurityAuthProvidersOptionsList = () => {
title={t`Google`}
description={t`Allow logins through Google's single sign-on functionality.`}
checked={currentWorkspace.isGoogleAuthEnabled}
- advancedMode
divider
onChange={() =>
toggleAuthMethod(ConnectedAccountProvider.GOOGLE)
@@ -217,7 +216,6 @@ export const SettingsSecurityAuthProvidersOptionsList = () => {
title={t`Microsoft`}
description={t`Allow logins through Microsoft's single sign-on functionality.`}
checked={currentWorkspace.isMicrosoftAuthEnabled}
- advancedMode
divider
onChange={() =>
toggleAuthMethod(ConnectedAccountProvider.MICROSOFT)
@@ -230,7 +228,6 @@ export const SettingsSecurityAuthProvidersOptionsList = () => {
title={t`Password`}
description={t`Allow users to sign in with an email and password.`}
checked={currentWorkspace.isPasswordAuthEnabled}
- advancedMode
onChange={() => toggleAuthMethod('password')}
/>
)}
@@ -241,7 +238,6 @@ export const SettingsSecurityAuthProvidersOptionsList = () => {
title={t`Invite by Link`}
description={t`Allow the invitation of new users by sharing an invite link.`}
checked={currentWorkspace.isPublicInviteLinkEnabled}
- advancedMode
divider
onChange={() =>
handleChange(!currentWorkspace.isPublicInviteLinkEnabled)
diff --git a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityIframeOrigins.tsx b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityIframeOrigins.tsx
index 2c996e3b884..dc314b6f6a1 100644
--- a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityIframeOrigins.tsx
+++ b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityIframeOrigins.tsx
@@ -93,7 +93,7 @@ export const SettingsSecurityIframeOrigins = () => {
<Section.Root>
<Section.Header
title={t`Iframe embedding`}
- description={t`Allow trusted websites to display this workspace in an iframe. Users who are already signed in may see their workspace inside those websites, so only add origins you fully trust. Leave the list empty to block external embedding.`}
+ description={t`Websites allowed to embed this workspace. Only add ones you fully trust.`}
/>
<StyledList>
{isDefined(policyError) && (
diff --git a/packages/twenty-front/src/modules/settings/security/components/TwoFactorAuthenticationSwitch.tsx b/packages/twenty-front/src/modules/settings/security/components/TwoFactorAuthenticationSwitch.tsx
index a6ecbd24dd1..34f2cff95e9 100644
--- a/packages/twenty-front/src/modules/settings/security/components/TwoFactorAuthenticationSwitch.tsx
+++ b/packages/twenty-front/src/modules/settings/security/components/TwoFactorAuthenticationSwitch.tsx
@@ -60,7 +60,6 @@ export const TwoFactorAuthenticationSwitch = () => {
description={t`Enforce two-step verification for every user login.`}
checked={currentWorkspace.isTwoFactorAuthenticationEnforced}
onChange={handleChange}
- advancedMode
/>
)}
</>
diff --git a/packages/twenty-front/src/modules/settings/workspace/components/ImpersonationSwitch.tsx b/packages/twenty-front/src/modules/settings/workspace/components/ImpersonationSwitch.tsx
index e1089543de6..a1780a544c1 100644
--- a/packages/twenty-front/src/modules/settings/workspace/components/ImpersonationSwitch.tsx
+++ b/packages/twenty-front/src/modules/settings/workspace/components/ImpersonationSwitch.tsx
@@ -49,7 +49,6 @@ export const ImpersonationSwitch = () => {
description={t`Grant access to your workspace so we can troubleshoot problems.`}
checked={currentWorkspace?.allowImpersonation ?? false}
onChange={handleChange}
- advancedMode
/>
</Card.Root>
);
diff --git a/packages/twenty-front/src/modules/settings/workspace/components/SettingsWorkspaceEmailSyncSection.tsx b/packages/twenty-front/src/modules/settings/workspace/components/SettingsWorkspaceEmailSyncSection.tsx
index 74bfb9387f3..ecddd85c687 100644
--- a/packages/twenty-front/src/modules/settings/workspace/components/SettingsWorkspaceEmailSyncSection.tsx
+++ b/packages/twenty-front/src/modules/settings/workspace/components/SettingsWorkspaceEmailSyncSection.tsx
@@ -58,7 +58,6 @@ export const SettingsWorkspaceEmailSyncSection = () => {
description={t`Include emails where all participants share the same domain.`}
checked={currentWorkspace?.isInternalMessagesImportEnabled ?? false}
onChange={handleSyncInternalEmailsChange}
- advancedMode
/>
</Card.Root>
</Section.Root>
diff --git a/packages/twenty-front/src/modules/ui/input/components/AdvancedSettingsSwitch.tsx b/packages/twenty-front/src/modules/ui/input/components/AdvancedSettingsSwitch.tsx
deleted file mode 100644
index 70b33801c55..00000000000
--- a/packages/twenty-front/src/modules/ui/input/components/AdvancedSettingsSwitch.tsx
+++ /dev/null
@@ -1,75 +0,0 @@
-import { NAVIGATION_DRAWER_COLLAPSED_BUTTON_SIZE } from '@/ui/navigation/navigation-drawer/constants/NavigationDrawerCollapsedButtonSize';
-import { styled } from '@linaria/react';
-import { useLingui } from '@lingui/react/macro';
-import { useId } from 'react';
-import { Switch } from 'twenty-ui/primitives/input';
-import { themeCssVariables } from 'twenty-ui/theme';
-
-const StyledContainer = styled.label<{ isCompact: boolean }>`
- align-items: center;
- box-sizing: border-box;
- cursor: pointer;
- display: flex;
- height: ${({ isCompact }) =>
- isCompact
- ? `${NAVIGATION_DRAWER_COLLAPSED_BUTTON_SIZE}px`
- : themeCssVariables.spacing[5]};
- justify-content: ${({ isCompact }) =>
- isCompact ? 'center' : 'space-between'};
- padding: ${({ isCompact }) =>
- isCompact ? '0' : themeCssVariables.spacing[1]};
- width: ${({ isCompact }) =>
- isCompact ? `${NAVIGATION_DRAWER_COLLAPSED_BUTTON_SIZE}px` : '100%'};
-`;
-
-const StyledText = styled.div`
- color: ${themeCssVariables.font.color.secondary};
- font-size: ${themeCssVariables.font.size.sm};
- font-weight: ${themeCssVariables.font.weight.medium};
-`;
-
-const StyledSwitch = styled(Switch)`
- color: ${themeCssVariables.color.yellow};
-`;
-
-type AdvancedSettingsSwitchProps = {
- isAdvancedModeEnabled: boolean;
- setIsAdvancedModeEnabled: (enabled: boolean) => void;
- label?: string;
- className?: string;
- isCompact?: boolean;
-};
-
-export const AdvancedSettingsSwitch = ({
- isAdvancedModeEnabled,
- setIsAdvancedModeEnabled,
- label,
- className,
- isCompact = false,
-}: AdvancedSettingsSwitchProps) => {
- const { t } = useLingui();
- const onChange = (newValue: boolean) => {
- setIsAdvancedModeEnabled(newValue);
- };
- const instanceId = useId();
- const labelId = `${instanceId}-text`;
- const switchLabel = label ?? t`Advanced`;
-
- return (
- <StyledContainer
- className={className}
- htmlFor={instanceId}
- isCompact={isCompact}
- title={isCompact ? switchLabel : undefined}
- >
- {!isCompact && <StyledText id={labelId}>{switchLabel}</StyledText>}
- <StyledSwitch
- id={instanceId}
- aria-label={isCompact ? switchLabel : undefined}
- aria-labelledby={isCompact ? undefined : labelId}
- onCheckedChange={onChange}
- checked={isAdvancedModeEnabled}
- />
- </StyledContainer>
- );
-};
diff --git a/packages/twenty-front/src/modules/ui/input/components/__stories__/AdvancedSettingsSwitch.stories.tsx b/packages/twenty-front/src/modules/ui/input/components/__stories__/AdvancedSettingsSwitch.stories.tsx
deleted file mode 100644
index ede09952d2c..00000000000
--- a/packages/twenty-front/src/modules/ui/input/components/__stories__/AdvancedSettingsSwitch.stories.tsx
+++ /dev/null
@@ -1,83 +0,0 @@
-import { AdvancedSettingsSwitch } from '@/ui/input/components/AdvancedSettingsSwitch';
-import { type Meta, type StoryObj } from '@storybook/react-vite';
-import { type ComponentProps, useState } from 'react';
-import { expect, fn, userEvent, within } from 'storybook/test';
-import { ComponentDecorator } from 'twenty-ui/testing';
-import { ThemeProvider } from 'twenty-ui/theme';
-
-type ControlledAdvancedSettingsSwitchProps = ComponentProps<
- typeof AdvancedSettingsSwitch
->;
-
-const ControlledAdvancedSettingsSwitch = ({
- isAdvancedModeEnabled,
- setIsAdvancedModeEnabled,
- ...props
-}: ControlledAdvancedSettingsSwitchProps) => {
- const [enabled, setEnabled] = useState(isAdvancedModeEnabled);
-
- return (
- <AdvancedSettingsSwitch
- {...props}
- isAdvancedModeEnabled={enabled}
- setIsAdvancedModeEnabled={(nextEnabled) => {
- setEnabled(nextEnabled);
- setIsAdvancedModeEnabled(nextEnabled);
- }}
- />
- );
-};
-
-const meta: Meta<typeof AdvancedSettingsSwitch> = {
- title: 'UI/Input/AdvancedSettingsSwitch',
- component: AdvancedSettingsSwitch,
- decorators: [ComponentDecorator],
- parameters: { container: { width: 300 } },
- args: {
- isAdvancedModeEnabled: false,
- setIsAdvancedModeEnabled: fn(),
- },
- render: (args) => <ControlledAdvancedSettingsSwitch {...args} />,
-};
-
-export default meta;
-type Story = StoryObj<typeof AdvancedSettingsSwitch>;
-
-export const Default: Story = {
- play: async ({ canvasElement, args }) => {
- const canvas = within(canvasElement);
- const control = await canvas.findByRole('switch', { name: 'Advanced' });
- await userEvent.click(canvas.getByText('Advanced'));
- await expect(control).toBeChecked();
- await expect(args.setIsAdvancedModeEnabled).toHaveBeenLastCalledWith(true);
- await userEvent.click(control);
- await expect(control).not.toBeChecked();
- await expect(args.setIsAdvancedModeEnabled).toHaveBeenLastCalledWith(false);
- await expect(args.setIsAdvancedModeEnabled).toHaveBeenCalledTimes(2);
- },
-};
-
-export const Dark: Story = {
- ...Default,
- decorators: [
- (Story) => (
- <ThemeProvider colorScheme="dark" applyToRoot={false}>
- <Story />
- </ThemeProvider>
- ),
- ],
-};
-
-export const Compact: Story = {
- args: { isCompact: true },
- play: async ({ canvasElement }) => {
- const canvas = within(canvasElement);
- const control = await canvas.findByRole('switch', { name: 'Advanced' });
-
- await expect(control).not.toBeChecked();
- await userEvent.click(control);
- await expect(control).toBeChecked();
- await userEvent.keyboard(' ');
- await expect(control).not.toBeChecked();
- },
-};
diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/CollapsibleNavigationDrawerSection.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/CollapsibleNavigationDrawerSection.tsx
index e389668b95f..43cf7f56965 100644
--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/CollapsibleNavigationDrawerSection.tsx
+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/CollapsibleNavigationDrawerSection.tsx
@@ -18,7 +18,6 @@ type CollapsibleNavigationDrawerSectionProps = {
sectionId: string;
label: string;
children: ReactNode;
- wrapTitle?: (titleNode: ReactNode) => ReactNode;
rightIcon?: ReactNode;
alwaysShowRightIcon?: boolean;
};
@@ -27,7 +26,6 @@ export const CollapsibleNavigationDrawerSection = ({
sectionId,
label,
children,
- wrapTitle,
rightIcon,
alwaysShowRightIcon,
}: CollapsibleNavigationDrawerSectionProps) => {
@@ -35,20 +33,17 @@ export const CollapsibleNavigationDrawerSection = ({
const { toggleNavigationSection, isNavigationSectionOpen } =
useNavigationSection(sectionId);
- const titleNode = (
- <NavigationDrawerSectionTitle
- label={label}
- rightIcon={rightIcon}
- alwaysShowRightIcon={alwaysShowRightIcon}
- onClick={toggleNavigationSection}
- isOpen={isNavigationSectionOpen}
- />
- );
-
return (
<NavigationDrawerSection>
- {isNavigationDrawerExpanded &&
- (wrapTitle ? wrapTitle(titleNode) : titleNode)}
+ {isNavigationDrawerExpanded && (
+ <NavigationDrawerSectionTitle
+ label={label}
+ rightIcon={rightIcon}
+ alwaysShowRightIcon={alwaysShowRightIcon}
+ onClick={toggleNavigationSection}
+ isOpen={isNavigationSectionOpen}
+ />
+ )}
<Collapsible.Root
open={!isNavigationDrawerExpanded || isNavigationSectionOpen}
>
diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/__stories__/NavigationDrawer.stories.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/__stories__/NavigationDrawer.stories.tsx
index cf8693559c1..943082d5fac 100644
--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/__stories__/NavigationDrawer.stories.tsx
+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/__stories__/NavigationDrawer.stories.tsx
@@ -3,7 +3,7 @@ import { useEffect } from 'react';
import { expect, within } from 'storybook/test';
import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';
-import { AdvancedSettingsSwitch } from '@/ui/input/components/AdvancedSettingsSwitch';
+import { LogsSwitch } from '@/navigation/components/LogsSwitch';
import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';
import { setTestObjectMetadataItemsInMetadataStore } from '~/testing/utils/setTestObjectMetadataItemsInMetadataStore';
import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
@@ -184,11 +184,7 @@ export const Settings: Story = {
</NavigationDrawerSection>
<NavigationDrawerFixedContent>
- <AdvancedSettingsSwitch
- isAdvancedModeEnabled={false}
- setIsAdvancedModeEnabled={() => {}}
- label="Advanced:"
- />
+ <LogsSwitch isEnabled={false} onEnabledChange={() => {}} />
</NavigationDrawerFixedContent>
</>
),
diff --git a/packages/twenty-front/src/pages/object-core/AgentCoreIndexPage.tsx b/packages/twenty-front/src/pages/object-core/AgentCoreIndexPage.tsx
index bec6efd0e35..cf6a4938aaf 100644
--- a/packages/twenty-front/src/pages/object-core/AgentCoreIndexPage.tsx
+++ b/packages/twenty-front/src/pages/object-core/AgentCoreIndexPage.tsx
@@ -10,13 +10,16 @@ import {
useCoreAgents,
} from '@/object-core/agents/hooks/useCoreAgents';
import { useCreateCoreAgent } from '@/object-core/agents/hooks/useCreateCoreAgent';
+import { shouldShowSystemCoreAgentsState } from '@/object-core/agents/states/shouldShowSystemCoreAgentsState';
import { type CoreAgent } from '@/object-core/agents/types/CoreAgent';
import { getCoreAgentLink } from '@/object-core/agents/utils/getCoreAgentLink';
import { CoreObjectIndexPageLayout } from '@/object-core/components/CoreObjectIndexPageLayout';
+import { CoreObjectSystemFilterChip } from '@/object-core/components/CoreObjectSystemFilterChip';
import { CoreObjectTable } from '@/object-core/components/CoreObjectTable';
import { CoreObjectTableAddNewRow } from '@/object-core/components/CoreObjectTableAddNewRow';
import { SidePanelToggleButton } from '@/side-panel/components/SidePanelToggleButton';
import { useWorkspaceSurfaceScopedComponentInstanceId } from '@/ui/layout/hooks/useWorkspaceSurfaceScopedComponentInstanceId';
+import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';
const getCoreAgentItemLink = (agent: CoreAgent) => getCoreAgentLink(agent.id);
@@ -26,7 +29,11 @@ export const AgentCoreIndexPage = () => {
const tableId =
useWorkspaceSurfaceScopedComponentInstanceId(CORE_AGENTS_TABLE_ID);
- const { coreAgents, isInitialLoading, error } = useCoreAgents({ tableId });
+ const { coreAgents, hasSystemAgents, isInitialLoading, error } =
+ useCoreAgents({ tableId });
+
+ const [shouldShowSystemCoreAgents, setShouldShowSystemCoreAgents] =
+ useAtomState(shouldShowSystemCoreAgentsState);
const { createCoreAgent, canCreateCoreAgent, isCreatingCoreAgent } =
useCreateCoreAgent();
@@ -41,7 +48,16 @@ export const AgentCoreIndexPage = () => {
icon={
<IconLego size={theme.icon.size.md} stroke={theme.icon.stroke.sm} />
}
- actionButton={<SidePanelToggleButton />}
+ actionButton={
+ <>
+ {hasSystemAgents && !shouldShowSystemCoreAgents && (
+ <CoreObjectSystemFilterChip
+ onRemove={() => setShouldShowSystemCoreAgents(true)}
+ />
+ )}
+ <SidePanelToggleButton />
+ </>
+ }
isInitialLoading={isInitialLoading}
hasError={hasError}
isEmpty={isEmpty}
diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationDangerZone.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationDangerZone.tsx
index d9ccbd4b687..130bcbeed41 100644
--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationDangerZone.tsx
+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationDangerZone.tsx
@@ -1,5 +1,7 @@
import { useApolloAdminClient } from '@/settings/admin-panel/apollo/hooks/useApolloAdminClient';
+import { useHasPermissionFlag } from '@/settings/roles/hooks/useHasPermissionFlag';
import { CLAIM_APPLICATION_REGISTRATION_OWNERSHIP_MODAL_ID } from '@/settings/admin-panel/apps/constants/ClaimApplicationRegistrationOwnershipModalId';
+import { SETTINGS_DEVELOPERS_TABS } from '@/settings/developers/constants/SettingsDevelopersTabs';
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
import { ConfirmationDialog } from '@/ui/layout/dialog/components/ConfirmationDialog';
import { DialogInstance } from '@/ui/layout/dialog/components/DialogInstance';
@@ -24,6 +26,7 @@ import {
DeleteApplicationRegistrationDocument,
FindApplicationRegistrationStatsDocument,
FindManyApplicationRegistrationsDocument,
+ PermissionFlagType,
TransferApplicationRegistrationOwnershipDocument,
} from '~/generated-metadata/graphql';
import { FindOneAdminApplicationRegistrationDocument } from '~/generated-admin/graphql';
@@ -70,6 +73,9 @@ export const SettingsAdminApplicationRegistrationDangerZone = ({
const applicationRegistrationId = registration.id;
const isUnclaimed = !isDefined(registration.ownerWorkspaceId);
+ const hasApplicationsPermission = useHasPermissionFlag(
+ PermissionFlagType.APPLICATIONS,
+ );
const { data: statsData } = useQuery(
FindApplicationRegistrationStatsDocument,
@@ -122,11 +128,11 @@ export const SettingsAdminApplicationRegistrationDangerZone = ({
);
} else {
navigate(
- SettingsPath.Applications,
+ SettingsPath.Developers,
undefined,
undefined,
undefined,
- '#developer',
+ `#${SETTINGS_DEVELOPERS_TABS.TABS_IDS.APPS}`,
);
}
@@ -243,7 +249,7 @@ export const SettingsAdminApplicationRegistrationDangerZone = ({
variant="outline"
>{t`Claim ownership`}</Button>
)
- : !isUnclaimed && (
+ : hasApplicationsPermission && (
<Button
startIcon={<IconShare />}
onClick={() => openDialog(TRANSFER_OWNERSHIP_MODAL_ID)}
diff --git a/packages/twenty-front/src/pages/settings/ai/SettingsAI.tsx b/packages/twenty-front/src/pages/settings/ai/SettingsAI.tsx
index 2c4ef173dcf..67adc36d4a6 100644
--- a/packages/twenty-front/src/pages/settings/ai/SettingsAI.tsx
+++ b/packages/twenty-front/src/pages/settings/ai/SettingsAI.tsx
@@ -14,19 +14,20 @@ import {
IconBook,
IconChartBar,
IconCpu,
- IconLayoutDashboard,
IconPlus,
IconSparkle2,
+ IconSparkles,
IconTool,
} from 'twenty-ui/icon';
import { Button } from 'twenty-ui/primitives/input';
import { SettingsAgentSkillsTab } from '~/pages/settings/ai/components/SettingsAgentSkillsTab';
import { SettingsAgentToolsTab } from '~/pages/settings/ai/components/SettingsAgentToolsTab';
-import { SettingsAiSystemPromptsSection } from '~/pages/settings/ai/components/SettingsAiSystemPromptsSection';
import { SettingsAiModelsTab } from '~/pages/settings/ai/components/SettingsAiModelsTab';
-import { SettingsAiOverviewTab } from '~/pages/settings/ai/components/SettingsAiOverviewTab';
import { SettingsAiUsageTab } from '~/pages/settings/ai/components/SettingsAiUsageTab';
import { SETTINGS_AI_TABS } from '@/settings/ai/constants/SettingsAiTabs';
+import McpCoverDark from '@/settings/mcp/assets/mcp-cover-dark.png';
+import McpCoverLight from '@/settings/mcp/assets/mcp-cover-light.png';
+import { SettingsMcpSetup } from '@/settings/mcp/components/SettingsMcpSetup';
import { useCreateTool } from '~/pages/settings/ai/hooks/useCreateTool';
const AI_HERO_LIGHT = '/images/ai/ai-tools-cover-light.png';
@@ -39,9 +40,9 @@ export const SettingsAI = () => {
const tabs = [
{
- id: SETTINGS_AI_TABS.TABS_IDS.OVERVIEW,
- title: t`Overview`,
- Icon: IconLayoutDashboard,
+ id: SETTINGS_AI_TABS.TABS_IDS.MCP,
+ title: t`MCP`,
+ Icon: IconSparkles,
},
{
id: SETTINGS_AI_TABS.TABS_IDS.MODELS,
@@ -69,8 +70,8 @@ export const SettingsAI = () => {
useSettingsActiveTabId(
SETTINGS_AI_TABS.COMPONENT_INSTANCE_ID,
tabs.map((tab) => tab.id),
- ) ?? SETTINGS_AI_TABS.TABS_IDS.OVERVIEW;
- const isOverviewTab = resolvedTabId === SETTINGS_AI_TABS.TABS_IDS.OVERVIEW;
+ ) ?? SETTINGS_AI_TABS.TABS_IDS.MCP;
+ const isMcpTab = resolvedTabId === SETTINGS_AI_TABS.TABS_IDS.MCP;
const isModelsTab = resolvedTabId === SETTINGS_AI_TABS.TABS_IDS.MODELS;
const isSkillsTab = resolvedTabId === SETTINGS_AI_TABS.TABS_IDS.SKILLS;
const isToolsTab = resolvedTabId === SETTINGS_AI_TABS.TABS_IDS.TOOLS;
@@ -115,7 +116,20 @@ export const SettingsAI = () => {
]}
>
<SettingsPageContainer>
- {!isModelsTab && (
+ {isMcpTab && (
+ <>
+ <Section.Root>
+ <SettingsDiscoveryHeroCard
+ lightSrc={McpCoverLight}
+ darkSrc={McpCoverDark}
+ instanceIdPrefix={SETTINGS_AI_HERO_INSTANCE_ID_PREFIX}
+ tabs={[]}
+ />
+ </Section.Root>
+ <SettingsMcpSetup />
+ </>
+ )}
+ {(isSkillsTab || isToolsTab || isUsageTab) && (
<Section.Root>
<SettingsDiscoveryHeroCard
lightSrc={AI_HERO_LIGHT}
@@ -134,12 +148,6 @@ export const SettingsAI = () => {
/>
</Section.Root>
)}
- {isOverviewTab && (
- <>
- <SettingsAiOverviewTab />
- <SettingsAiSystemPromptsSection />
- </>
- )}
{isModelsTab && <SettingsAiModelsTab />}
{isSkillsTab && <SettingsAgentSkillsTab />}
{isToolsTab && <SettingsAgentToolsTab />}
diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsx
index 9cb13d3f6b5..2599e641b48 100644
--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsx
+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsx
@@ -3,7 +3,6 @@ import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
import { DropdownRoot } from '@/ui/layout/dropdown/components/DropdownRoot';
import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';
import { useSortedArray } from '@/ui/layout/table/hooks/useSortedArray';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { useMutation, useQuery } from '@apollo/client/react';
import { styled } from '@linaria/react';
@@ -42,10 +41,7 @@ export const SettingsAgentSkillsTab = () => {
const [searchTerm, setSearchTerm] = useState('');
const [showDeactivated, setShowDeactivated] = useState(true);
- const [showSystemSkills, setShowSystemSkills] = useState(true);
-
- const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
- const shouldShowSystemSkills = isAdvancedModeEnabled && showSystemSkills;
+ const [showSystemSkills, setShowSystemSkills] = useState(false);
const currentWorkspace = useAtomStateValue(currentWorkspaceState);
const installedApplications = currentWorkspace?.installedApplications;
@@ -88,13 +84,13 @@ export const SettingsAgentSkillsTab = () => {
return false;
}
- if (skill.isSystem && !shouldShowSystemSkills) {
+ if (skill.isSystem && !showSystemSkills) {
return false;
}
return true;
}),
- [sortedSkills, searchTerm, showDeactivated, shouldShowSystemSkills],
+ [sortedSkills, searchTerm, showDeactivated, showSystemSkills],
);
const handleActivate = async (skillId: string) => {
@@ -147,13 +143,11 @@ export const SettingsAgentSkillsTab = () => {
onCheckedChange={setShowDeactivated}
checked={showDeactivated}
>{t`Deactivated`}</SettingsRow>
- {isAdvancedModeEnabled && (
- <SettingsRow
- startElement={<IconSettings />}
- onCheckedChange={setShowSystemSkills}
- checked={showSystemSkills}
- >{t`System skills`}</SettingsRow>
- )}
+ <SettingsRow
+ startElement={<IconSettings />}
+ onCheckedChange={setShowSystemSkills}
+ checked={showSystemSkills}
+ >{t`System skills`}</SettingsRow>
</Dropdown.Section>
</DropdownContent>
</DropdownRoot>
diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAiModelsTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiModelsTab.tsx
index 8e62cfc2680..bd84526c460 100644
--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAiModelsTab.tsx
+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiModelsTab.tsx
@@ -21,6 +21,8 @@ import { Select } from '@/ui/input/components/Select';
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { SettingsAiModelTiersPreview } from '~/pages/settings/ai/components/SettingsAiModelTiersPreview';
+import { SettingsAiSystemPromptsSection } from '~/pages/settings/ai/components/SettingsAiSystemPromptsSection';
+import { SettingsAiWorkspaceInstructionsSection } from '~/pages/settings/ai/components/SettingsAiWorkspaceInstructionsSection';
import { useSettingsAiModelsActions } from '~/pages/settings/ai/hooks/useSettingsAiModelsActions';
export const SettingsAiModelsTab = () => {
@@ -127,6 +129,8 @@ export const SettingsAiModelsTab = () => {
</Section.Root>
<SettingsAiModelTiersPreview />
+ <SettingsAiWorkspaceInstructionsSection />
+ <SettingsAiSystemPromptsSection />
</>
);
};
diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAiOverviewTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiOverviewTab.tsx
deleted file mode 100644
index a32275087a7..00000000000
--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAiOverviewTab.tsx
+++ /dev/null
@@ -1,154 +0,0 @@
-import { FormAdvancedTextFieldInput } from '@/advanced-text-editor/components/FormAdvancedTextFieldInput';
-import { AI_INSTRUCTIONS_EDITOR_PROFILE } from '@/ai/constants/AiInstructionsEditorProfile';
-import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
-import { getToastOptionsFromError } from '@/error-handler/utils/getToastOptionsFromError';
-import { SettingsCard } from '@/settings/components/SettingsCard';
-import { SettingsStatsGrid } from '@/settings/components/SettingsStatsGrid';
-import { UndecoratedLink } from '@/ui/navigation/link/components/UndecoratedLink/UndecoratedLink';
-import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';
-import { CombinedGraphQLErrors } from '@apollo/client';
-import { useMutation, useQuery } from '@apollo/client/react';
-import { styled } from '@linaria/react';
-import { t } from '@lingui/core/macro';
-import { Fragment, useState } from 'react';
-import { SettingsPath } from 'twenty-shared/types';
-import { getSettingsPath } from 'twenty-shared/utils';
-import { useToast } from 'twenty-ui/components/feedback';
-import { Section } from 'twenty-ui/components/layout';
-import { IconBook, IconMessage, IconSparkles, IconTool } from 'twenty-ui/icon';
-import { useTheme, themeCssVariables } from 'twenty-ui/theme';
-import { useDebouncedCallback } from 'use-debounce';
-import {
- FindWorkspaceAiStatsDocument,
- UpdateWorkspaceDocument,
-} from '~/generated-metadata/graphql';
-
-const StyledInstructionsContainer = styled.div`
- display: flex;
- flex-direction: column;
- gap: ${themeCssVariables.spacing[4]};
-`;
-
-const MCP_DEEP_LINK = `${getSettingsPath(SettingsPath.ApiWebhooks)}#mcp`;
-
-export const SettingsAiOverviewTab = () => {
- const theme = useTheme();
- const { enqueueToast } = useToast();
- const [currentWorkspace, setCurrentWorkspace] = useAtomState(
- currentWorkspaceState,
- );
- const [updateWorkspace] = useMutation(UpdateWorkspaceDocument);
-
- const { data: aiStatsData } = useQuery(FindWorkspaceAiStatsDocument);
- const stats = aiStatsData?.findWorkspaceAiStats;
-
- const initialInstructions = currentWorkspace?.aiAdditionalInstructions ?? '';
- const [workspaceInstructions, setWorkspaceInstructions] =
- useState(initialInstructions);
- const [originalInstructions, setOriginalInstructions] =
- useState(initialInstructions);
-
- const autoSave = useDebouncedCallback(async (newValue: string) => {
- if (!currentWorkspace?.id || newValue === originalInstructions) return;
- try {
- setCurrentWorkspace({
- ...currentWorkspace,
- aiAdditionalInstructions: newValue || null,
- });
- await updateWorkspace({
- variables: {
- input: { aiAdditionalInstructions: newValue || null },
- },
- });
- setOriginalInstructions(newValue);
- } catch (error) {
- setCurrentWorkspace({
- ...currentWorkspace,
- aiAdditionalInstructions: originalInstructions || null,
- });
- if (CombinedGraphQLErrors.is(error)) {
- enqueueToast(getToastOptionsFromError({ error }));
- } else {
- enqueueToast({
- status: 'error',
- children: t`Failed to save workspace instructions`,
- });
- }
- }
- }, 1000);
-
- return (
- <Fragment>
- <Section.Root>
- <Section.Header
- title={t`At a glance`}
- description={t`What's installed and being used in your workspace`}
- />
- <SettingsStatsGrid
- columns={[
- [
- {
- Icon: IconMessage,
- label: t`Conversations`,
- value: stats ? stats.conversationsCount.toString() : '—',
- },
- ],
- [
- {
- Icon: IconBook,
- label: t`Skills`,
- value: stats ? stats.skillsCount.toString() : '—',
- },
- ],
- [
- {
- Icon: IconTool,
- label: t`Tools`,
- value: stats ? stats.toolsCount.toString() : '—',
- },
- ],
- ]}
- />
- </Section.Root>
-
- <Section.Root>
- <Section.Header
- title={t`MCP Server`}
- description={t`Connect AI assistants like Claude or Cursor to your workspace via the Model Context Protocol`}
- />
- <UndecoratedLink to={MCP_DEEP_LINK}>
- <SettingsCard
- Icon={<IconSparkles size={theme.icon.size.md} />}
- title={t`Set up MCP`}
- />
- </UndecoratedLink>
- </Section.Root>
-
- <Section.Root>
- <Section.Header
- title={t`Workspace Instructions`}
- description={t`Custom instructions appended to every system prompt`}
- />
- <StyledInstructionsContainer>
- <FormAdvancedTextFieldInput
- key={originalInstructions}
- readonly={false}
- defaultValue={workspaceInstructions}
- profile={AI_INSTRUCTIONS_EDITOR_PROFILE}
- onChange={(value) => {
- setWorkspaceInstructions(value);
- autoSave(value);
- }}
- enableFullScreen={true}
- fullScreenBreadcrumbs={[
- { children: t`System Prompt`, href: '#' },
- { children: t`Workspace Instructions` },
- ]}
- placeholder={t`E.g., "We are a B2B SaaS company. Always use formal language..."`}
- minHeight={150}
- />
- </StyledInstructionsContainer>
- </Section.Root>
- </Fragment>
- );
-};
diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAiWorkspaceInstructionsSection.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiWorkspaceInstructionsSection.tsx
new file mode 100644
index 00000000000..376bf03a697
--- /dev/null
+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiWorkspaceInstructionsSection.tsx
@@ -0,0 +1,92 @@
+import { FormAdvancedTextFieldInput } from '@/advanced-text-editor/components/FormAdvancedTextFieldInput';
+import { AI_INSTRUCTIONS_EDITOR_PROFILE } from '@/ai/constants/AiInstructionsEditorProfile';
+import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
+import { getToastOptionsFromError } from '@/error-handler/utils/getToastOptionsFromError';
+import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';
+import { CombinedGraphQLErrors } from '@apollo/client';
+import { useMutation } from '@apollo/client/react';
+import { styled } from '@linaria/react';
+import { t } from '@lingui/core/macro';
+import { useState } from 'react';
+import { useToast } from 'twenty-ui/components/feedback';
+import { Section } from 'twenty-ui/components/layout';
+import { themeCssVariables } from 'twenty-ui/theme';
+import { useDebouncedCallback } from 'use-debounce';
+import { UpdateWorkspaceDocument } from '~/generated-metadata/graphql';
+
+const StyledInstructionsContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: ${themeCssVariables.spacing[4]};
+`;
+
+export const SettingsAiWorkspaceInstructionsSection = () => {
+ const { enqueueToast } = useToast();
+ const [currentWorkspace, setCurrentWorkspace] = useAtomState(
+ currentWorkspaceState,
+ );
+ const [updateWorkspace] = useMutation(UpdateWorkspaceDocument);
+
+ const initialInstructions = currentWorkspace?.aiAdditionalInstructions ?? '';
+ const [workspaceInstructions, setWorkspaceInstructions] =
+ useState(initialInstructions);
+ const [originalInstructions, setOriginalInstructions] =
+ useState(initialInstructions);
+
+ const autoSave = useDebouncedCallback(async (newValue: string) => {
+ if (!currentWorkspace?.id || newValue === originalInstructions) return;
+ try {
+ setCurrentWorkspace({
+ ...currentWorkspace,
+ aiAdditionalInstructions: newValue || null,
+ });
+ await updateWorkspace({
+ variables: {
+ input: { aiAdditionalInstructions: newValue || null },
+ },
+ });
+ setOriginalInstructions(newValue);
+ } catch (error) {
+ setCurrentWorkspace({
+ ...currentWorkspace,
+ aiAdditionalInstructions: originalInstructions || null,
+ });
+ if (CombinedGraphQLErrors.is(error)) {
+ enqueueToast(getToastOptionsFromError({ error }));
+ } else {
+ enqueueToast({
+ status: 'error',
+ children: t`Failed to save workspace instructions`,
+ });
+ }
+ }
+ }, 1000);
+
+ return (
+ <Section.Root>
+ <Section.Header
+ title={t`Workspace Instructions`}
+ description={t`Custom instructions appended to every system prompt`}
+ />
+ <StyledInstructionsContainer>
+ <FormAdvancedTextFieldInput
+ key={originalInstructions}
+ readonly={false}
+ defaultValue={workspaceInstructions}
+ profile={AI_INSTRUCTIONS_EDITOR_PROFILE}
+ onChange={(value) => {
+ setWorkspaceInstructions(value);
+ autoSave(value);
+ }}
+ enableFullScreen={true}
+ fullScreenBreadcrumbs={[
+ { children: t`System Prompt`, href: '#' },
+ { children: t`Workspace Instructions` },
+ ]}
+ placeholder={t`E.g., "We are a B2B SaaS company. Always use formal language..."`}
+ minHeight={150}
+ />
+ </StyledInstructionsContainer>
+ </Section.Root>
+ );
+};
diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillFormContent.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillFormContent.tsx
index b9dc6f818bc..1925b3ac6ea 100644
--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillFormContent.tsx
+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillFormContent.tsx
@@ -5,12 +5,12 @@ import { SettingsPath } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
import { Section } from 'twenty-ui/components/layout';
import { IconInfoCircle, IconRefresh, useIcons } from 'twenty-ui/icon';
+import { Collapsible } from 'twenty-ui/primitives/layout';
import { Card, Tooltip } from 'twenty-ui/primitives/surfaces';
import { useTheme, themeCssVariables } from 'twenty-ui/theme';
import { FormAdvancedTextFieldInput } from '@/advanced-text-editor/components/FormAdvancedTextFieldInput';
import { AI_INSTRUCTIONS_EDITOR_PROFILE } from '@/ai/constants/AiInstructionsEditorProfile';
-import { AdvancedSettingsWrapper } from '@/settings/components/AdvancedSettingsWrapper';
import { SaveAndCancelButtons } from '@/settings/components/SaveAndCancelButtons/SaveAndCancelButtons';
import { SettingsEditableTitle } from '@/settings/components/SettingsEditableTitle';
import { SettingsOptionCardContentSwitch } from '@/settings/components/SettingsOptions/SettingsOptionCardContentSwitch';
@@ -45,17 +45,10 @@ const StyledNameContainer = styled.div`
flex: 1;
`;
-const StyledAdvancedSettingsOuterContainer = styled.div`
+const StyledApiNameInputContainer = styled.div`
padding-top: ${themeCssVariables.spacing[4]};
`;
-const StyledAdvancedSettingsContainer = styled.div`
- display: flex;
- flex-direction: column;
- gap: ${themeCssVariables.spacing[4]};
- width: 100%;
-`;
-
type SettingsSkillFormContentProps = {
skill?: NonNullable<FindOneSkillQuery['skill']>;
};
@@ -123,13 +116,6 @@ export const SettingsSkillFormContent = ({
const breadcrumbText = isDefined(skill) ? skill.label : t`New Skill`;
- const isNameEditEnabled =
- !isReadonlyMode && !formValues.isLabelSyncedWithName;
-
- const apiNameTooltipText = formValues.isLabelSyncedWithName
- ? t`Deactivate "Synchronize Label and API Name" to set a custom API name`
- : t`Input must be in camel case and cannot start with a number`;
-
const title = isCreateMode ? (
t`New Skill`
) : (
@@ -219,52 +205,54 @@ export const SettingsSkillFormContent = ({
minHeight={300}
/>
- <AdvancedSettingsWrapper hideDot>
- <StyledAdvancedSettingsOuterContainer>
- <StyledAdvancedSettingsContainer>
- <SettingsTextInput
- instanceId="skill-api-name"
- label={t`API Name`}
- placeholder={t`mySkill`}
- value={formValues.name}
- onChange={(value) => handleFieldChange('name', value)}
- disabled={!isNameEditEnabled}
- fullWidth
- RightIcon={() =>
- apiNameTooltipText && (
- <Tooltip
- content={apiNameTooltipText}
- sideOffset={5}
- side="bottom"
- positionMethod="fixed"
- delay={TooltipDelay.shortDelay}
- >
- <IconInfoCircle
- id="info-circle-id-skill-name"
- size={theme.icon.size.md}
- color={theme.font.color.tertiary}
- style={{ outline: 'none' }}
- />
- </Tooltip>
- )
+ {!isReadonlyMode && (
+ <div>
+ <Card.Root rounded>
+ <SettingsOptionCardContentSwitch
+ Icon={IconRefresh}
+ title={t`Synchronize Label and API Name`}
+ description={t`Should changing the label also change the API name?`}
+ checked={formValues.isLabelSyncedWithName}
+ onChange={(value) =>
+ handleFieldChange('isLabelSyncedWithName', value)
}
/>
- <Card.Root rounded>
- <SettingsOptionCardContentSwitch
- Icon={IconRefresh}
- title={t`Synchronize Label and API Name`}
- description={t`Should changing the label also change the API name?`}
- checked={formValues.isLabelSyncedWithName}
- disabled={isReadonlyMode}
- advancedMode
- onChange={(value) =>
- handleFieldChange('isLabelSyncedWithName', value)
- }
- />
- </Card.Root>
- </StyledAdvancedSettingsContainer>
- </StyledAdvancedSettingsOuterContainer>
- </AdvancedSettingsWrapper>
+ </Card.Root>
+ <Collapsible.Root open={!formValues.isLabelSyncedWithName}>
+ <Collapsible.Panel
+ dimension="height"
+ containAnimation={false}
+ >
+ <StyledApiNameInputContainer>
+ <SettingsTextInput
+ instanceId="skill-api-name"
+ label={t`API Name`}
+ placeholder={t`mySkill`}
+ value={formValues.name}
+ onChange={(value) => handleFieldChange('name', value)}
+ fullWidth
+ RightIcon={() => (
+ <Tooltip
+ content={t`Input must be in camel case and cannot start with a number`}
+ sideOffset={5}
+ side="bottom"
+ positionMethod="fixed"
+ delay={TooltipDelay.shortDelay}
+ >
+ <IconInfoCircle
+ id="info-circle-id-skill-name"
+ size={theme.icon.size.md}
+ color={theme.font.color.tertiary}
+ style={{ outline: 'none' }}
+ />
+ </Tooltip>
+ )}
+ />
+ </StyledApiNameInputContainer>
+ </Collapsible.Panel>
+ </Collapsible.Root>
+ </div>
+ )}
</StyledFormContainer>
</Section.Root>
diff --git a/packages/twenty-front/src/pages/settings/ai/components/__tests__/SettingsAgentSkillsTab.test.tsx b/packages/twenty-front/src/pages/settings/ai/components/__tests__/SettingsAgentSkillsTab.test.tsx
index 8daf12f86be..982303d5ef6 100644
--- a/packages/twenty-front/src/pages/settings/ai/components/__tests__/SettingsAgentSkillsTab.test.tsx
+++ b/packages/twenty-front/src/pages/settings/ai/components/__tests__/SettingsAgentSkillsTab.test.tsx
@@ -10,7 +10,6 @@ import {
} from 'twenty-shared/application';
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
import { SOURCE_LOCALE } from 'twenty-shared/translations';
import { messages as frMessages } from '~/locales/generated/fr-FR';
import { FindManySkillsDocument } from '~/generated-metadata/graphql';
@@ -99,9 +98,7 @@ const CUSTOM_SKILL = buildSkill({
applicationId: WORKSPACE_CUSTOM_APPLICATION.id,
});
-const renderSkillsTab = ({
- isAdvancedModeEnabled = false,
-}: { isAdvancedModeEnabled?: boolean } = {}) => {
+const renderSkillsTab = () => {
const Wrapper = getJestMetadataAndApolloMocksWrapper({
apolloMocks: [
{
@@ -119,7 +116,6 @@ const renderSkillsTab = ({
},
],
onInitializeJotaiStore: (store) => {
- store.set(isAdvancedModeEnabledState.atom, isAdvancedModeEnabled);
store.set(currentWorkspaceState.atom, {
...mockCurrentWorkspace,
workspaceCustomApplication: WORKSPACE_CUSTOM_APPLICATION,
@@ -194,14 +190,18 @@ describe('SettingsAgentSkillsTab', () => {
expect(screen.queryByText('View Building')).not.toBeInTheDocument();
});
- it('shows system skills in advanced mode, and hides them again from the filter', async () => {
- renderSkillsTab({ isAdvancedModeEnabled: true });
+ it('shows system skills from the filter, and hides them again', async () => {
+ renderSkillsTab();
- expect(await screen.findByText('View Building')).toBeInTheDocument();
+ await screen.findByText('Word Documents');
await userEvent.click(screen.getByRole('button', { name: 'Filter' }));
await userEvent.click(screen.getByText('System skills'));
+ expect(await screen.findByText('View Building')).toBeInTheDocument();
+
+ await userEvent.click(screen.getByText('System skills'));
+
expect(screen.queryByText('View Building')).not.toBeInTheDocument();
expect(screen.getByText('Word Documents')).toBeInTheDocument();
});
diff --git a/packages/twenty-front/src/pages/settings/applications/SettingsApplicationRegistrationDetails.tsx b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationRegistrationDetails.tsx
index b63bd776f35..d48d8480e1f 100644
--- a/packages/twenty-front/src/pages/settings/applications/SettingsApplicationRegistrationDetails.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationRegistrationDetails.tsx
@@ -1,6 +1,7 @@
import { useRefetchOnApplicationRegistrationChange } from '@/applications/hooks/useRefetchOnApplicationRegistrationChange';
import { SettingsPageLayout } from '@/settings/components/layout/SettingsPageLayout';
import { SettingsTabBar } from '@/settings/components/layout/SettingsTabBar';
+import { SETTINGS_DEVELOPERS_TABS } from '@/settings/developers/constants/SettingsDevelopersTabs';
import { useQuery } from '@apollo/client/react';
import { useParams } from 'react-router-dom';
import { SettingsPath } from 'twenty-shared/types';
@@ -114,12 +115,12 @@ export const SettingsApplicationRegistrationDetails = () => {
href: getSettingsPath(SettingsPath.General),
},
{
- children: t`Applications - Developer`,
+ children: t`Developers`,
href: getSettingsPath(
- SettingsPath.Applications,
+ SettingsPath.Developers,
undefined,
undefined,
- 'developer',
+ SETTINGS_DEVELOPERS_TABS.TABS_IDS.APPS,
),
},
{ children: registration.name },
diff --git a/packages/twenty-front/src/pages/settings/applications/SettingsApplications.tsx b/packages/twenty-front/src/pages/settings/applications/SettingsApplications.tsx
index 3b603a70400..519676990c1 100644
--- a/packages/twenty-front/src/pages/settings/applications/SettingsApplications.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/SettingsApplications.tsx
@@ -1,37 +1,28 @@
import { SettingsDiscoveryHeroCard } from '@/settings/components/SettingsDiscoveryHeroCard';
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
+import { SETTINGS_DEVELOPERS_TABS } from '@/settings/developers/constants/SettingsDevelopersTabs';
import { SettingsPageLayout } from '@/settings/components/layout/SettingsPageLayout';
import { SettingsTabBar } from '@/settings/components/layout/SettingsTabBar';
import { useSettingsActiveTabId } from '@/settings/components/layout/useSettingsActiveTabId';
-import { useHasPermissionFlag } from '@/settings/roles/hooks/useHasPermissionFlag';
import { useLingui } from '@lingui/react/macro';
+import { Navigate, useLocation } from 'react-router-dom';
import { SettingsPath } from 'twenty-shared/types';
import { getSettingsPath } from 'twenty-shared/utils';
import { Section } from 'twenty-ui/components/layout';
-import {
- IconApps,
- IconCode,
- IconShoppingBag,
- IconSparkle2,
-} from 'twenty-ui/icon';
-import { PermissionFlagType } from '~/generated-metadata/graphql';
+import { IconApps, IconShoppingBag, IconSparkle2 } from 'twenty-ui/icon';
import coverDark from '~/pages/settings/applications/assets/cover-dark.png';
import coverLight from '~/pages/settings/applications/assets/cover-light.png';
-import { SettingsApplicationsClaimErrorTabEffect } from '~/pages/settings/applications/components/SettingsApplicationsClaimErrorTabEffect';
import { SettingsApplicationsAvailableTab } from '~/pages/settings/applications/tabs/SettingsApplicationsAvailableTab';
-import { SettingsApplicationsDeveloperTab } from '~/pages/settings/applications/tabs/SettingsApplicationsDeveloperTab';
import { SettingsApplicationsInstalledTab } from '~/pages/settings/applications/tabs/SettingsApplicationsInstalledTab';
const APPLICATIONS_TAB_LIST_ID = 'applications-tab-list';
const APPLICATIONS_HERO_INSTANCE_ID_PREFIX = 'settings-applications-hero';
-const DEVELOPER_TAB_ID = 'developer';
+// Docs and older links still point to the developer tab that moved to the Developers page
+const LEGACY_DEVELOPER_TAB_HASH = '#developer';
export const SettingsApplications = () => {
const { t } = useLingui();
-
- const hasDeveloperAccess = useHasPermissionFlag(
- PermissionFlagType.API_KEYS_AND_WEBHOOKS,
- );
+ const location = useLocation();
const tabs = [
{
@@ -41,9 +32,6 @@ export const SettingsApplications = () => {
pill: t`Beta`,
},
{ id: 'installed', title: t`Installed`, Icon: IconApps },
- ...(hasDeveloperAccess
- ? [{ id: DEVELOPER_TAB_ID, title: t`Developer`, Icon: IconCode }]
- : []),
];
const activeTabId = useSettingsActiveTabId(
@@ -57,13 +45,20 @@ export const SettingsApplications = () => {
return <SettingsApplicationsAvailableTab />;
case 'installed':
return <SettingsApplicationsInstalledTab />;
- case 'developer':
- return <SettingsApplicationsDeveloperTab />;
default:
return <SettingsApplicationsAvailableTab />;
}
};
+ if (location.hash === LEGACY_DEVELOPER_TAB_HASH) {
+ return (
+ <Navigate
+ to={`${getSettingsPath(SettingsPath.Developers)}${location.search}#${SETTINGS_DEVELOPERS_TABS.TABS_IDS.APPS}`}
+ replace
+ />
+ );
+ }
+
return (
<SettingsPageLayout
title={t`Applications`}
@@ -82,11 +77,6 @@ export const SettingsApplications = () => {
{ children: t`Applications` },
]}
>
- <SettingsApplicationsClaimErrorTabEffect
- tabListId={APPLICATIONS_TAB_LIST_ID}
- developerTabId={DEVELOPER_TAB_ID}
- hasDeveloperAccess={hasDeveloperAccess}
- />
<SettingsPageContainer>
<Section.Root>
<SettingsDiscoveryHeroCard
diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailGeneralTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailGeneralTab.tsx
index 46c2ad9b3a7..c22c0c95783 100644
--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailGeneralTab.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailGeneralTab.tsx
@@ -1,7 +1,6 @@
import { formatQueueJobProgressLabel } from '@/queue-job/utils/formatQueueJobProgressLabel';
import { SettingsApplicationOverviewCard } from '@/settings/applications/components/SettingsApplicationOverviewCard';
import { SettingsApplicationUninstallButton } from '@/settings/applications/components/SettingsApplicationUninstallButton';
-import { AdvancedSettingsWrapper } from '@/settings/components/AdvancedSettingsWrapper';
import { useHasPermissionFlag } from '@/settings/roles/hooks/useHasPermissionFlag';
import { t } from '@lingui/core/macro';
import { isNonEmptyString } from '@sniptt/guards';
@@ -156,11 +155,9 @@ export const SettingsApplicationDetailGeneralTab = ({
/>
)}
{applicationHasHttpTriggeredFunctions(application) && (
- <AdvancedSettingsWrapper>
- <SettingsApplicationFunctionDomainSection
- applicationId={application.id}
- />
- </AdvancedSettingsWrapper>
+ <SettingsApplicationFunctionDomainSection
+ applicationId={application.id}
+ />
)}
<SettingsApplicationConnectionsSection applicationId={application.id} />
</>
diff --git a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectIndexes.tsx b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectIndexes.tsx
new file mode 100644
index 00000000000..64434a502c0
--- /dev/null
+++ b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectIndexes.tsx
@@ -0,0 +1,65 @@
+import { isDDLLockedState } from '@/client-config/states/isDDLLockedState';
+import { useFilteredObjectMetadataItems } from '@/object-metadata/hooks/useFilteredObjectMetadataItems';
+import { isObjectMetadataReadOnly } from '@/object-record/read-only/utils/isObjectMetadataReadOnly';
+import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
+import { SettingsPageLayout } from '@/settings/components/layout/SettingsPageLayout';
+import { SettingsObjectIndexesSection } from '@/settings/data-model/object-details/components/tabs/SettingsObjectIndexesSection';
+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
+import { useLingui } from '@lingui/react/macro';
+import { useParams } from 'react-router-dom';
+import { SettingsPath } from 'twenty-shared/types';
+import { getSettingsPath, isDefined } from 'twenty-shared/utils';
+import { Section } from 'twenty-ui/components/layout';
+
+export const SettingsObjectIndexes = () => {
+ const { t } = useLingui();
+ const { objectNamePlural = '' } = useParams();
+ const isDDLLocked = useAtomStateValue(isDDLLockedState);
+
+ const { findObjectMetadataItemByNamePlural } =
+ useFilteredObjectMetadataItems();
+ const objectMetadataItem =
+ findObjectMetadataItemByNamePlural(objectNamePlural);
+
+ if (!isDefined(objectMetadataItem)) {
+ return null;
+ }
+
+ return (
+ <SettingsPageLayout
+ title={t`Indexes`}
+ links={[
+ {
+ children: t`Workspace`,
+ href: getSettingsPath(SettingsPath.General),
+ },
+ {
+ children: t`Objects`,
+ href: getSettingsPath(SettingsPath.Objects),
+ },
+ {
+ children: objectMetadataItem.labelPlural,
+ href: getSettingsPath(SettingsPath.ObjectDetail, {
+ objectNamePlural,
+ }),
+ },
+ { children: t`Indexes` },
+ ]}
+ >
+ <SettingsPageContainer>
+ <Section.Root>
+ <Section.Header
+ title={t`Indexes`}
+ description={t`Speed up reads on the fields you filter or sort by most. Each index also slows down writes and uses disk space, so add them with intent.`}
+ />
+ <SettingsObjectIndexesSection
+ objectMetadataItem={objectMetadataItem}
+ isReadOnly={
+ isObjectMetadataReadOnly({ objectMetadataItem }) || isDDLLocked
+ }
+ />
+ </Section.Root>
+ </SettingsPageContainer>
+ </SettingsPageLayout>
+ );
+};
diff --git a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectSearch.tsx b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectSearch.tsx
new file mode 100644
index 00000000000..904e8ce3980
--- /dev/null
+++ b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectSearch.tsx
@@ -0,0 +1,65 @@
+import { isDDLLockedState } from '@/client-config/states/isDDLLockedState';
+import { useFilteredObjectMetadataItems } from '@/object-metadata/hooks/useFilteredObjectMetadataItems';
+import { isObjectMetadataReadOnly } from '@/object-record/read-only/utils/isObjectMetadataReadOnly';
+import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
+import { SettingsPageLayout } from '@/settings/components/layout/SettingsPageLayout';
+import { SettingsObjectSearchSection } from '@/settings/data-model/object-details/components/tabs/SettingsObjectSearchSection';
+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
+import { useLingui } from '@lingui/react/macro';
+import { useParams } from 'react-router-dom';
+import { SettingsPath } from 'twenty-shared/types';
+import { getSettingsPath, isDefined } from 'twenty-shared/utils';
+import { Section } from 'twenty-ui/components/layout';
+
+export const SettingsObjectSearch = () => {
+ const { t } = useLingui();
+ const { objectNamePlural = '' } = useParams();
+ const isDDLLocked = useAtomStateValue(isDDLLockedState);
+
+ const { findObjectMetadataItemByNamePlural } =
+ useFilteredObjectMetadataItems();
+ const objectMetadataItem =
+ findObjectMetadataItemByNamePlural(objectNamePlural);
+
+ if (!isDefined(objectMetadataItem)) {
+ return null;
+ }
+
+ return (
+ <SettingsPageLayout
+ title={t`Search`}
+ links={[
+ {
+ children: t`Workspace`,
+ href: getSettingsPath(SettingsPath.General),
+ },
+ {
+ children: t`Objects`,
+ href: getSettingsPath(SettingsPath.Objects),
+ },
+ {
+ children: objectMetadataItem.labelPlural,
+ href: getSettingsPath(SettingsPath.ObjectDetail, {
+ objectNamePlural,
+ }),
+ },
+ { children: t`Search` },
+ ]}
+ >
+ <SettingsPageContainer>
+ <Section.Root>
+ <Section.Header
+ title={t`Search`}
+ description={t`Configure how this object appears in search results`}
+ />
+ <SettingsObjectSearchSection
+ objectMetadataItem={objectMetadataItem}
+ isReadOnly={
+ isObjectMetadataReadOnly({ objectMetadataItem }) || isDDLLocked
+ }
+ />
+ </Section.Root>
+ </SettingsPageContainer>
+ </SettingsPageLayout>
+ );
+};
diff --git a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectTable.tsx b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectTable.tsx
index 8f136c9b3fa..381d77f92e1 100644
--- a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectTable.tsx
+++ b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectTable.tsx
@@ -22,7 +22,6 @@ import { TableBody } from '@/ui/layout/table/components/TableBody';
import { TableHeader } from '@/ui/layout/table/components/TableHeader';
import { TableRow } from '@/ui/layout/table/components/TableRow';
import { useSortedArray } from '@/ui/layout/table/hooks/useSortedArray';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { styled } from '@linaria/react';
import { useLingui } from '@lingui/react/macro';
@@ -73,13 +72,11 @@ export const SettingsObjectTable = ({
const getIsMetadataItemCustom = useGetIsMetadataItemCustom();
const navigate = useNavigateSettings();
- const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
const isDDLLocked = useAtomStateValue(isDDLLockedState);
const [searchTerm, setSearchTerm] = useState('');
const [showDeactivated, setShowDeactivated] = useState(true);
- const [showSystemObjects, setShowSystemObjects] = useState(true);
- const shouldShowSystemObjects = isAdvancedModeEnabled && showSystemObjects;
+ const [showSystemObjects, setShowSystemObjects] = useState(false);
const { deleteOneObjectMetadataItem } = useDeleteOneObjectMetadataItem();
@@ -142,18 +139,13 @@ export const SettingsObjectTable = ({
}
const isSystem = item.objectMetadataItem.isSystem;
- if (isSystem && !shouldShowSystemObjects) {
+ if (isSystem && !showSystemObjects) {
return false;
}
return true;
}),
- [
- sortedObjectSettingsItems,
- searchTerm,
- showDeactivated,
- shouldShowSystemObjects,
- ],
+ [sortedObjectSettingsItems, searchTerm, showDeactivated, showSystemObjects],
);
return (
@@ -184,15 +176,13 @@ export const SettingsObjectTable = ({
}
checked={showDeactivated}
>{t`Deactivated`}</SettingsRow>
- {isAdvancedModeEnabled && (
- <SettingsRow
- startElement={<IconSettings />}
- onCheckedChange={() =>
- setShowSystemObjects(!showSystemObjects)
- }
- checked={showSystemObjects}
- >{t`System objects`}</SettingsRow>
- )}
+ <SettingsRow
+ startElement={<IconSettings />}
+ onCheckedChange={() =>
+ setShowSystemObjects(!showSystemObjects)
+ }
+ checked={showSystemObjects}
+ >{t`System objects`}</SettingsRow>
</Dropdown.Section>
</DropdownContent>
</DropdownRoot>
diff --git a/packages/twenty-front/src/pages/settings/data-model/__stories__/SettingsObjectDetail.stories.tsx b/packages/twenty-front/src/pages/settings/data-model/__stories__/SettingsObjectDetail.stories.tsx
index eef7da9dd0c..52b357ccb7b 100644
--- a/packages/twenty-front/src/pages/settings/data-model/__stories__/SettingsObjectDetail.stories.tsx
+++ b/packages/twenty-front/src/pages/settings/data-model/__stories__/SettingsObjectDetail.stories.tsx
@@ -1,21 +1,13 @@
import { type Meta, type StoryObj } from '@storybook/react-vite';
-import { HttpResponse } from 'msw';
-import { expect, fn, userEvent, waitFor, within } from 'storybook/test';
+import { expect, userEvent, within } from 'storybook/test';
-import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
-import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
-import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';
-import { FeatureFlagKey } from '~/generated-metadata/graphql';
import {
PageDecorator,
type PageDecoratorArgs,
} from '~/testing/decorators/PageDecorator';
-import { graphqlMocks, metadataGraphql } from '~/testing/graphqlMocks';
-import { mockCurrentWorkspace } from '~/testing/mock-data/users';
+import { graphqlMocks } from '~/testing/graphqlMocks';
import { sleep } from '~/utils/sleep';
-const updateOneFieldMetadataItem = fn();
-
import { SettingsObjectDetailPage } from '~/pages/settings/data-model/SettingsObjectDetailPage';
const meta: Meta<PageDecoratorArgs> = {
@@ -59,83 +51,23 @@ export const ObjectTabs: Story = {
},
};
-export const SettingsTabDropdowns: Story = {
- beforeEach: () => {
- updateOneFieldMetadataItem.mockClear();
- jotaiStore.set(isAdvancedModeEnabledState.atom, true);
- jotaiStore.set(currentWorkspaceState.atom, {
- ...mockCurrentWorkspace,
- featureFlags: [
- {
- key: FeatureFlagKey.IS_CONFIGURABLE_SEARCH_FIELDS_ENABLED,
- value: true,
- },
- ],
- });
-
- return () => jotaiStore.set(isAdvancedModeEnabledState.atom, false);
- },
- parameters: {
- msw: {
- handlers: [
- metadataGraphql.mutation(
- 'UpdateOneFieldMetadataItem',
- ({ variables }) => {
- updateOneFieldMetadataItem(variables);
-
- return HttpResponse.json({ data: { updateOneField: null } });
- },
- ),
- ...graphqlMocks.handlers,
- ],
- },
- },
+export const SettingsTabLinks: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
- const body = within(canvasElement.ownerDocument.body);
await userEvent.click(await canvas.findByTestId('tab-settings'));
- const addField = await canvas.findByRole('button', { name: 'Add field' });
-
- await userEvent.click(addField);
- const addFieldMenu = await body.findByRole('menu', { name: 'Add field' });
-
- await waitFor(() =>
- expect(
- within(addFieldMenu).getByRole('menuitem', { name: 'Domain Name' }),
- ).toHaveFocus(),
- );
- await userEvent.keyboard('{ArrowDown}');
expect(
- within(addFieldMenu).getByRole('menuitem', { name: 'Address' }),
- ).toHaveFocus();
- await userEvent.keyboard('{Enter}');
- await waitFor(() => expect(addFieldMenu).not.toBeInTheDocument());
- await waitFor(() =>
- expect(updateOneFieldMetadataItem).toHaveBeenCalledWith(
- expect.objectContaining({ updatePayload: { isSearchable: true } }),
- ),
- );
-
- const filterButton = canvas.getByRole('button', { name: 'Filter' });
-
- expect(canvas.getByText('Account Owner')).toBeVisible();
- await userEvent.click(filterButton);
- const filterPanel = await body.findByRole('dialog', { name: 'Filter' });
- const hideSystemIndexes = within(filterPanel).getByRole('switch', {
- name: 'Hide system indexes',
- });
-
- await userEvent.click(hideSystemIndexes);
- expect(hideSystemIndexes).toBeChecked();
- expect(filterPanel).toBeVisible();
- await waitFor(() =>
- expect(canvas.queryByText('Account Owner')).not.toBeInTheDocument(),
+ await canvas.findByRole('link', { name: 'Configure search' }),
+ ).toHaveAttribute('href', '/settings/objects/companies/object-search');
+ expect(
+ canvas.getByRole('link', { name: 'Manage indexes' }),
+ ).toHaveAttribute('href', '/settings/objects/companies/object-indexes');
+ expect(
+ canvas.getByRole('link', { name: 'Edit translations' }),
+ ).toHaveAttribute(
+ 'href',
+ '/settings/objects/companies/object-translations',
);
-
- await userEvent.keyboard('{Escape}');
- await waitFor(() => expect(filterPanel).not.toBeInTheDocument());
- await waitFor(() => expect(filterButton).toHaveFocus());
},
};
diff --git a/packages/twenty-front/src/pages/settings/data-model/__stories__/SettingsObjectIndexes.stories.tsx b/packages/twenty-front/src/pages/settings/data-model/__stories__/SettingsObjectIndexes.stories.tsx
new file mode 100644
index 00000000000..0510d35ee9b
--- /dev/null
+++ b/packages/twenty-front/src/pages/settings/data-model/__stories__/SettingsObjectIndexes.stories.tsx
@@ -0,0 +1,53 @@
+import { type Meta, type StoryObj } from '@storybook/react-vite';
+import { expect, userEvent, waitFor, within } from 'storybook/test';
+
+import { SettingsObjectIndexes } from '~/pages/settings/data-model/SettingsObjectIndexes';
+import {
+ PageDecorator,
+ type PageDecoratorArgs,
+} from '~/testing/decorators/PageDecorator';
+import { graphqlMocks } from '~/testing/graphqlMocks';
+
+const meta: Meta<PageDecoratorArgs> = {
+ title: 'Pages/Settings/DataModel/SettingsObjectIndexes',
+ component: SettingsObjectIndexes,
+ decorators: [PageDecorator],
+ args: {
+ routePath: '/settings/objects/:objectNamePlural/object-indexes',
+ routeParams: { ':objectNamePlural': 'companies' },
+ },
+ parameters: {
+ msw: graphqlMocks,
+ },
+};
+
+export default meta;
+
+export type Story = StoryObj<typeof SettingsObjectIndexes>;
+
+export const HideSystemIndexes: Story = {
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement);
+ const body = within(canvasElement.ownerDocument.body);
+
+ const filterButton = await canvas.findByRole('button', { name: 'Filter' });
+
+ expect(await canvas.findByText('Account Owner')).toBeVisible();
+ await userEvent.click(filterButton);
+ const filterPanel = await body.findByRole('dialog', { name: 'Filter' });
+ const hideSystemIndexes = within(filterPanel).getByRole('switch', {
+ name: 'Hide system indexes',
+ });
+
+ await userEvent.click(hideSystemIndexes);
+ expect(hideSystemIndexes).toBeChecked();
+ expect(filterPanel).toBeVisible();
+ await waitFor(() =>
+ expect(canvas.queryByText('Account Owner')).not.toBeInTheDocument(),
+ );
+
+ await userEvent.keyboard('{Escape}');
+ await waitFor(() => expect(filterPanel).not.toBeInTheDocument());
+ await waitFor(() => expect(filterButton).toHaveFocus());
+ },
+};
diff --git a/packages/twenty-front/src/pages/settings/data-model/__stories__/SettingsObjectSearch.stories.tsx b/packages/twenty-front/src/pages/settings/data-model/__stories__/SettingsObjectSearch.stories.tsx
new file mode 100644
index 00000000000..3797b60785a
--- /dev/null
+++ b/packages/twenty-front/src/pages/settings/data-model/__stories__/SettingsObjectSearch.stories.tsx
@@ -0,0 +1,89 @@
+import { type Meta, type StoryObj } from '@storybook/react-vite';
+import { HttpResponse } from 'msw';
+import { expect, fn, userEvent, waitFor, within } from 'storybook/test';
+
+import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
+import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';
+import { FeatureFlagKey } from '~/generated-metadata/graphql';
+import { SettingsObjectSearch } from '~/pages/settings/data-model/SettingsObjectSearch';
+import {
+ PageDecorator,
+ type PageDecoratorArgs,
+} from '~/testing/decorators/PageDecorator';
+import { graphqlMocks, metadataGraphql } from '~/testing/graphqlMocks';
+import { mockCurrentWorkspace } from '~/testing/mock-data/users';
+
+const updateOneFieldMetadataItem = fn();
+
+const meta: Meta<PageDecoratorArgs> = {
+ title: 'Pages/Settings/DataModel/SettingsObjectSearch',
+ component: SettingsObjectSearch,
+ decorators: [PageDecorator],
+ args: {
+ routePath: '/settings/objects/:objectNamePlural/object-search',
+ routeParams: { ':objectNamePlural': 'companies' },
+ },
+ parameters: {
+ msw: graphqlMocks,
+ },
+};
+
+export default meta;
+
+export type Story = StoryObj<typeof SettingsObjectSearch>;
+
+export const AddSearchField: Story = {
+ beforeEach: () => {
+ updateOneFieldMetadataItem.mockClear();
+ jotaiStore.set(currentWorkspaceState.atom, {
+ ...mockCurrentWorkspace,
+ featureFlags: [
+ {
+ key: FeatureFlagKey.IS_CONFIGURABLE_SEARCH_FIELDS_ENABLED,
+ value: true,
+ },
+ ],
+ });
+ },
+ parameters: {
+ msw: {
+ handlers: [
+ metadataGraphql.mutation(
+ 'UpdateOneFieldMetadataItem',
+ ({ variables }) => {
+ updateOneFieldMetadataItem(variables);
+
+ return HttpResponse.json({ data: { updateOneField: null } });
+ },
+ ),
+ ...graphqlMocks.handlers,
+ ],
+ },
+ },
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement);
+ const body = within(canvasElement.ownerDocument.body);
+
+ const addField = await canvas.findByRole('button', { name: 'Add field' });
+
+ await userEvent.click(addField);
+ const addFieldMenu = await body.findByRole('menu', { name: 'Add field' });
+
+ await waitFor(() =>
+ expect(
+ within(addFieldMenu).getByRole('menuitem', { name: 'Domain Name' }),
+ ).toHaveFocus(),
+ );
+ await userEvent.keyboard('{ArrowDown}');
+ expect(
+ within(addFieldMenu).getByRole('menuitem', { name: 'Address' }),
+ ).toHaveFocus();
+ await userEvent.keyboard('{Enter}');
+ await waitFor(() => expect(addFieldMenu).not.toBeInTheDocument());
+ await waitFor(() =>
+ expect(updateOneFieldMetadataItem).toHaveBeenCalledWith(
+ expect.objectContaining({ updatePayload: { isSearchable: true } }),
+ ),
+ );
+ },
+};
diff --git a/packages/twenty-front/src/pages/settings/data-model/new-index/SettingsObjectNewIndex.tsx b/packages/twenty-front/src/pages/settings/data-model/new-index/SettingsObjectNewIndex.tsx
index eb7847582ee..adf17fce965 100644
--- a/packages/twenty-front/src/pages/settings/data-model/new-index/SettingsObjectNewIndex.tsx
+++ b/packages/twenty-front/src/pages/settings/data-model/new-index/SettingsObjectNewIndex.tsx
@@ -116,7 +116,7 @@ export const SettingsObjectNewIndex = () => {
if (result.status === 'successful') {
enqueueToast({ status: 'success', children: t`Index created` });
- navigate(SettingsPath.ObjectDetail, { objectNamePlural });
+ navigate(SettingsPath.ObjectIndexes, { objectNamePlural });
}
};
@@ -141,6 +141,12 @@ export const SettingsObjectNewIndex = () => {
objectNamePlural,
}),
},
+ {
+ children: t`Indexes`,
+ href: getSettingsPath(SettingsPath.ObjectIndexes, {
+ objectNamePlural,
+ }),
+ },
{ children: t`New Index` },
]}
actionButton={
@@ -149,7 +155,7 @@ export const SettingsObjectNewIndex = () => {
isSaveDisabled={!canSave}
isCancelDisabled={isSubmitting}
onCancel={() =>
- navigate(SettingsPath.ObjectDetail, { objectNamePlural })
+ navigate(SettingsPath.ObjectIndexes, { objectNamePlural })
}
onSave={formConfig.handleSubmit(handleSave)}
/>
diff --git a/packages/twenty-front/src/pages/settings/api-webhooks/SettingsApiWebhooks.tsx b/packages/twenty-front/src/pages/settings/developers/SettingsDevelopers.tsx
similarity index 64%
rename from packages/twenty-front/src/pages/settings/api-webhooks/SettingsApiWebhooks.tsx
rename to packages/twenty-front/src/pages/settings/developers/SettingsDevelopers.tsx
index 8edac5ac794..78bfcba87df 100644
--- a/packages/twenty-front/src/pages/settings/api-webhooks/SettingsApiWebhooks.tsx
+++ b/packages/twenty-front/src/pages/settings/developers/SettingsDevelopers.tsx
@@ -5,15 +5,12 @@ import { SettingsTabBar } from '@/settings/components/layout/SettingsTabBar';
import { useSettingsActiveTabId } from '@/settings/components/layout/useSettingsActiveTabId';
import { SettingsDiscoveryHeroCard } from '@/settings/components/SettingsDiscoveryHeroCard';
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
+import PlaygroundCoverDark from '@/settings/developers/assets/cover-dark.png';
+import PlaygroundCoverLight from '@/settings/developers/assets/cover-light.png';
+import { PlaygroundSetupForm } from '@/settings/developers/components/PlaygroundSetupForm';
import { SettingsApiKeysTable } from '@/settings/developers/components/SettingsApiKeysTable';
import { SettingsWebhooksTable } from '@/settings/developers/components/SettingsWebhooksTable';
-import PlaygroundCoverDark from '@/settings/mcp-and-apis/assets/cover-dark.png';
-import PlaygroundCoverLight from '@/settings/mcp-and-apis/assets/cover-light.png';
-import McpCoverDark from '@/settings/mcp-and-apis/assets/mcp-cover-dark.png';
-import McpCoverLight from '@/settings/mcp-and-apis/assets/mcp-cover-light.png';
-import { PlaygroundSetupForm } from '@/settings/mcp-and-apis/components/PlaygroundSetupForm';
-import { SettingsMcpSetup } from '@/settings/mcp-and-apis/components/SettingsMcpSetup';
-import { useIsMobile } from 'twenty-ui/utilities';
+import { SETTINGS_DEVELOPERS_TABS } from '@/settings/developers/constants/SettingsDevelopersTabs';
import { styled } from '@linaria/react';
import { useLingui } from '@lingui/react/macro';
import { SettingsPath } from 'twenty-shared/types';
@@ -21,18 +18,22 @@ import { getSettingsPath } from 'twenty-shared/utils';
import { Section } from 'twenty-ui/components/layout';
import {
IconApi,
+ IconApps,
IconPlus,
IconSparkle2,
- IconSparkles,
IconWebhook,
} from 'twenty-ui/icon';
import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';
-import { SETTINGS_API_WEBHOOKS_TABS } from '@/settings/developers/constants/SettingsApiWebhooksTabs';
+import { useIsMobile } from 'twenty-ui/utilities';
+import AppsCoverDark from '~/pages/settings/applications/assets/cover-dark.png';
+import AppsCoverLight from '~/pages/settings/applications/assets/cover-light.png';
+import { SettingsDevelopersClaimErrorTabEffect } from '~/pages/settings/developers/components/SettingsDevelopersClaimErrorTabEffect';
+import { SettingsDevelopersAppsTab } from '~/pages/settings/developers/tabs/SettingsDevelopersAppsTab';
type TabKey =
- (typeof SETTINGS_API_WEBHOOKS_TABS.TABS_IDS)[keyof typeof SETTINGS_API_WEBHOOKS_TABS.TABS_IDS];
+ (typeof SETTINGS_DEVELOPERS_TABS.TABS_IDS)[keyof typeof SETTINGS_DEVELOPERS_TABS.TABS_IDS];
-const SETTINGS_API_HERO_INSTANCE_ID_PREFIX = 'settings-api-hero';
+const SETTINGS_DEVELOPERS_HERO_INSTANCE_ID_PREFIX = 'settings-developers-hero';
const StyledButtonContainer = styled.div`
display: flex;
@@ -57,44 +58,44 @@ const StyledTableContainer = styled.div<{ isMobile?: boolean }>`
overflow: ${({ isMobile }) => (isMobile ? 'hidden' : 'visible')};
`;
-export const SettingsApiWebhooks = () => {
+export const SettingsDevelopers = () => {
const isMobile = useIsMobile();
const { t } = useLingui();
const tabs = [
{
- id: SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.MCP,
- title: t`MCP`,
- Icon: IconSparkles,
- },
- {
- id: SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.API,
+ id: SETTINGS_DEVELOPERS_TABS.TABS_IDS.API,
title: t`API`,
Icon: IconApi,
},
{
- id: SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.WEBHOOKS,
+ id: SETTINGS_DEVELOPERS_TABS.TABS_IDS.WEBHOOKS,
title: t`Webhooks`,
Icon: IconWebhook,
},
+ {
+ id: SETTINGS_DEVELOPERS_TABS.TABS_IDS.APPS,
+ title: t`Apps`,
+ Icon: IconApps,
+ },
];
const activeTab: TabKey =
(useSettingsActiveTabId(
- SETTINGS_API_WEBHOOKS_TABS.COMPONENT_INSTANCE_ID,
+ SETTINGS_DEVELOPERS_TABS.COMPONENT_INSTANCE_ID,
tabs.map((tab) => tab.id),
- ) as TabKey) ?? SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.MCP;
+ ) as TabKey) ?? SETTINGS_DEVELOPERS_TABS.TABS_IDS.API;
- const isMcpTab = activeTab === SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.MCP;
+ const isAppsTab = activeTab === SETTINGS_DEVELOPERS_TABS.TABS_IDS.APPS;
return (
<SettingsPageLayout
- title={t`MCP & APIs`}
+ title={t`Developers`}
secondaryBar={
<SettingsTabBar
- aria-label={t`APIs and webhooks`}
+ aria-label={t`Developers`}
tabs={tabs}
- componentInstanceId={SETTINGS_API_WEBHOOKS_TABS.COMPONENT_INSTANCE_ID}
+ componentInstanceId={SETTINGS_DEVELOPERS_TABS.COMPONENT_INSTANCE_ID}
/>
}
links={[
@@ -102,29 +103,37 @@ export const SettingsApiWebhooks = () => {
children: t`Workspace`,
href: getSettingsPath(SettingsPath.General),
},
- { children: t`MCP & APIs` },
+ { children: t`Developers` },
]}
>
+ <SettingsDevelopersClaimErrorTabEffect
+ tabListId={SETTINGS_DEVELOPERS_TABS.COMPONENT_INSTANCE_ID}
+ appsTabId={SETTINGS_DEVELOPERS_TABS.TABS_IDS.APPS}
+ />
<SettingsPageContainer>
<Section.Root>
<SettingsDiscoveryHeroCard
- lightSrc={isMcpTab ? McpCoverLight : PlaygroundCoverLight}
- darkSrc={isMcpTab ? McpCoverDark : PlaygroundCoverDark}
- instanceIdPrefix={SETTINGS_API_HERO_INSTANCE_ID_PREFIX}
- tabs={[
- {
- id: 'api_webhook_walkthrough',
- title: t`Walkthrough`,
- Icon: IconSparkle2,
- vimeoId: '1217967646',
- hasSound: true,
- },
- ]}
+ lightSrc={isAppsTab ? AppsCoverLight : PlaygroundCoverLight}
+ darkSrc={isAppsTab ? AppsCoverDark : PlaygroundCoverDark}
+ instanceIdPrefix={SETTINGS_DEVELOPERS_HERO_INSTANCE_ID_PREFIX}
+ tabs={
+ isAppsTab
+ ? []
+ : [
+ {
+ id: 'api_webhook_walkthrough',
+ title: t`Walkthrough`,
+ Icon: IconSparkle2,
+ vimeoId: '1217967646',
+ hasSound: true,
+ },
+ ]
+ }
playButtonAriaLabel={t`Watch API demo`}
/>
</Section.Root>
- {activeTab === SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.API && (
+ {activeTab === SETTINGS_DEVELOPERS_TABS.TABS_IDS.API && (
<StyledTabContent>
<Section.Root>
<Section.Header
@@ -154,13 +163,7 @@ export const SettingsApiWebhooks = () => {
</StyledTabContent>
)}
- {activeTab === SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.MCP && (
- <StyledTabContent>
- <SettingsMcpSetup />
- </StyledTabContent>
- )}
-
- {activeTab === SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.WEBHOOKS && (
+ {activeTab === SETTINGS_DEVELOPERS_TABS.TABS_IDS.WEBHOOKS && (
<StyledTabContent>
<Section.Root>
<Section.Header
@@ -181,6 +184,8 @@ export const SettingsApiWebhooks = () => {
</Section.Root>
</StyledTabContent>
)}
+
+ {isAppsTab && <SettingsDevelopersAppsTab />}
</SettingsPageContainer>
</SettingsPageLayout>
);
diff --git a/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsGraphQLPlayground.stories.tsx b/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsGraphQLPlayground.stories.tsx
index e3bff7a922a..10c9d1a53bd 100644
--- a/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsGraphQLPlayground.stories.tsx
+++ b/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsGraphQLPlayground.stories.tsx
@@ -1,4 +1,4 @@
-import { playgroundApiKeyState } from '@/settings/mcp-and-apis/states/playgroundApiKeyState';
+import { playgroundApiKeyState } from '@/settings/developers/states/playgroundApiKeyState';
import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';
import { type Meta, type StoryObj } from '@storybook/react-vite';
import { action } from 'storybook/actions';
diff --git a/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsRestPlayground.stories.tsx b/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsRestPlayground.stories.tsx
index ca7bf6d76af..8d55e0a1cd7 100644
--- a/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsRestPlayground.stories.tsx
+++ b/packages/twenty-front/src/pages/settings/developers/__stories__/playground/SettingsRestPlayground.stories.tsx
@@ -1,4 +1,4 @@
-import { playgroundApiKeyState } from '@/settings/mcp-and-apis/states/playgroundApiKeyState';
+import { playgroundApiKeyState } from '@/settings/developers/states/playgroundApiKeyState';
import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';
import { type Meta, type StoryObj } from '@storybook/react-vite';
import { action } from 'storybook/actions';
diff --git a/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeyDetail.tsx b/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeyDetail.tsx
index 75ab0a31c16..b37a945fa18 100644
--- a/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeyDetail.tsx
+++ b/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeyDetail.tsx
@@ -34,7 +34,7 @@ import {
RevokeApiKeyDocument,
} from '~/generated-metadata/graphql';
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
-import { SETTINGS_API_WEBHOOKS_TABS } from '@/settings/developers/constants/SettingsApiWebhooksTabs';
+import { SETTINGS_DEVELOPERS_TABS } from '@/settings/developers/constants/SettingsDevelopersTabs';
const StyledInfo = styled.span`
color: ${themeCssVariables.font.color.light};
@@ -146,11 +146,11 @@ export const SettingsDevelopersApiKeyDetail = () => {
});
if (redirect) {
navigate(
- SettingsPath.ApiWebhooks,
+ SettingsPath.Developers,
undefined,
undefined,
undefined,
- SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.API,
+ SETTINGS_DEVELOPERS_TABS.TABS_IDS.API,
);
}
} catch {
@@ -258,12 +258,12 @@ export const SettingsDevelopersApiKeyDetail = () => {
href: getSettingsPath(SettingsPath.General),
},
{
- children: t`MCP & APIs`,
+ children: t`Developers`,
href: getSettingsPath(
- SettingsPath.ApiWebhooks,
+ SettingsPath.Developers,
undefined,
undefined,
- SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.API,
+ SETTINGS_DEVELOPERS_TABS.TABS_IDS.API,
),
},
{ children: apiKey.name || t`Unnamed API Key` },
diff --git a/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx b/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx
index 8c78f6be971..8211707c88e 100644
--- a/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx
+++ b/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx
@@ -23,7 +23,7 @@ import {
GetApiKeysDocument,
} from '~/generated-metadata/graphql';
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
-import { SETTINGS_API_WEBHOOKS_TABS } from '@/settings/developers/constants/SettingsApiWebhooksTabs';
+import { SETTINGS_DEVELOPERS_TABS } from '@/settings/developers/constants/SettingsDevelopersTabs';
import { Section } from 'twenty-ui/components/layout';
export const SettingsDevelopersApiKeysNew = () => {
@@ -138,12 +138,12 @@ export const SettingsDevelopersApiKeysNew = () => {
href: getSettingsPath(SettingsPath.General),
},
{
- children: t`MCP & APIs`,
+ children: t`Developers`,
href: getSettingsPath(
- SettingsPath.ApiWebhooks,
+ SettingsPath.Developers,
undefined,
undefined,
- SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.API,
+ SETTINGS_DEVELOPERS_TABS.TABS_IDS.API,
),
},
{ children: t`New Key` },
@@ -153,11 +153,11 @@ export const SettingsDevelopersApiKeysNew = () => {
isSaveDisabled={!canSave}
onCancel={() => {
navigateSettings(
- SettingsPath.ApiWebhooks,
+ SettingsPath.Developers,
undefined,
undefined,
undefined,
- SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.API,
+ SETTINGS_DEVELOPERS_TABS.TABS_IDS.API,
);
}}
onSave={handleSave}
diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationsClaimErrorTabEffect.tsx b/packages/twenty-front/src/pages/settings/developers/components/SettingsDevelopersClaimErrorTabEffect.tsx
similarity index 59%
rename from packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationsClaimErrorTabEffect.tsx
rename to packages/twenty-front/src/pages/settings/developers/components/SettingsDevelopersClaimErrorTabEffect.tsx
index 75e2c4477b2..3adf071fc0e 100644
--- a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationsClaimErrorTabEffect.tsx
+++ b/packages/twenty-front/src/pages/settings/developers/components/SettingsDevelopersClaimErrorTabEffect.tsx
@@ -4,20 +4,18 @@ import { useEffect } from 'react';
import { useSearchParams } from 'react-router-dom';
import { CLAIM_ERROR_CODE_SEARCH_PARAM } from '~/pages/settings/applications/components/SettingsClaimApplicationSection';
-type SettingsApplicationsClaimErrorTabEffectProps = {
+type SettingsDevelopersClaimErrorTabEffectProps = {
tabListId: string;
- developerTabId: string;
- hasDeveloperAccess: boolean;
+ appsTabId: string;
};
// The GitHub claim callback returns here with a claim error code, but the URL
-// hash that selects the developer tab can be dropped on the way back, so
-// select it from the query param instead.
-export const SettingsApplicationsClaimErrorTabEffect = ({
+// hash that selects the apps tab can be dropped on the way back, so select it
+// from the query param instead.
+export const SettingsDevelopersClaimErrorTabEffect = ({
tabListId,
- developerTabId,
- hasDeveloperAccess,
-}: SettingsApplicationsClaimErrorTabEffectProps) => {
+ appsTabId,
+}: SettingsDevelopersClaimErrorTabEffectProps) => {
const [searchParams] = useSearchParams();
const hasClaimError = searchParams.has(CLAIM_ERROR_CODE_SEARCH_PARAM);
@@ -27,10 +25,10 @@ export const SettingsApplicationsClaimErrorTabEffect = ({
);
useEffect(() => {
- if (hasClaimError && hasDeveloperAccess) {
- setActiveTabId(developerTabId);
+ if (hasClaimError) {
+ setActiveTabId(appsTabId);
}
- }, [hasClaimError, hasDeveloperAccess, developerTabId, setActiveTabId]);
+ }, [hasClaimError, appsTabId, setActiveTabId]);
return null;
};
diff --git a/packages/twenty-front/src/pages/settings/developers/playground/SettingsGraphQLPlayground.tsx b/packages/twenty-front/src/pages/settings/developers/playground/SettingsGraphQLPlayground.tsx
index 1ba90904da1..c4318af2e62 100644
--- a/packages/twenty-front/src/pages/settings/developers/playground/SettingsGraphQLPlayground.tsx
+++ b/packages/twenty-front/src/pages/settings/developers/playground/SettingsGraphQLPlayground.tsx
@@ -1,5 +1,5 @@
-import { GraphQLPlayground } from '@/settings/mcp-and-apis/components/GraphQLPlayground';
-import { PlaygroundSchemas } from '@/settings/mcp-and-apis/types/PlaygroundSchemas';
+import { GraphQLPlayground } from '@/settings/developers/components/GraphQLPlayground';
+import { PlaygroundSchemas } from '@/settings/developers/types/PlaygroundSchemas';
import { SettingsPath } from 'twenty-shared/types';
import { FullScreenContainer } from '@/ui/layout/fullscreen/components/FullScreenContainer';
@@ -7,7 +7,7 @@ import { Trans } from '@lingui/react/macro';
import { useParams } from 'react-router-dom';
import { getSettingsPath } from 'twenty-shared/utils';
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
-import { SETTINGS_API_WEBHOOKS_TABS } from '@/settings/developers/constants/SettingsApiWebhooksTabs';
+import { SETTINGS_DEVELOPERS_TABS } from '@/settings/developers/constants/SettingsDevelopersTabs';
export const SettingsGraphQLPlayground = () => {
const navigateSettings = useNavigateSettings();
@@ -20,11 +20,11 @@ export const SettingsGraphQLPlayground = () => {
const handleExitFullScreen = () => {
navigateSettings(
- SettingsPath.ApiWebhooks,
+ SettingsPath.Developers,
undefined,
undefined,
undefined,
- SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.API,
+ SETTINGS_DEVELOPERS_TABS.TABS_IDS.API,
);
};
@@ -41,12 +41,12 @@ export const SettingsGraphQLPlayground = () => {
href: getSettingsPath(SettingsPath.General),
},
{
- children: <Trans>MCP & APIs</Trans>,
+ children: <Trans>Developers</Trans>,
href: getSettingsPath(
- SettingsPath.ApiWebhooks,
+ SettingsPath.Developers,
undefined,
undefined,
- SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.API,
+ SETTINGS_DEVELOPERS_TABS.TABS_IDS.API,
),
},
{ children: <Trans>GraphQL API Playground</Trans> },
diff --git a/packages/twenty-front/src/pages/settings/developers/playground/SettingsRestPlayground.tsx b/packages/twenty-front/src/pages/settings/developers/playground/SettingsRestPlayground.tsx
index aa79cd2329a..fae670b7769 100644
--- a/packages/twenty-front/src/pages/settings/developers/playground/SettingsRestPlayground.tsx
+++ b/packages/twenty-front/src/pages/settings/developers/playground/SettingsRestPlayground.tsx
@@ -1,5 +1,5 @@
-import { RestPlayground } from '@/settings/mcp-and-apis/components/RestPlayground';
-import { PlaygroundSchemas } from '@/settings/mcp-and-apis/types/PlaygroundSchemas';
+import { RestPlayground } from '@/settings/developers/components/RestPlayground';
+import { PlaygroundSchemas } from '@/settings/developers/types/PlaygroundSchemas';
import { FullScreenContainer } from '@/ui/layout/fullscreen/components/FullScreenContainer';
import { Trans } from '@lingui/react/macro';
import { useCallback } from 'react';
@@ -7,7 +7,7 @@ import { useParams } from 'react-router-dom';
import { SettingsPath } from 'twenty-shared/types';
import { getSettingsPath } from 'twenty-shared/utils';
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
-import { SETTINGS_API_WEBHOOKS_TABS } from '@/settings/developers/constants/SettingsApiWebhooksTabs';
+import { SETTINGS_DEVELOPERS_TABS } from '@/settings/developers/constants/SettingsDevelopersTabs';
export const SettingsRestPlayground = () => {
const navigateSettings = useNavigateSettings();
@@ -17,21 +17,21 @@ export const SettingsRestPlayground = () => {
const handleExitFullScreen = () => {
navigateSettings(
- SettingsPath.ApiWebhooks,
+ SettingsPath.Developers,
undefined,
undefined,
undefined,
- SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.API,
+ SETTINGS_DEVELOPERS_TABS.TABS_IDS.API,
);
};
const handleError = useCallback(() => {
navigateSettings(
- SettingsPath.ApiWebhooks,
+ SettingsPath.Developers,
undefined,
undefined,
undefined,
- SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.API,
+ SETTINGS_DEVELOPERS_TABS.TABS_IDS.API,
);
}, [navigateSettings]);
@@ -44,12 +44,12 @@ export const SettingsRestPlayground = () => {
href: getSettingsPath(SettingsPath.General),
},
{
- children: <Trans>MCP & APIs</Trans>,
+ children: <Trans>Developers</Trans>,
href: getSettingsPath(
- SettingsPath.ApiWebhooks,
+ SettingsPath.Developers,
undefined,
undefined,
- SETTINGS_API_WEBHOOKS_TABS.TABS_IDS.API,
+ SETTINGS_DEVELOPERS_TABS.TABS_IDS.API,
),
},
{ children: <Trans>REST</Trans> },
diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsDeveloperTab.tsx b/packages/twenty-front/src/pages/settings/developers/tabs/SettingsDevelopersAppsTab.tsx
similarity index 99%
rename from packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsDeveloperTab.tsx
rename to packages/twenty-front/src/pages/settings/developers/tabs/SettingsDevelopersAppsTab.tsx
index 5f9e3961094..5f2633d9cc7 100644
--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsDeveloperTab.tsx
+++ b/packages/twenty-front/src/pages/settings/developers/tabs/SettingsDevelopersAppsTab.tsx
@@ -46,7 +46,7 @@ const StyledTableRowsContainer = styled.div`
padding: ${themeCssVariables.spacing[2]} 0;
`;
-export const SettingsApplicationsDeveloperTab = () => {
+export const SettingsDevelopersAppsTab = () => {
const { t } = useLingui();
const theme = useTheme();
const currentWorkspaceMember = useAtomStateValue(currentWorkspaceMemberState);
diff --git a/packages/twenty-front/src/utils/title-utils.ts b/packages/twenty-front/src/utils/title-utils.ts
index 7f014ed868e..1d6310123fc 100644
--- a/packages/twenty-front/src/utils/title-utils.ts
+++ b/packages/twenty-front/src/utils/title-utils.ts
@@ -8,7 +8,7 @@ enum SettingsPathPrefixes {
Profile = `${AppBasePath.Settings}/${SettingsPath.ProfilePage}`,
Objects = `${AppBasePath.Settings}/${SettingsPath.Objects}`,
Members = `${AppBasePath.Settings}/${SettingsPath.WorkspaceMembersPage}`,
- ApiWebhooks = `${AppBasePath.Settings}/${SettingsPath.ApiWebhooks}`,
+ Developers = `${AppBasePath.Settings}/${SettingsPath.Developers}`,
LogicFunctions = `${AppBasePath.Settings}/${SettingsPath.LogicFunctions}`,
Integration = `${AppBasePath.Settings}/${SettingsPath.Integrations}`,
General = `${AppBasePath.Settings}/${SettingsPath.General}`,
@@ -49,8 +49,8 @@ export const getPageTitleFromPath = (pathname: string): string => {
return t`Members - Settings`;
case SettingsPathPrefixes.Objects:
return t`Data model - Settings`;
- case SettingsPathPrefixes.ApiWebhooks:
- return t`MCP & APIs - Settings`;
+ case SettingsPathPrefixes.Developers:
+ return t`Developers - Settings`;
case SettingsPathPrefixes.LogicFunctions:
return t`Functions - Settings`;
case SettingsPathPrefixes.Integration:
diff --git a/packages/twenty-oxlint-rules/rules/no-twenty-ui-override.exemptions.ts b/packages/twenty-oxlint-rules/rules/no-twenty-ui-override.exemptions.ts
index 1e591b376b0..0dea98e5d1e 100644
--- a/packages/twenty-oxlint-rules/rules/no-twenty-ui-override.exemptions.ts
+++ b/packages/twenty-oxlint-rules/rules/no-twenty-ui-override.exemptions.ts
@@ -49,11 +49,6 @@ export const TWENTY_UI_OVERRIDE_EXEMPTIONS = [
'packages/twenty-front/src/modules/settings/components/SettingsListCard.tsx',
reason: 'Card.Footer laid out around the add button',
},
- {
- filePath:
- 'packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSwitch.tsx',
- reason: 'Advanced mode color on the Switch',
- },
{
filePath:
'packages/twenty-front/src/modules/settings/components/SettingsTableCard.tsx',
@@ -81,7 +76,7 @@ export const TWENTY_UI_OVERRIDE_EXEMPTIONS = [
},
{
filePath:
- 'packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetupCard.tsx',
+ 'packages/twenty-front/src/modules/settings/mcp/components/SettingsMcpSetupCard.tsx',
reason: 'One-off Card.Content row layout',
},
{
@@ -104,11 +99,6 @@ export const TWENTY_UI_OVERRIDE_EXEMPTIONS = [
'packages/twenty-front/src/modules/ui/feedback/toast/components/AppToaster.tsx',
reason: 'Toaster stacking order above the app layers',
},
- {
- filePath:
- 'packages/twenty-front/src/modules/ui/input/components/AdvancedSettingsSwitch.tsx',
- reason: 'Advanced mode color on the Switch',
- },
{
filePath:
'packages/twenty-front/src/modules/ui/input/components/FormFieldInputContainer.tsx',
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-48/2-48-upgrade-version-command.module.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-48/2-48-upgrade-version-command.module.ts
index 4f76fbb43b5..cf640cd9973 100644
--- a/packages/twenty-server/src/database/commands/upgrade-version-command/2-48/2-48-upgrade-version-command.module.ts
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-48/2-48-upgrade-version-command.module.ts
@@ -4,6 +4,7 @@ import { WorkspaceIteratorModule } from 'src/database/commands/command-runners/w
import { CountMessageListMembersCommand } from 'src/database/commands/upgrade-version-command/2-48/2-48-workspace-command-1791977057418-count-message-list-members.command';
import { RemoveCampaignListStatColumnsCommand } from 'src/database/commands/upgrade-version-command/2-48/2-48-workspace-command-1791979361903-remove-campaign-list-stat-columns.command';
import { AddCampaignListViewCommand } from 'src/database/commands/upgrade-version-command/2-48/2-48-workspace-command-1791979361904-add-campaign-list-view.command';
+import { RenameDevelopersSettingsCommandMenuItemCommand } from 'src/database/commands/upgrade-version-command/2-48/2-48-workspace-command-1791988325586-rename-developers-settings-command-menu-item.command';
import { ApplicationModule } from 'src/engine/core-modules/application/application.module';
import { WorkspaceCacheModule } from 'src/engine/workspace-cache/workspace-cache.module';
import { WorkspaceMigrationModule } from 'src/engine/workspace-manager/workspace-migration/workspace-migration.module';
@@ -19,6 +20,7 @@ import { WorkspaceMigrationModule } from 'src/engine/workspace-manager/workspace
CountMessageListMembersCommand,
RemoveCampaignListStatColumnsCommand,
AddCampaignListViewCommand,
+ RenameDevelopersSettingsCommandMenuItemCommand,
],
})
export class V2_48_UpgradeVersionCommandModule {}
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-48/2-48-workspace-command-1791988325586-rename-developers-settings-command-menu-item.command.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-48/2-48-workspace-command-1791988325586-rename-developers-settings-command-menu-item.command.ts
new file mode 100644
index 00000000000..805705e0b2b
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-48/2-48-workspace-command-1791988325586-rename-developers-settings-command-menu-item.command.ts
@@ -0,0 +1,91 @@
+import { Command } from 'nest-commander';
+import { TWENTY_STANDARD_APPLICATION_UNIVERSAL_IDENTIFIER } from 'twenty-shared/application';
+import { isNonEmptyArray } from 'twenty-shared/utils';
+
+import { ProvisionedWorkspaceCommandRunner } from 'src/database/commands/command-runners/provisioned-workspace.command-runner';
+import { WorkspaceIteratorService } from 'src/database/commands/command-runners/workspace-iterator.service';
+import { type RunOnWorkspaceArgs } from 'src/database/commands/command-runners/workspace.command-runner';
+import { buildDevelopersSettingsCommandMenuItemUpdates } from 'src/database/commands/upgrade-version-command/2-48/utils/build-developers-settings-command-menu-item-updates.util';
+import { RegisteredWorkspaceCommand } from 'src/engine/core-modules/upgrade/decorators/registered-workspace-command.decorator';
+import { WorkspaceCacheService } from 'src/engine/workspace-cache/services/workspace-cache.service';
+import { WorkspaceMigrationBuilderException } from 'src/engine/workspace-manager/workspace-migration/exceptions/workspace-migration-builder-exception';
+import { WorkspaceMigrationValidateBuildAndRunService } from 'src/engine/workspace-manager/workspace-migration/services/workspace-migration-validate-build-and-run-service';
+
+@RegisteredWorkspaceCommand('2.48.0', 1791988325586)
+@Command({
+ name: 'upgrade:2-48:rename-developers-settings-command-menu-item',
+ description:
+ 'Point the MCP & APIs settings command menu item to the Developers settings page',
+})
+export class RenameDevelopersSettingsCommandMenuItemCommand extends ProvisionedWorkspaceCommandRunner {
+ constructor(
+ protected readonly workspaceIteratorService: WorkspaceIteratorService,
+ private readonly workspaceCacheService: WorkspaceCacheService,
+ private readonly workspaceMigrationValidateBuildAndRunService: WorkspaceMigrationValidateBuildAndRunService,
+ ) {
+ super(workspaceIteratorService);
+ }
+
+ override async runOnWorkspace(args: RunOnWorkspaceArgs): Promise<void> {
+ await this.up(args);
+ }
+
+ async up(args: RunOnWorkspaceArgs): Promise<void> {
+ await this.syncCommandMenuItem(args, 'up');
+ }
+
+ async down(args: RunOnWorkspaceArgs): Promise<void> {
+ await this.syncCommandMenuItem(args, 'down');
+ }
+
+ private async syncCommandMenuItem(
+ { workspaceId, options }: RunOnWorkspaceArgs,
+ direction: 'up' | 'down',
+ ): Promise<void> {
+ const { flatCommandMenuItemMaps } =
+ await this.workspaceCacheService.getOrRecompute(workspaceId, [
+ 'flatCommandMenuItemMaps',
+ ]);
+
+ const commandMenuItemsToUpdate =
+ buildDevelopersSettingsCommandMenuItemUpdates({
+ flatCommandMenuItemByUniversalIdentifier:
+ flatCommandMenuItemMaps.byUniversalIdentifier,
+ now: new Date().toISOString(),
+ direction,
+ });
+
+ if (!isNonEmptyArray(commandMenuItemsToUpdate)) {
+ return;
+ }
+
+ if (options.dryRun) {
+ this.logger.log(
+ `[DRY RUN] Workspace ${workspaceId}: developers settings command menu item would be updated`,
+ );
+
+ return;
+ }
+
+ const validateAndBuildResult =
+ await this.workspaceMigrationValidateBuildAndRunService.validateBuildAndRunLegacyWorkspaceMigration(
+ {
+ isSystemBuild: true,
+ workspaceId,
+ applicationUniversalIdentifier:
+ TWENTY_STANDARD_APPLICATION_UNIVERSAL_IDENTIFIER,
+ allFlatEntityOperationByMetadataName: {
+ commandMenuItem: {
+ flatEntityToCreate: [],
+ flatEntityToDelete: [],
+ flatEntityToUpdate: commandMenuItemsToUpdate,
+ },
+ },
+ },
+ );
+
+ if (validateAndBuildResult.status === 'fail') {
+ throw new WorkspaceMigrationBuilderException(validateAndBuildResult);
+ }
+ }
+}
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-48/utils/__tests__/build-developers-settings-command-menu-item-updates.util.spec.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-48/utils/__tests__/build-developers-settings-command-menu-item-updates.util.spec.ts
new file mode 100644
index 00000000000..45433b32f41
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-48/utils/__tests__/build-developers-settings-command-menu-item-updates.util.spec.ts
@@ -0,0 +1,102 @@
+import { buildDevelopersSettingsCommandMenuItemUpdates } from 'src/database/commands/upgrade-version-command/2-48/utils/build-developers-settings-command-menu-item-updates.util';
+import { type FlatCommandMenuItem } from 'src/engine/metadata-modules/flat-command-menu-item/types/flat-command-menu-item.type';
+import { STANDARD_COMMAND_MENU_ITEMS } from 'src/engine/workspace-manager/twenty-standard-application/constants/standard-command-menu-item.constant';
+
+const NOW = '2026-10-14T00:00:00.000Z';
+
+const { universalIdentifier: DEVELOPERS_SETTINGS_UNIVERSAL_IDENTIFIER } =
+ STANDARD_COMMAND_MENU_ITEMS.goToSettingsApiWebhooks;
+
+const MCP_AND_APIS_VALUES = {
+ label: 'Go to MCP & APIs Settings',
+ shortLabel: 'MCP & APIs',
+ icon: 'IconPlug',
+ payload: { path: '/settings/api-webhooks' },
+};
+
+const DEVELOPERS_VALUES = {
+ label: 'Go to Developers Settings',
+ shortLabel: 'Developers',
+ icon: 'IconCode',
+ payload: { path: '/settings/developers' },
+};
+
+const buildExistingItems = (
+ values: Partial<FlatCommandMenuItem>,
+): Record<string, FlatCommandMenuItem> => ({
+ [DEVELOPERS_SETTINGS_UNIVERSAL_IDENTIFIER]: {
+ universalIdentifier: DEVELOPERS_SETTINGS_UNIVERSAL_IDENTIFIER,
+ updatedAt: '2025-01-01T00:00:00.000Z',
+ ...values,
+ } as FlatCommandMenuItem,
+});
+
+describe('buildDevelopersSettingsCommandMenuItemUpdates', () => {
+ it('points the former standard item to the Developers settings page', () => {
+ const updates = buildDevelopersSettingsCommandMenuItemUpdates({
+ flatCommandMenuItemByUniversalIdentifier:
+ buildExistingItems(MCP_AND_APIS_VALUES),
+ now: NOW,
+ direction: 'up',
+ });
+
+ expect(updates).toEqual([
+ expect.objectContaining({ ...DEVELOPERS_VALUES, updatedAt: NOW }),
+ ]);
+ });
+
+ it('restores the former standard item on down', () => {
+ const updates = buildDevelopersSettingsCommandMenuItemUpdates({
+ flatCommandMenuItemByUniversalIdentifier:
+ buildExistingItems(DEVELOPERS_VALUES),
+ now: NOW,
+ direction: 'down',
+ });
+
+ expect(updates).toEqual([
+ expect.objectContaining({ ...MCP_AND_APIS_VALUES, updatedAt: NOW }),
+ ]);
+ });
+
+ it('keeps customized values', () => {
+ const updates = buildDevelopersSettingsCommandMenuItemUpdates({
+ flatCommandMenuItemByUniversalIdentifier: buildExistingItems({
+ ...MCP_AND_APIS_VALUES,
+ label: 'Open API settings',
+ icon: 'IconApi',
+ }),
+ now: NOW,
+ direction: 'up',
+ });
+
+ expect(updates).toEqual([
+ expect.objectContaining({
+ label: 'Open API settings',
+ shortLabel: DEVELOPERS_VALUES.shortLabel,
+ icon: 'IconApi',
+ payload: DEVELOPERS_VALUES.payload,
+ }),
+ ]);
+ });
+
+ it('skips items already up to date', () => {
+ expect(
+ buildDevelopersSettingsCommandMenuItemUpdates({
+ flatCommandMenuItemByUniversalIdentifier:
+ buildExistingItems(DEVELOPERS_VALUES),
+ now: NOW,
+ direction: 'up',
+ }),
+ ).toEqual([]);
+ });
+
+ it('skips workspaces without the item', () => {
+ expect(
+ buildDevelopersSettingsCommandMenuItemUpdates({
+ flatCommandMenuItemByUniversalIdentifier: {},
+ now: NOW,
+ direction: 'up',
+ }),
+ ).toEqual([]);
+ });
+});
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-48/utils/build-developers-settings-command-menu-item-updates.util.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-48/utils/build-developers-settings-command-menu-item-updates.util.ts
new file mode 100644
index 00000000000..fae0d4d3d70
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-48/utils/build-developers-settings-command-menu-item-updates.util.ts
@@ -0,0 +1,87 @@
+import { isDefined } from 'twenty-shared/utils';
+
+import { type FlatCommandMenuItem } from 'src/engine/metadata-modules/flat-command-menu-item/types/flat-command-menu-item.type';
+import { STANDARD_COMMAND_MENU_ITEMS } from 'src/engine/workspace-manager/twenty-standard-application/constants/standard-command-menu-item.constant';
+
+type DevelopersSettingsCommandMenuItemValues = {
+ label: string;
+ shortLabel: string;
+ icon: string;
+ path: string;
+};
+
+const MCP_AND_APIS_SETTINGS_VALUES: DevelopersSettingsCommandMenuItemValues = {
+ label: 'Go to MCP & APIs Settings',
+ shortLabel: 'MCP & APIs',
+ icon: 'IconPlug',
+ path: '/settings/api-webhooks',
+};
+
+const DEVELOPERS_SETTINGS_VALUES: DevelopersSettingsCommandMenuItemValues = {
+ label: 'Go to Developers Settings',
+ shortLabel: 'Developers',
+ icon: 'IconCode',
+ path: '/settings/developers',
+};
+
+// Values a workspace customized are kept
+export const buildDevelopersSettingsCommandMenuItemUpdates = ({
+ flatCommandMenuItemByUniversalIdentifier,
+ now,
+ direction,
+}: {
+ flatCommandMenuItemByUniversalIdentifier: Record<
+ string,
+ FlatCommandMenuItem | undefined
+ >;
+ now: string;
+ direction: 'up' | 'down';
+}): FlatCommandMenuItem[] => {
+ const existingCommandMenuItem =
+ flatCommandMenuItemByUniversalIdentifier[
+ STANDARD_COMMAND_MENU_ITEMS.goToSettingsApiWebhooks.universalIdentifier
+ ];
+
+ if (!isDefined(existingCommandMenuItem)) {
+ return [];
+ }
+
+ const [formerValues, currentValues] =
+ direction === 'up'
+ ? [MCP_AND_APIS_SETTINGS_VALUES, DEVELOPERS_SETTINGS_VALUES]
+ : [DEVELOPERS_SETTINGS_VALUES, MCP_AND_APIS_SETTINGS_VALUES];
+
+ const shouldUpdateLabel =
+ existingCommandMenuItem.label === formerValues.label;
+ const shouldUpdateShortLabel =
+ existingCommandMenuItem.shortLabel === formerValues.shortLabel;
+ const shouldUpdateIcon = existingCommandMenuItem.icon === formerValues.icon;
+ const shouldUpdatePath =
+ existingCommandMenuItem.payload?.path === formerValues.path;
+
+ if (
+ !shouldUpdateLabel &&
+ !shouldUpdateShortLabel &&
+ !shouldUpdateIcon &&
+ !shouldUpdatePath
+ ) {
+ return [];
+ }
+
+ return [
+ {
+ ...existingCommandMenuItem,
+ label: shouldUpdateLabel
+ ? currentValues.label
+ : existingCommandMenuItem.label,
+ shortLabel: shouldUpdateShortLabel
+ ? currentValues.shortLabel
+ : existingCommandMenuItem.shortLabel,
+ icon: shouldUpdateIcon ? currentValues.icon : existingCommandMenuItem.icon,
+ payload: shouldUpdatePath
+ ? { path: currentValues.path }
+ : existingCommandMenuItem.payload,
+ updatedAt: now,
+ },
+ ];
+};
diff --git a/packages/twenty-server/src/engine/api/rest/core/handlers/rest-api-base.handler.ts b/packages/twenty-server/src/engine/api/rest/core/handlers/rest-api-base.handler.ts
index 61617a1d64e..66ece9368c3 100644
--- a/packages/twenty-server/src/engine/api/rest/core/handlers/rest-api-base.handler.ts
+++ b/packages/twenty-server/src/engine/api/rest/core/handlers/rest-api-base.handler.ts
@@ -259,7 +259,7 @@ export abstract class RestApiBaseHandler {
`No object was found for the workspace associated with this API key. You may generate a new one here ${this.workspaceDomainsService
.buildWorkspaceURL({
workspace,
- pathname: getSettingsPath(SettingsPath.ApiWebhooks),
+ pathname: getSettingsPath(SettingsPath.Developers),
})
.toString()}`,
);
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-registration/application-registration-claim.controller.ts b/packages/twenty-server/src/engine/core-modules/application/application-registration/application-registration-claim.controller.ts
index 6523e2c82e8..605915b6ecb 100644
--- a/packages/twenty-server/src/engine/core-modules/application/application-registration/application-registration-claim.controller.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/application-registration/application-registration-claim.controller.ts
@@ -68,10 +68,10 @@ export class ApplicationRegistrationClaimController {
const url = this.workspaceDomainsService.buildWorkspaceURL({
workspace,
- pathname: getSettingsPath(SettingsPath.Applications),
+ pathname: getSettingsPath(SettingsPath.Developers),
});
- url.hash = 'developer';
+ url.hash = 'apps';
return res.redirect(url.toString());
} catch (error) {
@@ -81,11 +81,11 @@ export class ApplicationRegistrationClaimController {
if (workspace !== null) {
const url = this.workspaceDomainsService.buildWorkspaceURL({
workspace,
- pathname: getSettingsPath(SettingsPath.Applications),
+ pathname: getSettingsPath(SettingsPath.Developers),
});
url.searchParams.set('claimErrorCode', claimErrorCode);
- url.hash = 'developer';
+ url.hash = 'apps';
return res.redirect(url.toString());
}
@@ -97,7 +97,7 @@ export class ApplicationRegistrationClaimController {
subdomain: this.twentyConfigService.get('DEFAULT_SUBDOMAIN'),
customDomain: null,
},
- pathname: getSettingsPath(SettingsPath.Applications),
+ pathname: getSettingsPath(SettingsPath.Developers),
}),
);
}
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/standard-command-menu-item.constant.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/standard-command-menu-item.constant.ts
index 68e93a77fb1..79fa08bcaa8 100644
--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/standard-command-menu-item.constant.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/standard-command-menu-item.constant.ts
@@ -1566,15 +1566,15 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
universalIdentifier: 'ed2c2fde-1e7a-4a42-ba63-221eaa7c9759',
label: i18nLabel(
msg({
- message: `Go to MCP & APIs Settings`,
+ message: `Go to Developers Settings`,
context: 'commandMenuItem.label',
}),
),
- icon: 'IconPlug',
+ icon: 'IconCode',
isPinned: false,
position: 58,
shortLabel: i18nLabel(
- msg({ message: `MCP & APIs`, context: 'commandMenuItem.shortLabel' }),
+ msg({ message: `Developers`, context: 'commandMenuItem.shortLabel' }),
),
availabilityType: CommandMenuItemAvailabilityType.GLOBAL,
conditionalAvailabilityExpression: 'permissionFlags.API_KEYS_AND_WEBHOOKS',
@@ -1582,7 +1582,7 @@ export const STANDARD_COMMAND_MENU_ITEMS = {
frontComponentUniversalIdentifier: null,
engineComponentKey: EngineComponentKey.NAVIGATION,
hotKeys: null,
- payload: { path: '/settings/api-webhooks' },
+ payload: { path: '/settings/developers' },
},
goToSettingsApplications: {
universalIdentifier: '44db6d7a-79ac-485e-b3da-da8776bd7777',
diff --git a/packages/twenty-shared/src/types/SettingsPath.ts b/packages/twenty-shared/src/types/SettingsPath.ts
index f57c97ff659..838ba4c1fa0 100644
--- a/packages/twenty-shared/src/types/SettingsPath.ts
+++ b/packages/twenty-shared/src/types/SettingsPath.ts
@@ -28,6 +28,8 @@ export enum SettingsPath {
ObjectValidationRuleEdit = 'objects/:objectNamePlural/validation-rules/:validationRuleId',
ObjectFieldEdit = 'objects/:objectNamePlural/:fieldName',
ObjectTranslations = 'objects/:objectNamePlural/object-translations',
+ ObjectSearch = 'objects/:objectNamePlural/object-search',
+ ObjectIndexes = 'objects/:objectNamePlural/object-indexes',
ObjectFieldTranslations = 'objects/:objectNamePlural/:fieldName/translations',
NewObject = 'objects/new',
Layout = 'layout',
@@ -62,17 +64,17 @@ export enum SettingsPath {
ApplicationViewDetail = 'applications/:applicationId/views/:viewUniversalIdentifier',
ApplicationPageLayoutDetail = 'applications/:applicationId/pageLayouts/:pageLayoutUniversalIdentifier',
AvailableApplicationDetail = 'applications/available/:availableApplicationId',
- ApplicationRegistrationDetail = 'applications/registrations/:applicationRegistrationId',
+ ApplicationRegistrationDetail = 'developers/apps/:applicationRegistrationId',
LogicFunctions = 'functions',
NewLogicFunction = 'functions/new',
LogicFunctionDetail = 'functions/:logicFunctionId',
- ApiWebhooks = 'mcp-apis',
+ Developers = 'developers',
RestPlayground = 'playground/rest/:schema',
GraphQLPlayground = 'playground/graphql/:schema',
- NewApiKey = 'mcp-apis/apis/new',
- ApiKeyDetail = 'mcp-apis/apis/:apiKeyId',
- NewWebhook = 'mcp-apis/webhooks/new',
- WebhookDetail = 'mcp-apis/webhooks/:webhookId',
+ NewApiKey = 'developers/apis/new',
+ ApiKeyDetail = 'developers/apis/:apiKeyId',
+ NewWebhook = 'developers/webhooks/new',
+ WebhookDetail = 'developers/webhooks/:webhookId',
Integrations = 'integrations',
Security = 'general#security',
Logs = 'general#logs',
diff --git a/packages/twenty-ui/src/icon/constants/TwentyIconDictionary.ts b/packages/twenty-ui/src/icon/constants/TwentyIconDictionary.ts
index 96b9dfe2e23..531dabf792d 100644
--- a/packages/twenty-ui/src/icon/constants/TwentyIconDictionary.ts
+++ b/packages/twenty-ui/src/icon/constants/TwentyIconDictionary.ts
@@ -460,21 +460,21 @@ export const TWENTY_ICON_DICTIONARY = [
avoidWhen: 'Representing MCP, webhooks, or external-service integrations.',
},
{
- key: 'mcp-and-apis',
- label: 'MCP & APIs',
+ key: 'developers',
+ label: 'Developers',
category: 'platform',
- iconName: 'IconPlug',
- tablerName: 'plug',
+ iconName: 'IconCode',
+ tablerName: 'code',
keywords: [
- 'MCP and APIs',
- 'developer connections',
+ 'developers',
+ 'developer settings',
'API keys and webhooks',
- 'platform connections',
+ 'app development',
],
useWhen:
- 'Representing the combined MCP, API keys, and webhooks settings area.',
+ 'Representing the Developers settings area for API keys, webhooks, and apps.',
avoidWhen:
- 'Representing an API, MCP server, webhook, or integration individually.',
+ 'Representing an API, webhook, or app individually, or generic source code.',
},
{
key: 'api-key',
diff --git a/packages/twenty-ui/src/icon/icon-dictionary.md b/packages/twenty-ui/src/icon/icon-dictionary.md
index 6dac0ecc736..82358336cb6 100644
--- a/packages/twenty-ui/src/icon/icon-dictionary.md
+++ b/packages/twenty-ui/src/icon/icon-dictionary.md
@@ -99,7 +99,7 @@ import { IconHierarchy } from 'twenty-ui/icon';
| Concept | React component | Tabler name | Use when | Avoid when | Search keywords |
| --- | --- | --- | --- | --- | --- |
| API | `IconApi` | `api` | Representing APIs, API access, or API configuration. | Representing MCP, webhooks, or external-service integrations. | API, REST, GraphQL, API key |
-| MCP & APIs | `IconPlug` | `plug` | Representing the combined MCP, API keys, and webhooks settings area. | Representing an API, MCP server, webhook, or integration individually. | MCP and APIs, developer connections, API keys and webhooks, platform connections |
+| Developers | `IconCode` | `code` | Representing the Developers settings area for API keys, webhooks, and apps. | Representing an API, webhook, or app individually, or generic source code. | developers, developer settings, API keys and webhooks, app development |
| API Key | `IconKey` | `key` | Representing an API key or API credential. | Representing APIs generally, security settings, or permissions. | API key, API credential, access token, secret key |
| Webhook | `IconWebhook` | `webhook` | Representing webhooks, webhook endpoints, or webhook events. | Representing a generic API, integration, or workflow action. | webhook, event callback, HTTP event, webhook endpoint |
| Integration / Connection | `IconPlug` | `plug` | Representing an integration or connection to an external service. | Representing an app, API, MCP, or connected email account. | integration, connection, external service, provider |