[Apps] Small improvements (#17129)

- Fix undefined in breadcrumbs
<img width="783" height="220" alt="breadcrumbs_bad"
src="https://github.com/user-attachments/assets/557648da-f825-4bf6-b66f-2ac3992eeab1"
/>
- Make role required in app definition
This commit is contained in:
Marie
2026-01-14 18:28:51 +01:00
committed by GitHub
parent 79e0207efa
commit 8379e19587
6 changed files with 16 additions and 17 deletions
@@ -37,7 +37,7 @@ export const SettingsServerlessFunctionDetail = () => {
const navigate = useNavigate();
const currentWorkspace = useRecoilValue(currentWorkspaceState);
const { data } = useFindOneApplicationQuery({
const { data, loading: applicationLoading } = useFindOneApplicationQuery({
variables: { id: applicationId },
skip: !applicationId,
});
@@ -187,7 +187,8 @@ export const SettingsServerlessFunctionDetail = () => {
];
return (
!loading && (
!loading &&
!applicationLoading && (
<SubMenuTopBarContainer
title={
<SettingsServerlessFunctionLabelContainer
@@ -7,6 +7,7 @@ describe('defineApp', () => {
displayName: 'My App',
description: 'My app description',
icon: 'IconWorld',
functionRoleUniversalIdentifier: '68bb56f3-8300-4cb5-8cc3-8da9ee66f1b2',
};
const result = defineApp(config);
@@ -1,5 +1,5 @@
import { type ObjectManifest } from 'twenty-shared/application';
import { isNonEmptyString } from '@sniptt/guards';
import { type ObjectManifest } from 'twenty-shared/application';
import { validateFieldsOrThrow } from './validate-fields';
/**
@@ -9,6 +9,7 @@ describe('validateManifest - objectExtensions', () => {
const validApplication: Application = {
universalIdentifier: '4ec0391d-18d5-411c-b2f3-266ddc1c3ef7',
displayName: 'Test App',
functionRoleUniversalIdentifier: '68bb56f3-8300-4cb5-8cc3-8da9ee66f1b2',
};
const validObjectExtension: ObjectExtensionManifest = {
@@ -2,9 +2,9 @@ import { type ApplicationVariables } from '@/application';
import { type SyncableEntityOptions } from '@/application/syncableEntityOptionsType';
export type Application = SyncableEntityOptions & {
functionRoleUniversalIdentifier: string;
displayName?: string;
description?: string;
icon?: string;
applicationVariables?: ApplicationVariables;
functionRoleUniversalIdentifier?: string;
};
@@ -1,17 +1,13 @@
import { type SyncableEntityOptions } from '@/application/syncableEntityOptionsType';
import { type FieldManifest } from '@/application/fieldManifestType';
import { type FieldMetadataType } from '@/types';
import { type RelationOnDeleteAction } from '@/types/RelationOnDeleteAction.type';
import { type RelationType } from '@/types/RelationType';
export type RelationFieldManifest = SyncableEntityOptions & {
name: string;
label: string;
description?: string;
icon?: string;
relationType: RelationType;
targetObjectUniversalIdentifier: string;
targetFieldLabel: string;
targetFieldIcon?: string;
onDelete?: RelationOnDeleteAction;
type: FieldMetadataType.RELATION;
};
export type RelationFieldManifest =
FieldManifest<FieldMetadataType.RELATION> & {
relationType: RelationType;
targetObjectUniversalIdentifier: string;
targetFieldLabel: string;
targetFieldIcon?: string;
onDelete?: RelationOnDeleteAction;
};