Fix #185: non-image links to blob view #186

Merged
crueber merged 1 commit from fix/issue-185 into main 2026-09-06 23:29:39 +00:00
Owner

Amends the #183 (issue #182) "others → raw" trade-off (recorded in 12_web_ui.md Decisions, law 12).

Rule now: images → raw bytes (unchanged); EVERY other relative link → in-app blob view at same ref (raw one click away via the blob raw pill). Directories: trailing slash (or repo-root resolution) is the cheap render-time signal → tree view; a slash-less directory link 404s honestly on the blob route. No new deps.

Tests: node --test web/test/unit/*.test.js 379/379 green (matrix updated: blob-view, tree-view, LICENSE-style, verbatim-suffix cases). Browser proof on real Chromium via CDP (:9222) against a scratch-built server: LICENSE link renders /demo/hello/blob/main/LICENSE and click lands on the blob view (content + raw pill shown); guide.md → blob; docs/ → tree; #anchor/absolute untouched; image inline via ?raw (naturalWidth 1); zero console/page errors in dark AND light.

Amends the #183 (issue #182) "others → raw" trade-off (recorded in 12_web_ui.md Decisions, law 12). Rule now: images → raw bytes (unchanged); EVERY other relative link → in-app blob view at same ref (raw one click away via the blob raw pill). Directories: trailing slash (or repo-root resolution) is the cheap render-time signal → tree view; a slash-less directory link 404s honestly on the blob route. No new deps. Tests: `node --test web/test/unit/*.test.js` 379/379 green (matrix updated: blob-view, tree-view, LICENSE-style, verbatim-suffix cases). Browser proof on real Chromium via CDP (:9222) against a scratch-built server: LICENSE link renders `/demo/hello/blob/main/LICENSE` and click lands on the blob view (content + raw pill shown); guide.md → blob; `docs/` → tree; `#anchor`/absolute untouched; image inline via `?raw` (naturalWidth 1); zero console/page errors in dark AND light.
Amends the #183 (issue #182) 'others -> raw' trade-off: images still go
to the raw-bytes endpoint, every other relative link lands on the in-app
blob view at the same ref (raw stays one click away via the blob raw
pill). Trailing-slash (or repo-root) links go to the tree view as the
cheap render-time directory signal; slash-less directory links 404
honestly on the blob route. Updates the URL-matrix tests and records the
amendment in 12_web_ui.md Decisions (law 12). No new deps.
Sign in to join this conversation.
No description provided.