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.
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
viewIdmay not be resolved as a serialized relation during app sync the wayfrontComponentIdis. In the types I saw,FrontComponentConfiguration.frontComponentIdis marked as aSerializedRelation, whereasFieldsConfiguration.viewIdis typed as a plainstring— which could explain why one resolves and the other stores null. - The built
manifest.jsonwas correct (viewId = the view's universalIdentifier), so it appears to be server-side resolution during sync, not a manifest authoring problem. - Repro: define a
defineViewwith field groups + adefinePageLayoutFIELDS widget whoseconfiguration.viewIdis that view's universalIdentifier ->app:devsync -> querycore."pageLayoutWidget"-> viewId is null. - Workaround we used: render the grouped columns with a FRONT_COMPONENT instead (its frontComponentId resolves fine).
App manifest sync resolves widget identifiers correctly for FRONT_COMPONENT but fails to persist the viewId inside FIELDS configuration.
- 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