Files
supabase/apps/www/data
claude[bot] 76a9ba968c refactor(www): unify legal page shells and versioning (#48483)
<!-- ccr-slack-attribution -->
_Requested by **Francesco Sansalvadore, Nicole Kramer** · [Slack
thread](https://supabase.slack.com/archives/C0161K73J1J/p1785399057853249?thread_ts=1785399057.853249&cid=C0161K73J1J)_

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Refactor of the marketing site's legal pages, plus two small content
fixes (removal of duplicated dates, two heading corrections) and two
permanent redirects.

## What is the current behavior?

The documents linked from the Legal Hub are built three different ways:

- `/terms` and `/enterprise-terms` render a plain inline heading with no
breadcrumbs.
- `/sla`, `/support-policy`, `/aup` and `/privacy` are standalone MDX
pages carrying their own layout.
- `/legal/dpa` has a one-off centered heading and grid of its own.

On top of that, the documents that already have a version selector
*also* print a "Last Modified" line inside the document body, so the
same fact is stated twice on the page. On `/terms` and
`/enterprise-terms` the two statements disagree: the selector says
"Version 2 — May 6, 2026" while the body says "Last Modified: 1 May
2026".

`/privacy` handles its history differently again — earlier versions live
at their own archived URLs (`/privacy-260316` and `/privacy-250528`),
strung together by "Previous Version" links at the bottom of each page.

## What is the new behavior?

Every legal page now renders through one shell: `PageHeader` with a
`PageBreadcrumb`, so the Legal Hub is one click away from any document.

- The duplicate "Last Modified" rows are removed from the five versioned
documents. The version selector is now the single place a date appears.
- `/aup` and `/privacy` gain the version selector.
- `/privacy`'s three historical versions are now selectable from the one
page, and the two old archived URLs permanently redirect to it.
- `/sla` and `/support-policy` pick up the shell and breadcrumbs but
intentionally show neither a date nor a selector — neither document has
ever carried one, and Legal asked that the SLA stay that way for now.

Implementation-wise the canonical pattern is the one the Data Processing
Addendum page was already using: `DefaultLayout` > `NextSeo` >
`PageHeader` (with a `breadcrumb` slot) > `MDXProvider` >
`SectionContainer className="prose"` > `LegalDocVersions`. The
standalone MDX pages were moved to `apps/www/data/legal/<slug>/vN.mdx`
as bare content partials, with a new TSX shell taking over the original
route. No route changed except the two archived privacy pages, which
redirect.

Dates were carried across from the "Last Modified" lines being deleted
rather than invented: `/aup` becomes Version 1 — June 1, 2026, and
privacy v1/v2/v3 become May 28 2025, March 16 2026 and May 13 2026.

## Additional context

**This is a stacked PR.** It is sequenced behind three PRs that touch
the same files and should land first: the Terms of Service v3 bump, the
Enterprise SaaS Subscription Agreement v3 bump, and #48481 (DPA
effective date → August 1, 2026). #48481 edits the very "Last Modified"
line this PR removes from the DPA content file, so a trivial conflict
there is expected. This branch will be rebased onto master before it
leaves draft.

**Two contracts now contain a clause that no longer describes the
page.** `apps/www/data/legal/terms/v1.mdx` and `v2.mdx` — and the same
sentence in the MPPA and both integration-partner addenda — still read
"The date on which the Agreement was last modified will be updated at
the top of this Agreement". There is no longer a date in the document
body; it sits in the version selector above it. Left untouched here
because it is contract text, but Legal should re-word it.

**The date mismatch is resolved in favour of the selector.** On `/terms`
and `/enterprise-terms`, deleting the body line leaves May 6, 2026 as
the only date on the page. Nicole Kramer confirmed in Slack that May 6
is the correct date.

**Two headings change visibly**, to line up with the labels used on the
Legal Hub: "Terms of service" → "Terms of Service", and "Service Level
Agreements" → "Service Level Agreement".

**`/legal/dpa` now looks almost identical to
`/legal/customer-resources/data-processing-addendum`** — same heading,
same breadcrumb, different content. The legacy page is a PDF download
plus a signing flow and was deliberately left live, but the overlap is
more obvious than it was. Redirecting it to the versioned page is the
natural follow-up; it is not done here.

**Build verification was incomplete in this environment.** `pnpm
install` could not finish because `npm.jsr.io` is blocked by network
policy (403), so `next build` never gave a real signal. What did run and
pass:

- `tsc --noEmit` on `apps/www`, with output byte-identical to clean
master
- ESLint on every changed file — 0 errors
- Prettier using the repo's actual config
- a direct MDX compile of all 14 `data/legal/**/*.mdx` files using the
app's own MDX options

The one thing left unverified is webpack resolving
`ui-patterns/PrivacySettings` from the privacy content's new directory.
CI will confirm that.

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-30 14:05:46 +02:00
..