Add the page layout filter API

Merged
EH
3d ago
+2363-1333

Stacked on #32005. Merge the storage PR first.

What

The layout editor can load saved date filters through PageLayout.filters and save them with tabs and widgets through updatePageLayoutWithTabsAndWidgets.

  • Omit filters to keep the saved list. Pass filters: [] to clear it.
  • Reads use the layout's existing access policy. Writes require LAYOUTS.
  • With the dashboard filters flag off, reads return an empty list and writes that include filters are rejected. Saves that omit filters still work.

How

Filter changes run in the same workspace migration as the tab and widget changes. Reads use the layout's cached filter IDs and sort by effective position. Older cache entries without filterIds fall back to matching by layout ID. Creating or deleting a filter invalidates both maps so the next read sees the updated list.

Testing

  • Passed targeted tests, including cache invalidation, plus lint and GraphQL schema validation.
  • Added metadata integration tests for the date-range round trip, omission and clearing, permissions, the feature flag, and rejection of an invalid default before saving the layout.
  • The integration run is pending. Local startup stopped on a missing @aws-sdk/client-ses dependency.

Widget bindings are the next PR. The rest of the stack is listed in #32005.