Parent: neomjs/neo#20671 (Cornerstone #4: Search engines and agents find and classify neomjs.com).
Context
Live Google Search Console audit of sc-domain:neomjs.com (2026-11-16) revealed 2,102Not found (404) URLs (1,933 submitted) in Indexing -> Pages. The crawled Nov 5–13, 2026 404 examples come directly from unrewritten relative Markdown links inside Portal documents resolved against <base href="./dist/production/apps/portal/"> / /apps/portal/:
Repository verification (2026-11-16) confirmed real authored Markdown examples in resources/content/ including discussions/chunk-1/discussion-11002.md:159 ([ai/deploy/docker-compose.test.yml](ai/deploy/docker-compose.test.yml)), archive/issues/v13.2.0/chunk-14/issue-17343.md:49,85-88 ([VectorService.mjs:595](ai/services/knowledge-base/VectorService.mjs#L595)), and archive/issues/v13.2.0/chunk-13/issue-16972.md:279 ([VectorService.mjs:1450](../blob/dev/ai/services/knowledge-base/VectorService.mjs#L1450)).
unowned-rationale: Prio-0 team lane per operator directive (2026-11-16); open for immediate maintainer self-selection (good first issue / help wanted omitted).
The Problem
Portal.view.content.Component (apps/portal/view/content/Component.mjs, base for tickets, pulls, discussions) and Portal.view.news.release.Component (apps/portal/view/news/release/Component.mjs) do not set contentRoute or override rewriteLinks (src/app/content/Component.mjs:234-270):Neo.app.content.Component#rewriteLinks immediately returns HTML untouched whenever !contentRoute || !me.record?.id (line 238), so relative links in issues, PRs, discussions, and release notes are emitted raw and resolve against /apps/portal/ into 404s.
Non-.md repository source paths (ai/..., src/..., buildScripts/...) and escaped ../ links are ignored by rewriteLinks (line 254, 264):if (... || !/\.md($|#)/i.test(href)) return match; leaves [VectorService.mjs](ai/services/knowledge-base/VectorService.mjs#L595) and ../decisions/... untouched even in views that do set contentRoute (Portal.view.learn.Component, Portal.view.news.blog.Component).
The Architectural Reality
Design authority:src/app/content/Component.mjs:220-270 (rewriteLinks JSDoc: "a relative path is the correct link [on GitHub], and inside an app, where only that app knows how to turn the path into something navigable. This seam lets a subclass supply that translation"), apps/portal/view/news/blog/Component.mjs:34-48 (#19901 pattern, which explicitly placed non-learn/ targets out of scope), and test/playwright/unit/app/content/LinkPredicateParity.spec.mjs:36-101.
Critical guard invariant (LinkPredicateParity.spec.mjs:36-44, 87-100):LinkPredicateParity.spec.mjs drives ContentComponent.prototype.rewriteLinks directly (contentRoute: '#/learn/', record: {id: 'guides/uibuildingblocks/DockLayouts'}) and asserts that ContentComponent.prototype.rewriteLinks leaves external scheme URIs, #fragments, root-absolute /..., and extensionless tokens (benefits.body.ConfigSystem) alone. Putting Portal-specific repo/GitHub URL rewriting on Portal's subclasses (while keeping Neo.app.content.Component#rewriteLinks compliant with LinkPredicateParity.spec.mjs and buildScripts/util/check-relative-links.mjs) preserves the build guard contract cleanly.
Portal.view.content.Component (tickets, pulls, discussions) and Portal.view.news.release.Component both already configure issuesUrl: '#/news/tickets/' and extends: ContentComponent, making them the natural Portal seam (or a shared Portal content helper called from Portal.view.learn.Component, Portal.view.news.blog.Component, Portal.view.news.release.Component, and Portal.view.content.Component).
The Fix
Share a Portal relative-link helper across Portal Markdown content components (apps/portal/view/...):
Preserve super.rewriteLinks(html) behavior in learn and blog (#19901) and keep Neo.app.content.Component#rewriteLinks passing LinkPredicateParity.spec.mjs unchanged.
In Portal.view.content.Component, Portal.view.news.release.Component, Portal.view.learn.Component, and Portal.view.news.blog.Component, rewrite any remaining relative <a href> (excluding EXTERNAL_TARGET scheme/# and root-absolute /...):
learn/blog/<slug>.md(#...) -> #/news/blog/<slug>(#...) and learn/<id>.md(#...) -> #/learn/<id>(#...).
Known repository paths (src/, ai/, apps/, examples/, buildScripts/, test/, resources/, .agents/, .github/, README.md, ROADMAP.md, or ../blob/dev/<path>) -> https://github.com/neomjs/neo/blob/dev/<cleanPath> with target="_blank" rel="noopener".
Avoid emitting unresolvable escaped ../... relative anchors against <base href="/apps/portal/">: normalize escaped ../ repo-relative paths (blob/dev/... or root repo file paths) rather than letting browsers or crawlers navigate to /apps/portal/... or /apps/...404s.
Add unit test coverage (test/playwright/unit/portal/ or test/playwright/unit/app/content/):
Test Portal.view.content.Component, Portal.view.news.release.Component, Portal.view.learn.Component, and Portal.view.news.blog.Component rewriting ai/services/knowledge-base/VectorService.mjs#L595, ai/deploy/docker-compose.test.yml, ../blob/dev/ai/services/knowledge-base/VectorService.mjs#L1450, and repo-relative learn/benefits/Introduction.md, while preserving #/..., /..., #anchor, and https://... URLs.
Run LinkPredicateParity.spec.mjs alongside the new unit spec to prove zero parity regression.
Translates relative learn/*.md links to Portal hash routes and relative repo source/config/escaped links to https://github.com/neomjs/neo/blob/dev/...
Leaves scheme URIs, /..., #... untouched
JSDoc on rewriteLinks overrides / helper
Unit spec + LinkPredicateParity.spec.mjs green
Decision Record impact
none (uses the documented ContentComponent#rewriteLinks subclass seam).
Acceptance Criteria
Portal.view.content.Component, Portal.view.news.release.Component, Portal.view.learn.Component, and Portal.view.news.blog.Component rewrite repo-relative ai/..., src/..., ../blob/dev/..., and learn/.../*.md anchors instead of emitting raw relative <a href>s against <base href="/apps/portal/">.
Neo.app.content.Component#rewriteLinks still passes test/playwright/unit/app/content/LinkPredicateParity.spec.mjs unchanged.
Unit tests verify ai/services/knowledge-base/VectorService.mjs#L595, ai/deploy/docker-compose.test.yml, ../blob/dev/..., learn/blog/..., learn/..., #/..., and https://... handling, and pass under npm run test-unit -- <spec>.
Out of Scope
Middleware SSR sanitization of pre-rendered archive HTML (neomjs/middleware-v2 companion ticket).
Clean pathname routing (neomjs/neo#21117).
Avoided Traps
Modifying Neo.app.content.Component#rewriteLinks default non-.md skip rule directly without gating:test/playwright/unit/app/content/LinkPredicateParity.spec.mjs asserts ContentComponent.prototype.rewriteLinks leaves non-.md tokens (benefits.body.ConfigSystem) alone. Keep the repo/timeline translation in Portal's subclasses / helper.
Emitting https://github.com/neomjs/neo/blob/dev/ai/deploy/docker-compose.test.yml without normalizing ../blob/dev/ prefixes: Strip leading (../)+blob/<branch>/ segments so links like ../blob/dev/ai/... do not turn into invalid GitHub URLs.
Live latest-open + closed sweep: checked latest 20 open issues (totalCount: 62, red band > 50 — scoped directly under Epic #20671, verified #20671 has 14 subs < 25) + open/closed search (rewriteLinks OR SsrService OR raw markdown noindex; read #19901 Out of Scope explicitly excluding moved/non-learn/ targets) in neomjs/neo at 2026-11-16T09:27Z; no duplicate found.
A2A in-flight claim sweep: list_messages({status: 'all', limit: 30}) at 2026-11-16T09:26Z; no competing claim on PortalrewriteLinks.
MC sweep: query_raw_memories on "Google Search Console neomjs.com sitemap raw markdown crawl budget 404 seo", 5 results, plus #19901 precedent.
Own-assignment sweep: #21104, #20987, #20671 in neomjs/neo; non-overlapping.
Structure map: N/A (Portal UI view code + unit test under existing directories).
Parent:
neomjs/neo#20671(Cornerstone #4: Search engines and agents find and classifyneomjs.com).Context
Live Google Search Console audit of
sc-domain:neomjs.com(2026-11-16) revealed2,102Not found (404)URLs (1,933submitted) inIndexing -> Pages. The crawledNov 5–13, 2026404 examples come directly from unrewritten relative Markdown links inside Portal documents resolved against<base href="./dist/production/apps/portal/">//apps/portal/:https://neomjs.com/apps/portal/ai/mcp/server/neural-link/Server.mjshttps://neomjs.com/apps/portal/ai/services/knowledge-base/VectorService.mjshttps://neomjs.com/apps/portal/ai/deploy/docker-compose.test.ymlhttps://neomjs.com/apps/decisions/0027-autonomous-data-recovery-actuator.mdhttps://neomjs.com/apps/agentos/IdentityFirewall.mdRepository verification (
2026-11-16) confirmed real authored Markdown examples inresources/content/includingdiscussions/chunk-1/discussion-11002.md:159([ai/deploy/docker-compose.test.yml](ai/deploy/docker-compose.test.yml)),archive/issues/v13.2.0/chunk-14/issue-17343.md:49,85-88([VectorService.mjs:595](ai/services/knowledge-base/VectorService.mjs#L595)), andarchive/issues/v13.2.0/chunk-13/issue-16972.md:279([VectorService.mjs:1450](../blob/dev/ai/services/knowledge-base/VectorService.mjs#L1450)).unowned-rationale:Prio-0 team lane per operator directive (2026-11-16); open for immediate maintainer self-selection (good first issue/help wantedomitted).The Problem
Portal.view.content.Component(apps/portal/view/content/Component.mjs, base fortickets,pulls,discussions) andPortal.view.news.release.Component(apps/portal/view/news/release/Component.mjs) do not setcontentRouteor overriderewriteLinks(src/app/content/Component.mjs:234-270):Neo.app.content.Component#rewriteLinksimmediately returns HTML untouched whenever!contentRoute || !me.record?.id(line 238), so relative links in issues, PRs, discussions, and release notes are emitted raw and resolve against/apps/portal/into404s..mdrepository source paths (ai/...,src/...,buildScripts/...) and escaped../links are ignored byrewriteLinks(line 254, 264):if (... || !/\.md($|#)/i.test(href)) return match;leaves[VectorService.mjs](ai/services/knowledge-base/VectorService.mjs#L595)and../decisions/...untouched even in views that do setcontentRoute(Portal.view.learn.Component,Portal.view.news.blog.Component).The Architectural Reality
Design authority:src/app/content/Component.mjs:220-270(rewriteLinksJSDoc: "a relative path is the correct link [on GitHub], and inside an app, where only that app knows how to turn the path into something navigable. This seam lets a subclass supply that translation"),apps/portal/view/news/blog/Component.mjs:34-48(#19901pattern, which explicitly placed non-learn/targets out of scope), andtest/playwright/unit/app/content/LinkPredicateParity.spec.mjs:36-101.LinkPredicateParity.spec.mjs:36-44, 87-100):LinkPredicateParity.spec.mjsdrivesContentComponent.prototype.rewriteLinksdirectly (contentRoute: '#/learn/',record: {id: 'guides/uibuildingblocks/DockLayouts'}) and asserts thatContentComponent.prototype.rewriteLinksleaves external scheme URIs,#fragments, root-absolute/..., and extensionless tokens (benefits.body.ConfigSystem) alone. Putting Portal-specific repo/GitHub URL rewriting on Portal's subclasses (while keepingNeo.app.content.Component#rewriteLinkscompliant withLinkPredicateParity.spec.mjsandbuildScripts/util/check-relative-links.mjs) preserves the build guard contract cleanly.Portal.view.content.Component(tickets,pulls,discussions) andPortal.view.news.release.Componentboth already configureissuesUrl: '#/news/tickets/'andextends: ContentComponent, making them the natural Portal seam (or a shared Portal content helper called fromPortal.view.learn.Component,Portal.view.news.blog.Component,Portal.view.news.release.Component, andPortal.view.content.Component).The Fix
apps/portal/view/...):super.rewriteLinks(html)behavior inlearnandblog(#19901) and keepNeo.app.content.Component#rewriteLinkspassingLinkPredicateParity.spec.mjsunchanged.Portal.view.content.Component,Portal.view.news.release.Component,Portal.view.learn.Component, andPortal.view.news.blog.Component, rewrite any remaining relative<a href>(excludingEXTERNAL_TARGETscheme/#and root-absolute/...):learn/blog/<slug>.md(#...)->#/news/blog/<slug>(#...)andlearn/<id>.md(#...)->#/learn/<id>(#...).src/,ai/,apps/,examples/,buildScripts/,test/,resources/,.agents/,.github/,README.md,ROADMAP.md, or../blob/dev/<path>) ->https://github.com/neomjs/neo/blob/dev/<cleanPath>withtarget="_blank" rel="noopener".../...relative anchors against<base href="/apps/portal/">: normalize escaped../repo-relative paths (blob/dev/...or root repo file paths) rather than letting browsers or crawlers navigate to/apps/portal/...or/apps/...404s.test/playwright/unit/portal/ortest/playwright/unit/app/content/):Portal.view.content.Component,Portal.view.news.release.Component,Portal.view.learn.Component, andPortal.view.news.blog.Componentrewritingai/services/knowledge-base/VectorService.mjs#L595,ai/deploy/docker-compose.test.yml,../blob/dev/ai/services/knowledge-base/VectorService.mjs#L1450, and repo-relativelearn/benefits/Introduction.md, while preserving#/...,/...,#anchor, andhttps://...URLs.LinkPredicateParity.spec.mjsalongside the new unit spec to prove zero parity regression.Contract Ledger Matrix
Portal.view.content.Component#rewriteLinks,Portal.view.news.release.Component#rewriteLinks,Portal.view.learn.Component#rewriteLinks,Portal.view.news.blog.Component#rewriteLinkssrc/app/content/Component.mjs:220-270,#19901,LinkPredicateParity.spec.mjslearn/*.mdlinks to Portal hash routes and relative repo source/config/escaped links tohttps://github.com/neomjs/neo/blob/dev/.../...,#...untouchedrewriteLinksoverrides / helperLinkPredicateParity.spec.mjsgreenDecision Record impact
none (uses the documented
ContentComponent#rewriteLinkssubclass seam).Acceptance Criteria
Portal.view.content.Component,Portal.view.news.release.Component,Portal.view.learn.Component, andPortal.view.news.blog.Componentrewrite repo-relativeai/...,src/...,../blob/dev/..., andlearn/.../*.mdanchors instead of emitting raw relative<a href>s against<base href="/apps/portal/">.Neo.app.content.Component#rewriteLinksstill passestest/playwright/unit/app/content/LinkPredicateParity.spec.mjsunchanged.ai/services/knowledge-base/VectorService.mjs#L595,ai/deploy/docker-compose.test.yml,../blob/dev/...,learn/blog/...,learn/...,#/..., andhttps://...handling, and pass undernpm run test-unit -- <spec>.Out of Scope
neomjs/middleware-v2companion ticket).neomjs/neo#21117).Avoided Traps
Neo.app.content.Component#rewriteLinksdefault non-.mdskip rule directly without gating:test/playwright/unit/app/content/LinkPredicateParity.spec.mjsassertsContentComponent.prototype.rewriteLinksleaves non-.mdtokens (benefits.body.ConfigSystem) alone. Keep the repo/timeline translation in Portal's subclasses / helper.https://github.com/neomjs/neo/blob/dev/ai/deploy/docker-compose.test.ymlwithout normalizing../blob/dev/prefixes: Strip leading(../)+blob/<branch>/segments so links like../blob/dev/ai/...do not turn into invalid GitHub URLs.Related
Parent:
neomjs/neo#20671· Prior:#19901· Companion:neomjs/neo#21117,neomjs/pages#89Live latest-open + closed sweep: checked latest
20open issues (totalCount: 62, red band> 50— scoped directly under Epic#20671, verified#20671has14subs< 25) + open/closed search (rewriteLinks OR SsrService OR raw markdown noindex; read#19901Out of Scope explicitly excluding moved/non-learn/targets) inneomjs/neoat2026-11-16T09:27Z; no duplicate found. A2A in-flight claim sweep:list_messages({status: 'all', limit: 30})at2026-11-16T09:26Z; no competing claim onPortalrewriteLinks. MC sweep:query_raw_memorieson"Google Search Console neomjs.com sitemap raw markdown crawl budget 404 seo",5results, plus#19901precedent. Own-assignment sweep:#21104,#20987,#20671inneomjs/neo; non-overlapping. Structure map: N/A (Portal UI view code + unit test under existing directories).Origin Session ID: 1f283c86-c55b-4aa5-a291-0cbb3786c302 Retrieval Hint: "Portal view content release rewriteLinks relative repo links ai deploy VectorService 404 GSC"