8000 Tags · ayePete/twenty · GitHub
[go: up one dir, main page]

Skip to content

Tags

Tags

twenty/v2.41.0

Toggle twenty/v2.41.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
i18n - website translations (twentyhq#26096)

Created by Github action

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/26096?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->

Co-authored-by: github-actions <github-actions@twenty.com>

sdk/v2.41.0

Toggle sdk/v2.41.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
i18n - website translations (twentyhq#26096)

Created by Github action

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/26096?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->

Co-authored-by: github-actions <github-actions@twenty.com>

twenty/v2.40.0

Toggle twenty/v2.40.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
List every kind pull does not export yet (twentyhq#25811)

## What

The sync and recovery page tells a developer what `yarn twenty pull`
does not write, and the "Not exported yet" bullet is incomplete. It
names roles and permissions, command menu items, logic functions and
front components. Seven more kinds are also not exported.

That page is the contract someone reads before deciding whether a pulled
tree is safe to apply, so a partial list reads as a promise that
everything else round-trips.

## How

Completed the bullet against what
`application-manifest-export.service.ts` actually assembles. The
exporter hardcodes nine sections to `[]`:

```ts
logicFunctions: [],   frontComponents: [],  permissionFlags: [],
roles: [],            skills: [],           agents: [],
publicAssets: [],     commandMenuItems: [], timelineActivityTypes: [],
```

and two more never reach the manifest at all: `connectionProviders` is
an optional key the export never sets, and
`application.applicationVariables` is not emitted by
`fromFlatApplicationToApplicationManifest`.

So the bullet gains skills and agents, connection providers, application
variables, public assets and timeline activity types. Permission flags
stay folded into the existing "roles and permissions".

Nothing else on the page changes. The advice immediately below it is
already correct and unchanged:

> push a pulled tree back with `yarn twenty apply --no-delete` until the
missing kinds are covered. A pruning `yarn twenty apply` would delete
them

## Why it matters

Deletion inference destroys any row of the application that the incoming
manifest does not mention, so every kind on that list is destroyed by a
pruning apply of a pulled tree. Measured on a seeded dev workspace,
pulling the Custom application and applying without `--no-delete`
destroyed 19 rows, and because `core."roleTarget"."roleId"` is `ON
DELETE CASCADE` it left 1004 of 1005 members with no role.

Connection providers are the reason this is worth correcting rather than
leaving to the export work.
`core."connectedAccount"."connectionProviderId"` is `ON DELETE CASCADE`
and is the only inbound cascade on that table, so losing a provider
takes its connected accounts with it, along with their encrypted access
and refresh tokens. A developer who read the old list would have no
reason to expect that.

The list shrinks again as each kind gets exported.


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/25811?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->

ui/v1.0.0-alpha.2

Toggle ui/v1.0.0-alpha.2's commit message
fix: republish twenty-ui as MIT (1.0.0-alpha.2) to resolve stale AGPL…

… artifacts

npm still serves twenty-ui@1.0.0-alpha.0/alpha.1 with AGPL-3.0 metadata
and the pre-twentyhq#23564 LICENSE, while the repo is MIT since twentyhq#23564. Both
artifacts predate the 2026-07-30 relicensing, so this is a missed
republish, not an intentional difference.

- Bump twenty-ui 1.0.0-alpha.1 -> 1.0.0-alpha.2 so the next publish
  ships the post-twentyhq#23564 package.json (license: MIT) and MIT LICENSE.
- List LICENSE explicitly in twenty-ui files so the MIT text is always
  in the tarball (verified with npm pack --dry-run).
- Point create-twenty-app scaffold template at 1.0.0-alpha.2, so apps
  created via the official quick start no longer install an AGPL-labeled
  twenty-ui.
- Sync English docs, codex-plugin references, and cross-doc validator.

twenty-shared needs no republish: it is private:true, has no version,
and is only consumed via workspace:* (bundled at build time by
twenty-sdk/twenty-client-sdk, never via the registry). The stale
twenty-shared@0.41.0-canary (AGPL, 2025-01-24) should be deprecated on
npm by a maintainer rather than republished.

Fixes twentyhq#25722

twenty/v2.39.5

Toggle twenty/v2.39.5's commit message
Register the GraphQL resolver name map cache provider in the worker (t…

…wentyhq#25717)

## Context

The "Swallowed invalidations" panel on the workspace-migration-metrics
dashboard sits at about 1,100 a day in prod EU, roughly 10% of all
post-commit cache invalidations. Every one of them is the same error,
and all of them come from worker pods:

```
[Runner] Cache invalidation failed after committed transaction: Error: Cache provider with key name "graphQLResolverNameMap" not found
```

The runner adds `graphQLResolverNameMap` to the keys it recomputes
whenever a migration touches object or field metadata. The provider for
that key was only registered by `DirectExecutionModule`, which the API
loads through the GraphQL config module and the worker never loads. So
any worker-run migration with schema changes hit `getProviderOrThrow`
and aborted the whole `invalidateAndRecompute`.

In prod the two sources are `InstallPreInstalledAppsJob` on the default
worker (about 160 a day) and `StreamAgentChatJob` on the ai-stream
worker, where agent tools create fields, objects and page layouts (about
950 a day).

## What this changes

- Move `WorkspaceResolverNameMapCacheService` into its own
`WorkspaceResolverNameMapCacheModule`, imported by both
`DirectExecutionModule` and `CoreEngineModule`, so the worker registers
the provider too.

## Verification

- `npx tsgo -p tsconfig.json --noEmit` in twenty-server: no errors in
the touched files.
- `npx nx lint:diff-with-main twenty-server`: clean.

twenty/v2.39.4

Toggle twenty/v2.39.4's commit message
refactor(server): warm up prebuilt logic functions after the install …

…migration commits (twentyhq#25672)

Installing an application with prebuilt logic functions built the
dependencies layer, the SDK layer and the lambda for each function
inside the workspace migration transaction. For an app with npm
dependencies (call-recorder on staging today) the first function's build
kept the migration's Postgres connection idle for ~36s with no
statement, the connection was terminated by the idle-in-transaction
timeout, and the next insert failed with `Query runner already
released`. The whole install rolled back.

This also motivated twentyhq#25608, which threaded the migration's in-flight
flat maps down to the SDK generation so the in-transaction build could
see uncommitted metadata.

- Logic functions are inserted as `PREBUILT` by the create and update
action handlers; the handlers no longer talk to the lambda driver, so
the migration transaction only holds DB and DDL work.
- A `WarmUpApplicationLogicFunctionsJob` (workspace queue, 3 retries
with exponential backoff) installs the prebuilt bundle of the functions
the migration created or whose checksum, execution mode or build state
it changed, derived from the migration's actions so unchanged functions
of a large app are not even looked up. It is enqueued by
`ApplicationInstallService` at the end of `runInstall`, after the SDK
client regeneration, the post-install hook and the registration refresh,
so a rolled-back fresh install never races a warm-up that is already
building lambdas. Only when at least one function needs a build. Dev
sync relies on self-heal.
- The executor's on-demand install (`ensurePrebuiltBundleInstalled`)
moves to the new `LogicFunctionPrebuiltWarmUpService` and is shared by
the executor and the job. A function executed before its warm-up ran
still installs itself through the existing checksum check, as it did
before twentyhq#20873 in LIVE mode.
- The `flatEntityMapsOverride` plumbing from twentyhq#25608 (driver interface,
lambda executor and layer managers, SDK archive and generation services,
schema factory, SDL service, helper type and util) is reverted: it only
existed for the in-transaction build. The runner's `structuredClone` of
the cache maps and its `flat-maps-clone` phase metric are kept, since
mutating the shared cache was a real bug on its own.
- `shouldReinstallLogicFunctionPrebuiltBundle` is removed with its only
caller.
- The warm-up builds the first function alone, so the dependencies and
SDK layers are created once, then the remaining functions ten at a time.
The dependencies layer creation gets an application-scoped lock
(`lambda-deps-layer:<layerName>`) so concurrent builders do not each
invoke the yarn-install lambda.
- SDK layer rebuilds are serialized per application. Build locks are per
function while the layer is shared by the application, so two concurrent
builds (the warm-up and an on-demand execution, or two executions after
an upgrade) could each delete every version and one could remove the
version the other had just published. The stale rebuild now runs under a
`lambda-sdk-layer:<layerName>` cache lock and re-reads the application
after acquiring it, so a waiter reuses the layer published while it
waited.

A warm-up that keeps failing is logged by the job and dead-lettered by
the queue; nothing is surfaced to the end user yet.

- `npx tsgo -p tsconfig.json --noEmit` in `twenty-server` passes.
- `oxlint` and `oxfmt` clean on the changed files.
- Unit: `logic-function-prebuilt-warm-up.service.spec.ts` (new),
`find-logic-function-universal-identifiers-to-warm-up.util.spec.ts`
(new), `lambda-layer-manager.service.spec.ts` (new, two concurrent stale
builds publish once) and `application-manifest-apply.service.spec.ts`
pass.

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/25672?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->

sdk/v2.40.0

Toggle sdk/v2.40.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: republish twenty-ui as MIT (1.0.0-alpha.2) to resolve stale AGPL…

… artifacts (twentyhq#25738)

Fixes twentyhq#25722.

## Problem
twentyhq#23564 (merged 2026-07-30) relicensed the app-development packages to
MIT, but npm still serves builds that predate the relicensing:

- twenty-ui@1.0.0-alpha.0 (latest) and 1.0.0-alpha.1 (alpha tag, both
published 2026-06-24): AGPL-3.0 on the registry, old root LICENSE in the
tarball.
- twenty-shared@0.41.0-canary (published 2025-01-24): AGPL-3.0.

Meanwhile twenty-sdk, twenty-client-sdk, and create-twenty-app (all
published after 2026-07-30) are correctly MIT. The repo itself is
already correct (license: MIT plus per-package MIT LICENSE).

In practice, create-twenty-app scaffolds apps pinning "twenty-ui":
"1.0.0-alpha.1" and the generated front component imports from
twenty-ui/data-display and twenty-ui/icon — the exact scenario twentyhq#23564
was written to prevent.

## What this PR does
- Bumps packages/twenty-ui/package.json 1.0.0-alpha.1 to 1.0.0-alpha.2
so the next publish ships the post-twentyhq#23564 package.json (license: MIT)
and MIT LICENSE.
- Adds LICENSE explicitly to twenty-ui files so the MIT text is always
in the tarball (verified: npm pack --dry-run lists package/LICENSE, 1.1
kB MIT, license=MIT).
- Points the create-twenty-app scaffold template at 1.0.0-alpha.2.
- Syncs English docs (front-components.mdx, project-structure.mdx),
codex-plugin references, and the cross-doc-contracts.js validator.

## Why twenty-shared is intentionally untouched
packages/twenty-shared/package.json is private:true with no version — it
is only consumed via workspace:* (bundled at build time; twenty-sdk and
twenty-client-sdk list it under devDependencies, never via the registry)
and the scaffold template does not depend on it. There is nothing to
republish; republishing would mean making an internal package public
again. Instead, a maintainer should run npm deprecate on
twenty-shared@0.41.0-canary pointing at this issue. The in-repo state
(license: MIT plus MIT LICENSE) is already correct.

## Maintainer follow-up needed (cannot be done in a PR)
1. Publish 1.0.0-alpha.2 from packages/twenty-ui, then promote it to
latest (currently latest still points at the stale 1.0.0-alpha.0; alpha
points at 1.0.0-alpha.1).
2. npm deprecate the stale artifacts: twenty-ui@1.0.0-alpha.0,
twenty-ui@1.0.0-alpha.1, and twenty-shared@0.41.0-canary.
3. Confirm npm view twenty-ui@1.0.0-alpha.2 license returns MIT and
package/LICENSE in the tarball is the MIT text.

## Verification done
- npm view confirms both published twenty-ui versions are AGPL-3.0 and
predate twentyhq#23564; repo is MIT.
- npm pack --dry-run on the bumped package includes package/LICENSE
(MIT) with license=MIT.
- No test pins the old version (only the template literal, docs, and
validator — all updated); twenty-apps examples use caret ranges that
resolve forward to alpha.2 automatically, and root yarn.lock uses
workspace:*, so no lockfile churn is needed.


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/25738?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->

twenty/v2.39.3

Toggle twenty/v2.39.3's commit message
fix(server): build the install-time SDK layer from the migration's ow…

…n flat maps (twentyhq#25608)

## Context

Installing the Slack app on some workspaces always failed with:

```
Migration action 'create' for 'logicFunction' (slack-home-opened) failed: Failed to get SDK layer for function ...: Primary key constraint field not found for object metadata <id>
```

The object id in the error changed on every attempt and never existed in
the workspace afterwards: it was one of the app's own objects, created
by the failing migration and rolled back with it. Brand-new workspaces
installed fine.

## Root cause

Two defects combine.

**The runner mutates the shared cache.**
`WorkspaceMigrationRunnerService` fetches the workspace flat maps from
the cache service, which returns its own live in-memory objects, and
applies every action to them in place through the
`...ThroughMutationOrThrow` helpers. From that moment, every reader of
that workspace's maps on the same server instance sees the half-applied
migration, until the post-commit or post-rollback invalidation replaces
the entries. If the post-rollback invalidation fails (it is caught and
only logged), the rolled-back state stays in the local cache with a hash
that still matches Redis.

**The install-time SDK build reads that cache mid-transaction.**
`CreateLogicFunctionActionHandlerService` installs the prebuilt bundle
inside the open transaction; on the lambda driver that builds the SDK
layer and regenerates the app-scoped GraphQL schema from the cache.
Object and field maps are separate cache entries with separate
lifecycles (per-key eviction cap, packing, hash revalidation against
Redis). When the field entry has been replaced by a fresh copy while the
object entry still holds the mutated object, the schema builder sees the
new object with none of its fields, prunes them all in
`reconcileObjectFieldIdsWithFilteredFieldMaps`, and
`getUniqueConstraintsFields` throws on the missing `id`.

## Fix

- The runner now works on a `structuredClone` of the maps it fetched,
taken once before any action runs, so the shared cache keeps reflecting
committed state throughout a migration. The clone cost is logged with
the other `[install-perf]` runner phases.
- The create logic function handler passes the runner's
`allFlatEntityMaps` (objects, fields, indexes) down through the driver,
the lambda layer manager and the SDK archive/generation services into
`WorkspaceGraphqlSchemaSDLService.getOrComputeSchemaSDL` as an optional
`ObjectFieldIndexFlatEntityMaps` argument. The install-time layer is
thus built from one coherent snapshot of the migration state and already
knows the app's own objects. When those maps are provided the stored SDL
is neither read nor written, since its cache hashes do not describe
them.

## Test

- Reproduced the failure on the affected cloud workspace by triggering
the install and capturing the raw error; the object id was freshly
created in that transaction.
- `npx tsgo -p tsconfig.json --noEmit` in `twenty-server` passes.
- `oxlint` and `oxfmt` clean on the changed files.
- Unit: `application-manifest-apply.service.spec.ts`,
`sdk-client.controller.spec.ts`, `workspace.factory.spec.ts` pass.
- Integration (with database reset):
`successful-create-one-object-metadata` and
`create-one-object-metadata-deterministic-field-universal-identifiers`
pass, exercising the runner with the cloned maps.

twenty/v2.39.2

Toggle twenty/v2.39.2's commit message
fix(server): build the install-time SDK layer from the migration's ow…

…n flat maps (twentyhq#25608)

## Context

Installing the Slack app on some workspaces always failed with:

```
Migration action 'create' for 'logicFunction' (slack-home-opened) failed: Failed to get SDK layer for function ...: Primary key constraint field not found for object metadata <id>
```

The object id in the error changed on every attempt and never existed in
the workspace afterwards: it was one of the app's own objects, created
by the failing migration and rolled back with it. Brand-new workspaces
installed fine.

## Root cause

Two defects combine.

**The runner mutates the shared cache.**
`WorkspaceMigrationRunnerService` fetches the workspace flat maps from
the cache service, which returns its own live in-memory objects, and
applies every action to them in place through the
`...ThroughMutationOrThrow` helpers. From that moment, every reader of
that workspace's maps on the same server instance sees the half-applied
migration, until the post-commit or post-rollback invalidation replaces
the entries. If the post-rollback invalidation fails (it is caught and
only logged), the rolled-back state stays in the local cache with a hash
that still matches Redis.

**The install-time SDK build reads that cache mid-transaction.**
`CreateLogicFunctionActionHandlerService` installs the prebuilt bundle
inside the open transaction; on the lambda driver that builds the SDK
layer and regenerates the app-scoped GraphQL schema from the cache.
Object and field maps are separate cache entries with separate
lifecycles (per-key eviction cap, packing, hash revalidation against
Redis). When the field entry has been replaced by a fresh copy while the
object entry still holds the mutated object, the schema builder sees the
new object with none of its fields, prunes them all in
`reconcileObjectFieldIdsWithFilteredFieldMaps`, and
`getUniqueConstraintsFields` throws on the missing `id`.

## Fix

- The runner now works on a `structuredClone` of the maps it fetched,
taken once before any action runs, so the shared cache keeps reflecting
committed state throughout a migration. The clone cost is logged with
the other `[install-perf]` runner phases.
- The create logic function handler passes the runner's
`allFlatEntityMaps` (objects, fields, indexes) down through the driver,
the lambda layer manager and the SDK archive/generation services into
`WorkspaceGraphqlSchemaSDLService.getOrComputeSchemaSDL` as an optional
`ObjectFieldIndexFlatEntityMaps` argument. The install-time layer is
thus built from one coherent snapshot of the migration state and already
knows the app's own objects. When those maps are provided the stored SDL
is neither read nor written, since its cache hashes do not describe
them.

## Test

- Reproduced the failure on the affected cloud workspace by triggering
the install and capturing the raw error; the object id was freshly
created in that transaction.
- `npx tsgo -p tsconfig.json --noEmit` in `twenty-server` passes.
- `oxlint` and `oxfmt` clean on the changed files.
- Unit: `application-manifest-apply.service.spec.ts`,
`sdk-client.controller.spec.ts`, `workspace.factory.spec.ts` pass.
- Integration (with database reset):
`successful-create-one-object-metadata` and
`create-one-object-metadata-deterministic-field-universal-identifiers`
pass, exercising the runner with the cloned maps.
0