web: full-width split diff view with a rendered file tree
Make the commit and compare pages full-bleed and default to the side-by-side
(split) diff, so the layout matches a conventional diff viewer: file tree on
the left, split diff on the right.
- layout.html renders the content wrapper with a per-page ContainerClass;
chrome() defaults it to "container" and the commit/compare handlers set
"container-fluid" for the diff views (the nav stays centered).
- app.ts defaults DEFAULT_LAYOUT to "split".
- Fix the @pierre/trees sidebar rendering blank: its virtualized container
collapses to zero height unless the mount has a definite height, so
sizeTreeRoot() gives #tree-root a viewport-height panel (re-applied on
resize). Rebuilt the vendored bundle.
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/.