Commit Graph

5613 Commits

Author SHA1 Message Date
7ed142e987 Fix command menu selection (#10248)
- Created a state `hasUserSelectedCommandState` : This state is set to
`true` when the user selects an element in the command menu list. It is
set to false upon redirection or when the command menu is closed.
- Modified `CommandMenuDefaultSelectionEffect` to have the expected
selection behavior for the command menu
2025-02-17 11:02:17 +00:00
14478afa7e i18n - translations (#10250)
Co-authored-by: github-actions <github-actions@twenty.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2025-02-17 12:00:59 +01:00
ecc388c4bf Skip ref checkout in 18n (#10249) 2025-02-17 11:54:26 +01:00
2ba9f2d0e5 Fix integration test ci (#10226)
## Context
Integration test ci was not running properly. This PR should fix that

Todo: This was not running for a while, many tests are not succeeding so
I'll try to fix them in this PR now that the action is running properly.
2025-02-17 11:45:44 +01:00
896ff1dc2e I18n ci 5 (#10247) 2025-02-17 11:42:32 +01:00
13053fd6fa Fix i18n ci (#10246) 2025-02-17 11:30:25 +01:00
5b961cbb7f Tasks assigned to me view (#9567) (#9568)
Issue: https://github.com/twentyhq/core-team-issues/issues/154

View is now added.

TODO: Fix filtering a relation field by 'Me' in Tasks.

---------

Co-authored-by: ad-elias <elias@autodiligence.com>
2025-02-17 10:13:55 +00:00
9ef6486b06 Fix autogrowing input glitch (#10224)
- Removed unnecessary resize observer
- Removed unused component
- Fixed autogrowing input glitch

# Before


https://github.com/user-attachments/assets/a7de71d5-bc6e-495f-851c-18df596749dd

# After


https://github.com/user-attachments/assets/63588d0e-1122-43fe-b685-3f3a4ec4114e
2025-02-17 10:10:39 +00:00
0cd6e29bff Leave old body field on task and note object (#10243) 2025-02-17 10:38:20 +01:00
9ddaaa803b Display object name plural instead of object (#10228)
Display object name plural instead of 'Object' inside the command menu
section related to the current object.
2025-02-17 10:34:58 +01:00
afdd44ff66 Cloudflare name typo (#10239)
Fix typo in Cloudflare
2025-02-17 08:50:15 +01:00
1dca3694f7 Delay loading support chat (#10234)
There are a lot of requests being done in parallel when you load the
page, and the support chat is responsible for some of them. I don't
think it's critical to have it upon loading so delaying it by 2 seconds
2025-02-16 12:58:20 +01:00
f795d90702 [WEBSITE] Upgrade guide 0.41.0 -> 0.42.0 (#10231)
# Introduction
Upgrade guide from 0.41.0 to 0.42.0

## Note
@guillim I've been searching for references to the new `env vars` added
in the Microsoft scope to the version to the `setup.mdx` page, unless
I'm mistaken `IS_MICROSOFT_SYNC_ENABLED` seems to be missing ? I'm not
sure if it's required or not and on where to add it within the page,
could you please give it a look 🙏 ?
2025-02-15 09:11:57 +01:00
db1b11742b [0.42][FIX] Seeder activate rich text v2 feature flag (#10229)
as per title
2025-02-14 17:57:32 +00:00
bab529b138 Fixing unhandled exception for microsoft driver (#10223)
Fixing a difficult bug: an unhandled exception for microsoft driver when
one of the many Microsoft BATCH request failed.
2025-02-14 18:50:53 +01:00
70e5cdfe83 Remove filter definition (#10227)
This PR removes completely filter definition usage and states,
everything is now derived from fieldMetadataItem.
2025-02-14 17:37:34 +00:00
68db9a7a8c (fix) throw if Access JWT does not have a userWorkspaceId (#10225)
After introducing userWorkspaceId into JWTs, we were wrongfully
executing
```
const userWorkspace = await this.userWorkspaceRepository.findOne({
      where: {
        id: payload.userWorkspaceId,
      },
    });
```

which would return a random userWorkpace if `payload.userWorkspaceId` is
undefined.

All generated JWTs have had a userWorkspaceId for more than a week now,
but in tests we had not modified the accessToken in use, which did not
have a userWorkspaceId, until [this
pr](https://github.com/twentyhq/twenty/pull/10204)
2025-02-14 17:48:06 +01:00
12cc61e096 [permissions] Add workspace + security settings permission gates (#10204)
In this PR

- closing https://github.com/twentyhq/core-team-issues/issues/313
- adding permission gates on workspace settings and security settings
- adding integration tests for each of the protected setting and
security
2025-02-14 17:32:42 +01:00
db526778e3 Update suspended cleaning command (#10195)
closes https://github.com/twentyhq/core-team-issues/issues/382
2025-02-14 15:49:44 +00:00
968ad3bd31 [NITPICK] From args list to record args RecordPositionFactory (#10215)
# Introduction
Just some nitpicking while debugging a bug that wasn't one
2025-02-14 15:43:09 +01:00
c624657b29 update seeding views to seed the new bodyV2 field on workspace creation (#10221)
As per title
2025-02-14 15:28:25 +01:00
017280384a Add flow to run output (#10220)
We need the version trigger and steps to be stored in the output. We
should not rely on the version itself because some run are made on draft
versions. Which means versions could be edited afterwards.
2025-02-14 15:20:27 +01:00
5fe101545d Add side panel in lab (#10183)
<img width="908" alt="Capture d’écran 2025-02-13 à 11 15 22"
src="https://github.com/user-attachments/assets/642b181c-8a20-4935-bb32-97d9d2b0f4c9"
/>
2025-02-14 13:59:27 +00:00
258025a18f Fix upgrade-0-42 command to migrate RICH_TEXT field metadata to RICH_TEXT_V2 (#10218)
While making sure the upgrade-0.42 command was working as expected to
upgrade from 0.41 to 0.42, we've detected that the standardId of the new
bodyV2 (type RICH_TEXT_V2) was not properly set ; standardId was not
correct.

This was forcing the sync-metadata command to try to re-create the field
again.
2025-02-14 13:50:06 +01:00
a36ba02efe Imrove I18n ci (#10219) 2025-02-14 13:42:16 +01:00
80c55b4462 384 update the input of the record show page inside the command menu (#10213)
Created a new component `RecordTitleCell` with an API close to
`RecordInlineCell`.
This new component is an autogrowing input. 
It consumes the `FieldContext`. It uses some hooks and states from
`RecordInlineCell` because I didn't want to duplicate all the logic, but
this logic could be duplicated.

Two issues that I didn't solve in this PR:
- There is a flashing glitch inside the input when typing
- The input of a workflow isn't focused when creating a new one. This is
because of an issue with the `useHotkeyScopeOnMount` hook which is
deprecated but still used in some components. Upon redirection on the
workflow showpage, the hokey scope of the input is overridden by the
hokey scopes of the components which use `useHotkeyScopeOnMount`. I
decided not to open the input for now.

## Command menu record show page

### Single input


https://github.com/user-attachments/assets/50dc235c-8f34-4445-8b04-586125606bd5

### Double input


https://github.com/user-attachments/assets/bdcfd6eb-d25e-4006-a87f-6e615e8a6e7e

## Workflow breadcrumb


https://github.com/user-attachments/assets/ded38dd6-5794-4779-a4ae-b3948567595a

## Record show page

### Single input


https://github.com/user-attachments/assets/8ad7a606-556a-416b-8788-93415f7989e1

### Double input


https://github.com/user-attachments/assets/55aae40b-36ae-40f1-8171-06f1a5db3532
2025-02-14 12:33:18 +00:00
a4a085392d fix(auth): Invite with public url and social sso. (#10216)
Correct the URL parameter name from "inviteHash" to
"workspaceInviteHash" and enhance domain URL handling for
multi-workspace environments.
2025-02-14 11:58:01 +00:00
171091e1ef refactor(domain-manager): simplify frontend URL configuration (#10194)
Replaced multiple environment variables for frontend URL construction
with a single FRONTEND_URL variable. This change reduces complexity and
improves clarity by consolidating frontend URL handling into one source.
Updated relevant validations and removed unused variables like
FRONT_PROTOCOL and FRONT_PORT.

Fix #10016
2025-02-14 12:03:07 +01:00
01665ca8ae Fix bug visibility table (#10214) 2025-02-14 11:48:41 +01:00
934a97df51 Fix custom exceptions not propagating error code (#10210)
## Context
In some CustomException exceptions, we were instantiating a code without
initializing it which was overriding the parent code and it was then
lost when retrieving it in filters.
Removing them to make sure we don't reproduce this pattern
2025-02-14 10:27:47 +01:00
ea07692abb refactor(ui/settings): update styles and improve structure (#10201)
Adjusted border color in SettingsRadioCard for better visual hierarchy.
Simplified grid template layout in SSO form for consistency. Enhanced
HorizontalSeparator by wrapping text in Label for improved accessibility
and styling.

Fix
https://github.com/twentyhq/core-team-issues/issues/385#event-16262349051

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-02-14 10:19:02 +01:00
8bd2f5c3c4 refactor(server): rename PORT to NODE_PORT (#10193)
Updated the environment variable name from PORT to NODE_PORT for more
clarity and alignment with node server conventions. Adjusted references
in configuration and application bootstrap accordingly.

Fix #10017
2025-02-14 10:03:58 +01:00
f45f7c28f2 Improve i18n ci (#10209) 2025-02-14 09:56:05 +01:00
1090fb8fad Remove localization feature flag and improve CI workflow (#10208) 2025-02-14 09:41:35 +01:00
f2da915b20 Poc lambda subhosting (#10192)
Add `SERVERLESS_LAMBDA_SUBHOSTING_ROLE` to allow hosting lambdas in
separate aws account

Tested with old configuration and new configuration
2025-02-14 09:18:49 +01:00
9cbcf6293b Fix number null value forced to 0 (#10202)
This PR fixes https://github.com/twentyhq/twenty/issues/9980

In here we implement a check to pass null through instead of converting
it to 0.
2025-02-13 18:15:21 +00:00
81b2d5bc89 Add workflow run visualizer (#10146)
- Remove the tabs from the workflowRun show page; now, we only show the
visualizer with the nodes highlighted based on the run's output
- Create the `generateWorkflowRunDiagram` function to go other each step
and assign a `runStatus` to it based on the workflow run's output

Remaining to do:

- Show the output of each step in the right drawer when selecting one
- The labels (e.g. "1 item") are not set on the edges; we might
implement that later


https://github.com/user-attachments/assets/bcf22f4c-db8c-4b02-9a1a-62d688b4c28e

Closes https://github.com/twentyhq/core-team-issues/issues/338
Closes https://github.com/twentyhq/core-team-issues/issues/336
2025-02-13 18:57:54 +01:00
1863ef7d10 Fix bug with table aggregate footer when switching object (#10198)
This PR fixes a bug that happens when switching from an object to
another.

It is a temporary fix because it fixes a problem downstream, that
shouldn't happen, but it is tied to the new implementation of the main
context store.

We should find a way to have context store states defined earlier
because it might impact logic that was developed during the previous
months that didn't anticipated the state of current view id taking more
re-renders to be correctly set between page change / table change.
2025-02-13 18:36:36 +01:00
5963c0f384 [REFACTOR][BUG] Dynamically compute field to write in cache CREATE (#10130)
# Introduction
While importing records encountering missing expected fields when
writting a fragment from apollo cache

## Updates

### 1/ `createdBy` Default value
When inserting in cache in create single or many we will now make
optimistic behavior on the createdBy value

### 2/ `createRecordInCache` dynamically create `recordGrqlFields`
When creating an entry in cache, we will now dynamically generate fields
to be written in the fragment instead of expecting all of them. As by
nature record could be partial

### 3/ Strictly typed `RecordGqlFields`

# Conclusion
closes #9927
2025-02-13 17:43:54 +01:00
58a62ec6f0 [settings/security] Prevent toggle if only 1 authentication option (#10169)
fix https://github.com/twentyhq/core-team-issues/issues/387
2025-02-13 15:54:37 +00:00
8a425456f2 feat(workspace): add support for custom domain status toggle (#10114)
Introduce isCustomDomainEnabled field in Workspace entity to manage
custom domain activation. Update related services, types, and logic to
validate and toggle the custom domain's status dynamically based on its
current state. This ensures accurate domain configurations are reflected
across the system.

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-02-13 15:01:33 +00:00
b67e850011 Fix table content missing when navigating to previously browsed page (#10188)
We are using useInView to detect if a row should be rendered or not.

# Behavior issue

When browsing an Index page (let's say People), then navigating to
another one (Company), then back to People, the rows were not displayed
anymore. For some reason the inView value was set to false in this case

# Fix
- I have updated the useInView (react-intersection-observer) package but
it did not fix it
- useInView provides a ref. However, I believe this was conflicting with
the draggableRef; cecause we are in a <table> we cannot add additional
containers and are forced to apply both refs to the <tr> (draggableRef +
inViewRef). I believe this was causing the issue. I have added the
inView ref to an empty <td> within the row which is achieving the same
goal without forcing to combine refs
2025-02-13 13:40:33 +01:00
41dfeb34d1 Add sync metadata to migrate command (#10182)
Add sync-metdata to 0-42 upgrade command
2025-02-13 13:36:29 +01:00
75268c3040 chore: update eslint configuration and clean up index file (#10185)
Removed eslint disable comment from the index file and updated the
eslint ignore list to exclude the serverless driver index file. This
ensures the file is skipped during linting without unnecessary inline
comments.
2025-02-13 11:35:55 +01:00
467aa775a8 Fixed context menu bug with new record filters refactor (#10181)
This PR enforces objectMetadataItem to be passed to hook
useColumnDefinitionsFromFieldMetadata, which was never used without an
objectMetadataItem passed in parameters (and probably shouldn't anyway)

Removed the associated test that tested for an undefined
objectMetadataItem parameter in useColumnDefinitionsFromFieldMetadata.

This allows to remove the need to rely on recordIndexContext to retrieve
the filterableFieldMetadataItems.
2025-02-13 11:15:41 +01:00
77d72e9b1c refactor(auth/sso): rename GetAuthorizationUrl for clarity (#10173)
- Rename `GetAuthorizationUrl` to `GetAuthorizationUrlForSSO`
- Move `GetAuthorizationUrlForSSO` from `sso.resolver.ts` to
`auth.resolver.ts` to avoid the permission guard and let users use an
SSO provider.
- Fix an issue in OIDC guard that breaks the connection if you have
multiple SSO providers + add tests for OIDC guard.
2025-02-13 11:15:22 +01:00
d7b84de1b5 Fix CI after SettingsFeature enum update (#10178) 2025-02-13 09:19:36 +00:00
372ebd14fe withDelete option to TypeOrm (#10161)
fixes https://github.com/twentyhq/core-team-issues/issues/112
2025-02-13 08:50:24 +01:00
d2a5027549 Fix contextProvider not set preventing login 2025-02-13 01:03:10 +01:00
eb6757f99c Fix linter on main 2025-02-13 00:58:14 +01:00