Skip to content
quarry Check-in [1d680372e5]
Login

Check-in [1d680372e5]

Overview
Comment:markup: map fossil site-relative links; theme-neutral pikchr ink

Two bugs found by browsing real content on a phone.

Imported wiki/technote/forum bodies are full of fossil's own routes (libfossil's wiki alone: 500 /finfo, 211 /dir, 105 /timeline, 23 /doc). Quarry passed those hrefs through verbatim, so libfossil's home page offered a README.md link that went nowhere. Resolver grows ResolvePath: /doc/<ver>/<path> maps to quarry's file route, /info to the artifact, /timeline /wiki /forum /technote to their pages; a verb quarry has no page for drops the link and keeps the label, since a dead link is worse than plain text. file.get now lets zit resolve symbolic versions (trunk, tip, tags) instead of demanding a hash — that is what /doc links use, and zit is the authority on names. The href rewrite runs BEFORE reference resolution so the two passes never see each other's output.

Pikchr hardcodes rgb(0,0,0), which is invisible on quarry's dark theme — the DOM assertions all passed while the diagram was unreadable, and only a screenshot caught it. Its default ink now becomes currentColor so a diagram follows the page theme; author-specified colours are untouched. Fossil solves this with a server-side --dark-mode flag, which cannot work for a CSS-themed page.

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1d680372e53aff10817bf0880c73cb0d6b95e085c8c5fc0d1087f4e642c56b30
User & Date: dmestas on 2026-08-16 13:44:53.498
Other Links: manifest | tags
Context
2026-08-16
15:08
web: show indexing on the fleet page, and keep SSE alive across patches

A first index can run for minutes, so the home page showed a repo with zero check-ins and no explanation. Repos now carry an Indexing flag and the fleet row wears a badge until the first fold finishes.

The badge exposed a live-update bug that had been there all along: data-init sat on the same element the stream patches. A patch morphs the target to match the fragment, the fragment has no data-init, so the first patch deleted Datastar's own connection attribute and the stream went quiet. The timeline had it too — masked because it only sends on change, so it appeared to work exactly once. The attribute now sits on a wrapper outside the patch target. check-in: 8e2eef5ab2 user: dmestas tags: trunk

13:44
markup: map fossil site-relative links; theme-neutral pikchr ink

Two bugs found by browsing real content on a phone.

Imported wiki/technote/forum bodies are full of fossil's own routes (libfossil's wiki alone: 500 /finfo, 211 /dir, 105 /timeline, 23 /doc). Quarry passed those hrefs through verbatim, so libfossil's home page offered a README.md link that went nowhere. Resolver grows ResolvePath: /doc/<ver>/<path> maps to quarry's file route, /info to the artifact, /timeline /wiki /forum /technote to their pages; a verb quarry has no page for drops the link and keeps the label, since a dead link is worse than plain text. file.get now lets zit resolve symbolic versions (trunk, tip, tags) instead of demanding a hash — that is what /doc links use, and zit is the authority on names. The href rewrite runs BEFORE reference resolution so the two passes never see each other's output.

Pikchr hardcodes rgb(0,0,0), which is invisible on quarry's dark theme — the DOM assertions all passed while the diagram was unreadable, and only a screenshot caught it. Its default ink now becomes currentColor so a diagram follows the page theme; author-specified colours are untouched. Fossil solves this with a server-side --dark-mode flag, which cannot work for a CSS-themed page. check-in: 1d680372e5 user: dmestas tags: trunk

12:53
markup: Pikchr diagrams via WebAssembly (fossil's third markup)

pikchr.c built to a standalone WASI module (-DPIKCHR_SHELL -sSTANDALONE_WASM) and run under wazero, so the CGO-free constraint holds. Its own CLI reads - and writes SVG, so the host ABI is a pipe: no memory marshalling to get wrong. Renders text/x-pikchr artifacts and pikchr fences inside markdown; a diagram that will not compile degrades to its source plus the compiler's message.

SVG does NOT ride the document policy. It gets a narrow allow-list derived by enumerating what the module actually emits (six elements, a closed geometry/paint attribute set, no script/href/foreignObject), so even a hole in Pikchr's own label escaping cannot reach a page. Fence placeholders are alphanumeric with a per-render nonce: an HTML parser rewrites control bytes, so a NUL-based marker does not survive sanitizing (caught by test). Provenance and the rebuild recipe are in the ledger. check-in: 58fe4cf214 user: dmestas tags: trunk

Changes