Builds on the versioned legal registry from the agreement PR.
Legal document viewing (P3/P4)
- GET /api/v1/legal/{docId} serves any registered doc (EULA, SLA exhibit,
subprocessors) as markdown from the registry; a LegalDocumentModal renders
it in-product with a draft badge. The SLA exhibit is one of these docs, so
the Order Form's "per SLA Exhibit" reference is now viewable.
Consent logging (P3)
- New legal_consent table (V39 + Supabase twin) records clickwrap consents
pinned to the exact document id + version. POST /api/v1/legal/consent.
- The trial-setup modal now requires accepting the EULA (with a link to read
it) before starting, and the quote builder records EULA consent on generate.
Best-effort — consent logging never blocks the flow.
Enhanced IP Protection (P2, light)
- Relabel the add-on to "Enhanced IP Protection" (patent coverage) and note
that baseline IP indemnification is included free. The Order Form already
renders it as elected/not from the agreement PR. Copy-only, no pricing change.
Out of scope (noted): self-serve PAYG / prepay consent surfaces don't exist
yet (separate self-serve billing workstream); a redundant quote-level legal-
entity column (signing already captures the authoritative legal name).
Verified: saas compiles; portal typecheck, eslint, prettier, dpdm (no cycles),
toml-sort, translation audits, and 176 portal/audit vitest tests pass.