Contents
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
-
Page service: Added
PageLinkUrlSummarytype extendingPageLinkwithPublicPageUrl(domain, path, url). ImplementedlistPageLinkUrlSummariesPagemethod with domain caching to efficiently resolve domains. UpdatedcreatePageLinkandupdatePageLinkto always return URL summaries. -
Management gateway GraphQL: Extended PageLink type with
domainandurlfields. Added resolver that pushes filtering/sorting/pagination tolistPageLinkUrlSummariesPageand returns canonical URLs. -
Web service router: Updated management page-links create/update procedures to output
PageLinkUrlSummarySchema, ensuring optimistic UI writes receive fully-resolved URLs. -
Management UI: Removed backend calls to fetch domains separately; frontend now consumes
domainandurldirectly frompageLinksquery. DeletedbuildPageLinkUrland 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.