Commit Graph

3782 Commits

Author SHA1 Message Date
6b4d3ed025 i18n - translations (#10714)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-06 23:33:41 +01:00
15f5a377cc i18n - translations (#10713)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-06 23:20:05 +01:00
d2a0376a6f i18n - translations (#10712)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-06 21:46:03 +01:00
4b19f7f33c i18n - translations (#10711)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-06 21:32:50 +01:00
3061576302 Admin panel: App health check (#10546)
closes https://github.com/twentyhq/core-team-issues/issues/441
whats new - 
- app health with the proposed format -- update, scratched this format
in favor of a more concise and more intentional health check. Now we
will check app health only based on pendingMigrations
<del>
```
status: 
  system: {
    nodeVersion
  },
  overview: {
    totalWorkspaces,
    criticalWorkspaces,
    workspacesWithPendingMigrations,
    healthDistribution: {
      healthy,
      warning,
      critical,
    }
  },
 problematicWorkspaces: [
    {
      workspaceId,
      severity,
      pendingMigrations,
      issuesSummary: {
        structural,
        data,
        relationship
      }
    }
  ]
  ```
</del>

- errorMessage and details seperation -- before we used to send error in details which made it difficult if we want both error and details on the front -- usecase >>
suppose app health indicator is not healthy but still want to send details
- stateHistory with timestamp -- this is something I introduced, not sure about this. Basically the thought process was to store the LastState of the details, incase of no connection or timeout errors. This is not yet used on the front, just the endpoint. But it could be used on the front too
- name unifying ⁠https://discord.com/channels/1130383047699738754/1346454192776155156
- json tree https://discord.com/channels/1130383047699738754/1346458558048501760
- match figma design https://discord.com/channels/1130383047699738754/1346451659647094815
- fix the collapse/open styles in tables https://discord.com/channels/1130383047699738754/1346452051974160406
- shift eye icon to expanded container https://discord.com/channels/1130383047699738754/1346452282669010987
- use H2Title for title and description of env variables groups https://discord.com/channels/1130383047699738754/1346434955936530452
2025-03-06 21:19:41 +01:00
f6314e52fe Delete related userWorkspaceRole and role when deleting workspace (#10707)
Closes https://github.com/twentyhq/core-team-issues/issues/537
2025-03-06 18:24:37 +01:00
777c12dd06 Fix advanced filter creation of group rule (#10690)
This PR improves advanced filter code and fixes the bug that prevented
the creation of a filter group.

On the debugging side : 
- Adding an advanced filter rule to create a group now works

On the refactoring side : 
- We now use AdvancedFilterRecordFilterGroupChildOptionsDropdown to
clarify the code that show the option dropdown of a group.
- Refacatored useCurrentViewViewFilterGroup to
useChildRecordFiltersAndRecordFilterGroups. It is now using only
RecordFilter and RecordFilterGroup type instead of view types. It also
exports recordFilters and recordFilterGroups alone, when they are
children of a group, so we don't have to extract them from the merged
array that is typed RecordFilter | RecordFilterGroup, which is necessary
for displaying a group.
- Two typeguards have been introduced to help discern RecordFilter from
RecordFilterGroup : isRecordFilterGroupChildARecordFilterGroup and
isRecordFilterGroupChildARecordFilter, this allows to remove any typing
on child processing.
- Renaming from view to record (but there are still some left)
2025-03-06 17:57:23 +01:00
cb5f4820d7 Visualize workflow run step input (#10677)
- Compute the context the selected step had access to during its
execution and display it with the `<JsonNestedNode />` component
- Ensure several steps with the same name can be displayed in order
- Prevent access to the input tab in a few cases
- Hide the input tab when the trigger node is selected as this node
takes no input
- Hide the input tab when the selected node has not been executed yet or
is currently executed
- Fallback to the Node tab when the Input tab can't be accessed

## Successful workflow execution


https://github.com/user-attachments/assets/4a2bb5f5-450c-46ed-b2d7-a14d3b1e5c1f

## Failed workflow execution


https://github.com/user-attachments/assets/3be2784e-e76c-48ab-aef5-17f63410898e

Closes https://github.com/twentyhq/core-team-issues/issues/433
2025-03-06 17:49:10 +01:00
9d78dc322d i18n - translations (#10706)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-06 17:36:04 +01:00
e86116aa57 491 save the page component instance id for side panel navigation (#10700)
Closes https://github.com/twentyhq/core-team-issues/issues/491

This PR:
- Duplicates the right drawer pages for the command menu and replace all
the states used in these pages by component states (The right drawer
pages will be deleted when we deprecate the command menu v1)
- Wraps those pages into a component instance provider
- We store the component instance id upon navigation to restore the
states when we navigate back to a page

The only pages which are not updated for now are the pages related to
the workflow objects, this will be done in another PR.
In another PR, to improve the navigation experience I will replace the
icons and titles of the chips by the label identifier and the avatar if
the page is a record page.


https://github.com/user-attachments/assets/a76d3345-01f3-4db9-8a55-331cca8b87e0

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2025-03-06 17:09:40 +01:00
37d7c0c994 Bump version to 0.44.0-canary (#10702) 2025-03-06 16:50:22 +01:00
5ddf7c6475 Set steps output schema in a recoil family state (#10688)
- Create a workflow version component family state for each workflow
version : `stepId` => `StepOutputSchema`
- Populate this state when reaching the workflow visualizer of the
workflow version
- Wrap the right drawer when in edit mode with the context. It is the
only one who needs this schema

Next step:
- read this state from the variables
2025-03-06 13:31:35 +00:00
17b488dd3b refactor(custom-domain): simplify record mapping logic (#10685)
Refactored the mapping logic in custom-domain.service to improve
readability and ensure proper handling of undefined records. This change
introduces an early return for nullish records and maintains existing
validation behavior.
2025-03-06 14:19:23 +01:00
341439092a send email refacto (#10691)
working refacto with min module deps of messaging-import-manager-module
2025-03-06 12:56:40 +00:00
fea8edb16d i18n - translations (#10692)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-06 11:35:42 +01:00
88c09587db i18n - translations (#10689)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-06 11:20:45 +01:00
82bc361ff3 i18n - translations (#10687)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-06 11:01:11 +01:00
23a371fcdb Update wording to indicate how to restore records (#10686) 2025-03-06 09:55:21 +00:00
54865d91a3 update globalSearch resolver (#10680)
### Context
In order to deprecate search[Object] resolvers, we need to update
globalSearch resolver to bring it to the same level of functionality

### Solution
- Add includedObject args to search in pre-selected tables
- Add record filtering

### Tested on gql api  
- Simple search with search term
- Search with excluded objects, with included objects, with both and
both with search term
- Search with id filtering and all args combined
- Search with deletedAt filtering and all args combined

- from front, search in command menu

back end part of https://github.com/twentyhq/core-team-issues/issues/495
2025-03-06 09:11:25 +01:00
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