Commit Graph
8099 Commits
Author SHA1 Message Date
3cada58908 Migrate from Zod v3 to v4 (#14639)
Closes [#1526](https://github.com/twentyhq/core-team-issues/issues/1526)

---------

Co-authored-by: Félix Malfait <[email protected]>
Co-authored-by: Félix Malfait <[email protected]>
2025-09-24 18:29:05 +02:00
MarieandGitHub 8d78032357 Implement groupBy resolver (with orderBy, without viewId) (#14690)
Closes
https://github.com/twentyhq/core-team-issues/issues/248?issue=twentyhq%7Ccore-team-issues%7C1543

In this PR
- Implementation of groupBy resolver, without pagination, without viewId
parameter
- introduction of new GqlInputTypeDefinitionKind `OrderByWithGroupBy`
which differs from `OrderBy` as it should use aggregations as order by
conditions (e.g.: OrderByWithGroupBy should use avgEmployees and not
employees which does not make sense)
- Minor refacto of all orderBy expressions to use orderBy signature with
`OrderByCondition` which is usable for both groupBy queries and
non-groupBy queries. groupBy queries differ because their orderBy
conditions are based on aggregatedFields (such as avgEmployees) for
which we can't use the same orderBy signature
<img width="728" height="216" alt="Capture d’écran 2025-09-24 à 15 07
14"
src="https://github.com/user-attachments/assets/aa5c0875-cf38-4d4b-be70-f4d64da77a41"
/>

- Minor refacto to add table name in aggregates expressions
`(AVG("employees") -> AVG("company"."employees")` to keep having the
table names in the orderBy expression as we already had. Since we use
common utils for orderBy and aggregates on findMany this change also
impacts findMany queries with aggregates. It also impacts field
permission check where we extract the name of the selected fields to
check permission on, so I also updated that (see
`extractColumnNamesFromAggregateExpression`)
2025-09-24 16:00:55 +00:00
Baptiste DevessierandGitHub d477db261a Add basic support for iterators in workflow runs (#14680)
## Workflow

<img width="3456" height="2234" alt="CleanShot 2025-09-24 at 11 50
49@2x"
src="https://github.com/user-attachments/assets/c9db9f27-9c0a-4b77-ac49-330e6f934a9e"
/>

## Workflow run

<img width="3456" height="2234" alt="CleanShot 2025-09-24 at 11 50
56@2x"
src="https://github.com/user-attachments/assets/c95d984f-03f0-4aa2-9677-dc86d851172f"
/>
2025-09-24 14:12:15 +00:00
Charles BochetandGitHub 58e1a2261d Debug webhook job (#14675) 2025-09-24 15:47:49 +02:00
Thomas TrompetteandGitHub 3b1657b6fa Store history when iterator reset the step info (#14684)
- before reseting the step, enrich info with previous result
- reset only when a step is executed more than once. This will avoid to
store the initial `NOT_STARTED` status of the step
2025-09-24 13:28:50 +00:00
EtienneandGitHub f5c5ee5645 update cleaning job to progressively delete metadata (#14596)
Workspace cleaning jobs slow down the db each hours when running. We
suspect the object metadata deleting query with all cascade/depending
entities (field, index, ..) to be the cause.
2025-09-24 13:18:56 +00:00
WeikoandGitHub f566f39292 Add FK creation in migration v2 (#14685)
## Context
-
packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/build-default-relation-flat-field-metadatas-for-custom-object.util.ts
Fixing targetFlatFieldMetadata not being accurate for default relation
during object creation (was not used yet)
-
packages/twenty-server/src/engine/twenty-orm/workspace-schema-manager/services/workspace-schema-foreign-key-manager.service.ts
Simplifying API + Removing unused methods and the ones that were
querying pg schema as we want to avoid those as much as possible
-
packages/twenty-server/src/engine/workspace-manager/workspace-migration-v2/workspace-migration-runner-v2/action-handlers/field/services/create-field-action-handler.service.ts
Adding FK creation when Join column is created
2025-09-24 15:07:50 +02:00
Raphaël BosiandGitHub b0e56e4717 Create MenuPicker (#14681)
Closes https://github.com/twentyhq/core-team-issues/issues/1534

<img width="746" height="324" alt="CleanShot 2025-09-24 at 14 32 52@2x"
src="https://github.com/user-attachments/assets/6c36fe37-b945-4d43-917c-424e7b346902"
/>
2025-09-24 12:43:05 +00:00
21b7cda7af i18n - translations (#14683)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2025-09-24 14:22:56 +02:00
Raphaël BosiandGitHub 66a6190e3c Create save dashboard record action (#14665)
Closes https://github.com/twentyhq/core-team-issues/issues/1502

- Created the save action
- Removed the temporary data attribute from the page layout widget since
we will connect widgets to real data soon



https://github.com/user-attachments/assets/2b46b511-f2c2-4e11-873c-a76fd31704e5
2025-09-24 12:03:27 +00:00
a067d961f7 i18n - translations (#14677)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2025-09-24 10:49:20 +02:00
neo773GitHubgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>Félix MalfaitFélix Malfait
a1ad8e3a1e Outbound message domains (#14557)
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Félix Malfait <[email protected]>
Co-authored-by: Félix Malfait <[email protected]>
2025-09-24 10:33:04 +02:00
Thomas TrompetteandGitHub 6ea7aea92b Migrate update step changes to diff (#14663)
This PR should fix optimistic rendering issues on step updates:
- compute a diff for trigger and steps on mutations
- build an util that applies that diff (built a more robust version from
https://github.com/AsyncBanana/micropatch)
- apply diff in cache
2025-09-23 16:41:26 +00:00
a5c47a60d0 i18n - translations (#14667)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2025-09-23 18:17:10 +02:00
09dd49d6d6 feat: Added workspace-level impersonation module and functionality (#14360)
## Description

- This PR is focused on issue
https://github.com/twentyhq/core-team-issues/issues/1421
- Added workspace-level impersonation apart from current
server-level-impersonation
- Introduced WorkspaceImpersonationModule, including service and
resolver for user impersonation within workspaces.
- Enhanced AdminPanelService and AdminPanelResolver to support
impersonation logic, including authentication checks and token
generation.
- added Member Management Interface in settings/members table
- added GraphQL mutation for workspace-level impersonation



## Visual Proof

<img width="919" height="444" alt="Screenshot 2025-09-09 at 1 29 22 AM"
src="https://github.com/user-attachments/assets/a361c6eb-03de-48db-b68a-7d3a489fafde"
/>


https://github.com/user-attachments/assets/454bc1aa-8b8f-4de1-9304-7c147da71dd4


## Impersontion Cookie

<img width="1792" height="297" alt="Screenshot 2025-09-11 at 9 44 06 PM"
src="https://github.com/user-attachments/assets/a8a37d5e-d38d-4472-94a7-4e4b36fba14e"
/>



<img width="1235" height="1041" alt="Screenshot 2025-09-19 at 1 24
09 AM"
src="https://github.com/user-attachments/assets/875e8f9c-e0cb-404b-8291-8fadc6c2a163"
/>

---------

Co-authored-by: Félix Malfait <[email protected]>
Co-authored-by: Félix Malfait <[email protected]>
Co-authored-by: etiennejouan <[email protected]>
2025-09-23 18:07:53 +02:00
nitinandGitHub 8b2726b3fb [Dashboards] - Fix seeding not working for YC workspace because of duplicate IDs (#14591) 2025-09-23 18:01:56 +02:00
martmullandGitHub 5105b4284e Remove twenty-app.jsonc (#14662)
As title, use package.json instead of twenty-app.jsonc
2025-09-23 16:54:24 +02:00
Baptiste DevessierandGitHub bbc97f4ab3 Allow nodes connection to loop edge (#14661)
## Before


https://github.com/user-attachments/assets/4cfb01cb-559a-4cfa-89d6-ee991a5e2550

## After


https://github.com/user-attachments/assets/236e81b0-4f1f-44c5-8714-aa6f1c9358e1

Closes https://github.com/twentyhq/core-team-issues/issues/1521
2025-09-23 13:59:30 +02:00
Raphaël BosiandGitHub 7cb294169d Add a new graphql mutation in the pageLayout resolver to handle page layout update with tabs and widgets (#14612)
Add a new graphql mutation in the pageLayout resolver to handle page
layout update with tabs and widgets.

Later we will add validation inside the service to check if the page
layout tab structure is correct (for instance check widgets don't
overlap or aren't out of the grid, or to check that they have a correct
configuration ...).

This mutation will be plugged to the save action of the dashboards in
the frontend.
v1.6.8
2025-09-23 11:00:36 +02:00
Paul RastoinandGitHub fbd3286792 Index v2 side effects (#14567)
# Introduction
Honestly this implem is a mess, discussing a potential side effect
handler with @weiko before the build and run that would handle each side
effect per entity and operation

Handling:
- [ ] unique index is generated when a field is updated with the
`isUnique`
- [x] an index is generated when a relation is created
- [x] search vector index creation on custom object creation
- [x] renaming a field metadata or an object should re-create all
related indexes which are composed by their namings
- [x] delete object should remove any related indexes
- [x] delete field should update related indexes ( if index ends up
empty it should be removed )
- [ ] on object renaming that contains morph fields -> triggers update
field -> trigger index recompute
- [x] on update name renaming should recompute all related indexes

## TODO
- [x] Integration testing
- [ ] Refactor the index maps cache to be storing a
`idsByObjectMetadataId`
- [x] Refactor deterministic name to use order sorting
- [x] Remove flat index from flat object

## What's next

Will handle morph indexes in a new dedicated PR for the moment will
stick to this
Same for the cache improvement and uniqueness
2025-09-23 10:57:11 +02:00
d0b9c7f076 i18n - translations (#14658)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2025-09-23 10:48:38 +02:00
Raphaël BosiandGitHub 3d27a1e48a Create a cancel action to leave the dashboard edit mode without saving (#14650)
Closes https://github.com/twentyhq/core-team-issues/issues/1523
2025-09-23 10:36:37 +02:00
1a1ef9f254 i18n - translations (#14656)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2025-09-23 09:32:26 +02:00
neo773andGitHub 0011864f9f Fix/preserve channels on credential update (#14633)
https://github.com/user-attachments/assets/6165f177-c32d-4ddf-8991-3986f01897ee


/closes #14522
2025-09-23 09:22:39 +02:00
6f49481095 Imap perf improvement (#14629)
- Removed buffer to string conversion on message and we instead pass the
direct Buffer
- Removed redundant flattening of results
- Cached `JSDOM` and `DOMPurify` Instance
- MailParser added `skipTextToHtml` along with some other options, which
reduced parsing time from 50ms to 35ms

---------

Co-authored-by: Félix Malfait <[email protected]>
Co-authored-by: Félix Malfait <[email protected]>
2025-09-23 09:21:30 +02:00
216d72b5d7 AI SDK v5 migration (#14549)
Co-authored-by: Félix Malfait <[email protected]>
2025-09-22 22:13:43 +02:00
martmullandGitHub e8121919bd Remove twenty-apps irrelevant stuff (#14649)
As title

twenty-apps is the public repository for public twenty applications. One
small hello-world application is registered here, will be useful for
development
2025-09-22 21:06:17 +02:00
martmullandGitHub 68882ec483 Merge commands (#14647)
- duplicates between install and deploy commands
- remove list command that call findManyAgents
2025-09-22 16:26:01 +02:00
WeikoandGitHub 40240ce514 Add view viewField favorite creation after object creation in migration v2 (#14644)
## Context
We are not exactly sure how we want to handle side effects with
workspace migration v2, in the meantime I'm re-introducing this part in
the caller (object v2 service)
2025-09-22 16:19:38 +02:00
martmullandGitHub f76e9df3cd Remove verbose option (#14646)
as title
2025-09-22 15:19:57 +02:00
Lucas BordeauandGitHub d6e4bcb533 Fix table column width on mobile (#14623)
This PR fixes some minor issues to have all width computation working
properly and table displaying nicely on mobile.
2025-09-22 10:18:12 +02:00
d308f5adf9 i18n - translations (#14634)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2025-09-21 17:20:09 +02:00
9a2766feae feat: rich text email body (#14482)
Co-authored-by: Raphaël Bosi <[email protected]>
Co-authored-by: Félix Malfait <[email protected]>
Co-authored-by: Félix Malfait <[email protected]>
2025-09-21 16:55:34 +02:00
Antoine MoreauxandGitHub a89e5d0f27 feat(database): activate unaccent extension with immutable function (#14621) 2025-09-21 15:17:19 +02:00
Abdullah.andGitHub 646aecece1 Update integration test to include cases for bi-directional accent-insensitive search. (#14631)
## Summary

Enhanced the search resolver integration tests to comprehensively
validate bidirectional accent-insensitive search functionality. Users
can now search with or without accents and find all relevant records
regardless of how the data was originally stored.

## Changes Made

### Test Data Enhancements

- Added 2 new person IDs: `TEST_PERSON_6_ID`, `TEST_PERSON_7_ID`
- Expanded corpus from 5 to 13 records:
  - 7 persons
  - 2 companies
  - 4 pets
- Refactored test data into single arrays with content-driven variable
naming for better maintainability

### Test Coverage Improvements

- Added 6 comprehensive bidirectional tests covering French, Spanish,
and German characters
- Validated multiple fields:
- `firstName`, `lastName`, `jobTitle`, `email`, `company name`, `pet
name`
- Cross-object search testing across Person, Company, and Pet
- Updated all ranking values to account for the enlarged test corpus (5
→ 13 records)

## Test Cases Added/Updated

- [x] should find both **"José"** and **"Jose"** when searching for
`"jose"` (bidirectional accent-insensitive)
- [x] should find both **"García"** and **"Garcia"** when searching for
`"garcia"` (bidirectional accent-insensitive)
- [x] should find both accented and non-accented **"Café"** / **"Cafe"**
records when searching for `"cafe"` (bidirectional accent-insensitive)
- [x] should find both accented and non-accented **"Naïve"** /
**"Naive"** records when searching for `"naive"` (bidirectional
accent-insensitive)
- [x] should find both **"Müller"** and **"Muller"** when searching for
`"muller"` (bidirectional accent-insensitive)
- [x] should find both **"François"** and **"Francois"** when searching
for `"francois"` (bidirectional accent-insensitive)
2025-09-21 08:47:14 +02:00
Thomas des FrancsandGitHub f851879e0f 1.6 changelog (#14620)
workflows improvements!
2025-09-20 12:41:37 +02:00
Charles BochetandGitHub a21daa2670 Optimize CI runner cost (#14628) 2025-09-20 12:14:29 +02:00
Abdullah.andGitHub ff3467c18e feat (search): add dynamic search field metadata foundation for database-driven search configuration (#14469)
## Summary

Implements the foundation for dynamic search field configuration from
[issue #1428](https://github.com/twentyhq/core-team-issues/issues/1428).

## Changes

- Add `SearchFieldMetadataEntity` junction table for storing searchable
field configurations
- Add `SearchFieldMetadataService` with core CRUD operations  
- Add `SearchFieldMetadataModule` following existing patterns  
- Add `IS_DYNAMIC_SEARCH_FIELDS_ENABLED` feature flag (defaults to
`false`)
- Database migration with proper indexes and foreign keys  

## Architecture

Uses a junction table where **record existence = field is searchable**:

**Table: `searchFieldMetadata(objectMetadataId, fieldMetadataId,
workspaceId)`**

- Unique constraint on `(objectMetadataId, fieldMetadataId)`  
- `ON DELETE CASCADE` on foreign keys  

## Testing

- [x] Migration runs successfully  
- [x] Table created with correct schema  
- [x] Feature flag seeded properly  
- [x] Database reset works correctly  

## Next Steps

Future PRs will handle:

- Data migration from existing hardcoded search field configs  
- Integration with search services  

 No breaking changes — fully backward compatible.
2025-09-19 18:35:51 +02:00
Charles BochetandGitHub a89cc3b234 Fix messaging crons (#14619)
## Context

While refactoring messaging, I forgot that workspaces that have been
created before july do not have 'CALENDAR_EVENT_LIST_FETCH_PENDING' and
'MESSAGE_LIST_FETCH_PENDING' enum values (as we don't sync-metadata the
enum values, we would need a migrate command that has not been written
yet)

In the current implementation CALENDAR_EVENT_LIST_FETCH_PENDING =
FULL_CALENDAR_EVENT_LIST_FETCH_PENDING, so I'm putting it back as it was
before
2025-09-19 17:26:05 +02:00
Lucas BordeauandGitHub aff3a300fe Refactored table width and height constants (#14613)
This PR essentially refactors some hard-coded values for width and
height in the table.

It also fixes a few differences from the Figma design, on the checkbox
column width and the top bar and view bar left alignment with the table.

The blue color has been set like before the refactor of the focus portal
(`theme.adaptiveColors.blue4`)

Fixes in https://github.com/twentyhq/core-team-issues/issues/1490 : 
- Fix first drag and drop column width that has changed from main (see
Figma)
- Unify all widths, heights, z-index, etc. with constants
- Put same blue as before for focused portal

Also removed `focus-active` class because we now use a portal for the
focus.
2025-09-19 17:19:26 +02:00
8ba1dc1d94 Added a util helper to remove accent and case to improve search logic (#14533)
# [WIP] Make Local Search Non-Accent-Sensitive

fixes(#14468)

---

**Description:**  
This PR adds accent- and case-insensitive search for the
**SettingsWorkspaceMembers** component’s local search. It ensures that
searching for names or emails works correctly even if the user types
letters without accents.

**Implementation:**  
- Added a helper util: `removeAccentsAndCase(text: string)`  
- This util:
  - Normalizes text to NFD form
  - Removes diacritics (accents)
  - Converts text to lowercase
- Replaced current `.includes(searchFilter)` logic with a normalized
comparison:


---

### Video ->

[Screencast from 2025-09-16
16-42-50.webm](https://github.com/user-attachments/assets/7035906c-9c5d-414d-81e5-74e53803628a)


---

Opening a draft pr for initial strategy review before extending it to
other components.

---------

Co-authored-by: Félix Malfait <[email protected]>
Co-authored-by: Félix Malfait <[email protected]>
2025-09-19 17:03:43 +02:00
Antoine MoreauxandGitHub deed08ba25 fix(billing): reenable trial (#14616)
…reation
2025-09-19 15:16:57 +02:00
Baptiste DevessierandGitHub 5311b07ae8 Support loops in workflow versions (#14603)
## In the workflow

<img width="3456" height="2160" alt="CleanShot 2025-09-18 at 17 57
23@2x"
src="https://github.com/user-attachments/assets/5041f1d8-ea43-44f5-b3f3-012054b0352d"
/>

## In the workflow version

<img width="3456" height="2234" alt="CleanShot 2025-09-18 at 17 57
32@2x"
src="https://github.com/user-attachments/assets/37137907-f00d-448c-ab81-0d5ee55b0437"
/>

Closes https://github.com/twentyhq/core-team-issues/issues/1452
2025-09-19 15:07:22 +02:00
Paul RastoinandGitHub 39661db3c8 Setup 1.6 commands (#14614) 2025-09-19 12:32:13 +00:00
Charles BochetandGitHub 349b15e81f Add scripts to relaunch message and calendar channels (#14579)
## Context

1. We are debugging the experience on messaging and calendar sync. I'm
adding two scripts to relaunch messaging and calendar channels
2. We are seeing errors in Sentry regarding microsoft drivers errors. I
was about to fix them but I'm refactoring / simplifying a bit the logic
first. It will be a betters starting point
2025-09-19 12:31:19 +02:00
MarieandGitHub 4a6ad48a62 Fix - Record text should always be visible and in first position in views (#14598)
Fixes https://github.com/twentyhq/twenty/issues/14442

Issues were
1. Table headers always used label metadata identifier (or record text)
as first column, while table body followed viewFields positions
2. Label metadata identifier should always be visible and in first
position for the table views to work as expected, while when updating
the label metadata identifier for an object, no changes were brought to
the viewFields

To fix that
1. In the BE: 
- a new logic is implemented to i) update label identifier's viewFields
position and visibility when an object's label identifier is updated to
a new field; ii) add validation on the update of a viewField's position
and visibility to make sure the label identifier's viewField always has
the lowest position + is visible
- a command was added to check all existing views and viewfields
3. In the FE: at first I tried to replicate the logic of the headers
(based on the label identifier rather than the positions) on the body,
but it was too complex and error-prone as in multiple places we are
based on the positions. It also feels more right to have only one source
of truth which is the viewField position. @lucasbordeau if that does not
suit you, we can throw an error if the field with the lowest position is
not the label metadata identifier, as you said the table view will be
very buggy / wont work if the label identifier is not in the first
position. but now it should never be the case thanks to the validation
implemented in the BE

This should be migrated to viewFieldService V2 when relevant @Weiko
@prastoin
2025-09-19 10:24:09 +00:00
43e0cd5d05 feat(billing): refacto billing (#14243)
… prices for metered billing

---------

Co-authored-by: Félix Malfait <[email protected]>
Co-authored-by: Félix Malfait <[email protected]>
2025-09-19 11:25:53 +02:00
Lucas BordeauandGitHub 163890f6c8 Add back shadow on frozen columns and header in table (#14593)
This PR adds back box-shadow on header and first frozen columns of the
table, they appear at scroll.

With the recent refactor and the removal of a lot of re-render, and the
usage of CSS variables, it is now completely fluid.

# Before 

<img width="500" height="234" alt="image"
src="https://github.com/user-attachments/assets/9735acb0-5951-4a2d-845c-49e917e99053"
/>

<img width="576" height="242" alt="image"
src="https://github.com/user-attachments/assets/328654bf-97c7-43a2-86b1-0f100ed60daa"
/>

# After 

<img width="455" height="250" alt="image"
src="https://github.com/user-attachments/assets/3450a63f-4d6f-45ed-bfd2-3c10856b21a7"
/>

<img width="488" height="244" alt="image"
src="https://github.com/user-attachments/assets/1057a391-3a98-4b5e-97f1-890f79e6f8d0"
/>
2025-09-19 10:40:32 +02:00
Thomas TrompetteandGitHub 6d5635f4e2 Use variables within Iterators (#14604)
Variables were not working properly. Output schema was outdated and
parent steps were not calculated properly.

Before


https://github.com/user-attachments/assets/b070c1ff-41dd-4ea0-a590-25bb39027456

After


https://github.com/user-attachments/assets/baa43e69-0e7c-4697-8812-3ce523efba13
2025-09-18 23:13:57 +02:00
Charles BochetandGitHub c7005db860 Fix sort bug issue (#14607)
Enum should not receive any special treatment when building order by
2025-09-18 20:23:19 +02:00