Commit Graph

7078 Commits

Author SHA1 Message Date
7a9ec55c5c switch datasourcing (#12825)
This PR improves error handling in `handleDriverException` by adding a
duck-typing check for `MessageImportDriverException` objects. It ensures
that errors are correctly identified and processed even if they are
received as plain objects rather than class instances. This change
prevents missed exception handling and increases the robustness of the
message import process.
2025-06-24 15:32:16 +02:00
b063510c79 Add metrics to workflows (#12829)
- ensure each trigger is working properly
- check throttle does not happen too often
- keep an eye on the completed/failed proportion
2025-06-24 15:31:47 +02:00
ce55b20faa Use main dataSource to query CRON jobs (#12830)
As title
2025-06-24 13:29:00 +00:00
251a19b87d i18n - translations (#12828)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-06-24 15:15:50 +02:00
8cf7649a4c Add object level form to role creation (#12826)
## Context
- Add object-level form to role creation
- Add isSaving props for save button isLoading state
<img width="594" alt="Screenshot 2025-06-24 at 15 03 59"
src="https://github.com/user-attachments/assets/77d9d399-4e1a-4e35-be45-c19100ef06c1"
/>

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2025-06-24 15:15:37 +02:00
540f3ffd67 Fix phone deletion (#12821)
Fixes https://github.com/twentyhq/core-team-issues/issues/1124
2025-06-24 13:12:40 +00:00
2da66af26a Improve onboarding experience (#12824)
https://github.com/user-attachments/assets/365c1618-e9d5-46d5-9b54-bed2cdeb7c02
2025-06-24 15:06:50 +02:00
21f9db1f41 Improve breaking change CI (#12816)
It used to post a comment if the API schema changed, even if there's no
breaking change. I thought this could be OK as an FYI. But it is not
since now we generate the examples dynamically with Faker the OpenAPI
schema is always different
2025-06-24 14:53:14 +02:00
95decc6401 additionaldata-message-exception (#12819)
better loging exceptions by keeping the orginal error (otherwise it's
swallowed and hard to debug precisely)
2025-06-24 14:52:03 +02:00
b4f7b547f1 i18n - translations (#12820)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-06-24 14:43:14 +02:00
480f135282 i18n - translations (#12818)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-06-24 14:22:44 +02:00
6f1107eecd Revert "[Permissions] Force open title input for role label when empty" (#12817)
Reverts twentyhq/twenty#12710
2025-06-24 14:08:16 +02:00
074cd22a67 [Permissions] Force open title input for role label when empty (#12710)
- Fix empty title in breadcrumb 
- Enforce role label input open if empty
2025-06-24 14:06:50 +02:00
4ac208cf1c Query dynamic cache key computation (#12814)
In this PR:
- add query hashKey to ObjectMetadataItems query graphql cache to avoid
caching outdated queries
- improve performance by removing ResolveField at FieldLevel and adding
this at resolver level
2025-06-24 12:04:00 +00:00
48347095d2 Fixed ACTOR advanced filter recent regressions (#12813)
This PR fixes recent regressions on advanced filters for the ACTOR field
type.

- The new `isFilterable` props on
`SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS` wasn't taken into account for
sub field picker in advanced filter.
- A wrong component instance id was passed to
`subFieldNameUsedInDropdownComponentState`
2025-06-24 13:57:18 +02:00
81d70e6fa3 Fixed relative date filter initalization (#12811)
This PR fixes problems with date filter : 
- Filter chip shows the label with plural, ex : `This weeks` 
- Using a relative filter now initializes to `This day`
- Switching between the different relative sub-operands (This, Past,
Next) now initializes with a value so we're never in an "empty" state.
2025-06-24 13:57:05 +02:00
5c3550a2ee in connected account, refresh-token can fail with network error (#12815)
This PR fixes this issue from the connected account refresh token
service that is

This PR fixes error handling in `handleDriverException` by ensuring that
errors resembling `MessageImportDriverException` are correctly detected,
even if they are plain objects and not true class instances. This
prevents missed exception handling due to failed `instanceof` checks.

Was introduced by [this
PR](https://github.com/twentyhq/twenty/pull/12233) that did not know all
provider cases that can occur.

Fixes https://github.com/twentyhq/twenty/issues/12589
2025-06-24 13:51:03 +02:00
3cee2b796f Fixed record picker loading flickering (#12736)
This PR solves a flickering effect on record pickers on the different
loading state they can be in.

It was designed with @Bonapara to settle on a nice UX feeling.

## Before

With fast network (local) :


https://github.com/user-attachments/assets/58899934-c705-4b44-b7f6-289045032c11

With slow network : 


https://github.com/user-attachments/assets/9fb18d86-9da6-4e5d-a83f-00c810fab2dc

## After


https://github.com/user-attachments/assets/f4abb40f-5d42-4c46-88ab-aaef4f883f7f

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

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2025-06-24 12:15:50 +02:00
9aaa104ec0 feat(infra-dev): add opentelemetry and grafana (#12808) 2025-06-24 12:13:24 +02:00
c56ccf7ed9 Fixes date filter chip bugs (#12788)
This PR fixes a bug that occurs during filter operand changes.

As a date filter can contain values that have a different shape, mainly
date ISO string and hard-coded relative dates, changing the operand
without resetting the value to its default was causing a crash.

This PR also extracts the logic that computes the right part of a filter
chip into a util instead of a difficult to understand ternary, thus
solving small bugs in the value displayed also.

Fixes https://github.com/twentyhq/twenty/issues/12778
2025-06-24 09:29:28 +00:00
84b204dcab i18n - translations (#12809)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-06-24 10:38:44 +02:00
d0126e22ee feat: ability to switch currency format (#12542)
Fixes #11927

I have added 'format' in the zod schema of currency, and for using it, I
am separately passing 'format' to 'currencyDisplay.'
The feature is working correctly.

---------

Co-authored-by: prastoin <paul@twenty.com>
Co-authored-by: Paul Rastoin <45004772+prastoin@users.noreply.github.com>
2025-06-24 10:28:50 +02:00
6651abae18 i18n - translations (#12807)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-06-23 23:33:18 +02:00
d8f4e7e233 Add loader on workspace creation (#12806)
Not my most brillant design but it should work!
                  


https://github.com/user-attachments/assets/b89ae6d8-84ca-43c4-a010-d0686d522183
2025-06-23 23:23:13 +02:00
4eb859256c feat(settings): add loading state to save buttons (#11639)
Introduce a loading state to SaveButton and SaveAndCancelButtons
components to enhance user feedback during save operations. Update
SettingsNewObject to manage the loading state while submitting the form.

Fix https://github.com/twentyhq/core-team-issues/issues/572

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2025-06-23 22:49:38 +02:00
d248e536f3 Fix CombinedFindManyRecords with permissions (#12805)
## Context
This was already for relations but not the root object. This caused
issues with pages where we query multiple objects with the
CombinedFindManyRecords such as the data model

In the example below, we don't have access to rockets so we don't see
the real number of instances (now displays 0) and the FE shouldn't query
it.
<img width="557" alt="Screenshot 2025-06-23 at 19 23 51"
src="https://github.com/user-attachments/assets/2ee769b6-c108-466e-93ef-a17a6b092fcc"
/>

Diff
<img width="1232" alt="Screenshot 2025-06-23 at 19 39 05"
src="https://github.com/user-attachments/assets/6c841d4f-2a64-4908-8423-dc040893dfac"
/>
<img width="1224" alt="Screenshot 2025-06-23 at 19 38 57"
src="https://github.com/user-attachments/assets/bb3ff3bc-e9e4-40a6-b72f-18b4dc109df9"
/>
2025-06-23 21:27:58 +02:00
d5c974054d Improve performance on metadata computation (#12785)
In this PR:

## Improve recompute metadata cache performance. We are aiming for
~100ms

Deleting relationMetadata table and FKs pointing on it
Fetching indexMetadata and indexFieldMetadata in a separate query as
typeorm is suboptimizing

## Remove caching lock

As recomputing the metadata cache is lighter, we try to stop preventing
multiple concurrent computations. This also simplifies interfaces

## Introduce self recovery mecanisms to recompute cache automatically if
corrupted

Aka getFreshObjectMetadataMaps

## custom object resolver performance improvement:  1sec to 200ms

Double check queries and indexes used while creating a custom object
Remove the queries to db to use the cached objectMetadataMap

## reduce objectMetadataMaps to 500kb
<img width="222" alt="image"
src="https://github.com/user-attachments/assets/2370dc80-49b6-4b63-8d5e-30c5ebdaa062"
/>

We used to stored 3 fieldMetadataMaps (byId, byName, byJoinColumnName).
While this is great for devXP, this is not great for performances.
Using the same mecanisme as for objectMetadataMap: we only keep byIdMap
and introduce two otherMaps to idByName, idByJoinColumnName to make the
bridge

## Add dataloader on IndexMetadata (aka indexMetadataList in the API)

## Improve field resolver performances too

## Deprecate ClientConfig
2025-06-23 21:06:17 +02:00
6aee42ab22 register all cron jobs in entrypoint (#12791)
closes https://github.com/twentyhq/core-team-issues/issues/1113

Three things I am not sure about - 
- Should we have a variable just like DISABLE_DB_MIGRATIONS to control
cron job registration behavior, i.e., DISABLE_CRON_JOBS_REGISTRATION?
- The location of the command ie, folder placement
- https://github.com/twentyhq/twenty/pull/12791/files#r2161734131
2025-06-23 21:05:01 +02:00
00eb93463c [permissions V2] Fix - filter objects to search (#12803)
In morph relation pickers, we were not taking into account permissions
when computing the list of objects to search for, while we should not
search for objects we don't have read permissions on (permission denied
error)
2025-06-23 19:35:08 +02:00
37b48e2b21 i18n - translations (#12804)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-06-23 19:20:12 +02:00
85c50f149d [Permissions][FE] Design followup 5 (#12793)
## Context
- We now display workspace member full name and email in role assignment
picker
- Replaced Forbidden by "Not shared" with lock icon
- Fix Disabled for Danger accent
- Fix avatar URL

<img width="575" alt="Screenshot 2025-06-23 at 16 38 56"
src="https://github.com/user-attachments/assets/08430bfe-29c4-4ac4-821c-9062dfad7150"
/>
<img width="756" alt="Screenshot 2025-06-23 at 16 21 36"
src="https://github.com/user-attachments/assets/c19f31bd-fe9d-415d-aa55-62fa3e228c49"
/>
<img width="373" alt="Screenshot 2025-06-23 at 17 13 08"
src="https://github.com/user-attachments/assets/e2f7878c-7c5a-40b4-a482-8e99292257c3"
/>
<img width="342" alt="Screenshot 2025-06-23 at 17 37 49"
src="https://github.com/user-attachments/assets/04169e85-14dd-4aed-bd71-7aefd601a894"
/>
<img width="434" alt="Screenshot 2025-06-23 at 17 37 35"
src="https://github.com/user-attachments/assets/7caf0967-c4dd-4d0f-90c8-259a85182b19"
/>
2025-06-23 19:15:58 +02:00
f05da75bb5 Set error message not absolute (#12802)
Before
<img width="485" alt="Capture d’écran 2025-06-23 à 18 52 50"
src="https://github.com/user-attachments/assets/19c60cd1-f241-4419-9d03-d16d019f2c04"
/>

After
<img width="485" alt="Capture d’écran 2025-06-23 à 18 48 01"
src="https://github.com/user-attachments/assets/85b68984-11e0-456b-aacb-5a0661818b9c"
/>
<img width="485" alt="Capture d’écran 2025-06-23 à 18 48 38"
src="https://github.com/user-attachments/assets/7380d537-e8d0-411c-b4f8-7b38b6550e20"
/>
2025-06-23 17:08:40 +00:00
7ff2f32438 Add position / positions to reserved keywords (#12800) 2025-06-23 19:02:02 +02:00
26d8498a4a [Messaging logs] Better logging AggregateError (#12801)
"An AggregateError in NestJS usually indicates that multiple errors were
thrown or collected together and then re-thrown as a single error."

Since we have this in logs, we cannot debug properly the error
https://github.com/twentyhq/twenty/issues/12589
<img width="911" alt="Screenshot 2025-06-23 at 18 39 16"
src="https://github.com/user-attachments/assets/888d620f-8d1a-4b59-93b6-2d716a4ab77c"
/>

That is why we will better log this errors in order to tackle them ASAP

Note: sentry errors match our Grafan logs agggregate errors as you can
see

<img width="298" alt="Screenshot 2025-06-23 at 18 39 58"
src="https://github.com/user-attachments/assets/fc412153-4f91-4eea-a9db-8e72c67f8ffc"
/>
<img width="973" alt="Screenshot 2025-06-23 at 18 40 46"
src="https://github.com/user-attachments/assets/2bf01947-bb6e-4f48-b94b-777acfd83012"
/>
2025-06-23 16:53:11 +00:00
981cbb4257 Generate id for standard multi select field options (#12799)
Fixes https://github.com/twentyhq/twenty/issues/12723

After


https://github.com/user-attachments/assets/1f957dda-d2d0-434f-a4cd-f37c759e9f46
2025-06-23 18:49:51 +02:00
6e4dc16f2b 12660 bugapi create one person post api request example is returning 400 in playground (#12787)
Use faker to provide simple working examples for REST API create one,
create many, update one and find duplicates

Eg:
<img width="1505" alt="image"
src="https://github.com/user-attachments/assets/99be990f-efd6-4ad7-8c29-f9dcecac112f"
/>
2025-06-23 18:24:42 +02:00
06fddc2ae0 Remove ID field + fix relations + remove runs (#12796)
- id field should only be available for search records action
- create record action does not work for relations. Requires to send
`accountOwner: { id: string }` instead of `accountOwner: string`
- hidding `runs` for version views as we did for workflows
2025-06-23 18:03:11 +02:00
d99bff983e Fix styling inconsistency for FormSingleRecordFieldChip placeholder (#12795)
## Before

![CleanShot 2025-06-23 at 17 01
16@2x](https://github.com/user-attachments/assets/8fb40b91-a17a-48dc-8d5e-6657bdcf8434)



## After


![CleanShot 2025-06-23 at 17 01
01@2x](https://github.com/user-attachments/assets/a9781e13-200c-4aa2-9907-a0c8f4a1dd67)
2025-06-23 17:32:51 +02:00
4c94fc2803 [permissions V2] Remove feature flag (#12790) 2025-06-23 15:22:57 +00:00
b6787c6fcd Record filter greaterThan becomes inclusive as lowerThan (#12786)
# Introduction
Greater than filtering wasn't inclusive whereas lower than was,
resulting in sending empty array to filtering resolver

Also refactored the transpilation methods to avoid asserting on the
`RATING_VALUES` order

closes https://github.com/twentyhq/twenty/issues/12779
2025-06-23 15:15:30 +00:00
facd2fe26f Import - fix import with multiple unique constraints (#12784)
Test : 
- For company for example, in import, update of domainName works (Export
companies, import them updating domainName.primaryLink)
2025-06-23 15:10:41 +00:00
b2a560e08d Fix rating field default value (#12792)
close https://github.com/twentyhq/twenty/issues/12789
2025-06-23 16:56:09 +02:00
2e296e775e Fix export to pdf (#12782)
Export to PDF was throwing an error due to fonts not being registered.
Maybe linked to the async loading changes or blocknote upgrades.


I wasn't a fan of hardcoding the fonts here (makes a second source of
truth for Inter), but after a few tests this seemed like the best
compromise
2025-06-23 16:27:21 +02:00
2cb2f528df [permissions - seeds] Give tim@apple.dev restricted rights (#12768)
Let's introduce an object-limited role for Tim, to test and/or spot
incompatibilities with restricted permissions in the future.
Our main user tim@apple.dev is now assigned a role that has all settings
permissions, and all object permissions except for update on Pets (to
test read-only view) and read on Rockets.
Since we still need an admin user for each workspace we are introducing
a new member, Jane, who has the admin role

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2025-06-23 13:46:53 +00:00
8f0c9facf2 Fix e2e tests (#12783)
Fixes:

- Trigger labels have been updated in the workflows
- Workflow runs are now opened by default in the side panel when
launched manually by the user
2025-06-23 13:34:35 +02:00
bec4a98ae7 add firstname and lastname on current user state and sync it while cr… (#12781)
…eating profile and pass it to cal.com's embed
2025-06-23 15:25:35 +05:30
b76dac2ca1 BREAKING CHANGE: Fix graphql errors (#12775)
We were using a global ValidationPipe in main.ts. This is an issue as
@Controllers should return HttpExecption and @Resolvers should return
GraphqlErrors

Removing the global pipe and creating a ResolverValidationPipe able to
generate GraphqlError. We also need to handle the exception in a filter
to avoid nest to think it's unhandled and make it flow to logs


Next step:
- it would be nice to have both @UsePipes(ResolverValidationPipe) +
@UseFilters(GraphqlValidationExceptionFilter) come together. This should
be possible if we create a @GraphQLResolver annotation
2025-06-23 11:23:16 +02:00
8e30da99e9 i18n - translations (#12777)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-06-22 22:01:09 +02:00
65df511179 feat: Add AI Agent workflow action node (#12650)
https://github.com/user-attachments/assets/8593e488-cb00-4fd2-b903-5ba5766e0254

---------

Co-authored-by: Antoine Moreaux <moreaux.antoine@gmail.com>
Co-authored-by: martmull <martmull@hotmail.fr>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Baptiste Devessier <baptiste@devessier.fr>
Co-authored-by: Joseph Chiang <josephj6802@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Guillim <guillim@users.noreply.github.com>
Co-authored-by: Raphaël Bosi <71827178+bosiraphael@users.noreply.github.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Marie <51697796+ijreilly@users.noreply.github.com>
Co-authored-by: Naifer <161821705+omarNaifer12@users.noreply.github.com>
Co-authored-by: prastoin <paul@twenty.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@twenty.com>
Co-authored-by: Thomas Trompette <thomas.trompette@sfr.fr>
Co-authored-by: Etienne <45695613+etiennejouan@users.noreply.github.com>
Co-authored-by: Ajay A Adsule <103304466+AjayAdsule@users.noreply.github.com>
Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
Co-authored-by: Marty <91310557+real-marty@users.noreply.github.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Paul Rastoin <45004772+prastoin@users.noreply.github.com>
Co-authored-by: Weiko <corentin@twenty.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: nitin <142569587+ehconitin@users.noreply.github.com>
2025-06-22 21:42:04 +02:00
22e126869c Allow json in workflow run's error field (#12762)
We can now inspect errors even if they contain complex data as objects.
Only the first line of the error is put in red.



![CleanShot 2025-06-20 at 18 31
54@2x](https://github.com/user-attachments/assets/a3fd41fb-0063-4fe1-8185-54137c2a0d6e)


![image](https://github.com/user-attachments/assets/833a2851-e7d5-4985-9e42-07a1899cd3de)
2025-06-20 19:07:24 +02:00