Found via a failing title assertion while doing the UI copy pass in #116.
parsePageTemplate parses the page file beforehtmlheader.html. That header contains {{block "title" .}}Webhooker{{end}}, which redefines the same template name and therefore wins. Every page's {{define "title"}} is dead: the browser tab reads "Webhooker" on every page regardless of what the page declares.
Consequence beyond cosmetics: any title copy is silently inert, so it cannot be relied on and a title assertion in one page's test would pass for the wrong reason.
Definition of done
Each page's {{define "title"}} renders in the browser tab, with htmlheader.html's block remaining the fallback for pages that declare none.
A rendering assertion per page template that the tab title matches that page, so the regression cannot return silently.
Implementation requirements
Expected fix is ordering: parse htmlheader.html ahead of the page file in parsePageTemplate's ParseFS arguments. Confirm that against html/template's actual redefinition semantics rather than assuming.
Branch from next, PR based on next, single commit, title ending (closes #N).
Touches internal/handlers/handlers.go and a test file. Do not take on unrelated copy changes.
Gate on make check plus script/cibuild with the Docker cache defeated.
Found via a failing title assertion while doing the UI copy pass in https://git.eeqj.de/sneak/webhooker/pulls/116.
`parsePageTemplate` parses the page file *before* `htmlheader.html`. That header contains `{{block "title" .}}Webhooker{{end}}`, which redefines the same template name and therefore wins. Every page's `{{define "title"}}` is dead: the browser tab reads "Webhooker" on every page regardless of what the page declares.
Consequence beyond cosmetics: any title copy is silently inert, so it cannot be relied on and a title assertion in one page's test would pass for the wrong reason.
## Definition of done
- Each page's `{{define "title"}}` renders in the browser tab, with `htmlheader.html`'s block remaining the fallback for pages that declare none.
- A rendering assertion per page template that the tab title matches that page, so the regression cannot return silently.
## Implementation requirements
- Expected fix is ordering: parse `htmlheader.html` ahead of the page file in `parsePageTemplate`'s `ParseFS` arguments. Confirm that against `html/template`'s actual redefinition semantics rather than assuming.
- Branch from `next`, PR based on `next`, single commit, title ending ` (closes #N)`.
- Touches `internal/handlers/handlers.go` and a test file. Do not take on unrelated copy changes.
- Gate on `make check` plus `script/cibuild` with the Docker cache defeated.
Found again by the audit for #377, on current next: the browser tab reads "Webhooker" on the webhook list, the webhook page, the event log and the profile page.
Model: opus-5-5
Found again by the audit for https://git.eeqj.de/sneak/webhooker/issues/377, on current `next`: the browser tab reads "Webhooker" on the webhook list, the webhook page, the event log and the profile page.
Model: opus-5-5
Plan. Still true on next: every page's browser tab reads "Webhooker". Make each page's {{define "title"}} win over htmlheader.html's {{block "title"}} fallback, by the parse order in parsePageTemplate (confirm html/template's redefinition rule rather than assuming). Add one test that renders every page template and checks its <title> matches what the page declares, and that a page declaring none gets "Webhooker". No template or copy changes beyond what the fix needs.
Model: opus-5-5
Plan. Still true on `next`: every page's browser tab reads "Webhooker". Make each page's `{{define "title"}}` win over `htmlheader.html`'s `{{block "title"}}` fallback, by the parse order in `parsePageTemplate` (confirm `html/template`'s redefinition rule rather than assuming). Add one test that renders every page template and checks its `<title>` matches what the page declares, and that a page declaring none gets "Webhooker". No template or copy changes beyond what the fix needs.
Model: opus-5-5
Built in #480. parsePageTemplate now parses the page file last, so each page's {{define "title"}} replaces the "Webhooker" fallback in htmlheader.html: a later definition of a template name replaces an earlier one, except that an empty one never does. A new test renders every page template and checks its browser tab title.
Judgement call: the fallback is checked on htmlheader.html alone, since every page declares a title.
Deviation: the cache-defeated script/cibuild run asked for above was dropped by the repo manager and not run.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/webhooker/pulls/480. `parsePageTemplate` now parses the page file last, so each page's `{{define "title"}}` replaces the "Webhooker" fallback in `htmlheader.html`: a later definition of a template name replaces an earlier one, except that an empty one never does. A new test renders every page template and checks its browser tab title.
Judgement call: the fallback is checked on `htmlheader.html` alone, since every page declares a title.
Deviation: the cache-defeated `script/cibuild` run asked for above was dropped by the repo manager and not run.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found via a failing title assertion while doing the UI copy pass in #116.
parsePageTemplateparses the page file beforehtmlheader.html. That header contains{{block "title" .}}Webhooker{{end}}, which redefines the same template name and therefore wins. Every page's{{define "title"}}is dead: the browser tab reads "Webhooker" on every page regardless of what the page declares.Consequence beyond cosmetics: any title copy is silently inert, so it cannot be relied on and a title assertion in one page's test would pass for the wrong reason.
Definition of done
{{define "title"}}renders in the browser tab, withhtmlheader.html's block remaining the fallback for pages that declare none.Implementation requirements
htmlheader.htmlahead of the page file inparsePageTemplate'sParseFSarguments. Confirm that againsthtml/template's actual redefinition semantics rather than assuming.next, PR based onnext, single commit, title ending(closes #N).internal/handlers/handlers.goand a test file. Do not take on unrelated copy changes.make checkplusscript/cibuildwith the Docker cache defeated.Found again by the audit for #377, on current
next: the browser tab reads "Webhooker" on the webhook list, the webhook page, the event log and the profile page.Model: opus-5-5
Plan. Still true on
next: every page's browser tab reads "Webhooker". Make each page's{{define "title"}}win overhtmlheader.html's{{block "title"}}fallback, by the parse order inparsePageTemplate(confirmhtml/template's redefinition rule rather than assuming). Add one test that renders every page template and checks its<title>matches what the page declares, and that a page declaring none gets "Webhooker". No template or copy changes beyond what the fix needs.Model: opus-5-5
Built in #480.
parsePageTemplatenow parses the page file last, so each page's{{define "title"}}replaces the "Webhooker" fallback inhtmlheader.html: a later definition of a template name replaces an earlier one, except that an empty one never does. A new test renders every page template and checks its browser tab title.Judgement call: the fallback is checked on
htmlheader.htmlalone, since every page declares a title.Deviation: the cache-defeated
script/cibuildrun asked for above was dropped by the repo manager and not run.Model: opus-5-5