Commit Graph

5786 Commits

Author SHA1 Message Date
9880114853 Fix twenty-website CI (#10790) 2025-03-11 18:39:20 +01:00
d4c2fa9f66 Fix Keystatic configuration (#10783)
- Always use the `github` mode
- Set a `pathPrefix` as the repository is a monorepo
2025-03-11 18:17:20 +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
ddeba39a2c Reset step output schema when step is removed (#10762)
When a step is deleted in a draft version, its variable are still
available in the following steps. This is because step output schema was
not reset. We needed either to refresh or to change version so output
schema gets updated.

This PR:
- migrates to a family state global + context not linked to a component
- add a reset step output schema function
- reset when a step is removed
2025-03-11 16:38:47 +00: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
0516e95330 i18n - translations (#10779)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-11 15:34:53 +01:00
8b523aec92 i18n - translations (#10778)
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 15:20:37 +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
3b40b2d50c i18n - translations (#10775)
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 13:57:39 +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
48bd48753b Improve twenty-front build performance (vite rollup option) (#10771)
In this PR, I'm specifying to vite build that
'@scalar/api-reference-react' is an external dependency and should not
be considered as a module we maintain (it won't get its own chunk at
build time and we won't generate sourcemaps on our end).

I'm not sure why vite is considering it internal in the first place (I
can see that it's generating .vue.js files, might be the first time we
are relying on a vue library)
2025-03-11 12:39:54 +01:00
c39843dfd4 i18n - translations (#10770)
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 12:19:41 +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
de22872c6e i18n - translations (#10766)
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 21:20:47 +01:00
e5a7aab733 Fix incorrect Scalar CSS import (#10763)
CSS was loaded in a global context (full screen which might be re-used
for other use cases in the future) instead of a local context.

\+ small update on .env.example
2025-03-10 21:10:40 +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
0861384351 i18n - translations (#10761)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-10 19:01:21 +01:00
5fb613a8f7 Fix permissions front followup (#10758) 2025-03-10 18:56:23 +01:00
c8b44aa242 Update design for not found variables (#10756)
<img width="494" alt="Capture d’écran 2025-03-10 à 14 09 37"
src="https://github.com/user-attachments/assets/ea4a55a1-c7f0-4138-a494-592b197ec8a2"
/>
2025-03-10 17:42:38 +00:00
252d95c741 i18n - translations (#10759)
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 17:48:15 +01:00
d8197920dc Fixed hotkeys on advanced filters (#10733)
This PR fixes hotkey escape on advanced filter dropdown, which wasn't
working.

It adds a parameters to openDropdown, because in this particular case,
the dropdown is not opened from its clickable component but from an
openDropdown, in that case it wasn't possible for openDropdown to know
which hotkey scope to take, because the hotkey scope is generally passed
in the Dropdown component props.

We might want to find a more robust solution, where a dropdown knows its
hotkey scope without having to be mounted.

---------

Co-authored-by: Raphaël Bosi <71827178+bosiraphael@users.noreply.github.com>
2025-03-10 16:41:53 +00:00
f79165ff28 450 merge first second tab on side panel (#10757)
Closes https://github.com/twentyhq/core-team-issues/issues/450

## Before


https://github.com/user-attachments/assets/9b3b8fe7-0cf6-49b7-9f1b-d263b8f65dde



## After


https://github.com/user-attachments/assets/b8e48cae-0661-4fc2-912b-bf091d94bde6
2025-03-10 17:40:27 +01:00
dd26001372 Handle JSON viewer empty states (#10750)
- Display the number of descendants for object and array elements
- Display an empty state for arrays and objects
- Make the input and output visualizer scrollable horizontally 
  - Prevent JSON visualizer's text to wrap

## Demo: input


https://github.com/user-attachments/assets/d6bd6acf-a779-4fc7-a8b1-12b857cee7f9

Closes https://github.com/twentyhq/core-team-issues/issues/497
2025-03-10 17:39:49 +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
3b79018609 fix 10604 them color (#10749)
fixes https://github.com/twentyhq/twenty/issues/10604
2025-03-10 14:36:47 +00:00
21ecfcaa72 i18n - translations (#10754)
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 15:20:23 +01:00
f0de6d31b7 Refactor MultipleObjectsPicker component (#10552)
Refactor to only have MultipleRecordPicker and SingleRecordPicker

What's done:
- SingleRecordPicker, MultipleRecordPicker
- RelationToOneInput
- RelationFromManyInput
- usage in TableCell, InlineCell, RelationDetailSection, Workflow

What's left:
- Make a pass on the app, to make sure the hotkeyScopes, clickOutside
are properly set
- Fix flashing on ActivityTarget
- add more tests on the code
2025-03-10 15:04:09 +01:00
7eabcc8774 i18n - translations (#10753)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-10 14:36:03 +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
a1e0d7b7d7 Fix file preview text color in dark mode (#10748)
This PR fixes an issue where the file preview text was unreadable due to
white text on a white background in dark mode.

Dark mode ->

![image](https://github.com/user-attachments/assets/1f8f6fd0-b95b-4b78-ae8c-db51acfefac2)

Light mode ->

![image](https://github.com/user-attachments/assets/82996a31-e000-4f04-b8db-bd35838732ec)

Fixes #10743

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2025-03-10 13:54:01 +01:00
c981ae329e Add variable path (#10720)
<img width="537" alt="Capture d’écran 2025-03-07 à 09 44 21"
src="https://github.com/user-attachments/assets/52c4d292-01af-4389-aa66-551be2358dd7"
/>

- search through step output schema the variable
- build the variable path
- returns the variable label 
- display both
2025-03-10 13:44:58 +01:00
c067044e01 i18n - translations (#10752)
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 13:42:46 +01:00
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
9c26ce5dc7 i18n - translations (#10737)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-07 18:32:17 +01:00
5056d3e53f send email (#10729)
workflow update to allow microsoft send email
- also handle the case were permissions are not enough
- update the redirection in case the user clicks on new account because
it's not anylonger as easy as simply google

fixes https://github.com/twentyhq/core-team-issues/issues/540
2025-03-07 18:29:35 +01:00
18de7efaaa i18n - translations (#10735)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-07 18:19:42 +01:00
f45a682249 491 save the page component instance id for side panel navigation (Part 2) (#10732)
This PR follows #10700, it is the same refactor but for the workflows
pages.

- Duplicates the right drawer workflow pages for the command menu and
replace the states used in these pages by component states
- We store the component instance id upon navigation to restore the
states when we navigate back to a page

There are still states which are not component states inside the
workflow diagram and workflow command menu pages, we should convert them
in a futur refactor.

`closeCommandMenu` was called programmatically in multiple places for
the workflow, I refactored that to only rely on the click outside
listener. This introduced a wiggling bug on the workflow canvas when we
change node selection. This should be fixed in another PR by updating
the canvas animation to take the animation values of the command menu
instead. I'm thinking we could use [motion
values](https://motion.dev/docs/react-motion-value) for this as I told
you @Devessier
2025-03-07 18:18:24 +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
d1518764a8 i18n - translations (#10734)
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 17:48:02 +01:00
b49ec864b1 Visualize workflow run step output (#10730)
- Displays the output of the selected step in the `Output` tab
- Access to the `Output` tab is prevented when the selected node is
currently executed or was skipped
- Display the status of the workflow run instead of the status of the
workflow version at the top left corner of the workflow run visualizer
- Fixed the icon's color for disabled tabs
- Use text/primary color for the step's name even when the input is
disabled

## Demo: Successful execution


https://github.com/user-attachments/assets/02e492f3-1589-48e9-926e-7edb031d9210

## Demo: Failed execution


https://github.com/user-attachments/assets/73e5ec86-5f38-4306-aa9a-46b2e73950da

Closes https://github.com/twentyhq/core-team-issues/issues/434
2025-03-07 17:35:39 +01:00
0e1d742f3d i18n - translations (#10731)
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 16:01:10 +01:00
3d7f4b7971 Fix view picker total count on board (#10697)
This PR is a follow-up of https://github.com/twentyhq/twenty/pull/10612
where the method of computation of total count was only taking records
fetched on the front end.

In this PR we use `totalCount` returned by `useFindManyRecords` instead,
which returns the total count in DB for the given filters.

We also set `shouldMatchRootQueryFilter` on board card create mutation
to avoid optimistic rendering issues.

Fixes https://github.com/twentyhq/twenty/issues/10598
2025-03-07 15:47:34 +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
02a085df4f i18n - translations (#10727)
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 14:21:45 +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