12bbdc77

By: Michael Lynch <git@mtlynch.io>

Add renderTemplate wrapper to eliminate ExecuteTemplate boilerplate

Every page handler repeated the same render-then-handle-error block after
building its template data. Extract it into a single renderTemplate helper
in templates.go and route all 7 call sites through it.

The helper renders into a buffer first, so a mid-render failure becomes a
clean 500 instead of a partially written response.

renderLogin's status parameter was always http.StatusOK, so drop it and
route renderLogin through the same wrapper, leaving no special cases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 1s 9s 9s 11s 1s
Eval 8s 45s 45s 54s 0s
Build 30s 4m47s 1m28s 1m59s 0s
Suite 1s 5m42s 1m57s 1m59s 1s

Timeline

0s10s20s30s40s50s1m1m10s1m20s1m30s1m40s1m50s