Repository navigation
feat: markdown alternate tags + llms.txt cleanup - #48287
pamelachia merged 8 commits into
Conversation
….txt, keep pricing
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
📝 WalkthroughWalkthroughThe change adds shared Markdown alternate metadata across pages, introduces vector Markdown content and redirects, updates LLM text outputs to use pricing sections, and adds filesystem-based coverage tests for Markdown route alignment. ChangesMarkdown surfaces
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ags-drift-test-vector-slug-fix
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/www/content/md/modules/vector.md`:
- Around line 17-18: Update the SOC2 Type 2 compliance bullet in the vector
module documentation to explicitly scope the claim to hosted Supabase
deployments, while keeping the self-hostable statement unchanged.
- Line 43: Update the backups statement in the vector module documentation to
specify that automatic daily backups are available for Pro, Team, and Enterprise
projects, while PITR is a separate add-on that replaces daily backups when
enabled. Remove the implication that backups are universal or provided
simultaneously.
- Line 34: Update the operator description in the vector module documentation to
identify `<#>` as negative inner product rather than inner product, while
leaving the cosine and L2 descriptions unchanged.
- Line 40: Update the vector dimension limits in the documented Max dimensions
entry: state that HNSW and IVFFlat indexes support up to 2,000 dimensions, and
identify 16,000 as the vector storage-type limit rather than attributing it to a
flat index or describing it as “16,000+”.
In `@apps/www/md-alternates.test.ts`:
- Around line 73-76: Update the Pages Router branch in the alternate validation
test to verify the shared pages/_app.tsx wiring produces a text/markdown
alternate for the slug, rather than only checking that pages/${slug}.tsx exists.
Preserve the existing App Router validation and ensure the test fails when the
route exists without the expected alternate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 6c50a2c9-77d7-4373-a806-762024135613
📒 Files selected for processing (15)
apps/docs/app/guides/troubleshooting/[slug]/page.tsxapps/www/app/(home)/page.tsxapps/www/app/(products)/auth/page.tsxapps/www/app/(products)/database/page.tsxapps/www/app/(products)/edge-functions/page.tsxapps/www/app/(products)/realtime/page.tsxapps/www/app/(products)/storage/page.tsxapps/www/app/blog/[slug]/page.tsxapps/www/app/llms-full.txt/route.tsapps/www/app/llms.txt/route.tsapps/www/app/pricing/page.tsxapps/www/content/md/modules/vector.mdapps/www/lib/md-alternates.tsapps/www/lib/redirects.jsapps/www/md-alternates.test.ts
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/www/content/md/modules/vector.md`:
- Around line 17-18: Update the SOC2 Type 2 compliance bullet in the vector
module documentation to explicitly scope the claim to hosted Supabase
deployments, while keeping the self-hostable statement unchanged.
- Line 43: Update the backups statement in the vector module documentation to
specify that automatic daily backups are available for Pro, Team, and Enterprise
projects, while PITR is a separate add-on that replaces daily backups when
enabled. Remove the implication that backups are universal or provided
simultaneously.
- Line 34: Update the operator description in the vector module documentation to
identify `<#>` as negative inner product rather than inner product, while
leaving the cosine and L2 descriptions unchanged.
- Line 40: Update the vector dimension limits in the documented Max dimensions
entry: state that HNSW and IVFFlat indexes support up to 2,000 dimensions, and
identify 16,000 as the vector storage-type limit rather than attributing it to a
flat index or describing it as “16,000+”.
In `@apps/www/md-alternates.test.ts`:
- Around line 73-76: Update the Pages Router branch in the alternate validation
test to verify the shared pages/_app.tsx wiring produces a text/markdown
alternate for the slug, rather than only checking that pages/${slug}.tsx exists.
Preserve the existing App Router validation and ensure the test fails when the
route exists without the expected alternate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 6c50a2c9-77d7-4373-a806-762024135613
📒 Files selected for processing (15)
apps/docs/app/guides/troubleshooting/[slug]/page.tsxapps/www/app/(home)/page.tsxapps/www/app/(products)/auth/page.tsxapps/www/app/(products)/database/page.tsxapps/www/app/(products)/edge-functions/page.tsxapps/www/app/(products)/realtime/page.tsxapps/www/app/(products)/storage/page.tsxapps/www/app/blog/[slug]/page.tsxapps/www/app/llms-full.txt/route.tsapps/www/app/llms.txt/route.tsapps/www/app/pricing/page.tsxapps/www/content/md/modules/vector.mdapps/www/lib/md-alternates.tsapps/www/lib/redirects.jsapps/www/md-alternates.test.ts
🛑 Comments failed to post (5)
apps/www/content/md/modules/vector.md (4)
17-18: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Scope SOC 2 compliance to hosted Supabase deployments.
The page presents the stack as both self-hostable and SOC 2 Type 2 compliant. Supabase’s compliance boundary does not extend to environments outside Supabase’s control, so self-hosted deployments cannot inherit this claim. (supabase.com)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/www/content/md/modules/vector.md` around lines 17 - 18, Update the SOC2 Type 2 compliance bullet in the vector module documentation to explicitly scope the claim to hosted Supabase deployments, while keeping the self-hostable statement unchanged.
34-34: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
curl -fsSL https://supabase.com/docs/guides/ai/vector-indexes | grep -i "negative inner product"Repository: supabase/supabase
Length of output: 50373
Describe
<#>as negative inner product.
<#>computes negative inner product, not the inner-product value itself. Update this line to avoid users interpreting the returned score/sign incorrectly.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/www/content/md/modules/vector.md` at line 34, Update the operator description in the vector module documentation to identify `<#>` as negative inner product rather than inner product, while leaving the cosine and L2 descriptions unchanged.
40-40: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
curl -fsSL https://supabase.com/docs/guides/ai/vector-indexes | grep -E "2,000 dimensions|HNSW|IVFFlat"Repository: supabase/supabase
Length of output: 50374
🏁 Script executed:
#!/bin/bash set -euo pipefail echo "== local file context ==" sed -n '30,50p' apps/www/content/md/modules/vector.md 2>/dev/null || true echo echo "== docs markdown source for dimension limits ==" python3 - <<'PY' import urllib.request url="https://supabase.com/docs/guides/ai/vector-indexes.md" try: with urllib.request.urlopen(url, timeout=20) as r: text=r.read().decode("utf-8") except Exception as e: print("fetch_error", e) raise SystemExit for i,line in enumerate(text.splitlines(),1): if "2,000" in line or "16,000" in line or "HNSW" in line or "IVFFlat" in line or "dimensions" in line: print(f"{i}: {line}") PYRepository: supabase/supabase
Length of output: 1172
🌐 Web query:
Supabase vector indexes HNSW IVFFlat maximum dimensions 2000 vector column dimensions limit 16000💡 Result:
In Supabase, which utilizes the pgvector extension, the storage limit for vector columns is significantly higher than the limit for vector indexes [1][2]. The
vectordata type itself supports up to 16,000 dimensions [2][3]. However, the maximum number of dimensions that can be indexed for approximate nearest neighbor search is strictly lower [1][4]. Specifically: - HNSW and IVFFlat indexes: These currently support a maximum of 2,000 dimensions for standardvectortypes [5][6][7]. - Half-precision (halfvec): For vectors with more than 2,000 dimensions, you can use thehalfvecdata type, which allows for indexing up to 4,000 dimensions [6][2]. - Binary (bit): You can use thebitdata type to index up to 64,000 dimensions [5][2]. While you can store vectors up to 16,000 dimensions in a table column, attempting to create an HNSW or IVFFlat index on a standardvectorcolumn that exceeds the 2,000-dimension limit will result in an error [2][4]. To index higher-dimensional data, you must utilize thehalfvecorbittypes as mentioned above [6][2]. Note: These limits refer to the core pgvector extension used in Supabase projects. If you are using the separate "Vector Bucket" feature in Supabase, different alpha-phase limits may apply (e.g., 4,096 dimensions) [8].Citations:
- 1: https://supabase.com/vector
- 2: https://github.com/pgvector/pgvector/?tab=readme-ov-file
- 3: https://github.com/pgvector/pgvector/blob/35ab919b/src/vector.h
- 4: pgvector/pgvector#461
- 5: https://supabase.com/docs/guides/ai/vector-indexes
- 6: https://supabase.com/docs/guides/ai/vector-indexes/hnsw-indexes
- 7: https://supabase.com/docs/guides/ai/vector-indexes/ivf-indexes
- 8: https://supabase.com/docs/guides/storage/vector/limits
Correct the vector dimension limits.
HNSW and IVFFlat indexes support up to 2,000 dimensions for
vector; 16,000 is thevectorstorage-type limit, not a flat/index type limit, and “16,000+” is incorrect.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/www/content/md/modules/vector.md` at line 40, Update the vector dimension limits in the documented Max dimensions entry: state that HNSW and IVFFlat indexes support up to 2,000 dimensions, and identify 16,000 as the vector storage-type limit rather than attributing it to a flat index or describing it as “16,000+”.
43-43: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Qualify the backup guarantee by plan and backup mode.
Automatic daily backups apply to Pro, Team, and Enterprise projects; PITR is an add-on, and enabling PITR replaces daily backups rather than providing both simultaneously. The current wording implies universal and simultaneous availability. (supabase.com)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/www/content/md/modules/vector.md` at line 43, Update the backups statement in the vector module documentation to specify that automatic daily backups are available for Pro, Team, and Enterprise projects, while PITR is a separate add-on that replaces daily backups when enabled. Remove the implication that backups are universal or provided simultaneously.apps/www/md-alternates.test.ts (1)
73-76: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Validate the Pages Router alternate, not only its route file.
This branch passes whenever
pages/${slug}.tsxexists, even if it emits notext/markdownalternate. Inspect or render the sharedpages/_app.tsxwiring here; otherwise the stated drift guarantee has a false-green path.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/www/md-alternates.test.ts` around lines 73 - 76, Update the Pages Router branch in the alternate validation test to verify the shared pages/_app.tsx wiring produces a text/markdown alternate for the slug, rather than only checking that pages/${slug}.tsx exists. Preserve the existing App Router validation and ensure the test fails when the route exists without the expected alternate.
This reverts commit 3b89b7e.
Braintrust eval report
|
…ers, pricing pages (#51859) ## Problem Missing canonical tags on many `www` pages (blogs, changelog entries, product pages, etc.). Part of general AEO / SEO hygiene. ## Solution Adds these in a similar pattern to `mdAlternates` (#48287) <img width="984" height="381" alt="image" src="https://github.com/user-attachments/assets/0a596f7f-b034-451f-9ea1-6804c5184388" /> ## Preview links Route type | Live | Preview -- | -- | -- Home (app router, page-level canonical) | https://supabase.com/ | https://zone-www-dot-com-git-kody-devrel-730-canonical-309a80-supabase.vercel.app/ Blog index (app router) | https://supabase.com/blog | https://zone-www-dot-com-git-kody-devrel-730-canonical-309a80-supabase.vercel.app/blog Blog post | https://supabase.com/blog/supabase-alpha-april-2020 | https://zone-www-dot-com-git-kody-devrel-730-canonical-309a80-supabase.vercel.app/blog/supabase-alpha-april-2020 Blog tag | https://supabase.com/blog/tags/postgres | https://zone-www-dot-com-git-kody-devrel-730-canonical-309a80-supabase.vercel.app/blog/tags/postgres Blog author | https://supabase.com/blog/authors/paul_copplestone | https://zone-www-dot-com-git-kody-devrel-730-canonical-309a80-supabase.vercel.app/blog/authors/paul_copplestone Product page | https://supabase.com/edge-functions | https://zone-www-dot-com-git-kody-devrel-730-canonical-309a80-supabase.vercel.app/edge-functions Pricing | https://supabase.com/pricing | https://zone-www-dot-com-git-kody-devrel-730-canonical-309a80-supabase.vercel.app/pricing Features index (pages router, _app) | https://supabase.com/features | https://zone-www-dot-com-git-kody-devrel-730-canonical-309a80-supabase.vercel.app/features Feature sub-page | https://supabase.com/features/postgres-database | https://zone-www-dot-com-git-kody-devrel-730-canonical-309a80-supabase.vercel.app/features/postgres-database Page with its own NextSeo canonical (override case) | https://supabase.com/state-of-startups-2025 | https://zone-www-dot-com-git-kody-devrel-730-canonical-309a80-supabase.vercel.app/state-of-startups-2025 Legal page, no page-level SEO (pages router default) | https://supabase.com/legal | https://zone-www-dot-com-git-kody-devrel-730-canonical-309a80-supabase.vercel.app/legal
The June/July marketing redesign (#47271, #47228) rebuilt the homepage and product pages off the Pages Router, silently dropping their
<link rel="alternate" type="text/markdown">head tags, and llms-full.txt has been accidentally embedding every blog/customer/event page via anMD_CONTENTspread. I restored the tags behind a shared helper, added a CI drift test so a future redesign can't drop them silently again, and trimmed both llms files to the agreed docs-index shape.Changed:
.mdalternate URLs via a newmdAlternates(slug)helper (the one documented consumer of the tag parses it from<head>and fetches the.mdsibling, so tags must point at the sibling, never the page itself).content/md/**and asserts every markdown-served slug's page wires the helper (or is covered by the Pages Router_app.tsxmechanism, whose alternate-link wiring the test also asserts directly so removing it fails CI too). Source-level assertions by design: page modules can't be imported under www's vitest config. Fails correctly when wiring is removed (verified by hiding a page and by altering the_app.tsxtag).content/md/vector.mdmoved tomodules/vectormatching the live route (the page previously had no negotiation or tag, and/modules/vector.md404'd);/vector.mdnow 308s to/modules/vector.mdand the legacy/llms/vector.txtredirect no longer chains.## Product Overviewsections are gone from both, each keeps a## Pricingsection. This deletes the hand-maintained links array (a drift trap) and fixes the accidental ~470-page embed, shrinking llms-full.txt from ~9.8MB to ~4.9MB and dropping the 4.1MB generated content module from that route's serverless bundle.Note: this PR is scoped to apps/www only. The docs side (troubleshooting pages and the rest of the docs surface) is handled separately through a consolidated manifest-gated mechanism; an earlier troubleshooting-tag commit was reverted out of this branch to keep the scopes clean.
Why alternate tags matter (background)
Agents ingest markdown far more efficiently than our rendered HTML: a fraction of the tokens and no extraction step. Since #47770 removed UA-based serving (UA sniffing broke a major AI app's fetcher and poisoned CDN caches), markdown is served only on explicit request: a
.mdsuffix URL, anAccept: text/markdownheader, or llms.txt. That's the right serving model, but it makes the markdown twin invisible to any agent that doesn't already know our URL convention, and the major AI fetchers send browser/wildcard Accept headers, so bare URLs hand them HTML.The
<link rel="alternate" type="text/markdown">head tag is the standards-based advertisement of the sibling. It has a documented consumer today: an agent CLI that parses the tag from<head>and then fetches the.mdsibling, which is also why the tag must point at a real sibling URL and never at the page itself. Peer docs sites ship this tag as table stakes. These www pages used to carry it until the June/July marketing redesign silently dropped it; the drift test in this PR turns that regression class into a CI failure.To test
Tested locally (www + docs dev servers):
/llms.txtrenders## Documentation+ single-link## Pricing, no Product Overview/llms-full.txtrenders# Supabase→## Pricing→## Documentation, no Product Overview, ~4.9MB_app.tsxwiring is alteredgenerateMdContent.mjsemitsmodules/vector, barevectorslug goneOn the Vercel preview (browser-verified with Playwright):
/,/auth,/database,/storage,/edge-functions,/realtime,/pricing, and a blog post: exactly one tag each, href = preview origin +.mdsibling/vector.md→ 308 →/modules/vector.md, renders as markdown (# Supabase Vector)/llms.txtshows single-link## Pricing, no Product OverviewMD_PAGESslugs + changelog index/entry curled on the preview; 471 pages carry exactly one tag, all.mdsiblings 200 astext/markdown. The 11 misses are legacy blog slugs whose HTML 308-redirects away (staleMD_PAGESentries predating this PR, no head to tag; follow-up tracked in Linear)Post-merge prod:
Linear
Summary by CodeRabbit
New Features
Tests