fix: include rating_partial.html in the review-detail template tree #52
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/review-detail-rating-partial"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
review_detail.html does {{template "rating_partial.html" .RatingPartial}}
but the parse helper that builds its template only loads layout.html
plus the named page, so the partial wasn't resolvable at render time
and every detail render warn-logged "no such template
'rating_partial.html'" before bailing.
Latent bug exposed by #50: when the only viewers were involved
parties (PR author / requested reviewers), they apparently never
clicked through to a review detail. As soon as admins could drill
into any review, the broken render started firing on every page
load.
Add the partial to the parse list. The standalone t.ratingPartial
parse below stays — it's used by handleRateReview to return a
fragment to HTMX after a rating POST.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
review_detail.html does {{template "rating_partial.html" .RatingPartial}} but the parse helper that builds its template only loads layout.html plus the named page, so the partial wasn't resolvable at render time and every detail render warn-logged "no such template 'rating_partial.html'" before bailing. Latent bug exposed by #50: when the only viewers were involved parties (PR author / requested reviewers), they apparently never clicked through to a review detail. As soon as admins could drill into any review, the broken render started firing on every page load. Add the partial to the parse list. The standalone t.ratingPartial parse below stays — it's used by handleRateReview to return a fragment to HTMX after a rating POST. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>Automated review by pr-reviewer v0.21.1 | Safety Check | Claude Sonnet 4 | tracking id
r-f48645-f70ab7This is an AI-generated review and may contain mistakes.
Status: ✅ Completed
✅ Verdict: LGTM — This is a straightforward bug fix that adds a missing template partial to resolve a template parsing error.
Complexity: trivial
The change correctly fixes a template parsing issue where
rating_partial.htmlwas referenced inreview_detail.htmlbut not included in the template parse list, causing "no such template" warnings. The fix simply adds the missing partial to the parse call, which is the correct solution. The comment explains the distinction between this template tree usage and the standalone partial parsed later for HTMX.efb13b671aa5975187f4