Fix #189: breadcrumb segment links carry ref #192

Merged
crueber merged 1 commit from fix/issue-189 into main 2026-09-08 12:33:36 +00:00
Owner

Tree Breadcrumb built intermediate hrefs as /{full}/tree/{subpath}, dropping the display ref, so nested crumbs (e.g. docs in docs/go) missed the branch while root worked. Now passes rev={t().ref} and renders /{full}/tree/{shortRef(rev)}/{subpath}, mirroring Blob.jsx. Extends the #29 breadcrumb-head regression test with a Tree rev case.

Proof: node --test web/test/unit/*.test.js 387/387 green (with web/node_modules present); headless-Chrome CDP drive of a scratch server on a seeded nested repo: tree docs/go shows root->/u/crumbtest, docs->/u/crumbtest/tree/main/docs, current go strong; click-through lands on /tree/main/docs with rows [go]; blob crumbs unchanged; zero console errors. No new deps; styling untouched (dark+light unaffected). No doc change needed: docs/go/12_web_ui.md already states the breadcrumb carries ref+path.

Tree Breadcrumb built intermediate hrefs as `/{full}/tree/{subpath}`, dropping the display ref, so nested crumbs (e.g. docs in docs/go) missed the branch while root worked. Now passes `rev={t().ref}` and renders `/{full}/tree/{shortRef(rev)}/{subpath}`, mirroring Blob.jsx. Extends the #29 breadcrumb-head regression test with a Tree rev case. Proof: `node --test web/test/unit/*.test.js` 387/387 green (with web/node_modules present); headless-Chrome CDP drive of a scratch server on a seeded nested repo: tree docs/go shows root->/u/crumbtest, docs->/u/crumbtest/tree/main/docs, current go strong; click-through lands on /tree/main/docs with rows [go]; blob crumbs unchanged; zero console errors. No new deps; styling untouched (dark+light unaffected). No doc change needed: docs/go/12_web_ui.md already states the breadcrumb carries ref+path.
Tree Breadcrumb built intermediate hrefs as /{full}/tree/{subpath},
dropping the display ref, so nested crumbs (e.g. docs in docs/go)
missed the branch and did not resolve. Pass rev={t().ref} at the
call site and render hrefs as /{full}/tree/{shortRef(rev)}/{subpath},
mirroring Blob.jsx. Extends the #29 breadcrumb-head regression test.
Sign in to join this conversation.
No description provided.