Commit Graph

1680 Commits

Author SHA1 Message Date
737e17193a i18n - translations (#10835)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-12 23:33:37 +01:00
8e9a73462b i18n - translations (#10834)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-12 23:20:10 +01:00
7468f25b80 i18n - translations (#10831)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-12 21:33:13 +01:00
8f38501aad i18n - translations (#10830)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-12 21:20:55 +01:00
c61748cd6e Admin panel fixes (#10792)
<img width="573" alt="Screenshot 2025-03-12 at 17 36 44"
src="https://github.com/user-attachments/assets/be6c20b0-626d-4a2c-810c-78a49e9f65ee"
/>
<img width="579" alt="Screenshot 2025-03-12 at 17 37 03"
src="https://github.com/user-attachments/assets/23692ff8-ac88-4104-823e-1a06b3074551"
/>
<img width="590" alt="Screenshot 2025-03-12 at 17 37 14"
src="https://github.com/user-attachments/assets/b46de1d3-a312-44cc-a54d-72208224453d"
/>
<img width="556" alt="Screenshot 2025-03-12 at 17 37 37"
src="https://github.com/user-attachments/assets/12176d49-d76d-4fb1-abe6-1f7dc5349d94"
/>
<img width="607" alt="Screenshot 2025-03-12 at 17 37 50"
src="https://github.com/user-attachments/assets/00e2edff-09db-45c5-a4df-6fd9ead830b6"
/>
2025-03-13 01:25:38 +05:30
75da64876a i18n - translations (#10828)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-12 19:37:22 +01:00
795930f4f8 i18n - translations (#10827)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-12 19:21:36 +01:00
f4a362b53a Add base form action without logic (#10811)
<img width="1298" alt="Capture d’écran 2025-03-12 à 15 32 27"
src="https://github.com/user-attachments/assets/8a3140e5-e165-445e-a718-748aa76b525c"
/>
2025-03-12 17:05:31 +00:00
89faccad4f i18n - translations (#10816)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-12 17:36:55 +01:00
69f6796021 i18n - translations (#10813)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-12 17:21:20 +01:00
daa501549e 271 remove is command menu v2 enabled (#10809)
Closes https://github.com/twentyhq/core-team-issues/issues/271

This PR
- Removes the feature flag IS_COMMAND_MENU_V2_ENABLED
- Removes all old Right drawer components
- Removes the Action menu bar
- Removes unused Copilot page
2025-03-12 16:26:29 +01:00
1b0413bf8b Add days schedule trigger (#10800)
<img width="1470" alt="image"
src="https://github.com/user-attachments/assets/660d79ba-60c7-4874-aa82-80a7575366ba"
/>
2025-03-12 15:25:07 +00:00
911647a279 Fix many bugs on advanced filters for CRUD to work (#10772)
This PR fixes many bugs on advanced filters, the goal here was to have
CRUD working with other simple filters and sorts.

In order to test this PR you'll have to run a sync metadata.

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

## Changed positionInViewFilterGroup field metadata type 

This PR changes the type of positionInViewFilterGroup to NUMERIC instead
of POSITION, there certainly was a confusion during the initial
development, where POSITION type seemed relevant but it is not for this
particular feature because the position in a view filter group is not
the position of a record, which is used for displaying and re-ordering
purpose in table and kanban views.

Here the positionInViewFilterGroup is a specific position concept tied
to a custom feature, and it is handled by the specific logic of this
advanced filter dropdown layout.

## Create new ids when duplicating a view

When we use create view from an existing view, the logic in
useCreateViewFromCurrentView will copy over filters, filter groups and
sorts. The problem is that it copies it with the same ids, and that if
the backend manages somehow to create new ids, the ids that are put in
parentViewFilterGroupId are corresponding to the old filter groups not
the duplicated new ones.

So we had to create a map of old id => new id so that everything that
has to be sent to the backend for creation already has the same mapping
of parent id but with new ids generated by the frontend.

## Bug with creating a simple filter

We couldn't create a simple filter when advanced filters were set, this
was because of findDuplicateRecordFilterInNonAdvancedRecordFilters which
wasn't doing what it's naming tells, it wasn't filtering on simple
filters only before looking for duplicates.

## Clean code

- Use lastChildPosition directly from
useChildRecordFiltersAndRecordFilterGroups instead of drilling it down
- Refactored AdvancedFilterDropdownButton to extract the code lower
where it is really needed in AdvancedFilterChip
- Renamed a few View to Record naming where relevant
2025-03-12 10:23:41 +00:00
8d1a4672de Add console logs to code step (#10796)
code review return -> move console interceptor to dedicated utils
2025-03-12 10:59:41 +01:00
4036933c84 Add console logs to code step (#10786)
Works for local and lambda drivers

## After

![image](https://github.com/user-attachments/assets/ec082cf6-4159-4a15-99b6-243c73a13773)

![image](https://github.com/user-attachments/assets/f42e3f43-5ea4-4167-b4b5-9a17826fd224)
2025-03-12 10:40:59 +01:00
4d0450069c Fix fieldMetadata sync validation exceptions caught in exception handler (#10789)
## Context
Field metadata service was reusing validators from
validate-**OBJECT**-metadata-input which were throwing ObjectMetadata
exceptions not handled in fieldMetadataGraphqlApiExceptionHandler and
were going to Sentry.
To solve the issue since this validator is associated with both fields
and objects I'm moving the util to the root utils folder of metadata
module and throwing a common metadata user input exception
2025-03-11 18:41:29 +01:00
d9817d6b9c Fix tabler icons load (#10782)
As per
https://github.com/tabler/tabler-icons/issues/1233#issuecomment-2428245119
2025-03-11 18:01:28 +01:00
680935e605 i18n - translations (#10785)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-11 17:21:25 +01:00
5bbfbf68eb i18n - translations (#10784)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-11 17:06:05 +01:00
293e3f58c4 Fix TEST env not using the correct DB for datasources (#10780)
## Context
Config was programmatically loaded in our datasources however the
default behavior of dotenv is to ignore vars if they are already
defined. This means we need to be careful about the order of env
injection and sometimes it's done at a higher level (for example
db:reset will depend on build). To make things easier I'm using the
override flag to properly override the PG_DATABASE_URL if different (and
to properly work with the 'test' DB instead of 'default' during
testing).
2025-03-11 16:20:01 +01:00
4e44ae59f7 Delete view & copy link (#10760)
adding the delete view and copy link additional menu option

Fixes https://github.com/twentyhq/core-team-issues/issues/480
Fixes https://github.com/twentyhq/core-team-issues/issues/481
2025-03-11 15:15:00 +01:00
0eb829dcb5 Remove system email address from cleaning emails (#10774)
as title, to avoid polluting the technical email address
2025-03-11 13:44:33 +01:00
41f3a63962 [BUGFIX] ObjectMetadata item server validation (#10699)
# Introduction
This PR contains several SNAPSHOT files explaining big +

While refactoring the Object Model settings page in
https://github.com/twentyhq/twenty/pull/10653, encountered a critical
issue when submitting either one or both names with `""` empty string
hard corrupting a workspace.

This motivate this PR reviewing server side validation

I feel like we could share zod schema between front and back

## Refactored server validation
What to expect from Names:
- Plural and singular have to be different ( case insensitive and
trimmed check )
- Contains only a-z A-Z and 0-9
- Follows camelCase
- Is not empty => Is not too short ( 1 )
- Is not too long ( 63 )
- Is case insensitive( fooBar and fOoBar now rejected )

What to expect from Labels:
- Plural and singular have to be different ( case insensitive and
trimmed check )
- Is not empty => Is not too short ( 1 )
- Is not too long ( 63 )
- Is case insensitive ( fooBar and fOoBar now rejected )

close https://github.com/twentyhq/twenty/issues/10694

## Creation integrations tests
Created new integrations tests, following
[EachTesting](https://jestjs.io/docs/api#testeachtablename-fn-timeout)
pattern and uses snapshot to assert errors message. These tests cover
several failing use cases and started to implement ones for the happy
path but object metadata item deletion is currently broken unless I'm
mistaken @Weiko is on it

## Notes
- [ ] As we've added new validation rules towards names and labels we
should scan db in order to standardize existing values using either a
migration command or manual check
- [ ] Will review in an other PR the update path, adding integrations
tests and so on
2025-03-11 12:14:37 +01:00
dc66d2498e i18n - translations (#10765)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-10 19:36:18 +01:00
d3e6879ee3 i18n - translations (#10764)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-10 19:21:42 +01:00
dc55fac1d5 Wrap all vizualizers into component context (#10755)
Steps are broken when a variable is set.
This is because component instance is not set for version and run
visualizers.
Each step viewer should be wrapped by the instance context.
Each diagram visualizer should be responsible for populating the output
schema.

Also fixing a billing error when running workflow.
2025-03-10 15:56:14 +01:00
77574594f2 admin panel fast follows (#10723)
fast follows:
- https://discord.com/channels/1130383047699738754/1346433965451382845
- https://discord.com/channels/1130383047699738754/1346434512757981264
- https://discord.com/channels/1130383047699738754/1346453484911853610

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2025-03-10 19:02:40 +05:30
f8772d205d Allow for unsecure SMTP settings for local unencrypted smtp relays (#10605)
This update provides the flexibility for users to configure SMTP for
local instances where encryption is not required. For environments using
an unencrypted SMTP relay or similar local instances that are not open
to the public, the end user can now choose to disable encryption. This
ensures flexibility in the configuration while still maintaining the
option for secure SMTP connections in other environments.

### From [NodeMailer](https://nodemailer.com/smtp/#tls-options)
**secure** – if true the connection will use TLS when connecting to
server. <mark>If false (the default) then TLS is used if server supports
the STARTTLS extension. In most cases set this value to true if you are
connecting to port 465. For port 587 or 25 keep it false.</mark>

**ignoreTLS** – <mark>if this is true and secure is false then TLS is
not used even if the server supports STARTTLS extension.</mark>

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
2025-03-10 13:30:38 +01:00
a443703a38 i18n - translations (#10740)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-07 19:36:08 +01:00
7e22d76cf4 i18n - translations (#10739)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-07 19:21:34 +01:00
fc287dac78 Feat: API Playground (#10376)
/claim #10283

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2025-03-07 18:03:57 +01:00
96035f0ccf fix redis concurrency issue in health metrics + remove ongoing status count (#10717)
### Context
For calendar and message sync job health monitoring, we used to
increment a counter in redis cache which could lead to concurrency
issue.

### Solution
- Update to a set structure in place of counter + use sAdd redis method
which is atomic
- Each minute another counter was incremented on a new cache key ->
Update to a 15s window
- Remove ONGOING status not needed. We only need status at job end (or
fail).


###  Potential improvements
- Check for cache key existence before fetching data to avoid useless
call to redis ?

closes https://github.com/twentyhq/twenty/issues/10070
2025-03-07 14:41:46 +01:00
4bdcf77028 Bettertyping (#10725)
To get better at catching errors on providers
(It will ease also my coming PR to send microsoft messages using
workflow)
2025-03-07 14:11:56 +01:00
4be75fb7da eliminate IS_BILLING_PLANS_ENABLED feature flag (#10678)
Solves: https://github.com/twentyhq/core-team-issues/issues/527

**TLDR:**
Basically the title. Fetches the product and prices from the database
instead of the environment variables.

**What this means:**

- new subscriptions in twenty will be hybrid (per seat subscription plus
an usage base product)
- right now the price for the usage base product  is 0$ per unit
- The existing subscription will work normally, however we will need to
update their subscription items in order to contain the usage base
product (remember that the pricing intervals like monthly or yearly
should match in all the subscription items)
-  The previous point can be done using Stripe Postman


**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 deleted
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
- Update the quantity of members in a workspace (add or delete)
- Change the subscription interval

---------

Co-authored-by: Etienne <45695613+etiennejouan@users.noreply.github.com>
2025-03-07 11:46:22 +01:00
90d01a6c58 i18n - translations (#10722)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-07 11:34:56 +01:00
709f5d7829 i18n - translations (#10721)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-07 11:20:38 +01:00
0210e07497 Only use CAPTCHA in logged out operations and pages (#10607)
Issue #10235

---------

Co-authored-by: ad-elias <elias@autodiligence.com>
2025-03-07 11:03:30 +01:00
21c7d2081d send email for outlook (#10703)
driver implementation for sending emails with microsoft

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-03-07 10:12:49 +01:00
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
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
37d7c0c994 Bump version to 0.44.0-canary (#10702) 2025-03-06 16:50:22 +01: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
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
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