fix: include rating_partial.html in the review-detail template tree #52

Merged
rcsheets merged 1 commit from fix/review-detail-rating-partial into main 2026-05-01 10:55:33 +00:00
Owner

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>
fix: include rating_partial.html in the review-detail template tree
Some checks failed
ci / check (pull_request) Has been cancelled
efb13b671a
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>
Collaborator

Automated review by pr-reviewer v0.21.1 | Safety Check | Claude Sonnet 4 | tracking id r-f48645-f70ab7
This 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.html was referenced in review_detail.html but 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.

*Automated review by [pr-reviewer](https://git.brooktrails.org/brooktrails/pr-reviewer) v0.21.1 | Safety Check | Claude Sonnet 4 | tracking id `r-f48645-f70ab7`* *This 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.html` was referenced in `review_detail.html` but 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.
rcsheets force-pushed fix/review-detail-rating-partial from efb13b671a
Some checks failed
ci / check (pull_request) Has been cancelled
to a5975187f4
All checks were successful
ci / check (pull_request) Successful in 43s
2026-05-01 10:54:04 +00:00
Compare
rcsheets deleted branch fix/review-detail-rating-partial 2026-05-01 10:55:34 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
brooktrails/pr-reviewer!52
No description provided.