Add dashboard filter widget binding storage
Merged
EH
2d ago+1407+1407+0123456789012345678901234567890123456789-2-2-0123456789
What
Add pageLayoutFilterBinding as workspace metadata. A binding connects one saved date filter to one widget and the date field that widget uses. For example, a dashboard’s Reporting period filter can use Close date for an Opportunities chart and Due date for a Tasks chart.
How
- Store one binding per filter and widget. Validate that the widget and field belong together and that the filter and widget belong to the same layout.
- Support an optional field on a related record and an optional part of a composite field. Use the existing metadata rules to validate the field path and require it to resolve to a date or date-time.
- Delete the binding when its filter, widget, or either linked field is deleted. Deleting a widget or field leaves the dashboard filter available for other widgets.
- Invalidate the workspace binding cache after cascading deletes.
- Preserve bindings during application manifest sync.
- Create the table and its optional field-path columns in one generated fast instance command. Existing layouts require no backfill.
This follows #32005 and #32007. The stacked layout API (#32230) saves and reads direct date bindings through the existing feature-flagged layout flow. Related and composite field paths will be wired into widget queries in a follow-up.
Testing
- Passed 105 metadata tests and 62 snapshots locally, plus 47 manifest and migration-order tests after review.
- Applied, rolled back, and reapplied the migration on isolated Postgres. Verified that the existing filter table stayed in place.
- Passed 132 targeted metadata and upgrade tests and 51 snapshots. Applied, rolled back, and reapplied the consolidated command on isolated Postgres, and verified nullable
varcharstorage and the related-field delete cascade.