Commit Graph

6558 Commits

Author SHA1 Message Date
442f8dbe3c [QRQC_2] No implicitAny in twenty-server (#12075)
# Introduction
Following https://github.com/twentyhq/twenty/pull/12068
Related with https://github.com/twentyhq/core-team-issues/issues/975

We're enabling `noImplicitAny` handled few use case manually, added a
`ts-expect-error` to the others, we should plan to handle them in the
future
2025-05-15 18:23:22 +02:00
08ce2f831e Fix missing exception catch (#12069)
add a check about uuid in rest api findOne handler
2025-05-15 15:01:57 +00:00
a8423e8503 [QRQC_2] No explicit any in twenty-server (#12068)
# Introduction

Added a no-explicit-any rule to the twenty-server, not applicable to
tests and integration tests folder

Related to https://github.com/twentyhq/core-team-issues/issues/975
Discussed with Charles

## In case of conflicts
Until this is approved I won't rebased and handle conflict, just need to
drop two latest commits and re run the scripts etc

## Legacy
We decided not to handle the existing lint error occurrences and
programmatically ignored them through a disable next line rule comment

## Open question
We might wanna activate the
[no-explicit-any](https://typescript-eslint.io/rules/no-explicit-any/)
`ignoreRestArgs` for our use case ?
```
    ignoreRestArgs?: boolean;
```

---------

Co-authored-by: etiennejouan <jouan.etienne@gmail.com>
2025-05-15 16:26:38 +02:00
c95c4383b4 Gmail temporary error (#12058)
# Handling Google error

This bug is hard to reproduce so the resolution is based only on the
Sentry logs. There is not definite error code
for this error message. in the documentation.
https://developers.google.com/workspace/gmail/api/guides

This is why i added more 5xx code types in order to be sure we catch
this. In order to refine this later, i added the error code to the
message.

Fixes https://github.com/twentyhq/twenty/issues/12025
2025-05-15 16:12:10 +02:00
f782f4dcd8 Fix CSV import upsert (#12048)
Fixes https://github.com/twentyhq/twenty/issues/11864 and
https://github.com/twentyhq/core-team-issues/issues/908

We should not send `createManyXXX` mutations with FE-forged ids in the
payload if we want to do an upsert, because that 1) prevents records
from being merged 2) triggers optimistic rendering while we can't know
before-hand which records will actually be created and which records
will only be updated

Also noticed createdBy was being overriden even for records we are
updating and not creating, which did not seem right, so fixed that too
2025-05-15 14:44:31 +02:00
aa424c6680 Make workflow custom fields editable (#12063)
Fixes https://github.com/twentyhq/twenty/issues/11989

<img width="1267" alt="Capture d’écran 2025-05-15 à 14 05 15"
src="https://github.com/user-attachments/assets/fbb22f52-2c76-424f-8b8c-fb030fef9fa8"
/>

`isCustom` was not properly set everywhere because it was not mandatory
in `isFieldValueReadOnly`. Removing the default value and adding it to
missing places
2025-05-15 12:28:13 +00:00
411cb33137 [reconnect account] Reseting calendar status and stage on reconnect (#12061)
## Description
When a calendar channel fails, its status is not reset during the
reconnect step.

In some cases, resetting is necessary—especially when we’ve deployed a
fix and users try to reconnect their accounts after the patch.

## Why reseting to initial state
Our processes are idempotent, so we can safely set the status to null to
restart the flow. This approach covers all cases and avoids edge
conditions caused by inconsistent statuses.


Fixes : https://github.com/twentyhq/twenty/issues/12026
2025-05-15 14:12:32 +02:00
3a494905ec Fixed error with previous filters on ACTOR with new sub-field filtering (#12050)
Fixes https://github.com/twentyhq/core-team-issues/issues/969 that
appeared since the new ACTOR sub-field filtering that changed the
default sub-field filtering from name to source.

Now we apply any existing filter value on an ACTOR field, whether for a
sub-field or not, to the name sub-field by default.

If the user wants to create a sub-field filter on source, he has to
create a new advanced filter.

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

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2025-05-15 13:58:22 +02:00
93c91c88dc Exclude workflows from relation field object dropdown when inactive (#12033)
closes #11996
- Switched the “Object destination” select in
SettingsDataModelFieldRelationForm to use
activeObjectMetadataItems.filter(...) so workflows, system, and remote
objects are excluded
- Updated useRelationSettingsFormInitialValues to fall back on the same
filtered activeObjectMetadataItems list for its initial value

This ensures workflows (and any unwanted system/remote objects) no
longer show up in the dropdown or as the default.
2025-05-15 17:04:10 +05:30
6a40ec604c Validate existing fields on creation (#12057)
Fixes https://github.com/twentyhq/twenty/issues/12040

When fields are deleted but still used in workflows we do not update
create record action settings.
It breaks all following workflow execution and the user cannot update
the settings anymore.

This PR fixes the bug by filtering on existing fields.

Next step will be to clean settings on field deletion. Adding it to fast
follows.

Also lowering throttle limit because some infinite loops are not
catched.
2025-05-15 13:24:57 +02:00
9e00a67b25 Fix kanban loading bug (#12042)
Fixes https://github.com/twentyhq/core-team-issues/issues/956

This PR fixes a bug that appeared when switching between two kanban
views multiple times.

Steps to reproduce : 
- Go to kanban view A
- Go to kanban view B
- Go back to kanban view A

Video before : 


https://github.com/user-attachments/assets/4fa789ae-7187-498e-82b4-ee7896cd95d1

Video after : 


https://github.com/user-attachments/assets/2b323a2d-2f76-405d-9abd-38fe72ee2214

The problem was that we allowed a hook to take a nullable parameter that
can be nullable between page switch, and threw when it was undefined.

In order to be more cautious in the future, let's be sure that we don't
throw for undefined props of a hook, when it is expected that those
props can be in an undefined state for several React render loops, while
fetching new data.

Here I identified the parent effect : `<RecordIndexBoardDataLoader />`
that loads all states for a board when we switch between views, for each
column, by calling `<RecordIndexBoardColumnLoaderEffect />` in a
`.map()`.

Each `RecordIndexBoardColumnLoaderEffect` was calling
`useLoadRecordIndexBoardColumn` with a potentially undefined
`boardFieldMetadataId`.

So to fix this, I cut the render flow higher than the throw in
`useLoadRecordIndexBoardColumn`, and by doing that I was able to ensure
that `recordIndexKanbanFieldMetadataItem` in
`RecordIndexBoardDataLoader` was already defined when using it inside
`useLoadRecordIndexBoardColumn`.

`recordIndexKanbanFieldMetadataItem` was unnecessarily fetched two
times, one time in `RecordIndexBoardDataLoader` and another time in its
child `useLoadRecordIndexBoardColumn` hook.

By implementing this flow-cut higher up, I could then remove the `|
null` in TypeScript in children components, and expect a defined value
in all the children of `RecordIndexBoardDataLoader`, thus removing the
need to ask ourselves if we should throw or not in
`useLoadRecordIndexBoardColumn`.
2025-05-15 10:27:47 +02:00
52c38c3082 Correct default fallback logo path in Logo component (#12053)
closes #11849
The Logo component’s fallback URL was pointing to
`/icons/android/android-launchericon-192-192.png`, but the asset lives
under `/images/icons/....`. This updates defaultPrimaryLogoUrl to use
the correct `/images/icons/android/android-launchericon-192-192.png`
path, restoring the default logo display when no primaryLogo prop is
provided.
2025-05-15 09:44:37 +02:00
81cc5da982 [Rest Api] Fix find duplicates endpoint (#12044)
- fix endpoint
- migrate to new rest api v2 service
- add integration test
2025-05-14 20:03:59 +00:00
fdc7d6c93c Messaging issues (#12041)
messageImportException
for messaging and calendar
add more context to the Sentry Exceptions

Fixes https://github.com/twentyhq/twenty/issues/11994
2025-05-14 18:37:42 +02:00
628ba18115 Fix infinite loop critical bug (#12046)
This PR fixes an infinite loop than happens due to a useEffect in a non
deterministic manner.

The fix is to put a `isDeeplyEqual()` to avoid re-rendering the
useEffect if the value is the same.

Fixes : https://github.com/twentyhq/core-team-issues/issues/957
2025-05-14 17:40:05 +02:00
929f7876de fix calendar events and messages post hooks (#12034)
Context
workspaceMemberId is not always present in AuthContext. Solution
implemented here is to fetch workspaceMemberId via userId.

QRQC coming ... 

Tested
- FindManyCalendarEvents / FindOneCalendarEvent
- FindManyMessages / FindOneMessage

closes https://github.com/twentyhq/twenty/issues/12027
2025-05-14 15:52:52 +02:00
0c60fa9c23 Fix cacheData not found after recomputes (#12032)
Closes https://github.com/twentyhq/core-team-issues/issues/861

sentries: [User workspace role map not found after
recompute](https://twenty-v7.sentry.io/issues/6575092700/events/f9825338a30b470eb2345fe78c1e3479/?project=4507072499810304&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D%20not%20found%20after%20recompute&referrer=next-event&stream_index=0)
(64 events in 90d), [Feature flag map not found after
recompute](https://twenty-v7.sentry.io/issues/6547696076/?project=4507072499810304&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D%20not%20found%20after%20recompute&referrer=issue-stream&stream_index=1)
(23 events in 90d)

We have a structural issue with cached data and our locking mechanism:
if a data is missing in cache and queried at the same time by two
different entities, the first one will recompute the data and indicate a
lock during the operation, while the second one will seek to recompute
the data too but be stopped because of the ongoing lock, and be left
with no data to use, condemned to throw an error. In this PR I
considered that it was more important to avoid that error and chose to
ignoreLock instead when the data is being queried (through
getFromCacheWithRecompute), but this is maybe questionnable.
An important note is that I can't figure out how users that regularly
use twenty (as it has been the case since this error occured on our
internal workspace) can encounter that error as once computed, **the key
should always be present in the workspace**: the corresponding value it
is always updated, never deleted (until this PR) and recreated. I was
not able understand how this happened

For our data cached without a version to refer to in the database, I
also chose to ignore the lock when the recompute is triggered by a data
change (eg feature flag enabling or assigning user to a role or adding
an objectPermission on a role, etc.), as we never want to imped the
recompute in that case to avoid potential stale data.
2025-05-14 15:41:24 +02:00
83bdb1a515 [DOCS] New troubleshoot password authentication failed for user "postgres" (#12031)
# Introduction
Shorter and clearer issue
https://github.com/twentyhq/twenty/issues/11868
close https://github.com/twentyhq/twenty/issues/8701
2025-05-14 15:17:06 +02:00
8ef9109925 Fix table click outside (#12038)
Fixes #12037 
Follow up on #12011

Make `RecordTableBodyFocusClickOutsideEffect` also be available for
`RecordIndexHotkeyScope.RecordIndex`
2025-05-14 13:08:06 +00:00
a4c56bd7fb 960 api rest batch create not working (#12028)
- fix batch endpoint
- migrate batch endpoint to the rest api v2
- add new integration test for batch endpoints
2025-05-14 14:44:04 +02:00
0766e73fc4 Fix filtering on grouped table view (#12029)
# Fix filtering on grouped table view

Fixes #11776 
This PR fixes the filtering issue on the grouped by column in the table.
State filters were overwritten by group filters.

- Implemented a new `combineFilters` utility function that properly
merges multiple filter objects using AND logic
- Added tests
- Modified `useFindManyRecordIndexTableParams` to use the new utility
instead of directly merging filter objects

## Before


https://github.com/user-attachments/assets/45d51535-ecbc-4cfd-b523-37e72aafc723


## After


https://github.com/user-attachments/assets/70416779-9a9c-4972-82ed-73ad98b0234f
2025-05-14 13:30:37 +02:00
2aa5db580b fix 11997 (#12018)
addressing:
https://github.com/twentyhq/twenty/issues/11997#issuecomment-2875772322
<img width="922" alt="Screenshot 2025-05-13 at 22 52 28"
src="https://github.com/user-attachments/assets/dc3b5fdd-b81b-4732-94f3-2ef2eb0012c2"
/>
before: 


https://github.com/user-attachments/assets/b55bf77e-99bf-485f-bcfa-5d311e7d2bd0

after: 


https://github.com/user-attachments/assets/70fb80b2-ce9f-4a8a-ac5d-d8c793c023be

### Some other issues I found

- On clicking clear, nothing happens

Before:


https://github.com/user-attachments/assets/01e937bb-b4d4-4296-baa7-ec1602de2cc9

After:


https://github.com/user-attachments/assets/8e4e5022-fe32-44fe-a7e4-5c98a7f3c2fa


- same behaviour for inline cell DateInput: 


https://github.com/user-attachments/assets/787354e5-b50a-457c-a392-4779270e2832


### Notes
The root issue seems to be that ViewBarFilterDropdown sets a fixed width
of 208px, which isn’t enough for the calendar to render correctly - it
ends up cropping the content. The fix here is more of a workaround than
a deep fix: I’ve adjusted styles to avoid the cropping, but it might be
worth revisiting how we handle sizing for filter dropdowns in general.

cc @lucasbordeau - thoughts?
Related commit:
afea017c12

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
2025-05-14 16:35:51 +05:30
9c2b88870f Improve sentry grouping (#12007)
This PR attemps at improving sentry grouping and filtering by 
- Using the exceptionCode as the fingerprint when the error is a
customException. For this to work in this PR we are now throwing
customExceptions instead of internalServerError deprived of their code.
They will still be converted to Internal server errors when sent back as
response
- Filtering 4xx issues where it was missing (for emailVerification
because errors were not handled, for invalid captcha and billing errors
because they are httpErrors and not graphqlErrors)

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2025-05-14 09:00:06 +00:00
6a1da5fe53 Make the default view names consistent (#12022) (#12023)
Fixes #12022

## What changed

Now the default names given to views are consistent for People,
Companies and Opportunities

## Before

Some say "All", others say "Some {object name}"


![Image](https://github.com/user-attachments/assets/4233f793-55e1-4566-b9b3-08a6f136dd53)


![Image](https://github.com/user-attachments/assets/29b1af5c-487e-4593-ba40-86163b518ca7)


![Image](https://github.com/user-attachments/assets/81fc1933-0e13-4144-914e-0d99a44db8e4)


![Image](https://github.com/user-attachments/assets/9439fc64-e6e0-4a04-ba28-13c3954a1aa1)

## After


![Image](https://github.com/user-attachments/assets/e88288ac-3a41-4810-bb2a-8e91c937ed6c)


![Image](https://github.com/user-attachments/assets/8fc353e3-5a7c-42ac-88d3-b7014c0fd02c)
2025-05-14 10:44:14 +02:00
4d2e431277 959 api rest startingafter and endingbefore not working properly with orderby (#12012)
Fixes https://github.com/twentyhq/core-team-issues/issues/959
2025-05-14 10:41:56 +02:00
e835e0ad64 Fix UI not being refreshed after grouping by None in the table (#12013)
Fixes https://github.com/twentyhq/twenty/issues/11719

Before:


https://github.com/user-attachments/assets/9350d20c-e782-4bf4-9e24-bc7dd7f3d03b


After:


https://github.com/user-attachments/assets/d452fd54-63f7-4519-b70f-5c380b7dd8da
2025-05-14 08:14:19 +00:00
fcac7b8a40 docs: update admin panel access property name in upgrade guide (#12019)
## Changes
- Updated the property name in the upgrade guide to reflect the
permission split in Admin Panel:
  - `canImpersonate`: only provides access to impersonate functionality
- `canAccessFullAdminPanel`: provides access to all other admin panel
features
2025-05-13 21:59:43 +02:00
c0b2d400d8 [DRAFT]: Add full Dev Workspace seeding to Preview Env Keep-Alive workflow (#12020)
does this work?

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2025-05-13 21:58:36 +02:00
0202586d36 Fix message channel processing (#12021)
Several users have complained about not being able to read their emails
anymore.

This is because the find-messages post query hook is expecting
ObjectRecord[] as an input but is actually getting a graphql Connection

Typing was wrong. This PR fixes the typing and make sure the post query
hook always get an ObjectRecord[]
2025-05-13 21:16:23 +02:00
c0a0214879 delete attachment when file is removed from activity body (#11952)
Using useEffect triggered at ActivityRichTextEditor unmount, to delete
attachments only when note is closed (and not when file block is deleted
during note update to keep command + z shortcut)

closes : https://github.com/twentyhq/twenty/issues/11229
2025-05-13 19:18:38 +02:00
3fe9c79967 docs(website): fix typos (#12016) 2025-05-13 19:16:44 +02:00
6ac82b9591 [DOCS] Upgrade guide 0.53 (#12015) 2025-05-13 18:35:09 +02:00
fc4d313907 Remove duplicated position for task's status field (#11998)
In this PR:

- Set the default position for the DONE option of the task's status
option to `2` instead of `1`, which was the same as `IN_PROGRESS`
option's position.
- Write a command to prevent position duplicates in the database for the
task's status field.

What I've checked before setting this PR as ready to be reviewed:

- De-duplicating the position solves the issue and it's possible to edit
the field (solves the related issue)
- The upgrade command de-duplicates the position for each workspace.
There are no more DONE options with `position=2`. I ran the upgrade
command on the `database-snapshot-manager` dataset.
- Suspended workspaces aren't fixed

---

To test the script:

```ts
const scannedPositions = new Set();
let biggestPosition = -1;

// Sort options by position for consistent processing
const sortedOptions = [
  { name: 'a', position: 2 },
  { name: 'b', position: 1 },
  { name: 'c', position: 1 },
  { name: 'd', position: 2 },
].sort((a, b) => a.position - b.position);

for (const option of sortedOptions) {
  if (scannedPositions.has(option.position)) {
    option.position = biggestPosition + 1;
  }

  biggestPosition = Math.max(biggestPosition, option.position);
  scannedPositions.add(option.position);
}

console.log('Sorted options:', sortedOptions);
```

Closes https://github.com/twentyhq/twenty/issues/11790
2025-05-13 16:21:47 +00:00
dfe8011948 Fix side panel click outside (#12011)
Fixes https://github.com/twentyhq/twenty/issues/11988

## Description

The issue came from `RecordTableBodyFocusClickOutsideEffect`.
When clicking outside the table with the side panel opened, two click
outside listeners were triggered: the one which closes the side panel
and the one which leaves the table focus. There was a race condition and
the leave table focus was executed first, changing the hotkey scope. The
side panel closure wasn't executed because the hotkey scope was wrong.

## Fix
Only leave the table focus if the hotkey scope is `TableFocus`


## Videos

Before:


https://github.com/user-attachments/assets/0ea666a6-c212-4b94-b89b-49211d18a13b


After:


https://github.com/user-attachments/assets/2ec6d593-ff65-4cbf-ac92-a0cfbd7dfd8b
2025-05-13 17:56:04 +02:00
3efdbed5d1 Fix clickhouse connection 2 (#12010)
Revert changes in #12006 as it might still be handy to have the DB
auto-created (e.g. for test or self-hosting users), but if there is a
permission exception we will just ignore it and assume the database
exist in that case
2025-05-13 16:52:07 +02:00
cec381c4de i18n - translations (#12009)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-05-13 16:26:27 +02:00
e94d90894b Fix relation deletion (#12008)
## What
This PR fixes a regression tied to the new relation format refactoring.
I'm also slightly improving the performance by decreasing the number of
queries.

## Considerations
1. I've started adding an integration test to cover relation creation
and deletion but we are still using the r`elation-metadata.service` to
create a relation and the `field-metadata.service` to delete it. As we
plan to fully deprecate the `relation-metadata.service`, I did not want
to invest into writing test tooling to change it in a few weeks so I've
reverted the test

2. We are still maintaining relationMetadata table up-to-date (so
deleting them when we delete the field). relationMetadata full
deprecation is up coming but I'm waiting a bit so we don't have breaking
changes in 0.53
2025-05-13 16:22:59 +02:00
bed33b00b9 adapt billing banners according to user's permissions (#12005)
closes https://github.com/twentyhq/twenty/issues/11951
2025-05-13 16:18:57 +02:00
fb615ed201 Remove clickhouse check requiring elevated permissions (#12006)
This check was un-necessary, it will fail after in anycase. Let's leave
it to the user to create the DB
2025-05-13 15:36:55 +02:00
efffac2a1a Deleted view disable delete btn (#11990)
This PR updates the defaultRecordActionConfig for the
SingleRecordActionKeys.DELETE action. A condition
!isSoftDeleteFilterActive was added to the shouldBeRegistered function
to ensure the delete button is only visible when the deleted records
view is not selected.

This prevents the delete button from appearing when viewing deleted
records.

#11974  

![Screenshot 2025-05-12 at 9 41
30 PM](https://github.com/user-attachments/assets/ab7c1f61-d5ab-4315-9f39-50108d11438c)

![Screenshot 2025-05-12 at 9 42
11 PM](https://github.com/user-attachments/assets/82a9843b-4d5e-406c-8186-dce5b7b16bf3)
2025-05-13 14:00:15 +02:00
45d4845b26 Remove old relations (#11993)
This is a first PR to remove old relation logic

Next steps:
- remove relationMetadata from cache
- remove relationMetadata table content and structure
- refactor relationDefinition to leverage field.settings instead
2025-05-13 11:28:22 +02:00
9ed6edc005 Twenty config integration tests + conversion refactor (#11972)
- In this PR the default value of IS_CONFIG_VARIABLES_IN_DB_ENABLED has
been changed to true,
    
- This is my first time writing integration tests, so I’d appreciate a
thorough review. :)
I’ve tried to follow the existing test patterns closely, but there might
be some small mistakes I may have missed.
Also let me know if I have missed any important test cases that should
be tested

UPDATE - 
### Config Value Converter Refactoring
- Created a centralized type transformers registry with bidirectional
validation
- Refactored ConfigValueConverterService to support validation in both
directions:
- Maintained existing DB-to-app conversion behavior
- Added validation for app-to-DB conversion
- Added integration tests to verify validation works in both directions

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2025-05-13 13:34:27 +05:30
df3db85f7f Implemented LINKS and EMAILS sub-field fitering (#11984)
This PR introduces LINKS and EMAILS sub-field filtering. It's mainly
about the implementation of secondaryLinks and additionalEmails
sub-fields, which are treated like additionalPhones.

There's also a refactor on the computeViewRecordGqlOperationFilter, a
big file that becomes very difficult to read and maintain. This PR
breaks it down into multiple smaller utils. There's still work to be
done to clean it as it is a central part of the record filter module,
this PR lays the foundation.
2025-05-12 21:30:53 +02:00
0fb5ea7d06 Sync-metadata swallow FK_e078063f0cbce9767a0f8ca431d (#11991)
# Introduction
Encountering a blocking issue due to legacy upgrade history in staging
due to relation refactor
For the moment ( release 0.53 ) swallowing
@charlesBochet 

## How to test
```ts
checkout v0.52.11
yarn
database:reset
checkout 0.53
yarn
build server
migrate
upgrade
```
2025-05-12 17:14:45 +00:00
4d352cb4e4 Keyboard Navigation and Shortcuts Implementation on the board (#11930)
# Keyboard Navigation and Shortcuts Implementation on the board

This PR implements keyboard navigation and shortcuts for the Record
Board component, enabling users to navigate and interact with board
cards using keyboard inputs.

## Key changes

### Navigation Architecture
- Added `useBoardCardNavigation` hook for directional navigation (arrow
keys)
- Implemented scroll behavior to automatically focus visible cards
- Created card focus/active states with component-level management

### State Management
- Added new component states: `focusedBoardCardIndexesComponentState`,
`activeBoardCardIndexesComponentState`,
`isBoardCardActiveComponentFamilyState`
- Extended index tracking with column/row position indicators
- Create hooks to manage these states

### Hotkey Implementation
- Created new `RecordBoardHotkeyEffect` component for hotkey handling
- Added `BoardHotkeyScope`
- Implemented Escape key handling to clear selections
- Replaced table-specific `TableHotkeyScope` with more generic
`RecordIndexHotkeyScope`. This is because, before, the hotkey scope was
always set to Table inside the page change effect, and we used the table
hotkey scope for board shortcuts, which doesn't make a lot of sense.
Since we don't know upon navigation on which type of view we are
navigating, I introduced this generic hotkey scope which can be used on
the table and on the board.

### Page Navigation Integration
- Modified `PageChangeEffect` to handle both table and board view types
- Added cleanup for board state upon navigating away from record pages

### Component Updates
- Updated `RecordBoardColumn` to track indexes for position-based
navigation
- Added `RecordBoardScrollToFocusedCardEffect` for auto-scrolling to
focused cards
- Added `RecordBoardDeactivateBoardCardEffect` for cleanup

This implementation maintains feature parity with table row navigation
while accounting for the 2D navigation needs of the board view.

## New behaviors

### Arrow keys navigation


https://github.com/user-attachments/assets/929ee00d-2f82-43b9-8cde-f7bc8818052f


### Record selection with X


https://github.com/user-attachments/assets/0b534c4d-2865-43ac-8ba3-09cb8c121f06


### Command + Enter opens the record


https://github.com/user-attachments/assets/0df01d1c-0437-4444-beb1-ce74bcfb91a4


### Escape unselect the records and unfocus the card



https://github.com/user-attachments/assets/e2bb176b-b6f7-49ca-9549-803eb31bfc23
2025-05-12 19:02:14 +02:00
4e39ef832c Fix 0.53 upgrade commands (#11987)
In this PR:
- fixes
[0-53-upgrade-search-vector-on-person-entity.command.ts](https://github.com/twentyhq/twenty/pull/11987/files#diff-d97fb2aefe44ac5d849fb7e29b8eaa1ca7c0f109d1b43fbdf87723b05dd22f58)
small mistake
- adding Cascade DELETE on fieldMetadata.relationTargetObjectMetadataId
(like we have on fieldMetadata.objectMetatadaId)
- enabling IsNewRelationEnabled in 0.53 upgrade
2025-05-12 17:26:35 +02:00
a942642b83 Untitled records for CreatedBy (#11914)
# Display "Soft-Deleted Workspace Members" in Actor Field Display

Reminder of the issue :
<img width="154" alt="Screenshot 2025-05-07 at 12 11 59"
src="https://github.com/user-attachments/assets/168f8743-2684-4d9a-b1a4-e86bb335f7a4"
/>

- `ActorFieldDisplay` component : display soft-deleted members
- `UserService` includes soft-deleted records when fetching workspace
members. This is the tricky part : do we want that for all workspace
members or maybe i could create another property dedicated to workspace
members and softdeleted ones. To be discussed

Result looks like this (we loose the source and the context in this
impleentation)
<img width="114" alt="Screenshot 2025-05-07 at 12 05 28"
src="https://github.com/user-attachments/assets/3cdddd91-454f-4e96-8d6d-6fe671658945"
/>


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


Another way we could also get into :
We could also, when a workspace user is softDeleted, change the current
implementation : we could avoid to delete the ActorMetadata like
CreatedByName (and context and source) in the "Person" table.

It would look more like this
<img width="111" alt="Screenshot 2025-05-07 at 12 06 16"
src="https://github.com/user-attachments/assets/daa4ece2-200a-41f0-ba24-177375c72983"
/>

However, this implementation is requires more work, and IMO harder to
maintain since is decouples completely the record from the workspace
member. This could be an issue in case we want tohard delete a user, or
decide another logic to display the Actor name.

Since the usecase should be pretty rare, I chose the first one but
willing to discuss it

---------

Co-authored-by: prastoin <paul@twenty.com>
2025-05-12 15:54:56 +02:00
679530020c increase recordCard field hovering zone width + click (recordCard and summaryCard) (#11983)
PR preview


https://github.com/user-attachments/assets/7d90f384-6bee-41d7-9aec-cadb434e7db6



closes https://github.com/twentyhq/twenty/issues/10561
2025-05-12 14:13:59 +02:00
e87c6236ca calendar sync failed (#11970)
# TLDR 
fix bug due to some event properties coming from the google calendar API
containing weird characters like this
"\u0000�4\u000b\u00042��K\u0001�z,\u001cm�",

it made the Postgres select and insert operator fail



## Details
We can have event properties (like cal UID below) encoded in a strange
way. From my research, the character \u0000 comes from `C` language to
signal end of line. It is wrongly interpreted by Postgres so must be
escaped. I decided to remove all possibility of failure with this regex
`[^\x20-\x7E]` basically "any character that is not a printable ASCII
character"

```
[
  "5foijj28qb8smqiafjablo17vd@google.com",
  "\u0011�\"�f�\\\u0019G_=��\u0005]x",
  "?}|��\f}l��+�弴�",
  "%���?t\u0007��n\u001e\u000eY�T<",
  ".\u0011�\u0016�!�\u000eIǹ� ��\u001f",
  "!h\u0004��D�6���h�]E",
  "(�CX]�Q�7�^��n\u0006�",
  "_040000008200E00074C5B7101A82E0080000000070105B958DEFD801000000000000000010000000EA30DB22E888B943A8EE0AD483F8DB35",
  "\t�N�#�D��Ic�h",
  "+�)�H���jJ|Ժ�'�",
  "_040000008200E00074C5B7101A82E0080000000070A54736C6EED8010000000000000000100000006502334AFE61904595C2831FA4391034",
  "_040000008200E00074C5B7101A82E0080000000072C80C3590EFD8010000000000000000100000001BA9FD5B330C1A4D85462AC9D70B9D9D",
  "sg�fvUa:St>-<�d\u0006",
  "\u0017ڦ��_\u001e\u001fGm-1����",
  "_040000008200E00074C5B7101A82E00800000000F0F4F01F4EF0D8010000000000000000100000004C11CE0950C85549B79C456C13987AB8",
  "$�����\u0007V\u0007��\u001e�OLN",
  "_040000008200E00074C5B7101A82E00800000000341DA81151EDD8010000000000000000100000007453CEFB19AA2D4899B17F0BDB000493",
  "_01C756CA-98DC-4799-9F06-883A540A065C",
  "_040000008200E00074C5B7101A82E00800000000919548BBF1EDD80100000000000000001000000050AE1E41F3CD314CA9215F193EBE1D39",
  "_040000008200E00074C5B7101A82E0080000000039CF64D718EDD801000000000000000010000000B3824EF0711436488CB5459BE83733B1",
  "_040000008200E00074C5B7101A82E00800000000C50BDADCB5E4D8010000000000000000100000005B95FE762B2EF84B9C5AC53907B7E5E8",
  "�Spx�\u0003ve��ss�X��",
  "\b���>\u0013̈�ыh��0�",
  "_040000008200E00074C5B7101A82E008000000005BCD492230E8D801000000000000000010000000B243A9CE99E94C4DAD201129A8F2A2F7",
  "_040000008200E00074C5B7101A82E008000000009B540B82D1DCD801000000000000000010000000B4AFC9825D94994AA6C528C953BD3D96",
  "_040000008200E00074C5B7101A82E008000000000D39EABDB7E4D801000000000000000010000000CD07BA2D05E61B47A597EE538ECE8CA5",
  "\u0016���\u0003inv�=O����",
  "4?b�-���\u001c\u0013ת�E�p",
  ">\u0000\u0015-;_�^�W&�p\u001f�",
  "_040000008200E00074C5B7101A82E008000000006258818C85D9D80100000000000000001000000003346C625768FE43AF3F8D09917CA3C9",
  "+K��ٔ�\u0006�\u0018G\u000b\u0000�s\u000e",
  "/\f�\rj�IOD�g脅��",
  "_68d820f9-e2c1-4d9a-bf61-83e4957c8261",
  "xĠ�W4>���t�\u001d���",
  "_040000008200E00074C5B7101A82E008000000003F1F314328E3D8010000000000000000100000002C8DC60F5369F44DA2B066441F882B35",
  "_040000008200E00074C5B7101A82E008000000006DFCC204FDDED80100000000000000001000000046ECD444737D2E4992C349B2EA05637F",
  "_1FF7C1BB-4E1A-485F-ADD0-5C4768601179",
  "_040000008200E00074C5B7101A82E00800000000A0AA1223EFD3D801000000000000000010000000C83B72C2B424944199F3353D1442B27E",
  "_040000008200E00074C5B7101A82E0080000000063D101EB06E4D801000000000000000010000000E489F61C89B8914BA6F8C8A2606405FE",
  "\u0011��f�\"�b���rB�[�",
  ";t��\u001d\u001euDY+T\u001d��v",
]
```



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

Fixes
https://twenty-v7.sentry.io/issues/6568530279/?environment=prod&project=4507072499810304&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D%20b09d7a84-e6bc-45cf-b3ca-1e6047dddeed&referrer=issue-stream&stream_index=0


### Edit :
Changed the regex to match the chars to remove from 
`[^\x20-\x7E]` to `replace('\u0000', '');`
2025-05-12 14:09:57 +02:00
a4656b415c Improve Form Layout + add drag and drop (#11901)
https://github.com/user-attachments/assets/cf542921-9354-4f7b-b6e8-061ebcaa9a9b

Closes https://github.com/twentyhq/core-team-issues/issues/887
Closes https://github.com/twentyhq/core-team-issues/issues/889
Closes https://github.com/twentyhq/core-team-issues/issues/890
2025-05-12 12:09:46 +02:00