Commit Graph

4934 Commits

Author SHA1 Message Date
da5ae34109 [permissions] Filter tabs + registered actions according to permissions (#12657)
Note and task tabs in side panel should only show if user has reading
permission on them.

"Go to companies", "Go to workflows", etc. in command menu should only
show is user has reading permission on related objects.

<img width="507" alt="Capture d’écran 2025-06-17 à 11 09 50"
src="https://github.com/user-attachments/assets/3a2a4c25-0b9b-4ee6-b18f-b019b8a56d47"
/>
<img width="505" alt="Capture d’écran 2025-06-17 à 11 09 56"
src="https://github.com/user-attachments/assets/8a219955-cc8e-4dbf-a4f9-a50e1aaa4b59"
/>

**How to test** 
Assign a user with a custom role that has **no** read permissions on
notes/tasks/workflows/companies/opportunities/people (no need to test
them all but at least one between note and tasks; workflows; one between
companies/opportunities/people). Check that you don't see the related
tab / action.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2025-06-18 15:12:58 +00:00
e77e7e3149 [permissions] Adapt defaultPath to permissions (#12689)
We had two linked issues
1. default path was not taking permissions into account and could link
to an object user does not have read access on's page
2. visiting the url of an object the user does not have read access on
was possible and returned a "blank" page

Before

https://github.com/user-attachments/assets/e4da1de5-d7e9-4644-ba8e-cd366a9b0fad

After

https://github.com/user-attachments/assets/6576f662-d3a0-4173-8b48-233cc0a04cdf

Also tested with V1.
2025-06-18 16:32:29 +02:00
d284fd1d71 Fix authUser decorator usage (#12697)
Solving issue: we don't have `user.firstName` and `user.lastName` set
when signin with e-mail/password. CreateBy, invitation emails and
validation domain email need those info

## Before

## ExecutedBy

<img width="511" alt="image"
src="https://github.com/user-attachments/assets/b85bbda5-f26b-4137-a875-0ef926a1eec4"
/>

## Invitation email

<img width="764" alt="image"
src="https://github.com/user-attachments/assets/107c71bf-a6b2-4291-a31b-6ce48b11dd77"
/>

### Validate domain email

<img width="829" alt="image"
src="https://github.com/user-attachments/assets/213ff7c5-f86d-476f-8f4d-74299d7eb13d"
/>


## After

## ExecutedBy

<img width="500" alt="image"
src="https://github.com/user-attachments/assets/b4125e84-b355-4280-8611-b4e36e6033c7"
/>

## Invitation email

<img width="754" alt="image"
src="https://github.com/user-attachments/assets/952fe5bf-f4da-4fef-b765-fc220255dedf"
/>

### Validate domain email

<img width="709" alt="image"
src="https://github.com/user-attachments/assets/6950097c-51ae-469b-a7cf-f561650ee86e"
/>
2025-06-18 13:57:55 +00:00
82876bb7d1 Fix table fetchMore flakyness (#12702)
Remove useless debounce + using cacheFirst for fetchMore as fetchingMore
will trigger initial fetch if not already performed
2025-06-18 15:37:22 +02:00
56d934872d Fix user signup event (#12700)
Send event for every type of user creation
2025-06-18 15:32:46 +02:00
2ebe437885 i18n - translations (#12701)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-06-18 13:42:24 +02:00
d98f5a241f fix missing trash x off icon (#12699)
## Context
Icon does not exist in tabler-icon it seems, had to create a new one
manually.

Also added a reload current user when roles are updated to update the
state accordingly

<img width="419" alt="Screenshot 2025-06-18 at 13 06 23"
src="https://github.com/user-attachments/assets/2667883e-c392-4f68-bc04-7471b9bdd6fd"
/>
2025-06-18 13:32:18 +02:00
9612a4928d fix(signinup): several issues (#12698)
- Fixed an issue where you have invitations in your available workspaces
for signup.
- Corrected the URL display in the browser when hovering over the twenty
logo on the sign-in/up form.
- The workspace list is now displayed when you are logged into the
default domain.
2025-06-18 13:13:44 +02:00
c9344cf427 i18n - translations (#12696)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-06-18 12:20:54 +02:00
78d39294ef Import - Increase record import limit (#12627)
<img width="700" alt="Screenshot 2025-06-16 at 15 05 09"
src="https://github.com/user-attachments/assets/a09c3fae-c0ae-4a63-8bda-9d29c97a6a66"
/>


closes https://github.com/twentyhq/twenty/issues/11980
2025-06-18 10:13:24 +00:00
83f28f113a Onboarding - fix infinite loop (#12694)
To reproduce : 
- IS_BILLING_ENABLED=true
- Start creating a workspace. At each onboarding step - Create Profile /
SyncEmails / InviteTeam - suspend your workspace > infinite loop

closes https://github.com/twentyhq/twenty/issues/12272
2025-06-18 11:56:34 +02:00
fb6f2610c5 fix(admin-panel): prevent layout shift when toggling feature flags (#12686)
Closes #12571
~~## What’s broken?~~
~~Toggling a feature flag in the admin panel re-renders the entire table
and uses a Framer Motion slide animation for the knob. Each animation
frame forces a layout recalculation all the way up, causing the page to
“jump.”~~

~~## What’s the fix?~~
~~Swap out the Framer Motion toggle for a pure-CSS version:~~
~~- Container is position: relative~~
~~- Knob is position: absolute and moves via left~~
~~- A transition: left 0.3s ease + will-change: left hint runs on the
compositor layer~~

~~This keeps the smooth slide effect but never triggers parent layout
reflows.~~

~~No changes to the public <Toggle> API or behavior.~~

~~TODO: test all toggles in app and stories if any~~

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2025-06-18 11:56:19 +02:00
657b87fd0c Fix banner z-index (#12683)
## Before

![image](https://github.com/user-attachments/assets/177e8ce2-eaba-442c-a10a-e3a44c91114f)

## After
<img width="1338" alt="image"
src="https://github.com/user-attachments/assets/d44da1b7-0d82-4b04-91b4-cbaa404e9da2"
/>
2025-06-18 11:46:23 +02:00
e00b75e63d i18n - translations (#12693)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-06-18 00:47:21 +02:00
6650d4b059 Add delete role action (#12691)
## Context
Add delete role action, the backend takes care of most of the operations
(can't delete a default role, can't delete the admin role, re-assign
existing members to default role...)

<img width="592" alt="Screenshot 2025-06-17 at 20 24 21"
src="https://github.com/user-attachments/assets/3f01f12c-d8a4-466c-b4c7-9674f597a7a8"
/>

<img width="567" alt="Screenshot 2025-06-17 at 20 24 24"
src="https://github.com/user-attachments/assets/8aceaf6c-3082-4ca6-a4dd-9767fc186923"
/>
2025-06-18 00:43:23 +02:00
338f08b3a4 Remove unused hook useSelectFilterFromViewBarFilterDropdown (#12687)
As title
2025-06-17 23:52:38 +02:00
c72ecde094 fixing index on relations (#12602)
## Why

After the changes on relations, index on relations were skipped by the
syncmetadata service, so no more migrations were generated for relation
fields.

We wanted to fix this.


## Test

This PR adds unit tests for the `createIndexMigration` utility in the
workspace migration builder. The tests cover:

- Creating index migrations for simple fields (e.g., text fields)
- Creating index migrations for relation fields (ensuring correct column
naming, e.g., `authorId` for the `author` objectmetadataname)


## Excluded
The delete index on relation does not need the column names so i don't
think i needed to work on this method. I might be wrong.


## Checklist

- [x] Added/updated unit tests for index migration creation
- [x] Verified correct handling of simple and relation fields
- [x] Ensured all tests pass

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2025-06-17 18:22:08 +02:00
1d703bbf2b Fix single picker dropdown search filter (#12688)
This PR fixes the single record picker search filter that wasn't reset
on close, thus preventing from having the result of a previous search
when re-opening a single record picker.

Before : 


https://github.com/user-attachments/assets/85a3a780-f010-4b63-8c86-2ed28202e9fd

After : 



https://github.com/user-attachments/assets/2db082b5-add2-4952-b812-6a4f24cb3b26


Fixes https://github.com/twentyhq/twenty/issues/12667
2025-06-17 17:44:29 +02:00
0ae43f518d catching better internal errors from google (#12663)
Small fix to avoid unknown errors into temporary errors
2025-06-17 16:48:40 +02:00
1cee587709 Removing trailing slashes (#12658)
Fix inconsistent domain URL formats : removing the last / that was
caused by URL method

Standardize URL formatting to ensure consistent links storage and
retrieval of domain URLs across the application. Will improve the
dedpulicates in the links

Note: there is another temporary issue from google that was solved on
the 13th of june https://groups.google.com/g/adwords-api/c/tRSQMRZrJYM
but we consider this out of this scope

Fixes #12621
2025-06-17 16:29:14 +02:00
cc7a37b0cc Fix "No results found" in record pickers (#12685)
This PR fixes small bugs around the "No results found" record picker.

Before : 


https://github.com/user-attachments/assets/e2eee648-1cb1-40fb-ad3c-fe4724f7314e

After : 


https://github.com/user-attachments/assets/714e6dea-3c65-4e04-9fef-ee718c94bbba

Minor improvements : 
- Created a new component `RecordPickerNoRecordFoundMenuItem` to
abstract this "No records found" menu item
- Removed `not-allowed` cursor from MenuItem in disabled state.

Fixes https://github.com/twentyhq/twenty/issues/12666
2025-06-17 16:10:44 +02:00
c88495b545 i18n - translations (#12684)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-06-17 16:05:27 +02:00
c79daced48 Fix readonly mode with permissions v2 for tables (#12617)
isReadonly was not set anymore, this PR put it back with the new
permission check
Also fix missing readonly mode for title cell
2025-06-17 14:03:50 +00:00
8f07f681d2 role settings various fixes + update role object level permission design (#12664)
<img width="944" alt="Screenshot 2025-06-17 at 12 10 07"
src="https://github.com/user-attachments/assets/abfda0c2-3266-465c-b98e-7bf78660a057"
/>
<img width="943" alt="Screenshot 2025-06-17 at 12 10 00"
src="https://github.com/user-attachments/assets/8fd28479-1f55-4f3a-815c-1195154d3305"
/>
<img width="667" alt="Screenshot 2025-06-17 at 12 09 49"
src="https://github.com/user-attachments/assets/8d444523-4e43-4b59-95bb-45dc5fac5520"
/>
<img width="632" alt="Screenshot 2025-06-17 at 12 09 42"
src="https://github.com/user-attachments/assets/8a1e45bb-7fde-42a6-9f2d-79cbec8121cd"
/>
<img width="643" alt="Screenshot 2025-06-17 at 12 09 36"
src="https://github.com/user-attachments/assets/43f80a92-16e2-4a0e-8a07-2f3e7278ff4a"
/>
2025-06-17 14:00:31 +00:00
f10abec505 fix(front): import missing fragment (#12678)
Co-authored-by: Paul Rastoin <45004772+prastoin@users.noreply.github.com>
2025-06-17 13:50:12 +00:00
834ae3ceb5 Adjutment to the padding (#12619)
it is an unusual 2.75 here.

I tried to set it to 3 however it requires a big re-work on all cells of
the table. The main concern being the new border left of 1px for the
"focus mode"

Note: to be fair, we are not 100% aligned with the Figma on the paddings
and alignment contruction. It is not related to this issue, but makes
this fix not ideal since not aligned with our CSS standards.

Fixes https://github.com/twentyhq/twenty/issues/12607

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2025-06-17 15:45:00 +02:00
bcfa08389b Fix linter on main 2025-06-17 15:37:05 +02:00
27e661d76f Deactivate workflow when deleted (#12677)
## Done
Update manually (without status update job) workflow and
workflowVersions statuses when workflow is deleted

## Not Done
Status optimistic rendering on workflow index deleted page. This page is
already buggy, this will be fix by
https://discord.com/channels/1130383047699738754/1384177035244732487
2025-06-17 15:33:06 +02:00
a47a6be4a8 Improve seeds (#12675)
- Add seeds for notes/tasks
- Adds account manager to companies
- A companies and phone numbers to people
- Add many more opportunities

TODO: add timeline activities

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-06-17 15:25:05 +02:00
f3a8b849aa Fix table loading (#12653)
As per title
2025-06-17 15:01:28 +02:00
fb9d5066dc Add basic UUID support to filters (#12676)
- Only operands IS
- Do not set filter when no valid uuids or variables
- Allow ID field to be filterable despite being system



https://github.com/user-attachments/assets/e1c67103-728f-4798-91c6-4aea162f8698

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2025-06-17 14:58:50 +02:00
01a69f6288 Fixed single record picker missing dropdown separator (#12672)
This PR fixes a missing dropdown menu separator when no result found in
a single record picker.

Before : 


![image](https://github.com/user-attachments/assets/77ea2275-cace-443b-b691-bab52dd8cfc0)

After : 

<img width="233" alt="image"
src="https://github.com/user-attachments/assets/73919d63-3126-4b56-b335-34d3c9d6ac15"
/>

Fixes https://github.com/twentyhq/twenty/issues/12665
2025-06-17 14:30:17 +02:00
efe1700cc8 Set hotkey scope when navigating in side panel's history (#12634)
This PR fixes a bug where the side panel couldn't be closed after the
execution of a workflow with a form. After the execution of the
workflow, `goBackFromCommandMenu` is called to show the workflow run.
The hotkey scope wasn't reset properly, and the click outside listener
from the side panel is only triggered when the scope is
`CommandMenuFocused`.

This PR sets the hotkey scope to `CommandMenuFocused` when going back or
when navigating inside the command menu history.

Note: (we don't use `setHotkeyScopeAndMemorizePreviousScope` here
because we don't need to memorize the active hotkey scope of the page we
are leaving)

Before:


https://github.com/user-attachments/assets/09edf97b-7520-46ce-ade3-6bb6b15ef435


After:


https://github.com/user-attachments/assets/16c288cb-1d42-4099-8925-74a673f7a479
2025-06-17 13:37:27 +02:00
99480e044f Import - fix uuid field import (#12659)
[Added here

](https://github.com/twentyhq/twenty/pull/12489/files#diff-4aeb04b117d39d98f2bcdc6045f825888419f4f6c96496b4278b9f2bcc1b95c6R287)
but
[accidentally removed during rebase
here](https://github.com/twentyhq/twenty/pull/12615/files#diff-4aeb04b117d39d98f2bcdc6045f825888419f4f6c96496b4278b9f2bcc1b95c6L287)
2025-06-17 13:16:27 +02:00
2877b28afb [permissions] Enable permissionsV2 in seeds (#12623)
In this PR

- enable permissions V2 in seeds 
- remove permission V2 toggle in tests
2025-06-17 09:56:11 +00:00
54090a0340 Fix icon button group design (#12656)
- remove not expected animation
- move border to iconButtonGroup ui component
2025-06-17 11:16:53 +02:00
713d3defef Import - Upsert on composite fields (#12615)
To test : 
- Import a record with Id column (for upsert-ing) + some subfields in
each composite fields. Check that only matched subfields are updated
(Main issue)
- Import a record with a multi-select field - Check it works + Match
multi-select field on a non multi-select column, check it does not work.
(Specific bug fixed in second commit is : undefined value in multi
select column (corresponding to no item selected) caused error in
multi-select parsing).

closes https://github.com/twentyhq/core-team-issues/issues/990
2025-06-17 11:07:51 +02:00
093073d5e2 Hide runs by default on workflow index view (#12652)
Too many runs cause perf issues on index page. Let's hide this field
until we improve the way we fetch relations
2025-06-17 11:06:04 +02:00
f7396e3531 Enable find records action + Implement readonly (#12636)
- Add readonly in context
- Avoid using it in AdvancedFilters component directly. Keeping it
workflow related

<img width="495" alt="Capture d’écran 2025-06-16 à 18 23 34"
src="https://github.com/user-attachments/assets/dfdfdb71-d5a9-4eed-8938-b06790c62bcd"
/>
2025-06-17 11:02:13 +02:00
18d154282e Harmonize filter and sort dropdown width (#12649)
This PR sets the same width for all dropdowns used in filter and sort
features.

We use GenericDropdownContentWidth. ExtraLarge (320px) as specified on
Figma :
https://www.figma.com/design/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=44490-81923&t=h6KWtlM5WUm4aujY-11

Fixes https://github.com/twentyhq/core-team-issues/issues/1004
2025-06-17 10:26:31 +02:00
0043665202 BREAKING CHANGE: Fix broken support button (#12648)
## Context 

Support button was missing for configuration having support enabled
(FrontApp)

<img width="1253" alt="image"
src="https://github.com/user-attachments/assets/930e3e0c-05a1-4a5b-820b-bb257f19fdde"
/>


## How

Recently, we changed some enums from lowercase to uppercase in graphql

## Problem resolution

supportDriver was typed as a string where we could have used
SupportDriver type. I'm exposing it in the graphql generated files to
re-use in the front so this issue cannot happen anymore
2025-06-17 10:26:22 +02:00
ccd16fb27f Display + edge icon on hover (#12635) 2025-06-17 10:17:58 +02:00
15c703c01e [permissions] allow checkoutSession if workspace is pending_creation (#12638)
Closes https://github.com/twentyhq/core-team-issues/issues/992

Occasionaly, users can have a subscription created but still have their
workspace not activated and therefore not have a role yet, if they did
not go through the whole flow the first time. This causes a permission
check error while calling checkoutSession, while it shouldn't.

We detected the error through sentry. Since there has been no occurences
for the past three weeks in aggregateCompanies and getCurrentUser
transactions (while we have daily errors in checkoutSession), I assume
it has been fixed in the meantime. If not it will pop again on sentry
anyway !
<img width="798" alt="Capture d’écran 2025-06-16 à 18 38 43"
src="https://github.com/user-attachments/assets/2067c166-8b19-4c83-9270-6e49ee7ae0f5"
/>
2025-06-17 09:16:22 +02:00
c7b4001c3d Migrate cursor rules (#12646)
Migrating rules to new format but they should be re-written entirely, I
don't think they help much and are not auto-included (except
architecture)
2025-06-17 07:54:02 +02:00
0b9280a4fc Fix path typo for timeline repositories (#12640)
## Summary
- rename `timeline/repositiories` dir to `repositories`
- update all imports referencing the new `repositories` path

## Testing
- `git status --short`

------
https://chatgpt.com/codex/tasks/task_e_68506cd0782c8320aea78cb452f228a0

Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
2025-06-16 23:53:56 +02:00
d1e0af7f38 Improve sync performances (#12639)
## Goal

We have identified that sync-metadata (which is called during new
workspace initialization) is slow mainly because of workspaceMigration
application (migration-runner module). This is due to the fact that we
use typeORM API to perform schema changes, which often query the
existing schema. As querying the existing schema is costly (especially
with ~1M existing columns) and as we already have what we need described
as metadata, we will use raw SQL directly. This should divide the
workspace initialization time by x2.

## How

This PR can be read in two commits:

1. Extract functions tied to column migrations in a separate service
(`workspace-migration-column.service`) + deprecate COMMENT column
migration type which is not useful since we are not using pg-graphql
anymore
2. Re-work `workspace-migration-column.service` to make it clearer + use
raw SQL

## Result

Before:
<img width="1367" alt="image"
src="https://github.com/user-attachments/assets/e730df7b-db7f-4433-9ce5-52841b010990"
/>

After:
<img width="1367" alt="image"
src="https://github.com/user-attachments/assets/72d2c2b1-2475-4541-a3d5-50b70824a2e4"
/>



## Manual Testing

- Sync-metadata OK
- Workspace init OK
2025-06-16 23:53:42 +02:00
47a03e3907 Fix typos in website README (#12641)
## Summary
- fix typos in `packages/twenty-website/README.md`

## Testing
- `npx nx format:check` *(fails: Could not find Nx modules)*

------
https://chatgpt.com/codex/tasks/task_e_68506cb30dcc832095fbe4b9b360fe8d
2025-06-16 21:27:59 +02:00
878e1dbfd9 Remove actions when record deleted (#12633)
## All Objects
Remove from deleted records view for all object:
- NoSelectionRecordActionKeys.CREATE_NEW_RECORD
- NoSelectionRecordActionKeys.IMPORT_RECORDS
- SingleRecordActionKeys.ADD_TO_FAVORITES
- SingleRecordActionKeys.REMOVE_FROM_FAVORITES

Remove from index view for deleted record:
- DELETE
- ADD_TO_FAVORITES
- REMOVE_FROM_FAVORITES

## Workflows
Remove from deleted workflows view:
- NoSelectionWorkflowRecordActionKeys.GO_TO_RUNS
- SingleRecordActionKeys.EXPORT

Remove from index view for deleted workflow:
- ACTIVATE
- DEACTIVATE
- DISCARD_DRAFT
- SEE_ACTIVE_VERSION
- SEE_RUNS
- SEE_VERSIONS
- TEST
2025-06-16 17:20:13 +02:00
22dade6ef7 Fix remaining field issues for find record action (#12628)
- Handle currency code and country multiselect fields

Before / After
<img width="252" alt="Capture d’écran 2025-06-16 à 15 24 35"
src="https://github.com/user-attachments/assets/3e921ffa-33cb-41dd-82d7-ef3a1aef3510"
/> <img width="252" alt="Capture d’écran 2025-06-16 à 15 24 47"
src="https://github.com/user-attachments/assets/115d18b8-7a15-46b1-8786-bd63b7bb1989"
/>

- Use action button rather than light icon button to match figma. Asked
@Bonapara, we want it for both workflow and index page

Before
<img width="252" alt="Capture d’écran 2025-06-16 à 15 25 02"
src="https://github.com/user-attachments/assets/ec376c70-d2df-417b-aefc-625e965dded1"
/>

After
<img width="252" alt="Capture d’écran 2025-06-16 à 15 23 50"
src="https://github.com/user-attachments/assets/1824ff86-b5f1-47ad-8b5c-7ea84e0e3ac6"
/> <img width="400" alt="Capture d’écran 2025-06-16 à 15 25 40"
src="https://github.com/user-attachments/assets/f2daba64-0982-40ee-9662-a23f86385a8f"
/>

- Remove `isRelative` from date field option for workflows
2025-06-16 16:32:10 +02:00
e922843afb Created DropdownMenuInnerSelect and implemented it for filter dropdowns (#12626)
This PR introduces a new generic UI component DropdownMenuInnerSelect,
that improves the UI by allowing to have both a dropdown menu header and
a select in the header.

In this PR we implement it just for filter dropdown components.

Fixes https://github.com/twentyhq/core-team-issues/issues/1001
2025-06-16 16:16:32 +02:00