github →

New request

#21095: App-installed FIELDS widget: configuration.viewId stored as null after manifest sync

We'll provision a sandbox, run an agent against the issue, and open a draft PR. You can pull the branch and iterate from there.

Issue
sonarly:hightype: bug

Bug Description

A Twenty SDK app declares a page layout with a FIELDS widget whose configuration.viewId references a view's universalIdentifier. After app:dev sync, the widget is stored in the database with a null viewId. Querying core."pageLayoutWidget" shows:

{"viewId": null, "configurationType": "FIELDS"}

Confirmed across two separate syncs. The built manifest.json has the correct view identifier, and the views themselves persist with real ids — only the FIELDS-widget viewId comes back null. As a result the widget renders every field ungrouped instead of the curated view, so an app cannot drive grouped field columns this way.

For contrast: a FRONT_COMPONENT widget's frontComponentId in the same app resolves correctly, and the native (server-seeded) Home-tab FIELDS widget has a real viewId. The issue is specific to FIELDS-widget viewId resolved via app manifest sync.

Observed on a self-hosted v2.8.3 instance.

Expected behavior

After sync, the FIELDS widget's configuration.viewId should hold the resolved id of the referenced view (the same way a FRONT_COMPONENT widget's frontComponentId does), so the widget renders the curated field groups from that view.

Technical inputs

Reporting as a new contributor (not a developer); I found this with Claude Code and traced the source against a clone that may be behind latest main, so paths may differ — please verify on current main, I could easily be wrong on the internals.

  • It looks like the FIELDS-widget viewId may not be resolved as a serialized relation during app sync the way frontComponentId is. In the types I saw, FrontComponentConfiguration.frontComponentId is marked as a SerializedRelation, whereas FieldsConfiguration.viewId is typed as a plain string — which could explain why one resolves and the other stores null.
  • The built manifest.json was correct (viewId = the view's universalIdentifier), so it appears to be server-side resolution during sync, not a manifest authoring problem.
  • Repro: define a defineView with field groups + a definePageLayout FIELDS widget whose configuration.viewId is that view's universalIdentifier -> app:dev sync -> query core."pageLayoutWidget" -> viewId is null.
  • Workaround we used: render the grouped columns with a FRONT_COMPONENT instead (its frontComponentId resolves fine).
Assessmentadvisory
bug●● medium90% confidence

App manifest sync resolves widget identifiers correctly for FRONT_COMPONENT but fails to persist the viewId inside FIELDS configuration.

Likely files
  • packages/twenty-server/src/engine/core-modules/app-manifest/app-manifest.service.ts
  • packages/twenty-server/src/engine/core-modules/app-sync/app-sync.service.ts
  • packages/twenty-server/src/engine/metadata-modules/page-layout-widget/page-layout-widget.service.ts
Create the request

This opens a fresh agent run and a draft PR for issue #21095.

Cancel