Commit Graph

4839 Commits

Author SHA1 Message Date
b160871227 feat: order the object metadata items of the API alphabetically (#12558)
resolve #12549
This PR updates the `findManyWithinWorkspace` function to order the
object metadata items alphabetically by `namePlural` in ascending order.


https://github.com/user-attachments/assets/0be77a37-173f-4cf2-86eb-8f2420d8ff51
2025-06-13 07:09:59 +02:00
9f579c84c1 Fix blocknote slash menu issue (#12578)
Fix #12562
2025-06-12 21:15:51 +02:00
0c6da76e88 i18n - translations (#12580)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-06-12 19:20:11 +02:00
a5c0922399 Improve email validation modal design (#12490)
closes https://github.com/twentyhq/core-team-issues/issues/1020
2025-06-12 19:05:36 +02:00
4f307a24b0 Add workflow seed (#12572)
Add "Quick Lead" workflow Manually triggered on no record selected
- form -> first name / last Name / email / job title / company name /
company domainName
- create company
- create person


![quickLead1](https://github.com/user-attachments/assets/972cd025-1940-42d6-aec4-38c650f0eee0)
<img width="1512" alt="Capture d’écran 2025-06-12 à 16 31 26"
src="https://github.com/user-attachments/assets/3c598370-12b1-4bf1-8a09-13926948ffbd"
/>
<img width="1512" alt="image"
src="https://github.com/user-attachments/assets/37db685a-ab59-46da-8086-c53cd4a2bac4"
/>
2025-06-12 18:04:46 +02:00
3ba701812b Add display flex on pagePanel (#12568)
## Before


https://github.com/user-attachments/assets/06a4d6e9-7674-4748-937a-ee3bbe5ccc5a

## After


https://github.com/user-attachments/assets/6c2a903b-7720-4fcd-acb9-f106cb05f37b


https://github.com/user-attachments/assets/87b1f7dc-457f-48c6-8622-cb49c2ad3c28
2025-06-12 16:48:01 +02:00
6efadd330f Recompute cached permissions at feature flag update (#12554)
If permissionsV2 feature flag is toggled, we should recompute the
permissions.

We decided to make each WorkspaceXxCacheService Xx-specific (feature
flag, permissions...), so we are not recomputing permission cache from
workspaceFeatureFlagCacheService where feature flags are recomputed,
even if that would be a lower level than FeatureFlagService. This allows
to avoid complex circuclar dependency and keeps a clear purpose for each
service.
2025-06-12 16:33:52 +02:00
7e6d3295d6 Fix search record relations (#12553)
Bunch of fixes:
- fix relations in search records
- allow to update relations in update record action
- fix multi select

<img width="503" alt="Capture d’écran 2025-06-11 à 18 30 40"
src="https://github.com/user-attachments/assets/ab652405-ec18-4454-9a60-c0db4c5df823"
/>
<img width="503" alt="Capture d’écran 2025-06-11 à 18 31 04"
src="https://github.com/user-attachments/assets/70b55e49-58ba-4cc2-b38b-13842714fc28"
/>
2025-06-12 16:33:25 +02:00
cf01faf276 965 flow control arrow menu 1/3 add insert step button (#12519)
Add insert step button to workflow edges



https://github.com/user-attachments/assets/7144f722-f1c7-450f-a8eb-c902071986a1



Also fixes `iconButtonGroup` UI component

## Before


https://github.com/user-attachments/assets/7b5f0245-d0e8-48af-9aa5-a29388a1caea


## After



https://github.com/user-attachments/assets/1820874f-aa99-41ae-8254-c76c275ee3ae
2025-06-12 12:14:21 +00:00
a189f15313 [permissions] fix workflows + remove shouldBypassPermissionChecks for system objects (#12559)
In this PR 

1. fix workflow step creation by adding forgotten
`shouldBypassPermissionChecks` in WorkflowVersionStepWorkspaceService
2. clarify the rule for twentyORMGlobalManager: do not add unnecessary
`shouldBypassPermissionChecks` for system objects (there are no
object-records permission checks on system objects, they are dealt with
at resolver level)
2025-06-12 13:56:41 +02:00
a614e00308 fix(workspace): simplify hostname matching logic in WorkspaceProvider… (#12365)
…Effect

Replaced `getHostnamesFromWorkspaceUrls` with
`isWorkspaceHostnameMatchCurrentLocationHostname` for streamlined
hostname comparison, reducing redundancy and improving logic clarity.

Fix #12295
2025-06-12 13:51:05 +02:00
333d7081ef Refactored and simplified DropdownMenuItemsContainer height management (#12547)
This PR refactors the `DropdownMenuItemsContainer` component and
simplifies its inner parts, which have been modified over months for
different needs without taking the time to have a global approach.

It should however be noted that due to the recent refactor of the
`DropdownContent`, it is now much easier to refactor
`DropdownMenuItemsContainer`, mainly because of the width management
being nicely handled by `DropdownContent` now.

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

# Changes

The `width` props of `DropdownMenuItemsContainer` and its usage in
calling components have been removed.

The multiple ternaries inside `DropdownMenuItemsContainer` have been
reduced to one ternary on `scrollable` props.

The `ScrollWrapper` usage has been removed from
`DropdownMenuItemsContainer`, because the only thing we need is to have
a simple `overflow-y: scroll;` CSS property.

Why ? Because it was previously relevant to have a `ScrollWrapper`, when
we were using an external library, but now that `ScrollWrapper` is a
simple `div` with overflowing, which only benefit is to expose a hook to
imperatively toggle this overflowing behavior from outside (mainly
useful for table fixed row and column), and that we don’t need this for
`DropdownMenuItemsContainer`, then it follows that we just need a simple
overflowing `div` container, which simplifies everything and boils down
our `DropdownMenuItemsContainer` to a straightforward and standard CSS
stack.

We remove the temporary `scrollWrapperHeightAuto` props that was used to
fix a bug in a previous PR, we also rollback `ScrollWrapper` to its
previous state with `width: 100%` and `height: 100%` and removed
`heightAuto` props.

The `hasMaxHeight` props is kept, but the `168` pixels value is
extracted in a constant.

# QA


Component | Comment
-- | --
CommandMenuActionDropdown | Reported bug
https://github.com/twentyhq/twenty/issues/12541
RecordIndexActionMenuDropdown |  
AttachmentDropdown | Cannot test because cannot add a file (currently
broken, maybe because of permissions ?)
CommandMenuContextChipGroups |  
FavoriteFolderNavigationDrawerItemDropdown |  
FavoriteFolderPicker |  
FavoriteFolderPickerFooter |  
AdvancedFilterAddFilterRuleSelect |  
AdvancedFilterFieldSelectMenu |  
AdvancedFilterRecordFilterGroupOptionsDropdown |  
AdvancedFilterRecordFilterOperandSelect |  
AdvancedFilterRecordFilterOptionsDropdown |  
AdvancedFilterSubFieldSelectMenu |  
ObjectFilterDropdownBooleanSelect |  
ObjectFilterDropdownCountrySelect |  
ObjectFilterDropdownCurrencySelect |  
ObjectFilterDropdownNumberInput |  
ObjectFilterDropdownOptionSelect | Fixed “No result” case
ObjectFilterDropdownRecordRemoveFilterMenuItem | Removed because unused
ObjectFilterDropdownTextInput |  
ObjectOptionsDropdownFieldsContent | Spotted bug with icon eye
https://github.com/twentyhq/twenty/issues/12545
ObjectOptionsDropdownHiddenFieldsContent | Spotted bug with icon eye
https://github.com/twentyhq/twenty/issues/12545
ObjectOptionsDropdownLayoutContent | Refactored
DropdownMenuItemsContainer usage with DropdownMenuSeparator, spotted bug
switch view type https://github.com/twentyhq/twenty/issues/12546
ObjectOptionsDropdownMenuContent | Refactored DropdownMenuItemsContainer
usage with DropdownMenuSeparator
ObjectOptionsDropdownLayoutOpenInContent |  
ObjectOptionsDropdownMenuViewName |  
ObjectOptionsDropdownRecordGroupFieldsContent |  
ObjectOptionsDropdownRecordGroupSortContent |  
ObjectSortDropdownButton |  
RecordBoardColumnDropdownMenu |  
RecordBoardColumnDropdownMenu |  
RecordBoardColumnHeaderAggregateDropdownFieldsContent |  
RecordBoardColumnHeaderAggregateDropdownMenuContent |  
RecordBoardColumnHeaderAggregateDropdownOptionsContent |  
MultiItemFieldInput | Added hasMaxHeight on list of items
MultiItemFieldMenuItem |  
RecordGroupsVisibilityDropdownSection |  
MultipleRecordPicker |  
MultipleRecordPickerMenuItems |  
SingleRecordPickerMenuItems |  
SingleRecordPickerMenuItemsWithSearch |  
RecordDetailRelationRecordsListItem |  
RecordTableColumnAggregateFooterDropdownSubmenuContent |  
RecordTableColumnAggregateFooterMenuContent |  
RecordTableHeaderPlusButtonContent |  
RecordTableHeaderPlusButtonContent |  
MultipleSelectDropdown |  
SettingsAccountsRowDropdownMenu |  
ConfigVariableDatabaseInput |  
ConfigVariableOptionsDropdownContent |  
SettingsDataModelNewFieldBreadcrumbDropDown |  
SettingsDataModelFieldSelectFormOptionRow |  
SettingsObjectFieldActiveActionDropdown |  
SettingsObjectFieldInactiveActionDropdown |  
SettingsObjectInactiveMenuDropDown |  
SettingsIntegrationDatabaseConnectionSummaryCard |  
SettingsRoleAssignmentWorkspaceMemberPickerDropdown |  
SettingsRolePermissionsObjectLevelObjectPickerDropdownContent | Cannot
test
SettingsSecurityApprovedAccessDomainRowDropdownMenu | Cannot test
SettingsSecuritySSORowDropdownMenu | Cannot test
SettingsServerlessFunctionTabEnvironmentVariableTableRow | Cannot test
MatchColumnSelectFieldSelectDropdownContent |  
MatchColumnSelectSubFieldSelectDropdownContent |  
SubMatchingSelectInput |  
SupportDropdown |  
IconPicker |  
Select |  
SelectInput |  
CurrencyPickerDropdownSelect |  
PhoneCountryPickerDropdownSelect |  
CustomSlashMenu |  
TabListDropdown | Cannot test
MultiWorkspaceDropdownDefaultComponents | Removed unnecessary
StyledDropdownMenuItemsContainer
MultiWorkspaceDropdownThemesComponents |  
MultiWorkspaceDropdownWorkspacesListComponents |  
UpdateViewButtonGroup |  
ViewBarFilterDropdownFieldSelectMenu |  
ViewFieldsVisibilityDropdownSection |  
ViewPickerContentCreateMode |  
ViewPickerContentEditMode |  
ViewPickerListContent | Add hasMaxHeight to limit the height of view
list
ViewPickerOptionDropdown |  
WorkflowEditTriggerDatabaseEventForm |  
WorkflowVariablesDropdownFieldItems |  
WorkflowVariablesDropdownObjectItems |  
WorkflowVariablesDropdownWorkflowStepItems |  


<!-- notionvc: a3a87101-9944-4b03-a29d-b2974d5ffa9d -->

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2025-06-12 12:22:26 +02:00
6b0517943f Prevent empty form steps (#12560)
https://github.com/user-attachments/assets/b9fd0269-fffa-4027-a634-15a5234980f0

Related to https://github.com/twentyhq/core-team-issues/issues/1091
2025-06-12 12:18:38 +02:00
cb5a895963 fix: prevent command menu from closing when clicking items in slash menu (#12555)
resolve #12540 

Prevent command menu from closing by adding new excludedClickOutsideIds
constant.


https://github.com/user-attachments/assets/965075d5-d592-4d50-bb5a-1b2bb561e55a

---------

Co-authored-by: Raphaël Bosi <71827178+bosiraphael@users.noreply.github.com>
2025-06-12 09:30:10 +00:00
10b97d56d4 Fix chromatic tests (#12551) 2025-06-12 10:17:23 +02:00
ecbc116f8b Workflow to detect breaking changes (#12532)
New CI to detect breaking changes in the REST API or the GraphQL API
2025-06-11 23:17:41 +02:00
04dd0e50bb [permissions] permissions and workflows (#12436)
In this PR

- Determine object record permissions on workflows objects (workflow,
workflowVersion, workflowRun) base on settings permissions @Weiko
- Add Workflow permission guards on workflow resolvers @thomtrp . **Any
method within a resolver that has the SettingsPermission Guard is only
callable by a apiKey or a user that has the permission** (so not by
external parties).
- Add checks bypass in workflow services since 1) for actions gated by
settings permissions, the gate should be done at resolver level, so it
will have been done before the call to the service 2) some service
methods may be called by workflowTriggerController which is callable by
external parties without permissions (ex:
workflowCommonWorkspaceService.getWorkflowVersionOrFail). This is
something we may want to change in the future (still to discuss), by
removing the guard at resolver-level and relying on
shouldBypassPermissionChecks at getRepository and made in a way that we
only bypass for external parties.
- Add checks bypass for actions performed by workflows since they should
not be restricted in our current vision
- Add tests
2025-06-11 16:47:29 +00:00
e33f2fadd8 Close command menu after destroy (#12525)
Added an argument `closeCommandMenuFromShowPageOptionsMenu` which allows
us to not only close the parent action menu if the action is located
inside the record page action menu dropdown, but to also close the
command menu after, which is the behavior we want for the destroy
action.
2025-06-11 16:38:04 +00:00
17fb47f97c Fix unable to reopen record after going back in side panel (#12523)
Before:


https://github.com/user-attachments/assets/25ab8857-ed83-41be-9952-2108443d3e3c

After:


https://github.com/user-attachments/assets/c161c194-1f41-4197-8d5c-f824c6cb5e73
2025-06-11 18:29:03 +02:00
3d3543e441 Run deduplicateIndexedFieldsCommand before sync metadata (#12550)
please merge
2025-06-11 18:25:46 +02:00
27d0a3766f Make filters and sorts work on record page pagination (#12460)
Fixes #7929 

This PR implements a system to capture and preserve the filters and
sorts when navigating from an index view to a record show page. This
information is stored in a context store component state.

This allows users to navigate between records inside the record page
while maintaining context from the index view.
2025-06-11 18:01:03 +02:00
23cbeec227 Fix missing Add File button (#12548) 2025-06-11 15:54:40 +00:00
afa6f84408 fix: remove pointer cursor and hover effects from readonly form field… (#12017)
Readonly form fields in Workflow Versions were previously showing a
pointer cursor and hover background

This update introduces a `isReadOnly` prop on the StyledFieldContainer,
which is derived from the field's `readonly` state via
`actionOptions.readonly`.

When `isReadOnly` is true:
- The cursor is set to `default` instead of `pointer`.

This ensures a more accurate and user-friendly UI by visually indicating
that the field is non-interactive.


https://github.com/user-attachments/assets/90e5c109-f2a6-4e79-b72d-e2fa6038bf93



#12004

---------

Co-authored-by: Baptiste Devessier <baptiste@devessier.fr>
2025-06-11 17:16:06 +02:00
d4995ab54e Fix cursor-based pagination with lexicographic ordering for composite fields (#12467)
# Fix cursor-based pagination with lexicographic ordering for composite
fields

## Bug

The existing cursor-based pagination implementation had a bug when
handling composite fields.
When paginating through results sorted by composite fields (like
`fullName` with sub-properties `firstName` and`lastName`), the WHERE
conditions generated for cursor positioning were incorrect, leading to
records being skipped.

The previous implementation was generating wrong WHERE conditions:

For example, when paginating with a cursor like `{ firstName: 'John',
lastName: 'Doe' }`, it would generate:

```sql
WHERE firstName > 'John' AND lastName > 'Doe'
```

This is incorrect because it would miss records like `{ firstName:
'John', lastName: 'Smith' }` which should be included in forward
pagination.

## Fix

Create a new util to use proper lexicographic order when sorting a
composite field.

---------

Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2025-06-11 14:48:03 +00:00
4cea354838 migrating to 55 (#12537)
- Adjusting the upgrade command to add the 55 command
- Adding a correction to move types to core schema
2025-06-11 16:41:12 +02:00
c8ad9f149c Fix e2e tests and "Use as Draft" (#12536)
Closes https://github.com/twentyhq/twenty/issues/12535
2025-06-11 15:13:19 +02:00
cf63bd25e3 Hide search again (#12539)
As title
2025-06-11 14:29:53 +02:00
5a15ecb316 i18n - translations (#12538)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-06-11 14:22:43 +02:00
ee7d4380d1 Build column design for advanced filters (#12534)
Figma
https://www.figma.com/design/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=45225-472099&p=f&m=dev

A few design items need to be discussed with product (font, add filter
button...) to be consistent with existing advanced filter dropdown. I
will also add stories.

<img width="495" alt="Capture d’écran 2025-06-11 à 11 11 03"
src="https://github.com/user-attachments/assets/1fa2fa1e-b4b1-4456-9f9e-81083b0caac6"
/>
2025-06-11 14:01:00 +02:00
beba4b8313 Add missing overrides on entityManager (#12471)
In this PR

1. Add missing override of insert() method on
WorkspaceSelectQueryBuilder to return our custom
WorkspaceInsertQueryBuilder with permission checks.
2. Replace override implementation of methods on WorkspaceEntityManager
that call createQueryBuilder at a nested internal layer of typeORM (i.e.
not directly in the initial implementation of EntityManager - unlike
findBy for instance -, but in calls done under the hood at a level which
would force us to override entire other classes to pass on our
permissionOptions. It is the case for methods which call typeORM's
EntityPersistExecutor for instance.), to validate permissions and then
allow the subsequent calls to be made without permission checks
3. adapt tests

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2025-06-11 12:50:10 +02:00
0b406042a1 Allow many record fields relative to the same record type in workflow forms (#12522)
Relative to https://github.com/twentyhq/twenty/issues/12517

## Before


https://private-user-images.githubusercontent.com/29370468/453438380-58c52f55-9145-40f9-a9e9-caec2a2281ea.mp4?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDk1NzAwODAsIm5iZiI6MTc0OTU2OTc4MCwicGF0aCI6Ii8yOTM3MDQ2OC80NTM0MzgzODAtNThjNTJmNTUtOTE0NS00MGY5LWE5ZTktY2FlYzJhMjI4MWVhLm1wND9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA2MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNjEwVDE1MzYyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWYxY2VlZWVmM2I2ZDBhOGQ3NzdlMjEyZTE3OTg0ZDZmMWRmMjQzZTVmYWM5MmU4NDM1NjkyZjNiYWZmMzUxZTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.n3nrJ4-I-pUjMz2YripGDHZtKc_P3hSlOFK7apFqVIA

## After


https://github.com/user-attachments/assets/4877ca29-f900-48ea-ba3c-124f910d8cf3
2025-06-11 10:20:40 +02:00
4c81d60dc7 Fix workflow run tab not displaying when navigating from side panel to full page (#12531)
closes https://github.com/twentyhq/core-team-issues/issues/1076
## Problem
When opening a workflow run in the side panel and then navigating to the
full page view, the workflow visualizer tab wouldn't display until the
page was refreshed.

## Root Cause
- In the side panel, tabs are merged into a single "home" tab
- When navigating to full page, the activeTabId state persisted as
"home"
- But the full page view only has a "workflowRun"(flow) tab, not "home"
- TabList was trying to display a non-existent tab, resulting in blank
content

## Solution
Added validation in TabList to check if activeTabId exists in
visibleTabs. If not, it falls back to the first available tab.
2025-06-11 10:17:12 +02:00
251b97ca7f Fix cache issue (#12527) 2025-06-10 19:52:52 +02:00
93103210bf Fix merge conflict on import 2025-06-10 17:24:41 +02:00
87e944ca60 i18n - translations (#12521)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-06-10 17:01:12 +02:00
a15318537f update import steps design (#12463)
closes https://github.com/twentyhq/core-team-issues/issues/916

![Screenshot 2025-06-05 at 10 52
58](https://github.com/user-attachments/assets/ba5b6d65-0c1f-4d63-a197-e61816ec2d55)
![Screenshot 2025-06-05 at 10 53
09](https://github.com/user-attachments/assets/4aed579e-5e0e-4570-9518-b6e8ac604ea6)
![Screenshot 2025-06-05 at 10 53
24](https://github.com/user-attachments/assets/6f716306-ba08-468c-875a-4279991c1abd)
2025-06-10 16:49:37 +02:00
a68895189c Deprecate old relations completely (#12482)
# What

Fully deprecate old relations because we have one bug tied to it and it
make the codebase complex

# How I've made this PR:
1. remove metadata datasource (we only keep 'core') => this was causing
extra complexity in the refactor + flaky reset
2. merge dev and demo datasets => as I needed to update the tests which
is very painful, I don't want to do it twice
3. remove all code tied to RELATION_METADATA /
relation-metadata.resolver, or anything tied to the old relation system
4. Remove ONE_TO_ONE and MANY_TO_MANY that are not supported
5. fix impacts on the different areas : see functional testing below 

# Functional testing

## Functional testing from the front-end:
1. Database Reset 
2. Sign In 
3. Workspace sign-up 
5. Browsing table / kanban / show 
6. Assigning a record in a one to many / in a many to one 
7. Deleting a record involved in a relation  => broken but not tied to
this PR
8. "Add new" from relation picker  => broken but not tied to this PR
9. Creating a Task / Note, Updating a Task / Note relations, Deleting a
Task / Note (from table, show page, right drawer)  => broken but not
tied to this PR
10. creating a relation from settings (custom / standard x oneToMany /
manyToOne) 
11. updating a relation from settings should not be possible 
12. deleting a relation from settings (custom / standard x oneToMany /
manyToOne) 
13. Make sure timeline activity still work (relation were involved
there), espacially with Task / Note => to be double checked  => Cannot
convert undefined or null to object
14. Workspace deletion / User deletion  
15. CSV Import should keep working  
16. Permissions: I have tested without permissions V2 as it's still hard
to test v2 work and it's not in prod yet 
17. Workflows global test  

## From the API:
1. Review open-api documentation (REST)  
2. Make sure REST Api are still able to fetch relations ==> won't do, we
have a coupling Get/Update/Create there, this requires refactoring
3. Make sure REST Api is still able to update / remove relation => won't
do same

## Automated tests
1. lint + typescript 
2. front unit tests: 
3. server unit tests 2 
4. front stories: 
5. server integration: 
6. chromatic check : expected 0
7. e2e check : expected no more that current failures

## Remove // Todos
1. All are captured by functional tests above, nothing additional to do

## (Un)related regressions
1. Table loading state is not working anymore, we see the empty state
before table content
2. Filtering by Creator Tim Ap return empty results
3. Not possible to add Tasks / Notes / Files from show page

# Result

## New seeds that can be easily extended
<img width="1920" alt="image"
src="https://github.com/user-attachments/assets/d290d130-2a5f-44e6-b419-7e42a89eec4b"
/>

## -5k lines of code
## No more 'metadata' dataSource (we only have 'core)
## No more relationMetadata (I haven't drop the table yet it's not
referenced in the code anymore)
## We are ready to fix the 6 months lag between current API results and
our mocked tests
## No more bug on relation creation / deletion

---------

Co-authored-by: Weiko <corentin@twenty.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
2025-06-10 16:45:27 +02:00
264861e020 [permissions V2] Add integration tests on relations and objectRecord permissions (#12450)
In this PR

1. adding tests on relations and nested relations to make sure that if
any permission is missing, the query fails
2. adding tests on objectRecord permissions to make sure that
permissions granted or restricted by objectPermissions take precedence
on the role's allObjectRecords permissions
2025-06-10 16:38:38 +02:00
78ecb01c90 Fix camel case typo Orobject in twenty-orm files (#12491)
Was looking into the Twenty ORM files and caught a camelCase typo which
is `workspaceEntityOrobjectMetadataName` to
`workspaceEntityOrObjectMetadataName` in two files
1. twenty-orm.manager.ts
2. twenty-orm-global.manager.ts

Co-authored-by: Raphaël Bosi <71827178+bosiraphael@users.noreply.github.com>
2025-06-10 13:49:35 +00:00
02bd15d61f Website changes docs playground (#10413)
From #10376 (extracting website related changes to deploy them
separately, later)

---------

Co-authored-by: oliver <8559757+oliverqx@users.noreply.github.com>
2025-06-10 15:01:24 +02:00
b74f6901b4 modal fix (#12514)
issue was the modal was closing itself due to onclickoutside while it
should have been excluded

fixes https://github.com/twentyhq/twenty/issues/12512
2025-06-10 14:44:25 +02:00
f0f0d85380 Fixed sub-field filter dropdown content and icons (#12516)
This PR improves the sub-field selection UX in advanced filters.

- Now using the icon of the field instead of the field type
- Now using the label of the field instead of the field type
- Removed now useless constant ICON_NAME_BY_ANY_SUB_FIELD
- Now selects a default value (any or default sub-field for type) when
clicking on the field, instead of waiting for the user to select the
sub-field

Fixes https://github.com/twentyhq/core-team-issues/issues/1005
2025-06-10 14:00:12 +02:00
78d63a3fe8 fix(frontend):Prevent record type select dropdown from opening when viewing a workflow version (#12495)
Closes #12003 


https://github.com/user-attachments/assets/07561cf6-a45d-4f7e-815e-550421d1bd9f
2025-06-10 12:20:46 +02:00
9cfabd81cb Fix missing New Note / New Task button (#12513)
New Note button was missing because of the wrong condition being applied
to display it
<img width="492" alt="Capture d’écran 2025-06-10 à 10 26 57"
src="https://github.com/user-attachments/assets/dafd10e3-b3a8-497c-9a00-c395f20cecbb"
/>
2025-06-10 09:12:41 +00:00
3cbd3427a1 chip-count-black-mode (#12505)
![image](https://github.com/user-attachments/assets/01b4576d-2409-4bf0-8fa7-bd39ad00ded5)

Add chip count display for black mode in participant chips.

Improves visual clarity for participant lists in calendar events.

Fix https://github.com/twentyhq/twenty/issues/12473
2025-06-10 10:03:04 +02:00
7f19111e57 Stop forwarding the active prop for the TabButton component (#12501)
This error was triggered:

![CleanShot 2025-06-09 at 14 49
45@2x](https://github.com/user-attachments/assets/9cc02f99-aead-40ec-aec1-33a6f8a4b81f)
2025-06-09 16:12:30 +02:00
1f2c40af61 fix: prevent duplicate dropdowns in activity targets when editing in different contexts (#12462)
Closes #12361

### Changes Made

- In `ActivityTargetsInlineCell`, we now use different component
instance IDs based on context. This ensures that each instance of the
component (whether in right drawer or main view) has its own isolated
state, preventing state conflicts and duplicate dropdowns.
- The `MultipleRecordPicker` component now properly resets its state
when closed, preventing state leakage between instances.


https://github.com/user-attachments/assets/deb99687-a803-417e-a339-cab061026739
2025-06-09 15:20:13 +02:00
da35a2f479 fix: trigger onClickOutside when click escape for closing the model a… (#12461)
Description:
Resolved a bug where pressing the Escape key did not clear the filter
chips when no filter value was present.
Added a call to onClickOutside inside the useScopedHotkeys hook to
ensure filter chips are removed when Escape is pressed and the dropdown
is open but empty.



https://github.com/user-attachments/assets/42ed35b0-f5a8-4d26-8407-fdd5e2cc4a42

fix #12319
2025-06-09 15:08:57 +02:00
ecf21774dd Fix workspace hydratation (#12452)
We must separate the concept of hydratation which happens at the request
level (take the token and pass auth/user context), from the concept of
authorization which happens at the query/endpoint/mutation level.

Previously, hydratation exemption happened at the operation name level
which is not correct because the operation name is meaningless and
optional. Still this gave an impression of security by enforcing a
blacklist. So in this PR we introduce linting rule that aim to achieve a
similar behavior, now every api method has to have a guard. That way if
and endpoint is not protected by AuthUserGuard or AuthWorspaceGuard,
then it has to be stated explicitly next to its code.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2025-06-09 14:14:32 +02:00
322c8a1852 Upgrade to Node22 (#12488)
BlocknoteJS requires an ESM module where our server is CJS, this forced
us to pin the server-util version, which led us to force the resolution
of several packages, leading to bugs downstream.

From Node 22.12 Node supports requiring ESM modules (available from Node
22.0 with a flag). So I upgrade the module.
I picked Node 22 and not Node 23 or Node 24 because 22 is the LTS and we
don't plan to change node versions frequently.

If you remain on Node 18, things should still mostly work, except if you
edit a Rich Text field.

I also starting changing the default runtime for Serverless Functions
which isn't directly related. This means new serverless functions will
be created on Node 22, but we will still need another PR to migrate
existing serverless functions before September (end of support by AWS).

(In this PR I also remove the upgrade commands from 0.43 since they rely
on Blocknote and I didn't want to have to deal with this)

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-06-06 18:35:30 +02:00