web: http server, sourcehut chrome, compare/commit pages
Implement the compare.sr.ht HTTP layer over the committed core/gitx/authz
packages:
- Server assembly (New) from shared SourceHut config: [git.sr.ht] repos,
[meta.sr.ht]/[compare.sr.ht] origins, [sr.ht] site-name/environment, and
the hashed stylesheet resolved by globbing the embedded static FS.
- Routes: landing, repo page, compare (base..base...head, .patch escape
hatch), single-commit (+.patch), embedded static assets, healthz. Compare
form GET canonicalizes to a clean URL via 302.
- SourceHut chrome port to html/template: nav service switcher (canonical
order, paste/pages/hub excluded, compare active), login/logout with
return_to, environment banner.
- Embedded compare-data JSON (template.JS so html/template's script-context
escaper leaves it verbatim; json.Marshal's HTML escaping blocks a
</script> breakout) plus the vendored bundle.js scaffold.
- httptest coverage with a stub Authorizer and a real git-CLI fixture repo.
The cmd layer must wire, in order: RealIP, Recoverer, Logger,
config.Middleware(conf,"compare.sr.ht"), authz.Middleware.
frontend: pierre diffs/trees bundle and sourcehut theme css
Vendored esbuild bundle (frontend/src/app.ts) rendering @pierre/diffs
FileDiff per file and a @pierre/trees FileTree sidebar against the SSR
#compare-data contract, plus scss/main.scss (base + compare views)
compiled and content-hashed into web/static/.