Commit Graph

6787 Commits

Author SHA1 Message Date
7cacccf0b8 UNAUTHORIZED gmail error (#12262)
# Gmail OAuth authentication flow issues

### TLDR
This error is not an error and therefore should be treated as a simple
redirect with a snackbar.

### More details
Fixing incomplete OAuth token exchange processes and improving error
handling for empty Gmail inboxes.
The changes include modifications to OAuth guards, to ensure that if a
user clicks "cancel" instead of completing the authentication workflow
if fails

## Before:
Redirection from `/settings/accounts` to `app.twenty.com` with an
`UNAUTHORIZED` error

## After :
<img width="948" alt="Screenshot 2025-05-26 at 18 04 37"
src="https://github.com/user-attachments/assets/62c8721e-c2b3-4e3d-ad0b-e4059dfb7a98"
/>


Fixes https://github.com/twentyhq/twenty/issues/11895

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2025-05-27 16:45:42 +02:00
4b25aabfa2 Update schema and add tests (#12314)
For database event triggers, we remove the before / after logic. We go
directly with the properties
<img width="211" alt="Capture d’écran 2025-05-27 à 11 40 36"
src="https://github.com/user-attachments/assets/a05bd3c1-104b-477b-be52-d56846ce7e63"
/>

To achieve this without changing the shape of events, we need to handle
keys using dots, such:
```
'properties.after.name': {
    icon: 'IconBuildingSkyscraper',
    type: FieldMetadataType.TEXT,
    label: 'Name',
    value: 'My text',
    isLeaf: true,
},
```

This PR:
- adds logic to handle the case where the key has dot included
- adds tests
2025-05-27 15:57:28 +02:00
78f8562457 fix: prevent drag selection from blocking input focus (#12322)
closes #12309
Fixes input elements becoming unusable due to drag selection preventing
default browser behavior.

**Problem:**
- Input elements couldn't receive focus because `event.preventDefault()`
was called unconditionally
- Removing `preventDefault()` broke click-outside-to-deselect
functionality

**Solution:**
- Only call `preventDefault()` when actually starting drag selection
- Preserves input focus while maintaining drag selection and deselection
behavior

**Changes:**
- Move `event.preventDefault()` inside the `shouldStartSelecting`
condition
- Update test to reflect correct behavior for disabled elements
2025-05-27 14:51:48 +02:00
feeb032602 Add mcp.json to gitignore (#12321)
# Introduction
In order to avoid pushing secrets within an project scoped mcp.json
configuration
[Related
docs](https://docs.cursor.com/context/model-context-protocol#configuration-locations)
2025-05-27 14:06:21 +02:00
0275fad5f7 billing - remove deprecated endpoint (#12315)
staging and main env config in stripe updated (prod already updated)
2025-05-27 14:03:37 +02:00
d85c45a4cf Fix last row disappearing when dragging a row in the table (#12297)
# Fix last row disappearing when dragging a row in the table

Fixes https://github.com/twentyhq/core-team-issues/issues/836

The issue came from the fact that the provided placeholder was not
mounted at the right place (after the footer when it should be mounted
before it).

I created a context to which we can pass the placeholder. We can use
this placeholder anywhere inside the table by using
`RecordTableBodyDroppablePlaceholder`.

## Before


https://github.com/user-attachments/assets/39a2e45b-6d97-4450-bfee-12135a873a1d


## After


https://github.com/user-attachments/assets/ca126819-67f2-4358-b644-85172fef3b8f
2025-05-27 12:02:24 +02:00
c7b3ebc743 i18n - translations (#12312)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-05-27 11:46:00 +02:00
42d493d31d Commit index.ts twenty-ui (#12310)
Related to https://github.com/twentyhq/twenty/pull/12282
2025-05-27 09:37:19 +00:00
7b5d6a2ffc Open the executed workflow run in the side panel (#12284)
> [!WARNING]
> This PR introduces a new way to interact with workflow runs. It comes
with a few known flaws that will be solved in a second time.

## Launching a Test


https://github.com/user-attachments/assets/89b0eb63-d276-4ac5-a5d8-665d0084e0c5

## Triggering a workflow with a manual trigger


https://github.com/user-attachments/assets/047975d4-a24d-4cf0-b617-525965e3bfd8

Closes https://github.com/twentyhq/core-team-issues/issues/812
2025-05-27 11:34:02 +02:00
a83279ddce fix(dropdown): separator width + DropdownHeader height (#12285)
## Before

![CleanShot 2025-05-26 at 15 26
35@2x](https://github.com/user-attachments/assets/d6247af2-6008-4234-b777-13597c697b12)

## After

![CleanShot 2025-05-26 at 15 26
42@2x](https://github.com/user-attachments/assets/65447c84-4313-4f9a-831d-efc1eccd3d26)
2025-05-27 11:17:03 +02:00
8cf3b83bb9 fix/replace-set-primary-with-bookmark-12268 (#12276)
## 🛠️ What this PR fixes

Fixes #12268

This PR fixes the UI behavior where the "Set as Primary" button was
incorrectly shown for emails or phones that are already marked as
primary. Instead, users now see a bookmark icon indicating the entry as
primary.

## 🎥 Demo

The attached video demonstrates the updated UI where the "Set as
Primary" button is hidden for primary contacts or emails and replaced by
a bookmark icon.



https://github.com/user-attachments/assets/9afcc818-fbb4-4e7c-8fa2-093fdc7d8a26

---------

Co-authored-by: Davinder Kumar <davinder.kumar@intverse.io>
Co-authored-by: Devessier <baptiste@devessier.fr>
2025-05-27 11:10:12 +02:00
92aa6a8e1a filter out 500 errors from sentry-captured errors in FE (#12307)
Since https://github.com/twentyhq/twenty/pull/12286 we are now capturing
in sentry graphql queries errors in the FE.
We want to exclude InternalServerErrors because they are already
captured in sentry from the BE.
2025-05-27 10:43:26 +02:00
9cdd0fdac0 Revert "Client config not render blocking (#12300)" (#12302)
This reverts commit 4ce7fc6987, to take
more time to address PR comments
2025-05-27 09:04:47 +02:00
e8532faaaa Fix find duplicates typing (id -> uuid) (#12301)
Minor fix of a bug I saw while testing in staging
2025-05-27 08:02:47 +02:00
4ce7fc6987 Client config not render blocking (#12300)
Changes for performance improvement.
The primary improvements include replacing GraphQL queries with
REST-based client configuration fetching and making the client config
non render-blocking
2025-05-27 00:06:48 +02:00
aa58259019 11744 emails broken image in emails (#12265)
- refactor file tokens
- update file token management
  - generate one token per file per workspaceId
  - move token from query params to url path
2025-05-26 22:05:21 +02:00
69badf2a66 Capture FE GraphQL exceptions in sentry (#12286)
We should capture graphQL exceptions thrown in the FE in Sentry.

All the more so as we have just cleaned back-end errors in sentry,
preventing 4xx errors from being wrongfully sent to sentry.
Those 4xx errors should, except for `Unauthenticated` and `Forbidden`
errors (for now - this list can evolve), trigger a sentry FE error, as
we are not suppose to let users of the product interface trigger queries
that will fail with 4xx errors (for instance a malformed input).

We still miss an efficient way to group those errors together in sentry.
It could be the message but the message may be different for each user
if it contains user-specific data, and we don't always have control on
the message.
This can be done later as we iterate on improving sentry
2025-05-26 17:23:19 +00:00
a15451dab2 Fix close command menu button (#12282)
Fixes #12280 

The `dataClickOutsideId` and `dataGloballyPreventClickOutside` props
weren't passed to the button components.

This PR fixes this and introduces the type `ClickOutsideAttributes`.



https://github.com/user-attachments/assets/38b1a6f9-8f3a-43d2-aa7b-aaa259ac6737
2025-05-26 15:37:46 +02:00
ec4e4740d2 Make workflow statuses more resilient (#12263)
Workflow statuses are often broken. I did not figured out why yet. But I
see two causes that can be fixed:
- statuses calculation are really complicated today, just to spare a
call to the database
- job is not indempotent, it is using the combination of the previous
statuses + the update to calculate the new statuses. Which means that
once broken, next updates will be broken as well

Instead, we now:
- fetch workflow versions
- get the statuses from these.
It simplifies the code and make the job indempotent.
2025-05-26 13:05:18 +00:00
742af7884a Update Makefile in local setup to clean postgres instead of pg-spile (#12273)
In Makefile used for Local dev setup spilo container is still in the use
despite deprecating it in 0.43.0

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-05-26 12:20:19 +02:00
524a1d78d2 Refactor drag selection: Replace external library with custom implementation and add auto-scroll (#12134)
Closes #12076
Closes #11764

Replaced the `@air/react-drag-to-select` library with a custom
implementation to get better control over the selection behavior and add
auto-scroll functionality.

**What changed:**
- Removed external drag selection dependency 
- Built custom drag selection from scratch using pointer events --
@charlesBochet
- Added auto-scroll when dragging near container edges
- Fixed boundary detection so selection stays within intended areas
- Added proper `data-select-disable` support for checkboxes and other
non-selectable elements

The new implementation gives us full control over the selection logic
and eliminates the external dependency while adding the auto-scroll
feature that was **not** requested 😂

**Auto Scroll**



https://github.com/user-attachments/assets/3509966d-5b6e-4f6c-a77a-f9a2bf26049f



related to #12076 


https://github.com/user-attachments/assets/2837f80e-728c-4739-a0e2-b8d7bc83a21a

**Also fixed:**
- Record board column height not extending to the bottom (styling issue
I found while working on this)

before:

<img width="1512" alt="Screenshot 2025-05-19 at 23 58 54"
src="https://github.com/user-attachments/assets/602b310f-7ef6-44f6-99e9-da5ff59b31d3"
/>

after:

<img width="1512" alt="Screenshot 2025-05-19 at 23 56 40"
src="https://github.com/user-attachments/assets/1d0ecb5c-49e0-4f03-be3b-154a6f16a7a4"
/>

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2025-05-26 11:58:22 +02:00
621a779526 Prevent setting primary link as primary link (#12266)
## Before

It was possible to set the primary link as the... primary link.


https://github.com/user-attachments/assets/a6ffefab-50c5-403e-9aa1-5acc08593168

## After


https://github.com/user-attachments/assets/494e45c4-de15-4b52-b71b-032a2ca77c35

- We display the bookmark icon for the first link if there is more than
one link to show. (`index === 0 && links.length > 1`)
- It's never possible to "Set as Primary" the first link (`index > 0`)
- I introduced abstractions to make it easy to solve a similar issue for
phones and emails fields (see
https://github.com/twentyhq/twenty/issues/12268)
- Wrote stories to document the current improper behavior of phones and
emails fields
2025-05-23 18:55:26 +02:00
bd8eace0b1 i18n - translations (#12269)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-05-23 18:44:47 +02:00
371fdba1f8 Changed the auto matching of columns in import (#12181)
This PR changes the way we do automatching in the import feature.

It uses [Fuse.js](https://www.fusejs.io/) to do a fuzzy text search on
fields and sub-fields.

The labels of sub-fields are now derived from the common config constant
we have for sub-fields.
2025-05-23 18:33:18 +02:00
f7ccb5d207 i18n - translations (#12267)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-05-23 18:31:10 +02:00
1e5257f95b Fixes active row state after opening the file preview (#12264)
Fixes #12093
This bug was quite hard to fix because it was an issue with the
`AnimatePresence` component of the framer motion library.

After investigating the issue with @Devessier, here is what we
understood:

Since the modal component has an exit animation but wasn't wrapped
inside an `AnimatePresence` component, the animation seemed to never be
marked as complete when we closed the modal and the component did not
appear anymore but was still in the dom.

This caused an issue when closing the side panel because the state
cleanup function of the command menu is triggered when its closing
animation is complete. This cleanup function emits a right drawer close
event, which is listened by the record table row to update it's state.

The `onExitComplete` was never triggered because the exit animation of
the modal was never considered as complete, and since it's a children
animation of the command menu `AnimatePresence`, this animation was
never considered as complete either (see [PresenceChild
doc](https://github.com/motiondivision/motion/blob/main/packages/framer-motion/src/components/AnimatePresence/PresenceChild.tsx).

This caused the cleanup function to never be executed and the close
event to never be emitted, so the row stayed active.

Before:


https://github.com/user-attachments/assets/a165039b-6203-43d6-b992-dcfb4dfb8f2b


After:


https://github.com/user-attachments/assets/42eab2e8-62c9-4c25-85d6-78210d7ebe89
2025-05-23 16:26:30 +00:00
5428348d7f fix(email-verification): prevent double email validation (#12250)
Fix #12177 
Fix #12171

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2025-05-23 16:24:26 +00:00
8de85eea61 fix(): remove originHeader decorator (#12245)
Fix
https://github.com/twentyhq/core-team-issues/issues/858#issuecomment-2891213392
Fix #11966 
Fix #12175
2025-05-23 18:01:36 +02:00
54edcc0ea7 fix(auth): prevent unexpected form effect trigger (#12261)
Ensure the form effect is not erroneously triggered when the sign-in
step is not related to email or password. This resolves potential state
inconsistencies during the authentication flow.


Fix #12176
2025-05-23 17:50:03 +02:00
f9afa589f4 Fix wrong email logo url (#12256)
Fix wrong twenty logo url
It does not fix all the https://github.com/twentyhq/twenty/issues/11744
issue, but this is a small step. The other step is pretty big so I split
the ticket in 2 PRs
2025-05-23 17:28:49 +02:00
af5762c8ba Infinite scrolling in relation picker menu (#12051)
https://github.com/user-attachments/assets/4be785e0-ea8a-4c8e-840e-6fa0a663d7ba

Closes #11938

---------

Co-authored-by: martmull <martmull@hotmail.fr>
2025-05-23 17:23:09 +02:00
6ef9a3b4c9 Empty Gmail box bug (#12225)
if gmail is empty, there is an error. This PR handles this use-case
2025-05-23 17:21:31 +02:00
88b967dfb8 Cast typeorm QueryFailedError to BadRequestException for the rest api (#12217) 2025-05-23 17:00:45 +02:00
362d540aac Misc. of sentry improvements (#12233)
This PR mixes various initiatives to improve visibility on sentry 

**1. Catch errors on workflow jobs**
commit [catch workflowTriggerExceptions in job
handle](1dbba8c9e2)
@thomtrp 

**2. Fix type in messagingImportExceptionHandler** 
commit [fix type issue on
messagingImportExceptionHandler](919bb3844c)
@guillim 

**3. Catch invalid uuid errors thrown by Postgres by rightfully typing
expected id as uuid**
commits [use UUIDFilter instead of IDFilter to get graphqlError in case
of malformed
id](57cc315efe),
[use UUIDFilter
(2)](304553d770),
[fix ids typed as UUID instead of
ID](f95d6319cf)
@Weiko 
⚠️⚠️⚠️ when we deploy this PR we need to flush the schema types from
redis as this PR changes them ⚠️⚠️⚠️


**4. Do not group UNKNOWN errors together**
commit [do not group unknown errors
together](c299b39c8f)
Some CustomException classes have introduced UNKNOWN error codes as a
default fallback error code. We use CustomException codes to group
issues together, but we don't want to do it with UNKNOWN error as they
may not have anything in common. For exemple [this sentry for UNKNOWN
code](https://twenty-v7.sentry.io/issues/6605750776/events/a72272d8941b4fa2add9b1f39c196d3f/?environment=prod&environment=prod-eu&project=4507072499810304&query=Unknown&referrer=next-event&stream_index=0)
groups together "Unknown error importing calendar events for calendar
channel...", "Insufficent permissions...", to name a few.

**5. Improve postgres error grouping**
commit [group together postgres
errors](567c25495e)
Postgres error are thrown by typeORM as QueryFailedError. we have a lot
of them on sentry where they are badly grouped They are currently
grouped on sentry according to the stack trace, which leads them to
sometimes be grouped even if they don't have anything in common : for
exemple [this sentry for
QueryFailedError](https://twenty-v7.sentry.io/issues/6563624590/events/2d636821e27a448595b647b4b5a7d6a8/?environment=prod&environment=prod-eu&project=4507072499810304&query=is%3Aunresolved%20%21issue.type%3A%5Bperformance_consecutive_db_queries%2Cperformance_consecutive_http%2Cperformance_file_io_main_thread%2Cperformance_db_main_thread%2Cperformance_n_plus_one_db_queries%2Cperformance_n_plus_one_api_calls%2Cperformance_p95_endpoint_regression%2Cperformance_slow_db_query%2Cperformance_render_blocking_asset_span%2Cperformance_uncompressed_assets%2Cperformance_http_overhead%2Cperformance_large_http_payload%5D%20timesSeen%3A%3E10&referrer=previous-event&sort=date&stream_index=0)
groups together "user mapping not found for "postgres" and "invalide
type for uuid: 'fallback-id'" to name a few. I attempted to improve the
grouping by grouping them with a new custom fingerPrint composed of the
[code returned by
Postgres](https://www.postgresql.org/docs/current/errcodes-appendix.html)
+ the truncated operation name (Find, Aggregate, Check...). This is
still not ideal as postgres code are quite broad - we could have the
same error code for two Find operations with different causes. let's
give this a try !
2025-05-23 13:36:02 +00:00
5da446d7f7 Display "Untitled" in MultipleRecordPicker (#12246)
Fixes #11940 

Display untitled with the object name for untitled records in
`MultipleRecordPicker`:

![CleanShot 2025-05-23 at 11 29
20@2x](https://github.com/user-attachments/assets/062df33c-5c7a-4170-a973-8a1fc1b04729)
2025-05-23 14:51:16 +02:00
c98439d76a Fixed RecordShowEffect request bug (#12247)
This PR fixes the RecordShowEffect that was overwriting the record store
with an empty state during the request loading time.
2025-05-23 11:45:05 +00:00
3d21e1ce26 remove activity fallback record in RelationFromManyFieldDisplay (#12232)
EDITED ⬇️ 

Context
When fixing relation fields preview in this
[PR](https://github.com/twentyhq/twenty/pull/11745/files#diff-10073c6310707810d002bceef587936ed5d31dba2ea5babbb4d452a7f1e756b5R31-R35),
I've (try to) fixed NoteTarget (and TaskTarget) field preview adding
[fallback
record](https://github.com/twentyhq/twenty/pull/11745/files#diff-da3ccb70824f1792351457dbee66dd75e48e45ff8e6e0f768f402e35256377bcR54-R61).

It introduces the sentry error (findOneNote/Task with 'fallback-id') :
when activity is soft deleted, associated activityTarget is not. In
TableView, when displaying Note/Task field in view for a record with a
soft deleted ntoe/task, 'fallback-id' record chip is clickable.

Solution - seen with Charles - Remove fallback-id record + Hide
NoteTarget and TaskTarget field preview - awaiting ManyToMany relation
are updated in few weeks

<img width="1160" alt="Screenshot 2025-05-23 at 11 07 06"
src="https://github.com/user-attachments/assets/73b1629a-67a0-43cc-ac2c-ddeea524ed6e"
/>


Test - RelationFromManyFieldDisplay in Table view & Settings field
preview

closes https://github.com/twentyhq/twenty/issues/12218
2025-05-23 12:25:12 +02:00
ddab513c0b patch messages in thread (#12191)
closes https://github.com/twentyhq/twenty/issues/12190
2025-05-23 10:24:13 +00:00
ec9d8e4e95 Discard empty and null links in Links fields (#12188)
This PR has several objectives:

- Ignore invalid and empty links in the frontend
- Ignore empty links when creating or updating a link field in the
backend
- Throw an error when trying to create or update a link field with an
invalid link

The logic is mostly the same in the frontend and the backend: we take
the initial primaryLink and the secondaryLinks, we discard all the empty
links (with `url === '' || url === null`), and the primaryLink becomes
the first remaining link.

## Frontend

There are three parts in the frontend where we have to remove the empty
links:

- LinksDisplay
- LinksFieldInput
- isFieldValueEmpty; used in RecordInlineCell

## Backend

I put the logic in
`packages/twenty-server/src/engine/core-modules/record-transformer/services/record-input-transformer.service.ts`
as it's used by the REST API, the GraphQL API, and by Create Record and
Update Record actions in the workflows.
2025-05-23 11:13:10 +02:00
75e4a5d19b Fixed dropdown flip and resize edge cases (#12234)
This PR fixes the dropdown resize problems we had with some edge cases,
the most common was that when opening a dropdown that is placed near the
bottom end of the screen the dropdown would shrink to a ridiculously
small height instead of flipping.

With this PR we implement a mechanism that respects all of the existing
behaviors while fixing this edge case, and most of all allows for the
incoming refactor on harmonization of dropdown content width.

Before : 



https://github.com/user-attachments/assets/6da3b291-e60c-4353-94fb-45fef55ee0e1

After : 



https://github.com/user-attachments/assets/c9fd9a34-f5de-4701-a301-08cba1eafdad

Fixes https://github.com/twentyhq/core-team-issues/issues/980
2025-05-23 11:07:47 +02:00
710c859f4e feat(settings): replace TextInputV2 with TextInput and update hotkey … (#12236)
…scope

Replaced TextInputV2 with TextInput in
SettingsSecurityApprovedAccessDomain for consistency with the input
component. Added a new hotkey scope for the REST Playground page in
PageChangeEffect to enable keyboard shortcut menu functionality.

Fix #10981
2025-05-23 11:03:31 +02:00
ac98ecf3fc Fix/exit settings link stuck 12235 (#12243)
## 🛠️ What this PR fixes
Fixes #12235

The "Exit Settings" link was stuck after navigating using a keyboard
shortcut(s).
This PR ensures the Exit Settings button works correctly.

## 🎥 Demo
The attached video demonstrates the issue being fixed and the link
behaving correctly.
**Note:** You can view the shortcuts I pressed in the bottom-left corner
of the video. To ensure they are clearly visible, avoid letting the
video’s progress bar overlap them by moving the cursor away from the
video after starting playback.


https://github.com/user-attachments/assets/4d705ddd-7b48-45c1-a292-127b9a88b68d

---------

Co-authored-by: Davinder Kumar <davinder.kumar@intverse.io>
2025-05-23 10:32:56 +02:00
cced069d28 Fix discard workflow draft (#12230)
Fixes https://github.com/twentyhq/core-team-issues/issues/997

Fetch workflow id in workflow version is not done by default since the
refacto of relations. So we delete the version from cache once discarded
by we cannot clean the workflow using the workflow id in the version.

This PR adds the workflow id to the query.

Before


https://github.com/user-attachments/assets/03663bba-6c9e-4357-9326-0fb33c707fe6

After


https://github.com/user-attachments/assets/e6bb910b-2d9f-412f-a349-cd4b076aca65
2025-05-23 10:17:18 +02:00
051f0fc83f Use data attributes for click outside instead of classNames (#12228)
We previously used classnames to exclude elements from the click outside
listener.

With this PR we can now use `data-click-outside-id` instead of
`classNames` to target the elements we want to exclude from the click
outside listener.

We can also add `data-globally-prevent-click-outside` to a component to
globally prevent triggering click outside listeners for other
components. This attribute is especially useful for confirmation modals
and snackbar items.

Fixes #11785:


https://github.com/user-attachments/assets/318baa7e-0f82-4e3a-a447-bf981328462d
2025-05-22 18:10:51 +02:00
45c89a46d6 FieldMetadata ENUM CREATE UPDATE server validation and integration tests (#12121)
# Introduction

Big diff a lot of tests and snapshots ( real diff < 500+ )

close https://github.com/twentyhq/twenty/issues/12117
close https://github.com/twentyhq/twenty/issues/12133

## What has been done here
Implemented a strong integration coverage on both fieldmetadata`SELECT`
`UPDATE` and `CREATE`.
Implemented server side validation for the options `value` `label` `id`
and collision issue with also `position`

We could improve:
- Position validation
- DefaultValue validation

## Update
```ts
 PASS  test/integration/metadata/suites/field-metadata/update-one-field-metadata-select.integration-spec.ts (41.054 s)
  Field metadata select update tests group
    ✓ Update should succeed with provided option id (2565 ms)
    ✓ Update should succeed with valid default value (1469 ms)
    ✓ Update should succeed with various options id (1257 ms)
    ✓ Update should succeed without option id (1286 ms)
    ✓ Update should trim option values (1366 ms)
    ✓ Update should succeed with default value and no options (1122 ms)
    ✓ Update should fail with unknown default value and no options (1075 ms)
    ✓ Update should fail with only white spaces id (1195 ms)
    ✓ Update should fail with empty string id (1058 ms)
    ✓ Update should fail with null id (1066 ms)
    ✓ Update should fail with not a string id (1098 ms)
    ✓ Update should fail with too long id (1373 ms)
    ✓ Update should fail with only white spaces label (1034 ms)
    ✓ Update should fail with empty string label (1057 ms)
    ✓ Update should fail with null label (1100 ms)
    ✓ Update should fail with not a string label (1144 ms)
    ✓ Update should fail with too long label (1273 ms)
    ✓ Update should fail with only white spaces value (1385 ms)
    ✓ Update should fail with empty string value (1035 ms)
    ✓ Update should fail with null value (1068 ms)
    ✓ Update should fail with not a string value (1021 ms)
    ✓ Update should fail with too long value (1134 ms)
    ✓ Update should fail with invalid option id (1137 ms)
    ✓ Update should fail with empty options (1238 ms)
    ✓ Update should fail with invalid option value format (1104 ms)
    ✓ Update should fail with comma in option label (1004 ms)
    ✓ Update should fail with duplicated option values (1015 ms)
    ✓ Update should fail with duplicated option ids (1079 ms)
    ✓ Update should fail with duplicated option positions (1266 ms)
    ✓ Update should fail with duplicated trimmed option values (1220 ms)
    ✓ Update should fail with undefined option label (1029 ms)
    ✓ Update should fail with an invalid default value (1142 ms)
    ✓ Update should fail with an unknown default value (1081 ms)
    ✓ Update should fail with undefined option value (1086 ms)

Test Suites: 1 passed, 1 total
Tests:       34 passed, 34 total
Snapshots:   28 passed, 28 total
Time:        41.079 s
```


## Create
```ts
 PASS  test/integration/metadata/suites/field-metadata/create-one-field-metadata-select.integration-spec.ts (38.292 s)
  Field metadata select creation tests group
    ✓ Create should succeed with provided option id (2096 ms)
    ✓ Create should succeed with valid default value (1316 ms)
    ✓ Create should succeed with various options id (1113 ms)
    ✓ Create should succeed without option id (1378 ms)
    ✓ Create should trim option values (1296 ms)
    ✓ Create should fail with only white spaces id (1000 ms)
    ✓ Create should fail with empty string id (1325 ms)
    ✓ Create should fail with null id (1060 ms)
    ✓ Create should fail with not a string id (1142 ms)
    ✓ Create should fail with too long id (1321 ms)
    ✓ Create should fail with only white spaces label (999 ms)
    ✓ Create should fail with empty string label (1163 ms)
    ✓ Create should fail with null label (1198 ms)
    ✓ Create should fail with not a string label (1678 ms)
    ✓ Create should fail with too long label (1527 ms)
    ✓ Create should fail with only white spaces value (1200 ms)
    ✓ Create should fail with empty string value (1102 ms)
    ✓ Create should fail with null value (1037 ms)
    ✓ Create should fail with not a string value (1462 ms)
    ✓ Create should fail with too long value (896 ms)
    ✓ Create should fail with invalid option id (997 ms)
    ✓ Create should fail with empty options (1058 ms)
    ✓ Create should fail with invalid option value format (1190 ms)
    ✓ Create should fail with comma in option label (1142 ms)
    ✓ Create should fail with duplicated option values (872 ms)
    ✓ Create should fail with duplicated option ids (860 ms)
    ✓ Create should fail with duplicated option positions (1002 ms)
    ✓ Create should fail with duplicated trimmed option values (1336 ms)
    ✓ Create should fail with undefined option label (754 ms)
    ✓ Create should fail with an invalid default value (696 ms)
    ✓ Create should fail with an unknown default value (678 ms)
    ✓ Create should fail with undefined option value (699 ms)
    ✓ Create should fail with null options (720 ms)
    ✓ Create should fail with undefined options (686 ms)

Test Suites: 1 passed, 1 total
Tests:       34 passed, 34 total
Snapshots:   29 passed, 29 total
Time:        38.314 s
```

## Conclusion
As always any suggestions are welcomed ! Please let me know


## Discussion about validation governance
### Front
Front side will be dealing with zod validations schema that he will
handle and maintain by himself

### Back validation instances
- Validation hold through DTO declarations ( run by yoga through the
resolvers )
- Server programmatic validation and exceptions handling ( run through
the services )

For this refactor/fix we decided to stick to the current implementation
only touching the `Server programmatic validation and exceptions
handling` we will handle validation centralization when we will onboard
the `nestjs-query` deprecation/integration refactor.

### Vision
In the best of the world we could think of an intermediary model that
will handle and take responsibility of the validation decorators that
would be run programmatically through the service, Yoga would still
consume it ? then we would need to have enough grain in the service to
know the input has already validated

## Notes
Introduced zod back side in order to handle very atomic and primitive
validation
2025-05-22 17:58:59 +02:00
7cc0a7ae72 add checkFileExists method in file storage service (#12229) 2025-05-22 15:09:21 +00:00
08e32017fb Fix + column header in tables (#12221)
Fixes https://github.com/twentyhq/twenty/issues/12213



https://github.com/user-attachments/assets/1eb675f0-c8ba-4601-bcf7-c80c27a03d40
2025-05-22 16:32:07 +02:00
aeee04415d add more logs to cleaning command (#12219) 2025-05-22 13:25:19 +00:00
79b4b3f783 Improve lazy loading (#12186)
WIP, using preview app to test performance (which was very bad)
2025-05-22 15:07:01 +02:00
4ac47c2a1b Improve logs in workflow trigger (#12215)
- distinguish logs coming from webhook and job triggers
- add workspace and workflow ids to help debugging

Hard to debug sentry issue:

https://twenty-v7.sentry.io/issues/6605607134/?project=4507072499810304&query=&referrer=issue-stream&stream_index=7
2025-05-22 14:56:30 +02:00