web: add long-line wrapping toggle
web: tighten diff and file-tree spacing
Address three spacing complaints in the compare view:
- File tree: switch @pierre/trees to the "compact" density preset (24px
rows, 0.8 factor) so folder/child rows read as a dense index rather
than an airy list.
- Diff blocks: drop the inter-file gap (.diff-file margin-bottom
1rem -> .5rem) and the tree/diff column gap (1rem -> .75rem).
- File tree height: size the mount to its content height (capped at the
viewport) instead of always filling the viewport, removing the band of
empty tree background below the last file. Re-measures on resize and on
every tree change (expand/collapse) via tree.subscribe.
Rebuilt and re-hashed the embedded bundle and stylesheet.
web: content-hash the bundle and colour the status column
Two diff-view fixes reported against the deployed instance.
Empty file tree after an upgrade: bundle.js had a stable filename served with a
1-hour cache, so browsers kept a pre-fix bundle and the @pierre/trees sidebar
rendered blank. Content-hash the bundle like the stylesheet — Makefile emits
bundle.<sha256[:8]>.js, server.go globs it into a BundleHref, the templates
reference {{.BundleHref}}, and the hashed name is served immutable. A deploy now
always busts the cache.
Unreadable status column: the changed-files table rendered A/M/D in the dim
default cell colour, near-invisible on the dark chrome. Render each status as a
semantic .diff-status badge (added=green, modified=amber, deleted=red,
renamed=blue) with light/dark variants, via statusClass/statusLabel helpers and
a small self-contained style block (the sourcehut-derived main.min.css can't be
rebuilt locally).
Tests resolve the hashed bundle via a bundleName helper and assert its immutable
cache header; docs updated for the hashed filename.
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.
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/.