Repository: twentyhq/twenty
File: packages/twenty-front/src/modules/page-layout/hooks/useTemporaryFieldsConfiguration.ts (TypeScript)

Code before:
  const configuration = useMemo<FieldsConfiguration | null>(() => {
    if (!isDefined(objectMetadataItem)) {
      return null;
    }

    const fieldsToDisplay = objectMetadataItem.fields.filter(
      (field) =>
        field.type !== FieldMetadataType.RELATION &&
        field.type !== FieldMetadataType.MORPH_RELATION &&
        field.type !== FieldMetadataType.RICH_TEXT_V2,
    );

    if (fieldsToDisplay.length === 0) {
      return null;
    }

    const generalFields: Array<{ fieldMetadataId: string; position: number }> =
      [];
    const otherFields: Array<{ fieldMetadataId: string; position: number }> =
      [];

    let generalPosition = 0;
    let otherPosition = 0;

    fieldsToDisplay.forEach((field) => {
      if (field.type === FieldMetadataType.LINKS) {
        otherFields.push({
          fieldMetadataId: field.id,
          position: otherPosition++,
        });
      } else {
        generalFields.push({
          fieldMetadataId: field.id,
          position: generalPosition++,
        });
      }
    });

    const sections = [];

    if (generalFields.length > 0) {
      sections.push({
        id: `${objectNameSingular}-section-general`,
        title: t`General`,
        position: 0,
        fields: generalFields,
      });
    }

    if (otherFields.length > 0) {
      sections.push({

Review comment (suggestion):
The change from checking `field.type === FieldMetadataType.LINKS` to `field.isCustom === true` fundamentally alters the logic for categorizing fields. Previously, only LINKS type fields went into the "Other" section, but now ALL custom fields (regardless of type) are categorized as "Other". This is a significant behavioral change that could affect how fields are organized. Consider whether this is the intended behavior or if a more specific check is needed.
```suggestion
      if (field.type === FieldMetadataType.LINKS) {
```

Code after:
  const configuration = useMemo<FieldsConfiguration | null>(() => {
    if (!isDefined(objectMetadataItem)) {
      return null;
    }

    const fieldsToDisplay = objectMetadataItem.fields.filter(
      (field) =>
        field.type !== FieldMetadataType.RELATION &&
        field.type !== FieldMetadataType.MORPH_RELATION &&
        field.type !== FieldMetadataType.RICH_TEXT_V2,
    );

    if (fieldsToDisplay.length === 0) {
      return null;
    }

    const generalFields: Array<{ fieldMetadataId: string; position: number }> =
      [];
    const otherFields: Array<{ fieldMetadataId: string; position: number }> =
      [];

    let generalPosition = 0;
    let otherPosition = 0;

    fieldsToDisplay.forEach((field) => {
      if (field.isCustom === true) {
        otherFields.push({
          fieldMetadataId: field.id,
          position: otherPosition++,
        });
      } else {
        generalFields.push({
          fieldMetadataId: field.id,
          position: generalPosition++,
        });
      }
    });

    const sections = [];

    if (generalFields.length > 0) {
      sections.push({
        id: `${objectNameSingular}-section-general`,
        title: t`General`,
        position: 0,
        fields: generalFields,
      });
    }

    if (otherFields.length > 0) {
      sections.push({