Commit Graph

5873 Commits

Author SHA1 Message Date
326acfe9a5 Fix activity target picker click outside not closing the menu (#10897)
## Context
onClickOutside was not implemented after the refactoring
2025-03-14 16:31:38 +01:00
61f7625238 Compute any new Workspace version from APP_VERSION (#10893)
# Introduction
We want any new activated workspace to be filled with a version equal to
the current `APP_VERSION`
Please note that in a workspace lifecycle this operation will be run
only once, discussed with @charlesBochet in front of `3 fois plus de
piments`

Going straightforward in this PR in order to release asap
Started et will continue to implem new integrations regarding `SignUp`
and `ActivateWorkspace` happy and expections path in
https://github.com/twentyhq/twenty/tree/prastoin-new-workspace-has-version-integrations-tests
2025-03-14 15:18:48 +01:00
c371dd5d27 Add custom domain to Lab and move countBoolean command to 0.44 from 0.50 (#10884)
- Add customs domain to Lab
- Moving back countBoolean command to 0.44 from 0.50 (I inadvertently
moved it yesterday night...)

<img width="592" alt="Screenshot 2025-03-14 at 12 07 44"
src="https://github.com/user-attachments/assets/1d8d7b36-f392-4df0-974d-426a55760af2"
/>
2025-03-14 15:13:44 +01:00
9883472d55 fix public feature flag update (#10887)
## Context
upsert from typeorm does not seem to return keys that are not updated,
I'm reverting back to find/save since upsert is not consistent
2025-03-14 15:01:06 +01:00
fe4b47b781 Fix selected record id required after closing settings (#10894)
On Show page, let's only load the actionMenu if the objectMetadataItem
and the selectedRecord are present in the context store
2025-03-14 15:00:52 +01:00
b12b2485c5 Fixed kanban for advanced filters and other bugs (#10888)
This PR mainly fixes advanced filters on kanban view.

It also fixes various bugs and cleans some old states.

## Advanced filters on kanban views

Kanban views use a different hook to retrieve data from the backend :
useLoadRecordIndexBoardColumn, this hook wasn't using the new state
currentRecordFilterGroupsComponentState.

## Removal of confusing duplicate states

A few different states were used for filters and states, where we only
need one for filters and one for sorts for all indexes. So we remove
here the different states that can lead to confusion about what state
should be used in what case.

States removed : 
- recordIndexFilterState
- recordIndexSortState
- recordIndexViewFilterGroupsState
- tableFiltersComponentState
- tableSortsComponentState

We also remove the logic that was used to manage those states.

## Abstracted non composite field type check into a util

We abstract the check made in mapFieldMetadataToGraphQLQuery into a util
isNonCompositeField, because those kinds of checks should be stored into
a separate unique file that acts as a source of truth.

## Bug with advanced filter rule position not saved

The position of an advanced filter rule wasn't correctly saved in the
backend, here we remove the WorkspaceIsSystem decorator on the
positionInViewFilterGroup fields.

The function that saved view filters was also ignoring the field
positionInViewFilterGroup, we add it back.

## Bug with view picker option dropdown closing weirdly

The view picker option dropdown was closing as soon as we hovered
outside of the option dropdown, which was annoying for the user, here we
apply the same behavior as every dropdown in the app : closing on click
outside.
2025-03-14 14:41:30 +01:00
2b89273241 Fix API playground not loading (#10891)
The @scalar package we use to offer a REST api playground is quite heavy
(3k files compared to the 15k existing) and is not pre-build in the npm
package, which is not unusual.

This is increasing the memory need during vite build. 
I'm increasing the RAM available for vite build.

Long term I recommend using a CDN here as this is not really a React
component so we won't benefit from any reactivity anyway. Exaclty like
we have done for FrontApp support chat integration
<img width="1058" alt="image"
src="https://github.com/user-attachments/assets/5412c6c1-7434-4b19-b9ac-e89f1cb614f3"
/>
2025-03-14 14:38:46 +01:00
d899e65f76 i18n - translations (#10890)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-14 13:56:08 +01:00
685808c69d Fix activity target creation (#10885)
## Context
Delete was using the wrong id
Create was not setting the morph id
2025-03-14 12:45:34 +00:00
d951a5a099 Fix Each child in a list should have a unique key prop. (#10881)
As title
2025-03-14 12:00:03 +01:00
44a11353b4 i18n - translations (#10882)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-14 11:20:37 +01:00
46c773e5ff Fix update of aggregate operation not reflected in kanban header without refresh (#10879)
Before


https://github.com/user-attachments/assets/1761c49e-3d08-413a-bebd-11f4592a7de8

After


https://github.com/user-attachments/assets/064ef28f-b131-48af-ad66-11f782298670
2025-03-14 11:13:13 +01:00
362bc333d1 [ENH] APP_VERSIONdocumentation (#10880)
# Introduction
In https://github.com/twentyhq/twenty/pull/10751 we decided not to put
`APP_VERSION` references in `.env.example` as it's programmatically
defined by our CD and should not be override by any manual interaction.

Still, as a dev testing the upgrade command in local, if you do not set
the `APP_VERSION` in local you will encounter the following error:
```ts
'Cannot run upgrade command when APP_VERSION is not defined'
```

@guillim currently doing the release legitimately raised that it was not
very intuitive

## Levers
- Improve error message such as adding reference to checking env
variables
- App local upgrade command dev dedicated documentation ?

## Conclusion
Any suggestions are more than welcomed !
2025-03-14 10:00:32 +00:00
6cf1775fac i18n - translations (#10878)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-14 09:35:03 +01:00
2edf510de2 i18n - translations (#10877)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-14 09:21:17 +01:00
842a68a0aa i18n - translations (#10876)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-14 08:01:27 +01:00
bc4c79bc1c i18n - translations (#10875)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-14 07:47:47 +01:00
1bffe57f6b feat: added countTrue and countFalse (#10741)
fix: #10603 


https://www.loom.com/share/cebc8a19bd8e4ae684a5a215d0fd1f94?sid=cadaa395-285c-45c9-b3ce-2ae6d1330a3c

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2025-03-14 07:34:21 +01:00
7f8ab6dda5 i18n - translations (#10871)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-13 21:32:55 +01:00
445f1dd352 i18n - translations (#10870)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-13 21:20:47 +01:00
2362fd7f92 i18n - translations (#10867)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-13 19:36:57 +01:00
963c2f8d4a i18n - translations (#10866)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-13 19:21:36 +01:00
3901ff3207 Fix Side Panel v2 bugs (#10865)
Fixing:
- Export as PDF on empty note
- Command O (sub commands) not using the right contextStore
- BelongsToOne Field input triggering an error on open if no existing
relation record is pre-selected
2025-03-13 19:18:34 +01:00
cb96f019d6 Set record groups when view groups are updated (#10863)
Currently we need to refresh to see view group updates.
2025-03-13 19:17:48 +01:00
dfb00f2b61 [FIX] Omition on previous integ of upgrade command compare version based on integer result (#10864) 2025-03-13 18:12:05 +00:00
ce42928143 Fix keystatic github redirect_uri by relying on x-forwarded-* headers (#10862)
Fix suggested by
https://github.com/Thinkmill/keystatic/issues/1022#issuecomment-2009029315.
2025-03-13 18:18:48 +01:00
db48aa532c bugfix for kunai: email missing in thread (#10861) 2025-03-13 18:14:34 +01:00
fc30ba57f8 Fix server integration tests 2 (#10818)
## Context
- Removing search* integration tests instead of fixing them because they
will be replaced by global search very soon
- Fixed billing + add missing seeds to make them work
- Fixed integration tests not using consistently the correct "test" db
- Fixed ci not running the with-db-reset configuration due to nx
configuration being used twice for different level of the command
- Enriched .env.test
- Fixed parts where exceptions were not thrown properly and not caught
by exception handler to convert to 400 when needed
- Refactored feature flag service that had 2 different implementations
in lab and admin panel + added tests
- Fixed race condition when migrations are created at the same timestamp
and doing the same type of operation, in this case object deletion could
break because table could be deleted earlier than its relations
- Fixed many integration tests that were not up to date since the CI has
been broken for a while

---------

Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
2025-03-13 17:48:29 +01:00
d48b2b3264 Only store current object metadata id in state (#10856)
Fix group by refresh when adding a select field
2025-03-13 17:26:07 +01:00
29ead8ab69 Create a running variant for workflow diagram nodes (#10857)
- Add all the missing adaptive colors
- Create a running variant for the workflow diagram nodes
- Make the `<Loader />` be precisely `24px` large

## Demo



https://github.com/user-attachments/assets/cc9ef259-30dd-445d-b167-af35b4f9c4cc



Closes https://github.com/twentyhq/core-team-issues/issues/430
2025-03-13 16:50:55 +01:00
b1322beac3 Fix console errors (#10859)
Fixes https://github.com/twentyhq/core-team-issues/issues/276

## Before

![image](https://github.com/user-attachments/assets/d1b49746-eb9b-4f96-81af-81332ebb2e43)

![image](https://github.com/user-attachments/assets/41ceccfc-6ee3-4ff5-9d02-c621244bf36b)


## After

![image](https://github.com/user-attachments/assets/67eea9c9-d838-4211-9e75-47d895d2662e)
2025-03-13 16:50:35 +01:00
4f0fd0c9f3 Fix stories again 2025-03-13 16:50:24 +01:00
37afb38479 refactor(server): upgrade command to more human friendly (#10858)
# Introduction
Refactored the upgrade command to be more intuitive to anyone wanting to
add a command to the next relase upgrade instance

Also updated the upgrade command for the next 0.44 release
2025-03-13 16:48:58 +01:00
93f70f8457 Fix e2e tests (#10855) 2025-03-13 16:42:38 +01:00
bd5d211590 [FEAT] New APP_VERSION env var inferred from tag & refactor upgrade-command to integrate versioning (#10751)
# Introduction
This PR contains a big test file and few snapshots
Related to https://github.com/twentyhq/core-team-issues/issues/487

## New env var `APP_VERSION`
Now will be injected directly in a built docker image the twenty's built
version. Inferred from the build git tag name.
Which mean on main or other `not a tag version` built APP_VERSION will
be `null`

## New upgrade-commander-runner
Refactored the upgrade command to be more strict regarding:
 - Version management
 - Sync metadata command always run
 - Added failing workspaces aggregator + logs on cleanup
 
From now on the `upgrade` command will compare the `WORKSPACE_VERSION`
to the `APP_VERSION` in order to bypass any workspace version != than
the upgrade version `fromVersion`
## Existing commands
Note that the version validation will be done only when passing by the
`upgrade` command.
Which means that running the following command
`upgrade:x.y-some-specific-command` won't result in workspace version
mutation

This is to enforce that all an upgrade commands + sync-metadata has been
run on a workspace



## Will do in other PR but related
### New workspace
New workspace will now be inserted with version equal to the APP_VERSION
they've been created by

### Old workspace
Will create a command that should be ran outside of any `upgrade-runner`
extending command, the command will have to be ran on every workspace
before making the next release upgrade
This command iterates over any active and suspended workspace that has
`version` to `NULL` in order to update it `APP_VERSION` -1 minor

### SENTRY_RELEASE
- Either deprecate SENTRY_RELEASE in favor of `APP_VERSION` => What
about main with null version ? or create a new env var that would be
`APP_COMMIT_SHA` instead of SENTRY third party ref

### Update CD to inject APP_VERSION from branch name

### Update docs and release logs
Adding documentation for `APP_VERSION`

## Related PRs:
https://github.com/twentyhq/twenty-infra/pull/181
2025-03-13 15:46:27 +01:00
15019d2c66 Fix stories 2025-03-13 15:35:46 +01:00
3ab73dd777 format duplicate field name error (#10736)
fix temporarily https://github.com/twentyhq/core-team-issues/issues/180
2025-03-13 15:20:57 +01:00
8b49c803ec Fixed minor bugs on advanced filters (#10847)
This PR fixes minor bugs on advanced filters : 
- We couldn't close the advanced filter dropdown after removing a rule,
because the rule options dropdown wasn't closed, so focus dropdown id
was in a corrupted state.
- The text filter input in filter dropdown and the search input were the
same component, which was causing conflicts with state management but
this conflict didn't happen with the simple filter dropdown
implementation, the advanced filter dropdown brought this bug to light.
- The chevron down icon disappeared from the filter update button group,
this PR fixes it.

Fixes https://github.com/twentyhq/core-team-issues/issues/557
Fixes https://github.com/twentyhq/core-team-issues/issues/558
2025-03-13 15:20:23 +01:00
a2004e6220 Fix storybook stories (#10853)
Small PR to fix flaky stories
2025-03-13 15:19:20 +01:00
794110f9dd Fix wrong font in chips and tabs (#10825)
Fix wrong font in chips and tabs

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2025-03-13 14:44:04 +01:00
885b2d62d9 Fix stories (#10851)
Fix storybook stories
<img width="1475" alt="image"
src="https://github.com/user-attachments/assets/50327d9b-f3a0-46ea-87f2-93da356ec7c9"
/>
2025-03-13 14:31:20 +01:00
2ca0dc243a Fix incorrect error message (#10850)
Fix #10833
2025-03-13 14:12:33 +01:00
da4eb1e7d2 Fix UI bug in REST API playground (#10848)
When you clicked on the left-side menu to navigate, the top bar would
disappear. This PR fixes that and the top bar always remain visible.
2025-03-13 13:15:03 +01:00
3f7315c2dc Fix test data disapear (#10846)
As title. Init input from source code only once.
2025-03-13 12:08:29 +01:00
f66ae3eff6 Add permissions v1 to lab (#10845)
## Context
Not sure why the image should be self hosted on twenty-website, I've
simply followed what we did with other items of the lab
2025-03-13 12:03:01 +01:00
5b34f86b6d Add Icon to roles (#10842)
## Context
Adding icon column to role table to distinguish roles.

<img width="621" alt="Screenshot 2025-03-13 at 11 02 37"
src="https://github.com/user-attachments/assets/dc7b121c-2901-4599-9638-d5dcdf443999"
/>
2025-03-13 11:34:30 +01:00
46a57c2167 i18n - translations (#10843)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-13 11:20:38 +01:00
ecf282ad99 Highlight consumed variables in workflow runs (#10788)
- Create a function to resolve the variables used in the configuration
of a step
- Let the JSON tree components take a prop (`getNodeHighlighting`) to
determine whether an element must be highlighted
- Compute each element's keyPath recursively; the keyPath is passed as
an argument to the `getNodeHighlighting` function

## Demo


https://github.com/user-attachments/assets/8586f43d-53d1-41ba-ab48-08bb8c74e145

Closes https://github.com/twentyhq/core-team-issues/issues/435
2025-03-13 11:19:12 +01:00
7e291f3cff Fix close right drawer error (#10841)
fixes
https://discord.com/channels/1130383047699738754/1349485390871924796
2025-03-13 10:02:59 +00:00
638fbe2014 Fix flash when creating draft (#10814)
Always set `serverlessWorkflowVersion = 'draft'` in code steps
2025-03-13 10:16:47 +01:00