PR Summary

What problems was I solving

Client-side URL construction functions (buildPublicPageOrigin, buildPageUrl, buildProspectPageUrl) were out of sync with production routing rules. This caused potential URL divergence between management UI and the page-gateway service, especially regarding tenant-scoped domains, versioning, and routing tables.

What user-facing changes did I ship

Users see page-link URLs displayed as separate 'Domain' and 'Path' components instead of a concatenated URL string. The format is unchanged, but edits may now expose earlier URL resolution errors (e.g., unpublished pages, missing domains) rather than silently generating potentially incorrect URLs.

How I implemented it

Removed lib/page-url.ts and switched all URL resolution to GraphQL operations from the management gateway: ManagementPageUrl and ManagementPageGroupUrl. Added getPageGroupUrl() and getPageUrl() async functions to the view-model. Draft state now carries url and originalUrl fields to track canonical URLs for unchanged items. Added an AST grep guardrail to prevent future client-side URL construction in the management layers.

Description for the changelog

Updates the management UI to fetch public page URLs from page-service GraphQL API instead of constructing them client-side. Removes obsolete lib/page-url.ts module. Adds domain/path clarity to URL previews in page link dialogs. Ensures consistent URL resolution across tenant domains, versions, and routing tables. Includes a new ast-grep guardrail to block future public URL construction outside the page service.

Management UI: Public URL Generation

low10 files
Removes client-side page-public URL builders and switches to page-service GraphQL API calls for URL resolution.

Management UI View-model: GraphQL URL Operations

low3 files
Adds GraphQL operations (`getPageUrl`, `getPageGroupUrl`) and URL mapping for public page URLs in the view-model layer.

Tests: Public URL Generation

low2 files
Updates tests for draft state and copy-page-link view model to reflect new URL field structure and GraphQL-based URL generation.

New AST Grep Guardrail

low1 file
Adds an AST grep guardrail to block client-side construction of public page URLs (/p/ and /a/ routes) in management UI and management gateway.