Issue 356
Search: fix a wrong comment, use documentHref on the post page, test the query's collection
Back to our planOpen
frontendtech-debtpriority: lowneeds grooming
Problem
Three small leftovers from review 5639495077 / 5639510653 on #349 (search fix, #200):
- The
populatecomment infindSearchResults(src/modules/news/) says the linked post or event isn't loaded. Withdepth: 1, Payload loads each one's slug, so the comment is wrong. src/app/(frontend)/posts/[slug]/page.tsx:46builds'/posts/' + decodedSlugby hand for the redirect lookup instead of the shareddocumentHref('posts', decodedSlug)(DRY rule indocs/guidelines/development.md).- No test checks that the search query returns each entry's collection, which the result
hrefdepends on.
Acceptance criteria
- The comment says what the query actually loads.
- The post page uses
documentHreffor the redirect lookup, with the same URL as before. - A test fails if the search query stops returning the entry's collection.
Generated by Claude Code, opens in a new tab