github twentyhq/twenty sdk/v2.35.0

latest release: twenty/v2.35.2
2 hours ago

Two breaking changes require migration before upgrading. CoreApiClient now requires { runAs } at construction; omitting it fails typecheck. LogicFunctionExecutionContext now carries workspace and trigger fields. SidePanelExpandTarget now takes an expand callback; update front components that wire the side-panel expand action.

localStorage and sessionStorage now work in sandboxed workers, scoped per-app and per-user. Add frontComponentSharedDependencies to package.json to share library bundles across components, dropping per-component size from ~190KB to ~1.6KB. Standard media recording APIs are now available.

App manifests gain timelineActivityTypes for custom event types, writability on objects and fields, and isDeprecated on variables. Logic functions can throw RetryableLogicFunctionError to trigger queue retry with configurable backoff.

⚠️ Breaking changes

  • System record page layout (#23651) by @prastoin
  • SidePanelExpandTarget now requires an opaque expand: () = void callback instead of a route descriptor; update any front component that registers a side-panel expand action. (#23965) by @FelixMalfait
  • Metadata label edits are now two distinct operations: rename changes the canonical value for all locales, translate sets a per-locale override; the previous single-path rename-only behavior is gone. (#24374) by @FelixMalfait
  • LogicFunctionExecutionContext now includes workspaceId, workspaceSubdomain, triggering entity info, and retry counts; CoreApiClient requires { runAs: 'workspace' | 'application' } at construction — update every handler and client instantiation. (#24493) by @FelixMalfait

🌟 Highlights

  • CoreApiClient now requires { runAs: 'workspace' | 'application' } at construction and LogicFunctionExecutionContext gains workspace and trigger context — update every handler and client instantiation before upgrading. (#24493)
  • SidePanelExpandTarget now takes an opaque expand: () = void callback instead of a route descriptor — front components implementing the side-panel expand action must update. (#23965)
  • Front components can now call localStorage and sessionStorage; both are backed by the host page and scoped per-app and per-user, eliminating crashes from storage-dependent libraries in sandboxed workers. (#23761)
  • Declare frontComponentSharedDependencies in package.json to build one shared bundle across all front components, dropping per-component size from ~190KB to ~1.6KB. (#23773)
  • Add timelineActivityTypes to your app manifest to declare custom timeline event types with their own renderers, emitters, i18n, and settings integration. (#24620)
  • Throw RetryableLogicFunctionError (exported from twenty-sdk/logic-function) to classify a logic function failure as transient and trigger queue retry with fixed or exponential backoff. (#24317)

✨ New features

  • Front components can now call window.localStorage and window.sessionStorage; both are backed by the host page and scoped per-app and per-user, so storage-dependent dependencies no longer crash in sandboxed workers. (#23761) by @bosiraphael
  • Add frontComponentSharedDependencies: ['react', 'react-dom/client'] to package.json; twenty-sdk build compiles one shared bundle and each front component loads from it instead of bundling its own copy. (#23773) by @bosiraphael
  • Mark a serverVariables entry with isDeprecated: true to display a Deprecated pill in settings and preserve the stored value while you migrate callers to a replacement variable. (#23868) by @bosiraphael
  • Front components can now call navigator.mediaDevices.getUserMedia and construct a MediaRecorder directly for audio and video capture using standard web platform APIs. (#24203) by @FelixMalfait
  • Add optional writability?: MetadataWritability to object and field manifest definitions to restrict editing to APPLICATION or SYSTEM level; omitting it preserves the default OPEN behavior. (#24255) by @abdulrahmancodes
  • Throw RetryableLogicFunctionError (exported from twenty-sdk/logic-function) to signal a transient failure; configure fixedBackoff or exponentialBackoff on the job to control queue retry behavior. (#24317) by @ehconitin
  • Add httpMethods: ['GET', 'POST'] to serverRouteTriggerSettings to accept GET requests (e.g. webhook verification challenges); undeclared methods return 405 instead of falling through to the SPA. (#24401) by @emmanuelhb56
  • Add timelineActivityTypes to your app manifest to declare custom timeline event types with renderers, emitters, i18n, and settings controls; messages, notes, tasks, and custom objects share the same model. (#24620) by @FelixMalfait
  • Add headerCommandMenuItemUniversalIdentifiers to a widget's front-component configuration to render declared command-menu items as icon buttons in the widget header. (#24688) by @FelixMalfait
  • Use the new enqueueJobs mutation to enqueue up to 200 payloads for one logic function in a single call; enqueueJob is deprecated and will be removed in a future release. (#24691) by @martmull

💅 Improvements & UX

  • App catalogs and the front-component worker now both use message IDs at runtime; the readable-key format is removed from the worker's catalog lookup path. (#24325) by @FelixMalfait
  • Use {placeholder} syntax for variable substitution in manifest labels; ${expression} template-style syntax is no longer supported and was never extracted for translation. (#24326) by @FelixMalfait
  • Manifest strings appearing in multiple metadata roles now produce separate catalog entries keyed by role, enabling distinct translations in gendered or case-marked languages. (#24360) by @FelixMalfait
  • timelineActivity.name is deprecated in favor of a timelineActivityType id; in 2.33 new code reads the type first and falls back to name, so existing apps continue to work without immediate changes. (#24568) by @FelixMalfait
  • The SDK manifest build now validates timeline activity type names for uniqueness, resolves custom renderer references against declared front components, and checks emitter targets and relation fields before sync. (#24661) by @FelixMalfait
  • The CoreApiClient stub now declares constructor(options: ClientOptions & { runAs }), so new CoreApiClient({ runAs: 'application' }) passes yarn typecheck without a cast. (#24671) by @abdulrahmancodes

🐛 Bug fixes

  • Running twenty apply or twenty dev without a translations block no longer wipes stored locale data for published apps; dev-once sync now treats translations: undefined as a no-op. (#24408) by @FelixMalfait
  • The dev sync now queues exactly one follow-up run when file changes arrive during an active sync, instead of dropping changes or stacking redundant pipeline runs. (#24514) by @FelixMalfait

🔧 Developer & API

  • Packages bumped to 2.31.0-alpha.1 as an intermediate prerelease; scaffolded apps pin to create-twenty-app's own version and pick this up automatically. (#24011) by @prastoin
  • Alpha suffix removed; packages returned to a stable version string. (#24059) by @prastoin
🏗️ Internal changes (16)

🎉 New contributors

Full changelog (45 PRs)

Full Changelog: sdk/v2.30.0...sdk/v2.35.0

Don't miss a new twenty release

NewReleases is sending notifications on new releases.