Commit Graph

5431 Commits

Author SHA1 Message Date
f45f7c28f2 Improve i18n ci (#10209) 2025-02-14 09:56:05 +01:00
1090fb8fad Remove localization feature flag and improve CI workflow (#10208) 2025-02-14 09:41:35 +01:00
f2da915b20 Poc lambda subhosting (#10192)
Add `SERVERLESS_LAMBDA_SUBHOSTING_ROLE` to allow hosting lambdas in
separate aws account

Tested with old configuration and new configuration
2025-02-14 09:18:49 +01:00
9cbcf6293b Fix number null value forced to 0 (#10202)
This PR fixes https://github.com/twentyhq/twenty/issues/9980

In here we implement a check to pass null through instead of converting
it to 0.
2025-02-13 18:15:21 +00:00
81b2d5bc89 Add workflow run visualizer (#10146)
- Remove the tabs from the workflowRun show page; now, we only show the
visualizer with the nodes highlighted based on the run's output
- Create the `generateWorkflowRunDiagram` function to go other each step
and assign a `runStatus` to it based on the workflow run's output

Remaining to do:

- Show the output of each step in the right drawer when selecting one
- The labels (e.g. "1 item") are not set on the edges; we might
implement that later


https://github.com/user-attachments/assets/bcf22f4c-db8c-4b02-9a1a-62d688b4c28e

Closes https://github.com/twentyhq/core-team-issues/issues/338
Closes https://github.com/twentyhq/core-team-issues/issues/336
2025-02-13 18:57:54 +01:00
1863ef7d10 Fix bug with table aggregate footer when switching object (#10198)
This PR fixes a bug that happens when switching from an object to
another.

It is a temporary fix because it fixes a problem downstream, that
shouldn't happen, but it is tied to the new implementation of the main
context store.

We should find a way to have context store states defined earlier
because it might impact logic that was developed during the previous
months that didn't anticipated the state of current view id taking more
re-renders to be correctly set between page change / table change.
2025-02-13 18:36:36 +01:00
5963c0f384 [REFACTOR][BUG] Dynamically compute field to write in cache CREATE (#10130)
# Introduction
While importing records encountering missing expected fields when
writting a fragment from apollo cache

## Updates

### 1/ `createdBy` Default value
When inserting in cache in create single or many we will now make
optimistic behavior on the createdBy value

### 2/ `createRecordInCache` dynamically create `recordGrqlFields`
When creating an entry in cache, we will now dynamically generate fields
to be written in the fragment instead of expecting all of them. As by
nature record could be partial

### 3/ Strictly typed `RecordGqlFields`

# Conclusion
closes #9927
2025-02-13 17:43:54 +01:00
58a62ec6f0 [settings/security] Prevent toggle if only 1 authentication option (#10169)
fix https://github.com/twentyhq/core-team-issues/issues/387
2025-02-13 15:54:37 +00:00
8a425456f2 feat(workspace): add support for custom domain status toggle (#10114)
Introduce isCustomDomainEnabled field in Workspace entity to manage
custom domain activation. Update related services, types, and logic to
validate and toggle the custom domain's status dynamically based on its
current state. This ensures accurate domain configurations are reflected
across the system.

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-02-13 15:01:33 +00:00
b67e850011 Fix table content missing when navigating to previously browsed page (#10188)
We are using useInView to detect if a row should be rendered or not.

# Behavior issue

When browsing an Index page (let's say People), then navigating to
another one (Company), then back to People, the rows were not displayed
anymore. For some reason the inView value was set to false in this case

# Fix
- I have updated the useInView (react-intersection-observer) package but
it did not fix it
- useInView provides a ref. However, I believe this was conflicting with
the draggableRef; cecause we are in a <table> we cannot add additional
containers and are forced to apply both refs to the <tr> (draggableRef +
inViewRef). I believe this was causing the issue. I have added the
inView ref to an empty <td> within the row which is achieving the same
goal without forcing to combine refs
2025-02-13 13:40:33 +01:00
41dfeb34d1 Add sync metadata to migrate command (#10182)
Add sync-metdata to 0-42 upgrade command
2025-02-13 13:36:29 +01:00
75268c3040 chore: update eslint configuration and clean up index file (#10185)
Removed eslint disable comment from the index file and updated the
eslint ignore list to exclude the serverless driver index file. This
ensures the file is skipped during linting without unnecessary inline
comments.
2025-02-13 11:35:55 +01:00
467aa775a8 Fixed context menu bug with new record filters refactor (#10181)
This PR enforces objectMetadataItem to be passed to hook
useColumnDefinitionsFromFieldMetadata, which was never used without an
objectMetadataItem passed in parameters (and probably shouldn't anyway)

Removed the associated test that tested for an undefined
objectMetadataItem parameter in useColumnDefinitionsFromFieldMetadata.

This allows to remove the need to rely on recordIndexContext to retrieve
the filterableFieldMetadataItems.
2025-02-13 11:15:41 +01:00
77d72e9b1c refactor(auth/sso): rename GetAuthorizationUrl for clarity (#10173)
- Rename `GetAuthorizationUrl` to `GetAuthorizationUrlForSSO`
- Move `GetAuthorizationUrlForSSO` from `sso.resolver.ts` to
`auth.resolver.ts` to avoid the permission guard and let users use an
SSO provider.
- Fix an issue in OIDC guard that breaks the connection if you have
multiple SSO providers + add tests for OIDC guard.
2025-02-13 11:15:22 +01:00
d7b84de1b5 Fix CI after SettingsFeature enum update (#10178) 2025-02-13 09:19:36 +00:00
372ebd14fe withDelete option to TypeOrm (#10161)
fixes https://github.com/twentyhq/core-team-issues/issues/112
2025-02-13 08:50:24 +01:00
d2a5027549 Fix contextProvider not set preventing login 2025-02-13 01:03:10 +01:00
eb6757f99c Fix linter on main 2025-02-13 00:58:14 +01:00
ba8797d220 Remove filterDefinition.type usage (#10164)
This PR essentially removes the usage of filterDefinition.type, by
replacing it with fieldMetadataItem.type derivation. Thus allowing to
completely remove filterDefinition later on.

In computeFilterRecordGqlOperationFilter, emptyOperationFilter is now
returned before going into the big switch case. This avoids repeating
the same exact call to getEmptyRecordGqlOperationFilter for each type.

Fixed some tests that need
getJestMetadataAndApolloMocksAndActionMenuWrapper to have record filters
properly working with the new implementation. We'll probably want to
refactor the record context store, record index context, etc.

Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
2025-02-13 00:57:28 +01:00
6e57f02ae3 Feature flag IS_MICROSOFT_SYNC_ENABLED removal (#10170)
Since we have already removed the feature flag from twenty-infra, and
the most part of the application. we can now remove it from these
declaration

fixes https://github.com/twentyhq/core-team-issues/issues/331
2025-02-13 00:52:31 +01:00
466f8c733f Fix latest visited view (#10158)
Fixes https://github.com/twentyhq/twenty/issues/9772

In this PR:
- the root cause of the issue that the ContextStoreViewIdEffect was not
filtering the views on objectMetadata properly
- I'm also deleting some over complex in the latestVisited view logic
- Duplicated logic between ContextStoreViewIdEffect and
ViewBarViewIdEffect, see my comment
2025-02-13 00:52:04 +01:00
8f69352d17 i18n - translations (#10174)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-02-12 21:20:38 +01:00
0fa03aeb2c i18n - translations (#10172)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-02-12 19:21:30 +01:00
193ef432a0 add object settings permission tab (#10159)
## Context
Introducing the "Permissions" tab in the role page

Next: Need to address some css improvements, some components might be
reusable and it still does not fully match the figma (icon missing for
permission types for example). We decided to merge like this for now so
we have something functional and I will update the code in an upcoming
PR

<img width="633" alt="Screenshot 2025-02-12 at 13 54 16"
src="https://github.com/user-attachments/assets/762db5d7-e0a6-4ee1-b299-24de6645bad1"
/>
2025-02-12 18:49:50 +01:00
61881d6d0f Fix relation creation (#10171)
## Context
We recently introduced a createMany on the field metadata service to
improve seeding performances. This broke relation metadata creation
because it was using a method with the same name that was inherited from
TypeOrmQueryService.
2025-02-12 18:49:26 +01:00
0609b31c64 add WorkspaceDuplicateCriteria decorator + update duplicate resolver logic (#10128)
## Context

All objects have '...duplicates' resolver but only companies and people
have duplicate criteria (hard coded constant).
Gql schema and resolver should be created only if duplicate criteria
exist.

## Solution

- Add a new @WorkspaceDuplicateCriteria decorator at object level,
defining duplicate criteria for given object.
- Add a new duplicate criteria field in ObjectMetadata table
- Update schema and resolver building logic
- Update front requests for duplicate check (only for object with
criteria defined)



closes https://github.com/twentyhq/twenty/issues/9828
2025-02-12 17:32:59 +01:00
b66289c44c replace log by throw (#10167)
as title
2025-02-12 16:31:41 +00:00
fb936cccfb i18n - translations (#10168)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-02-12 17:11:13 +01:00
39e7a0b61c Remove log to fix serverless function (#10166)
as title
2025-02-12 15:39:00 +00:00
c30f416912 Add log (#10162)
add log to fix issue in staging
2025-02-12 15:01:34 +00:00
f98668febf i18n - translations (#10160)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-02-12 15:20:02 +01:00
f3586d4989 HandleAlias (#10156)
If a user has microsoft aliases, they will be taken into account, in a
similar way as we did for google
2025-02-12 14:22:13 +01:00
2b24bf43a4 i18n - translations (#10157)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-02-12 13:22:35 +01:00
d2d3b21c90 consistent background color in notes (#10097)
fixes #10086 

![image](https://github.com/user-attachments/assets/c8233d63-9020-457f-9ce1-4c88d6dc2019)

![image](https://github.com/user-attachments/assets/3deeb644-eeb1-4073-9ee8-dd08745282f6)

---------

Co-authored-by: ehconitin <nitinkoche03@gmail.com>
2025-02-12 17:15:26 +05:30
23d2e54439 RICH_TEXT_V2 upgrade command (#10094)
Adds two migration commands:
- copy note and task `body` data to `bodyV2`
- hide `body` view field and swap position with `bodyV2` view field

Related to issue https://github.com/twentyhq/twenty/issues/7613

---------

Co-authored-by: ad-elias <elias@autodiligence.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2025-02-12 12:26:29 +01:00
33af71ccd3 Create base search record action (#10135)
Create Search Record action without filters neither sorting

<img width="234" alt="Capture d’écran 2025-02-11 à 18 19 25"
src="https://github.com/user-attachments/assets/f18caaa3-476a-436f-9f93-1ad506b24da2"
/>
<img width="262" alt="Capture d’écran 2025-02-11 à 18 19 38"
src="https://github.com/user-attachments/assets/25fcbfcf-57fb-476f-aba9-119be7c3e067"
/>
<img width="236" alt="Capture d’écran 2025-02-11 à 18 19 53"
src="https://github.com/user-attachments/assets/1eb2be25-0727-4797-868c-afdc05040e6a"
/>
2025-02-12 10:29:32 +00:00
9cc6ea501a i18n - translations (#10149)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-02-12 11:20:24 +01:00
e4ae76ac20 [permissions] Add permission gates on API & Webhooks + Security settings (#10133)
Closes https://github.com/twentyhq/core-team-issues/issues/312
Closes https://github.com/twentyhq/core-team-issues/issues/315
2025-02-12 09:40:26 +00:00
08fd227049 i18n - translations (#10145)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-02-12 09:21:13 +01:00
2c0f66dab6 Progress on translations (#10142) 2025-02-12 08:13:29 +01:00
b55a366e2f i18n - translations (#10144)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-02-12 03:43:55 +01:00
1d4bf2c576 i18n - translations (#10143)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-02-12 01:32:33 +01:00
959046ee12 Prevent data visualizer from fetching workflows when not enabled (#10116)
- Use existing active objects filter
- Add memoization on active objects. Otherwise the reference will keep
changing into
[SettingsDataModelOverviewEffect.tsx](https://github.com/twentyhq/twenty/compare/tt-fix-data-visualizer?expand=1#diff-737ffd4d69acac03975f83069add9503ef3d0a744b56c9760a2d386f1f50e85c),
which will cause infinite re-renders

With workflows
<img width="694" alt="Capture d’écran 2025-02-10 à 18 28 04"
src="https://github.com/user-attachments/assets/72b1d707-4bf7-4920-a442-92f3e685978f"
/>


No workflows
<img width="694" alt="Capture d’écran 2025-02-10 à 18 28 19"
src="https://github.com/user-attachments/assets/0fe54ed4-6776-4e70-ae6a-8e7a5c59e0a0"
/>
2025-02-11 23:36:11 +01:00
6faf356be2 i18n - translations (#10141)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-02-11 23:19:57 +01:00
d5b247fa6b i18n - translations (#10140)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-02-11 21:20:29 +01:00
5f8fc8cad8 minor env tab description font color fix (#10139)
Before: 

<img width="630" alt="Screenshot 2025-02-12 at 00 48 14"
src="https://github.com/user-attachments/assets/0df50cc6-be0c-4286-9883-2a9d23f4f9d9"
/>

After:

<img width="628" alt="Screenshot 2025-02-12 at 00 47 54"
src="https://github.com/user-attachments/assets/cb02c127-fb01-493f-8183-e558449c0193"
/>
2025-02-12 01:03:19 +05:30
88ab7cb553 i18n - translations (#10137)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-02-11 19:21:13 +01:00
b757a37d07 Fix bug where aggregate resets record filters (#10136)
This PR fixes a bug where setting an aggregate in the footer of a record
table makes the currentRecordFilters state being overwritten by the
view, which we don't want.
2025-02-11 19:14:18 +01:00
252922b522 Admin panel refactor (#10119)
addressing > 
There are two patterns to avoid:
Creating functions that return JSX like renderThing() -> this was taken
already addressed in https://github.com/twentyhq/twenty/pull/10011
Making a hook that "stores" all the logic of a component - > this PR is
addressing this particular pattern
In essence, handlers should remain in the component and be connected to
their events.
And everything in a handler can be abstracted into its dedicated hook.
For example:
const { myReactiveState } =
useRecoilValue(myReactiveStateComponentState);
const { removeThingFromOtherThing } = useRemoveThingFromOtherThing();

const handleClick = () => {
  if (isDefined(myReactiveState)) {
    removeThingFromOtherThing();
  }
}

Broadly speaking, this is how you can split large components into
several sub-hooks.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2025-02-11 17:10:28 +00:00
83bf2d1739 Webhook follow up (#10124)
- fix webhook creation
- fix pointer
2025-02-11 16:30:11 +00:00