Skip to content

The open alternative to Salesforce, designed for AI.

feat(applications): remove the application custom settings tab (#22156)

martmulla20ebfa8807e
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
index b705dc68ec8..ed335e3a21e 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
@@ -714,7 +714,7 @@ type Application {
applicationRegistrationId: UUID
canBeUninstalled: Boolean!
defaultRoleId: String
- settingsCustomTabFrontComponentId: UUID
+ settingsCustomTabFrontComponentId: UUID @deprecated(reason: "Custom settings tabs are no longer supported. This field is ignored.")
defaultLogicFunctionRole: Role
agents: [Agent!]!
frontComponents: [FrontComponent!]!
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.ts b/packages/twenty-client-sdk/src/metadata/generated/schema.ts
index 6dd53433fc6..478dfb24b4c 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/schema.ts
+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.ts
@@ -475,6 +475,7 @@ export interface Application {
applicationRegistrationId?: Scalars['UUID']
canBeUninstalled: Scalars['Boolean']
defaultRoleId?: Scalars['String']
+ /** @deprecated Custom settings tabs are no longer supported. This field is ignored. */
settingsCustomTabFrontComponentId?: Scalars['UUID']
defaultLogicFunctionRole?: Role
agents: Agent[]
@@ -3510,6 +3511,7 @@ export interface ApplicationGenqlSelection{
applicationRegistrationId?: boolean | number
canBeUninstalled?: boolean | number
defaultRoleId?: boolean | number
+ /** @deprecated Custom settings tabs are no longer supported. This field is ignored. */
settingsCustomTabFrontComponentId?: boolean | number
defaultLogicFunctionRole?: RoleGenqlSelection
agents?: AgentGenqlSelection
diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts
index fb91d9dde4e..b241e072e53 100644
--- a/packages/twenty-front/src/generated-metadata/graphql.ts
+++ b/packages/twenty-front/src/generated-metadata/graphql.ts
@@ -302,6 +302,7 @@ export type Application = {
objects: Array<Object>;
packageJsonChecksum?: Maybe<Scalars['String']['output']>;
packageJsonFileId?: Maybe<Scalars['UUID']['output']>;
+ /** @deprecated Custom settings tabs are no longer supported. This field is ignored. */
settingsCustomTabFrontComponentId?: Maybe<Scalars['UUID']['output']>;
universalIdentifier: Scalars['String']['output'];
version?: Maybe<Scalars['String']['output']>;
diff --git a/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx
index e6266bfff73..6db5a2de4b6 100644
--- a/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx
@@ -22,7 +22,6 @@ import { type Manifest } from 'twenty-shared/application';
import { SettingsPath } from 'twenty-shared/types';
import { getSettingsPath, isDefined } from 'twenty-shared/utils';
import {
- IconApps,
IconBox,
IconCommand,
IconGraph,
@@ -44,7 +43,6 @@ import { SettingsSectionSkeletonLoader } from '@/settings/components/SettingsSec
import { CUSTOM_APPLICATION_ILLUSTRATIONS } from '~/pages/settings/applications/constants/CustomApplicationIllustrations';
import { STANDARD_APPLICATION_ILLUSTRATIONS } from '~/pages/settings/applications/constants/StandardApplicationIllustrations';
import { useFindApplicationConnectionProviders } from '~/pages/settings/applications/hooks/useFindApplicationConnectionProviders';
-import { SettingsApplicationCustomTab } from '~/pages/settings/applications/tabs/SettingsApplicationCustomTab';
import { SettingsApplicationDetailAboutTab } from '~/pages/settings/applications/tabs/SettingsApplicationDetailAboutTab';
import { SettingsApplicationDetailContentTab } from '~/pages/settings/applications/tabs/SettingsApplicationDetailContentTab';
import { SettingsApplicationDetailSettingsTab } from '~/pages/settings/applications/tabs/SettingsApplicationDetailSettingsTab';
@@ -102,9 +100,6 @@ export const SettingsApplicationDetails = () => {
const screenshots = getScreenshots();
- const settingsCustomTabFrontComponentId =
- application?.settingsCustomTabFrontComponentId;
-
const { upgrade, isUpgrading } = useUpgradeApplication();
const canInstallMarketplaceApps = useHasPermissionFlag(
@@ -245,9 +240,6 @@ export const SettingsApplicationDetails = () => {
disabled: hasNothingToConfigure,
};
})(),
- ...(isDefined(settingsCustomTabFrontComponentId)
- ? [{ id: 'custom', title: t`Custom`, Icon: IconApps }]
- : []),
];
const renderActiveTabContent = () => {
@@ -312,16 +304,6 @@ export const SettingsApplicationDetails = () => {
return (
<SettingsApplicationDetailSettingsTab application={application} />
);
- case 'custom':
- return isDefined(settingsCustomTabFrontComponentId) ? (
- <SettingsApplicationCustomTab
- settingsCustomTabFrontComponentId={
- settingsCustomTabFrontComponentId
- }
- />
- ) : (
- <></>
- );
default:
return <></>;
}
diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationCustomTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationCustomTab.tsx
deleted file mode 100644
index 122b30dce85..00000000000
--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationCustomTab.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import { styled } from '@linaria/react';
-import { Suspense, lazy } from 'react';
-
-const FrontComponentRenderer = lazy(() =>
- import('@/front-components/components/FrontComponentRenderer').then(
- (module) => ({ default: module.FrontComponentRenderer }),
- ),
-);
-
-const StyledContainer = styled.div`
- height: 100%;
- overflow: auto;
- width: 100%;
-`;
-
-type SettingsApplicationCustomTabProps = {
- settingsCustomTabFrontComponentId: string;
-};
-
-export const SettingsApplicationCustomTab = ({
- settingsCustomTabFrontComponentId,
-}: SettingsApplicationCustomTabProps) => {
- return (
- <StyledContainer>
- <Suspense fallback={null}>
- <FrontComponentRenderer
- frontComponentId={settingsCustomTabFrontComponentId}
- />
- </Suspense>
- </StyledContainer>
- );
-};
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-migration.service.ts b/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-migration.service.ts
index 599a44f885a..ffeb9ea228f 100644
--- a/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-migration.service.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/application-manifest/application-manifest-migration.service.ts
@@ -257,7 +257,7 @@ export class ApplicationManifestMigrationService {
);
if (!dryRun) {
- await this.syncDefaultRoleAndSettingsCustomTab({
+ await this.syncDefaultRole({
manifest,
workspaceId,
ownerFlatApplication,
@@ -270,7 +270,7 @@ export class ApplicationManifestMigrationService {
};
}
- private async syncDefaultRoleAndSettingsCustomTab({
+ private async syncDefaultRole({
manifest,
workspaceId,
ownerFlatApplication,
@@ -279,13 +279,10 @@ export class ApplicationManifestMigrationService {
workspaceId: string;
ownerFlatApplication: FlatApplication;
}) {
- const {
- flatRoleMaps: refreshedFlatRoleMaps,
- flatFrontComponentMaps: refreshedFlatFrontComponentMaps,
- } = await this.workspaceCacheService.getOrRecompute(workspaceId, [
- 'flatRoleMaps',
- 'flatFrontComponentMaps',
- ]);
+ const { flatRoleMaps: refreshedFlatRoleMaps } =
+ await this.workspaceCacheService.getOrRecompute(workspaceId, [
+ 'flatRoleMaps',
+ ]);
let defaultRoleId: string | null = null;
@@ -310,31 +307,11 @@ export class ApplicationManifestMigrationService {
}
}
- let settingsCustomTabFrontComponentId: string | null = null;
-
- const settingsCustomTabUniversalIdentifier =
- manifest.application.settingsCustomTabFrontComponentUniversalIdentifier;
-
- if (isDefined(settingsCustomTabUniversalIdentifier)) {
- const flatFrontComponent = findFlatEntityByUniversalIdentifier({
- flatEntityMaps: refreshedFlatFrontComponentMaps,
- universalIdentifier: settingsCustomTabUniversalIdentifier,
+ if (isDefined(defaultRoleId)) {
+ await this.applicationService.update(ownerFlatApplication.id, {
+ workspaceId,
+ defaultRoleId,
});
-
- if (!isDefined(flatFrontComponent)) {
- throw new ApplicationException(
- `Failed to resolve front component for settingsCustomTabFrontComponentUniversalIdentifier ${settingsCustomTabUniversalIdentifier}`,
- ApplicationExceptionCode.ENTITY_NOT_FOUND,
- );
- }
-
- settingsCustomTabFrontComponentId = flatFrontComponent.id;
}
-
- await this.applicationService.update(ownerFlatApplication.id, {
- workspaceId,
- settingsCustomTabFrontComponentId,
- ...(isDefined(defaultRoleId) ? { defaultRoleId } : {}),
- });
}
}
diff --git a/packages/twenty-server/src/engine/core-modules/application/application.entity.ts b/packages/twenty-server/src/engine/core-modules/application/application.entity.ts
index c2f52a19237..c4894c03f56 100644
--- a/packages/twenty-server/src/engine/core-modules/application/application.entity.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/application.entity.ts
@@ -102,6 +102,11 @@ export class ApplicationEntity extends WorkspaceRelatedEntity {
@Field(() => RoleDTO, { nullable: true })
defaultRole: RoleDTO | null;
+ /**
+ * @deprecated Custom settings tabs are no longer supported. The column is
+ * kept (not dropped) so existing installations upgrade cleanly, but the
+ * value is no longer read or synced from manifests.
+ */
@Column({ nullable: true, type: 'uuid' })
settingsCustomTabFrontComponentId: string | null;
diff --git a/packages/twenty-server/src/engine/core-modules/application/dtos/application.dto.ts b/packages/twenty-server/src/engine/core-modules/application/dtos/application.dto.ts
index 255efa9fe47..81f187009ac 100644
--- a/packages/twenty-server/src/engine/core-modules/application/dtos/application.dto.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/dtos/application.dto.ts
@@ -86,9 +86,17 @@ export class ApplicationDTO {
@Field({ nullable: true })
defaultRoleId?: string;
+ /**
+ * @deprecated Custom settings tabs are no longer supported. Kept for
+ * backward compatibility with existing installations; the value is ignored.
+ */
@IsOptional()
@IsUUID()
- @Field(() => UUIDScalarType, { nullable: true })
+ @Field(() => UUIDScalarType, {
+ nullable: true,
+ deprecationReason:
+ 'Custom settings tabs are no longer supported. This field is ignored.',
+ })
settingsCustomTabFrontComponentId?: string;
@IsOptional()
diff --git a/packages/twenty-shared/src/application/applicationType.ts b/packages/twenty-shared/src/application/applicationType.ts
index 3651ed0878d..75e9c132b70 100644
--- a/packages/twenty-shared/src/application/applicationType.ts
+++ b/packages/twenty-shared/src/application/applicationType.ts
@@ -21,6 +21,11 @@ export type ApplicationManifest = SyncableEntityOptions & {
issueReportUrl?: string;
postInstallLogicFunction?: PostInstallLogicFunctionApplicationManifest;
preInstallLogicFunction?: PreInstallLogicFunctionApplicationManifest;
+ /**
+ * @deprecated Custom settings tabs are no longer supported. This property is
+ * kept for backward compatibility with older manifests but is now ignored.
+ * Use typed `applicationVariables` / `serverVariables` instead.
+ */
settingsCustomTabFrontComponentUniversalIdentifier?: string;
packageJsonChecksum: string | null;
yarnLockChecksum: string | null;