Coves frontend - a photon fork

fix(post): redirect aliased permalinks to their canonical URL master

The post and comment permalink loaders never compared the community segment of the URL to the loaded post's community, so a post rendered under any slug (`/c/anything/post/<owner>/<rkey>`) and had unlimited URL aliases across the community, owner, and commenter segments. A link could present a post as belonging to a different community. After the post hydrates, each loader now compares the decoded route params to the segments `postLink`/`commentLink` emit for that record and issues a 302 to the canonical path, preserving the query string. 302 rather than 301 because the canonical community segment depends on the deployment's local instance domain (deployment config) and browsers cache 301s indefinitely. Unavailable posts never redirect; an unknown comment rkey still 404s before any redirect. Changes: - helpers: add `canonicalPostPath` / `canonicalCommentPath`, returning the canonical path or null; comparisons are against unencoded segment values so `name@origin` round-trips with a literal `@` - helpers: `repoSegment` treats an unresolved `handle.invalid` author handle as absent, so a working DID URL can never redirect into a 404 - post loader: redirect on mismatch; claim the streamed comments promise's rejection so a redirect cannot leave it unhandled (the page still receives the original promise) - comment loader: redirect on mismatch, canonicalising the commenter segment too; the focused comment's author rides on the cached value - fresh-post: `buildFreshPostView` carries the community `origin`, so the create flow lands on its canonical URL instead of spending the one-shot fresh-post stash on a bounce - tests: acceptance + loader + helper coverage for redirect, anti-bounce, `?uri=` preservation, remote origin form, legacy community-owned records, handle.invalid, unavailable posts, 404-before-redirect; fixtures moved to canonical URLs Deferred (filed in the central backlog): the comment page's "show context" link emits the DID commenter segment and now costs a redirect hop; the comment loader's cache key omits the commenter so a cache hit skips the commenter-mismatch 404. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015TRVa2emqMYeycESTBrjvH


+868 -25
12 changed files