web: hide the per-row diff scrollbar gutter (overlay style)
Each @pierre/diffs code row scrolls horizontally on its own
(overflow-x: scroll) and reserves a classic scrollbar track sized to the
measured --diffs-scrollbar-gutter. On platforms with non-overlay
scrollbars (e.g. macOS "always show"), that track shows as a grey strip
under any row with a long line, reading as leftover bottom padding.
Set --diffs-scrollbar-gutter-override: 0 on #diff-root so the track is
never reserved; long lines stay scrollable by trackpad / wheel. Verified
the override wins over a simulated 14px measured gutter (reserved height
stays 0).
Re-hashed the embedded stylesheet.
web: remove grey padding bands inside each diff file
Two sources put a grey strip above the first line and below the last,
inside the file border:
- The shared `base` partial's `section { padding-bottom: .5rem }` applied
to .diff-file (it is a <section>). Cancel it with padding-bottom: 0.
- The @pierre/diffs vertical code padding (--diffs-gap-block, default 8px)
above the first and below the last line. Set it to 0 on #diff-root; it
inherits into the DIFFS-CONTAINER shadow DOM. Horizontal code padding
(--diffs-gap-inline) is left on its default.
Re-hashed the embedded stylesheet.
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.
rename module to sourcecraft.dev/bigbes/sr-ht-compare; depend on sourcecraft sr-ht-core
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/.