PR Summary

What problems was I solving

Page link URLs were generated inconsistently across frontends and backend. Different teams handled local dev port (':26000'), path normalization, and domain lookup separately, leading to potential mismatches and bugs. The management UI also suffered from replica read races when rendering page link lists optimistically.

What user-facing changes did I ship

The management UI now displays canonical page-link URLs (with domain and url) directly. Users will see consistent URLs across all views including analytics exports, audiences tab exports, and page-link option pickers. No breaking changes to existing features – all existing page-link functionality continues to work.

How I implemented it

  1. Page service: Added PageLinkUrlSummary type extending PageLink with PublicPageUrl (domain, path, url). Implemented listPageLinkUrlSummariesPage method with domain caching to efficiently resolve domains. Updated createPageLink and updatePageLink to always return URL summaries.

  2. Management gateway GraphQL: Extended PageLink type with domain and url fields. Added resolver that pushes filtering/sorting/pagination to listPageLinkUrlSummariesPage and returns canonical URLs.

  3. Web service router: Updated management page-links create/update procedures to output PageLinkUrlSummarySchema, ensuring optimistic UI writes receive fully-resolved URLs.

  4. Management UI: Removed backend calls to fetch domains separately; frontend now consumes domain and url directly from pageLinks query. Deleted buildPageLinkUrl and related domain lookup logic.

Description for the changelog

Added listPageLinkUrlSummariesPage API in page-service to return canonical domain and URL for each page link. Extended management gateway GraphQL PageLink type with domain and url fields, removing separate domain queries in the UI. Updated management UI to consume these canonical URLs instead of constructing them client-side, improving consistency and fixing replica read race conditions in optimistic collection writes.

Page Service: Add PageLinkUrlSummary APIs

medium1 file
Adds PageLinkUrlSummary type and listPageLinkUrlSummariesPage method to PageLinksFeature API, returning canonical domain and URL for each page link.

Page Service: Add PageLinkUrlSummary APIs

medium2 files
Implements listPageLinkUrlSummariesPage and url-building helper methods with domain caching.

Management Gateway: Add PageLink URL fields and resolver

medium3 files
Adds domain and url fields to PageLink GraphQL type and listPageLinkUrlSummariesPage resolver.

Page Service: Add PageLinkUrlSummary APIs - Unit Tests

medium1 file
Unit tests for listPageLinkUrlSummariesPage method, verifying domain resolution and URL generation.

Web Service: Update management page-links router

low1 file
Updates create/update page-link procedures to return PageLinkUrlSummarySchema with domain and url.

External Actor Gateway: Update page-links test expectations

low1 file
Updates test mocks to expect PageLinkUrlSummary objects with domain and url fields instead of raw PageLinks.

Management UI: Consume canonical page-link URLs from backend

low6 files
Removes client-side page-link domain lookups and URL construction, consuming domain and url fields from page-service API response.

Management UI: Consume canonical page-link URLs - Unit Tests

low2 files
Updated tests to remove domain query mocks and verify canonical URL consumption.