Repository navigation
docs: footer trademark notices scan different text than rehype-trademarks marks #497
Description
Activity
coderabbitai commented
on Aug 19, 2026 coderabbitaiboton Aug 19, 2026 – with coderabbitaiMore actions🔗 Related PRs
#142 - feat(docs): rebuild site with wavehouse logo and design tokens [closed]
#187 - docs: prep docs for publishing [closed]
#313 - feat(docs): view-transition polish, branded search + 404, chrome pass [closed]
#368 - feat(docs): override Starlight header with a top-level site nav [merged]
#489 - build(docs): cloud referrals, standard fmt, and markdown lint rules [open]
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:issue_enrichment: auto_enrich: enabled: false
💬 Have feedback or questions? Drop into our discord!
- added a commit that references this issue
on Aug 19, 2026 This is fixed by design in the new public package
@wave-rf/astro-trademarks, which is option 1 above: the notices are built from the same scan that places the symbols, over the rendered HTML, so they can't diverge. The package has a test that fails if they ever do.Measured, not inferred. I ran the package's HTML pass over this repo's built
docs/dist/architecture/index.html, the page this issue cites, withsrc/config/trademarks.ts's realTRADEMARKSand the planned config (skipClasses: [defaults, Starlight preset, "not-content"]):Notices Today's footer (raw body) ClickHouse, NATS, Redis, OpenTelemetry, Prometheus, Hasura, Amazon Web Services, Kubernetes, Docker The package ClickHouse, NATS, Prometheus, Hasura, Docker, Claude OpenTelemetry, Redis, AWS and Kubernetes appear only in headings or code on that page, and they drop out.
The Claude hit is a false positive. It comes from the starlight-llm-tools "Open with AI" dropdown inside
<main>. The adoption config below skips it withsllm-links, and the proper fix is tracked in starlight-llm-tools (Wave-RF/starlight-llm-tools#11).Adoption, once the package is on npm (the first publish is a manual bootstrap):
- Delete
src/plugins/rehype-trademarks.tsandsrc/components/Trademarks.astro. Insrc/config/trademarks.ts, keep only the registry: wrapTRADEMARKSindefineTrademarks, and dropheroText,pageText,PageFrontmatterand the matchers. DroprehypeTrademarksfromrehypePlugins. - Add
trademarks({ marks, skipClasses: ["not-content", "sllm-links"] })to the integrations. The Starlight preset is auto-detected. - In
Footer.astro, replace<Trademarks source={…} />andpageTextwith:<TrademarkNotices catchAll="All other product names, logos, and brands are the property of their respective owners." disclaimer="WaveHouse is an independent open-source project and is not affiliated with, endorsed by, or sponsored by the trademark holders named above." />
- In
Hero.astro, dropmarkFirstMentionsand render the tagline as plain text. Starlight's hero is inside<main>, so the middleware marks it. - Styles: keep
.wh-tmviasymbolClass: "wh-tm", or drop it, since the defaults match. Map.wh-legalonto--tm-notices-font-size: 0.75rem; --tm-notices-line-height: 1.5; --tm-notices-color: var(--wh-ink-subtle). - Trade-off to accept: Cloud CTA copy in the footer (
not-content) gets neither a symbol nor a notice. Counting it without marking it was this issue's bug. - The
.mdtwins andllms*.txtare left untouched by default (themachineReadableoption is off).
- Delete
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsBacklog
Raised by CodeRabbit on #489 (
docs/src/components/Footer.astro:51), and independently noticed-but-not-raised by thepre-push-reviewergate on the same branch. Filing rather than folding in, because the fix is a design decision rather than a review nit.The invariant, and how it breaks
Trademarks.astrostates the contract in its own header:Both sides read one registry, but they scan different text:
rehype-trademarks.tswalks the rendered HTML and deliberately skipscode,pre,kbd,samp,var,h1–h6,.katex,.expressive-code, and theLinkButton/LinkCardcomponents — each for a good reason (a ® inside a copy-pasteable command is wrong; marking a heading desyncs it from the TOC that was collected before the plugin runs).Footer.astrobuilds its notice list frompageText(entry.data, entry.body ?? "")— the raw Markdown/MDX body, which contains all of those.So a mark named only inside a heading or a fenced block produces a footer notice with no matching symbol anywhere in the prose. Live example:
docs/src/content/docs/architecture.mdmentions OpenTelemetry only in excluded structures, and still emits an OpenTelemetry notice.The direction is the safe one — over-attributing is better than claiming a mark the page never names — which is why it isn't blocking. But it is precisely the mismatch the component says can't happen.
Options
pageText()the same exclusions — strip fenced/inline code and ATX/setext headings from the body before scanning. Cheaper, no plumbing, but it duplicates the eligibility rules in a second place and they will drift.Option 1 is the one that actually holds the line; option 2 is the pragmatic version if the plumbing isn't worth it.
Also in scope while there
Trademarks.astroderives fromentry.body, so a mark appearing only inside a code fence still yields a footer notice — the same root cause, and it would be fixed by the same change.