Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds public legal pages at
/termsand/privacy, wires them into the session-exempt list and sitemap, and links to both from the signup form.Why
Stripe-gated SaaS products are expected to link Terms of Service and a Privacy Policy from checkout/signup, and users creating accounts at
/signupwere previously giving us their email with no privacy commitment on the page. Both paths previously 404'd on modelrelay.io.Changes
crates/modelrelay-cloud/src/routes/legal.rs(new):terms_pageandprivacy_pagehandlers rendered throughmodelrelay_web::templates::page_shellwith per-page canonical/og:url for/termsand/privacy. Bodies cover the sections requested (acceptance, description of service, account responsibilities, acceptable use, payment/cancellation via Stripe, availability + rate limits, suspension/termination, disclaimers, limitation of liability, governing law CA/SF, changes, contact; for privacy: sign-up data, usage metadata, Stripe, cookies, API keys, use, sharing, retention, security, user rights, children, jurisdiction, changes, contact).crates/modelrelay-cloud/src/routes/mod.rs: registerspub mod legal;, adds/terms+/privacyroutes, adds both toSESSION_EXEMPT_ROUTES, and adds<url><loc>entries tositemap_xml.crates/modelrelay-cloud/src/routes/auth.rs: adds a small "By creating an account, you agree to our Terms of Service and Privacy Policy" line under the Create Account button insignup_form_html.crates/modelrelay-cloud/tests/http_routes.rs: four new tests covering 200 +<h1>+ canonical/og:url on both pages, sitemap inclusion, and signup-form link presence. Also extends the existing sitemap test to assert/termsand/privacyare present.Validation
cargo fmt --all -- --checkcleancargo clippy -p modelrelay-cloud --all-targets --no-deps -- -D warningscleancargo test -p modelrelay-cloud— 30 passed, 0 failed (including the 4 new tests)Post-deploy verification
After Deploy Cloud succeeds, expect:
curl -s -o /dev/null -w "%{http_code}" https://modelrelay.io/terms→ 200curl -s -o /dev/null -w "%{http_code}" https://modelrelay.io/privacy→ 200/termsand/privacy