Commit Graph

3763 Commits

Author SHA1 Message Date
e92e094a81 feat(approved-access-domain): QA (#10681) 2025-03-06 07:35:10 +01:00
1ad08cdbe9 Save the trigger's default name (#10657)
Closes https://github.com/twentyhq/core-team-issues/issues/511
2025-03-05 18:19:52 +01:00
3cd52b052e feat: files visiblity with file configuration (#10438)
Ref: #10404 

- Added `FileFolderConfig` with `isPublic` key.
- Updated `file-path-guard.ts` to `ignoreExpiration` to validate the
token if `isPublic` is `true`.
- Token verification ignores expiration, assuming it's used to fetch
file metadata with a required workspaceId as we cannot remove the token
as we will loose the `workspaceId`.

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2025-03-05 16:17:24 +00:00
f4fcf39eb5 [permissions] Prepare for roll-out (#10676)
Closes https://github.com/twentyhq/core-team-issues/issues/469 and
https://github.com/twentyhq/core-team-issues/issues/500

In this PR
1. stop conditioning permission initialization for a workspace to env
variable value. Instead we want to create and assign permissions and
roles in all new workspaces. For now that will be totally silent.
2. temporarily, the default role is set to the admin role for new
workspaces. it will also be the case for existing workspaces through the
backfill command. Member role is still being created though. (when we
will do the final roll-out we will update this so that future workspaces
have the member role as default role. our goal here is not to break any
current behaviour for users, that today have all have the equivalent of
admin rights).
2025-03-05 16:47:41 +01:00
91e714969f Fix REST API when metadata cache not found (#10669)
## Context
When REST API calls fail due to metadata cache version not found, we
throw an exception without trying to recover.
In Graphql implementation, the exception is thrown after recomputing the
cache. This PR implements the same logic for REST for users only user
the REST API.
2025-03-05 16:47:02 +01:00
55a45c50cc microsoft sync failed (#10381)
This PR is supposed to solve an issue with the syncrhonisation of
messages, specifically with microsoft driver. Microsoft calls don't need
access_Token so refreshing toekns was not implemented.

However, microsoft rely on its client which calls its refresfh_token,
and I might have missed some underlying dependency from microsoft
impelemtation so I setup the access token process to refresh it

Needs a talk before to be merged

Fix : https://github.com/twentyhq/twenty/issues/10367

EDIT:
it was a problem with microsoft making refreshtoken expire (contrarily
to google) which needs to be handled.
2025-03-05 15:22:51 +00:00
d61f48d7ee Add icons next to permission settings labels (#10673)
## Context
as title

Before
<img width="842" alt="Screenshot 2025-03-05 at 15 11 19"
src="https://github.com/user-attachments/assets/1c228f29-368b-460d-8067-90bb2afc6e41"
/>

After
<img width="862" alt="Screenshot 2025-03-05 at 15 09 51"
src="https://github.com/user-attachments/assets/e7f9d02a-0c4a-49f3-977f-a0d6bef20862"
/>
2025-03-05 16:11:15 +01:00
f34b59b6b6 Fix view open in settings not saving (#10674)
This PR removes the legacy useGetCurrentView hook that still returned
view with combined filters and sorts, which we don't use anymore.

This allows to remove a bug where we couldn't select the "open in"
settings of a view.
2025-03-05 15:52:37 +01:00
2ed055ecb4 update path for copying pg backup file to docker host folder (#10608)
### Update of path for copying postgres dumpfile to docker host folder.

The original path stated in the upgrade guide for self hosted docker.
(Option 2) Database migration, contains a wrong path to be able to copy
the backup file. The command results in a "there is no such file"
I replaced the  line 
**docker cp twenty-db-1:/databases_backup.sql .**   
with 
**docker cp twenty-db-1:/home/postgres/databases_backup.sql .**  
and it worked as it should.

So this is the edit of the correct path on the user guide on the webpage
2025-03-05 15:28:41 +01:00
4d7e52ef25 deprocate getProductPrices query in front end (#10397)
**TLDR:**
Deprecate getProductPrices in the frontEnd and replace it with
BillingBaseProductPrices.

**In order to test:**

- Have the environment variable IS_BILLING_ENABLED set to true and add
the other required environment variables for Billing to work
- Do a database reset (to ensure that the new feature flag is properly
added and that the billing tables are created)
- Run the command: npx nx run twenty-server:command
billing:sync-plans-data (if you don't do that the products and prices
will not be present in the database)
- Run the server , the frontend, the worker, and the stripe listen
command (stripe listen --forward-to
http://localhost:3000/billing/webhooks)
- Buy a subscription for acme workspace the choose your plan should be
using the new front end endpoint
2025-03-05 15:27:34 +01:00
e838dfc68b Fix advanced filters (#10665)
This PR partially fixes advanced filters that were not working even with
feature flag activated.

Bugs fixed here : 

- Advanced filters are not applied
- Root advanced filters cannot be created
- Cannot close advanced filters dropdown
- Can create multiple times the same non-advanced filter (reserved for
advanced filters)

upsertRecordFilter and removeRecordFilter have been refactored to take
record filter id instead of field metadata id, because the user should
be allowed to apply multiple filters for the same field.

We now base view filter CRUD directly on id, otherwise it could lead to
inconsistencies between advanced filters and simple filters.

This PR also refactors an important hook :
computeRecordGqlOperationFilter, so that it takes an object instead of
multiple params.

There are still bugs left, they will be taken in other PRs.
2025-03-05 14:01:07 +00:00
fd8b130df6 [Fix] Read only users should not be able to open a Relation picker (#10666)
## Context
ActivityTargetsInlineCell was not using the useIsFieldValueReadOnly hook
but a dedicated prop instead. To align with the rest of the
implementation I've updated that part of the code however we still want
the table/kanban views to always be in read-only mode regardless of the
hook logic so I've updated the hook to take the ContextStoreViewType
into account.
2025-03-05 13:56:58 +01:00
f3e667a651 496 add open in full page button on command menu record page (#10659)
Closes https://github.com/twentyhq/core-team-issues/issues/496

I upgraded react tabler icons to the latest version to be able to use
the newest icons.

The option menu was no longer accessible on right drawer record pages,
this pr fixes this and creates a new button which opens the record show
page.
This button is accessible via the shortcut `Command` + `Enter`


https://github.com/user-attachments/assets/570071b2-4406-40bd-be48-a0e5e430ed70
2025-03-05 12:02:31 +01:00
03c945ef97 i18n - translations (#10661)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-04 19:37:02 +01:00
a60f7586f3 i18n - translations (#10660)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-04 19:21:32 +01:00
6a0fcb8c8c i18n - translations (#10658)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-04 18:19:54 +01:00
5d2be60758 Various frontend fixes for roles pages (#10654) 2025-03-04 18:09:23 +01:00
4bf8af472a i18n - translations (#10656)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-04 17:48:45 +01:00
b83d8a4b27 [BUG] Object Settings Model tabs list heigh value 0 (#10646)
# Introduction
While working on https://github.com/twentyhq/core-team-issues/issues/355
encountered a recent regression:

![image](https://github.com/user-attachments/assets/654349a0-fd3d-4e17-a503-b942165f1771)

I honestly cannot explain this regression, should take time to do some
commits dichotomy in order to identify the problematic one but it feels
overkill

## Remarks
- Modified a common components please while reviewing have a look to
other of its invokation too ( others settings page )
2025-03-04 17:40:17 +01:00
9da973592d 460 create restore one and restore many records action (#10647)
Closes https://github.com/twentyhq/core-team-issues/issues/460


https://github.com/user-attachments/assets/5271e56d-bf67-49cc-a8da-e25c12171e2e
2025-03-04 17:27:14 +01:00
d6171c66df [BUGFIX] Dynamic default body background depending on device preferences (#10626)
# Introduction
close #9965 

When landing on twenty you should be able to see a white screen
flickering if you had setup dark mode.
This is because before the SPA has been loaded we're not displaying
anything, which in a white screen from the browser.
During this period we should display a background color following the
user's device theme.

## Reproduction
In order to reproduce this behavior define a fast 4G connection from
your network console.

## Cons
Device mode might not the one chosen afterwards when the user has been
authenticated
=> We should store appearance settings in the local storage in order to
optimistically render the default "loading" background ( wouldn't be
100% bullet proof for instance if the user is now unauth for some reason
)

Body background will be override by theme after app bootstrap
2025-03-04 15:54:16 +01:00
f6bc567aaf i18n - translations (#10652)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-04 15:34:31 +01:00
136feb57a7 i18n - translations (#10651)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-03-04 15:20:11 +01:00
19fce0c77d Fix gap between releases and logout (#10649)
## Context
A gap was introduced when we refactored the menu rendering as Logout
menu item was handled differently in its own NavigationDrawer section
which added the gap.
To fix that we are moving the Logout to the menu rendering logic in
useSettingsNavigationItems hook, allowing items to have onClick prop
instead of a path.

Before
<img width="213" alt="Screenshot 2025-03-04 at 14 36 55"
src="https://github.com/user-attachments/assets/23b63673-a9c4-47de-af71-7dda74469e9f"
/>

After
<img width="225" alt="Screenshot 2025-03-04 at 14 36 38"
src="https://github.com/user-attachments/assets/053c0c0d-8876-40b6-ae2c-b68124393f7f"
/>
2025-03-04 14:58:36 +01:00
696c510933 Removing empty handles from MessageWithParticipants (#10625)
fixes https://github.com/twentyhq/twenty/issues/10623
2025-03-04 14:53:24 +01:00
150e6bb17a Prepare docker-compose.yml for mail and calendar variables (#10464)
Adding the placeholders for the environment variables related to setting
up the mail and calendar sync. This will make the Twenty setup easier
for new users.

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2025-03-04 14:30:04 +01:00
d151b1329c Generate fake form from metadata (#10641)
- add name to form field metadata
- extract field generation from object record schema
- use field generation to generate field from metadata
- add tests
2025-03-04 13:25:29 +01:00
aba20dae11 Implemented CRUD for view filter group and removed old states (#10590)
This PR implements CRUD for view filter groups with the new logic as
already done for view filters and view sorts.

It also completely removes the old combined view filter group states and
usage.

This PR is quite big but the impact is limited since it only changes
advanced filters module, which is under feature flag at the moment, and
it is already in a broken state so unusable, even if someone activates
the feature flag.
2025-03-04 13:16:02 +01:00
9d80d2a8ef i18n - translations (#10644)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-03-04 11:35:27 +01:00
be1073a2ef Fix settings page container (#10645)
This was changed in https://github.com/twentyhq/twenty/pull/10556 and
was not needed. Reverting to fix the roles page.

## Before

<img width="1155" alt="Screenshot 2025-03-04 at 11 30 30"
src="https://github.com/user-attachments/assets/21ae9c02-7c37-46e1-be40-e69ae809ea80"
/>

## After
<img width="1128" alt="Screenshot 2025-03-04 at 11 30 09"
src="https://github.com/user-attachments/assets/956a6222-7925-4aa2-9adb-efd158189368"
/>

Also checked if security page is still working
<img width="1136" alt="Screenshot 2025-03-04 at 11 30 19"
src="https://github.com/user-attachments/assets/0c30101b-51ae-4755-b5a7-d564fb093160"
/>
2025-03-04 11:35:00 +01:00
85f6597d4c 0.43 changelog (#10643) 2025-03-04 11:22:56 +01:00
ec4b6c9aa2 Fix: security and developers path should not be accessible to non-admin users (#10628)
https://github.com/twentyhq/core-team-issues/issues/468
2025-03-04 10:51:06 +01:00
ad628c1266 [ENH] Do not fail on missed cache within server commands (#10634)
Avoid critical failure if cache is missed when interacting with the
twenty-orm in the upgrade commands
2025-03-04 10:28:21 +01:00
156530ff5e i18n - translations (#10639)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-04 09:12:57 +01:00
749caf5336 i18n - translations (#10638)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-04 08:20:27 +01:00
327f0cd370 Health status worker metrics improvements (#10442)
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2025-03-04 08:17:12 +01:00
41db10daff Revert "Remove reference to data-testid from styling" (#10635)
Reverts twentyhq/twenty#10407
2025-03-03 19:15:12 +01:00
e8b6b1b941 fix(): several ui improvements (#10556)
Close #10531

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Etienne <45695613+etiennejouan@users.noreply.github.com>
Co-authored-by: Raphaël Bosi <71827178+bosiraphael@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-03 17:06:16 +01:00
a5d60919a7 Create import csv action (#10624)
Closes https://github.com/twentyhq/core-team-issues/issues/63

This PR:
- Creates an **Import csv** action
- Allows the import of notes and tasks
- Removes the import action from the index option menu
- Adds export action when only one record is selected
- Adds see deleted record action to workflow objects
2025-03-03 17:03:53 +01:00
3d56e5394f Create a JSON tree visualizer (#10579)
Inspired by
https://github.com/reduxjs/redux-devtools/tree/main/packages/react-json-tree

- Created a reusable JSON tree visualizer
- For now, the visualizer is only meant to render raw JSON. It can't
determine if a string is a UUID and display a specific icon.

**The visualizer is not rendered in the app. You must use Storybook to
review it.**

## Demo



https://github.com/user-attachments/assets/ffd4fc94-b33d-4481-9ac1-fa3a348b7c81
2025-03-03 16:55:16 +01:00
2325e0ae0f fix(): include workspace in reset password flow (#10617)
Fix #10586
2025-03-03 16:47:33 +01:00
b8d944bd6e fix try catch logic in upgrade command (#10616) 2025-03-03 16:37:39 +01:00
9300f0a29b Fix: Prevent Multiple Search Icons in Command Menu (#10424)
Description:
This PR fixes an issue where clicking the search button multiple times
caused multiple search icons to appear in the search bar. The issue was
caused by continuously appending new items to the navigation stack
instead of replacing the existing search page entry.

Before:


https://github.com/user-attachments/assets/1abc4223-6295-4eea-b276-00e4539a2992



After:



https://github.com/user-attachments/assets/04d3a306-f3ca-4d3d-9028-9e4b4574e6a6

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2025-03-03 15:08:34 +00:00
cb3b0633b5 [FIX]: Overflow issue in delete record popup (#10417)
#10411
**Issue**: After right-clicking on deleted record, popup is cut
**Solution**: Added text-overflow ellipsis

previous behaviour: 


![image](https://github.com/user-attachments/assets/415e3603-5181-4656-a719-a5898e02128d)

fix:


![image](https://github.com/user-attachments/assets/a5178990-df14-45b4-a5cd-0b0261990407)

![image](https://github.com/user-attachments/assets/bdbc385f-4a92-4049-b0bc-70f6a38afeac)

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2025-03-03 15:08:06 +00:00
44018911f2 Fix buttons size (#10620)
The button size attribute was removed accidentally in this PR
https://github.com/twentyhq/twenty/pull/10536, I'm putting it back.
All the buttons were 32px instead of 24px for the small ones.
2025-03-03 14:02:30 +00:00
83899ff26b feat(button): add accent prop and disable pointer events (#10618)
Added an accent prop to the StyledButtonWrapper for additional styling
capabilities. Also disabled pointer events on ButtonIcon to prevent
interference during loading states.
2025-03-03 13:59:55 +00:00
d2ad23d1cf fix workspace member search (#10613) 2025-03-03 11:57:07 +01:00
c5795b7325 Fixed board total count on view picker button (#10612)
This PR adds a missing call to `setRecordIndexEntityCount` during board
data loading.
2025-03-03 11:25:48 +01:00
51c34b77d9 feat(twenty-front/Button): add loading state on Button (#10536) 2025-03-03 11:04:32 +01:00
2e4c596644 [TEST] Covering useDeleteOne relations optimistic cache behavior (#10238)
## Introduction
Added coverage on the `useDeleteOneRecord` hooks, especially its
optimistic behavior feature.
Introduced a new testing tool `InMemoryTestingCacheInstance` that has
builtin very basic expectors in order to avoid future duplication when
covering others record hooks `update, create, destroy` etc etc

## Notes
Added few comments in this PR regarding some builtin functions I've
created around companies and people mocked object model and that I think
could be cool to spread and centralize within a dedicated "class
template"

Also put in light that unless I'm mistaken some tests are running on
`RecordNode` and not `RecordObject`

Took few directions on my own that as I always I would suggestion nor
remarks on them !

Let me know

## Misc
- Should we refactor `useDeleteOneRecord` tests to follow `eachTesting`
pattern ? => I feel like this is inappropriate as this hooks is already
high level, the only plus value would be less tests code despite
readability IMO
2025-03-03 10:22:26 +01:00