feat: privacy language on homepage and consent page - #102
Conversation
Marketing-friendly truth, scoped to what the Privacy Policy actually says (account data IS stored while the account exists, so no absolute zero-data claims): - New PRIVACY_NOTICE_TEXT in server/legal.ts, handed to every consent flow (parked signup + signed-in re-consent) and rendered under the form next to the refund notice: nothing stored beyond what the account needs to run, the consent record itself is the one statutory keep (LGPD Art. 16, III). - TrustBar microcopy: same scoped claim + nothing kept after you leave that the LGPD does not require. - LGPD FAQ answer extended with the user-data side: erased on the spot on account deletion except the consent record; no selling, no ad profiling, no model training. - legal.test.ts consistency guard: the three surfaces must scope the claim to account needs and may never make an absolute zero-data claim. - consent.test.ts: both load branches return privacyText and the page renders it (failing tests first, per repo rules).
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
Warning Review limit reached
Next review available in: 48 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR updates privacy-retention messaging across landing pages and the consent flow. It adds a shared privacy notice, returns it from both consent load paths, renders it on the consent page, and adds consistency and rendering tests. ChangesPrivacy notice consistency
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 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 |
Sequence DiagramThis PR adds scoped privacy messaging to the homepage and consent flow. The consent page receives the privacy notice in both signup and re-consent flows and displays it separately from the logged consent text. sequenceDiagram
participant Visitor
participant Homepage
participant ConsentPage
participant Backend
Visitor->>Homepage: Open homepage
Homepage-->>Visitor: Show scoped privacy message
Visitor->>ConsentPage: Open consent page
ConsentPage->>Backend: Load consent data
Backend-->>ConsentPage: Return privacy notice for account needs
ConsentPage-->>Visitor: Show privacy notice below the form
Generated by CodeAnt AI |
🏁 CodeAnt Quality Gate ResultsCommit: ✅ Overall Status: PASSEDQuality Gate Details
|
There was a problem hiding this comment.
Summary
This PR successfully adds privacy language to the homepage TrustBar, consent page, and LGPD FAQ answer, consistently scoping all claims to "what your account needs to run." The implementation follows the established pattern of REFUND_NOTICE_TEXT and includes comprehensive test coverage.
Key Strengths:
- Consistent scoping enforced by test guards to prevent contradictions with Privacy Policy §2
- All surfaces (TrustBar, FAQ, consent page) correctly pass and render the privacy notice
- Tests validate both the presence of scoping language and absence of absolute zero-data claims
- Clean integration following existing patterns
Verification:
- ✅ All tests passing (521/521)
- ✅ No compilation errors
- ✅ Clean build
- ✅ Test guards enforce privacy claim scoping
No blocking issues identified. The changes are ready to merge.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
PR Summary by QodoAdd scoped privacy copy to homepage and consent flow (LGPD-aware)
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | ✅ 30 (≤ 100 complexity) |
| Duplication | ✅ 0 (≤ 1 duplication) |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
✅ Deploy Preview for moderaty ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
PR Code Suggestions ✨Latest suggestions up to commit
|
| Category | Suggestion | Severity | Generated at (UTC) |
| Api mismatch |
Account deletion is inaccurately described as erasing everything except the consent recordThe account-deletion claim is broader than the retention policy: the Privacy Policy Why it matters? 🤔
(Use Cmd/Ctrl + Click for best experience) Prompt for AI Agent 🤖This is a comment left during a code review.
**Path:** src/lib/landing/faq.ts
**Line:** 60:60
**Comment:**
*Api Mismatch: The account-deletion claim is broader than the retention policy: the Privacy Policy also retains billing and tax records, support correspondence, connection/application logs, and security records for defined periods. Saying that everything is erased except the consent record contradicts the policy and is published both in the visible FAQ and its JSON-LD. Scope this sentence to the account and moderation data that is actually erased, or list the other legally retained categories.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix | Major | 2026-08-05 15:16
|
| Logic error |
The homepage retention promise contradicts documented post-account-deletion retention periodsThe homepage now promises that nothing remains after account closure unless LGPD src/lib/components/landing/TrustBar.svelte [34-35] Why it matters? 🤔
(Use Cmd/Ctrl + Click for best experience) Prompt for AI Agent 🤖This is a comment left during a code review.
**Path:** src/lib/components/landing/TrustBar.svelte
**Line:** 34:35
**Comment:**
*Logic Error: The homepage now promises that nothing remains after account closure unless LGPD requires it, but the Privacy Policy explicitly retains support records for up to two years and security/abuse-prevention data for up to twelve months under legitimate interest, in addition to legally required billing and connection records. This makes the public claim materially inconsistent with the documented retention policy; narrow it to the specific account data deleted on closure or include the documented retention exceptions.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix | Major | 2026-08-05 15:16
|
There was a problem hiding this comment.
Warning
CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.
Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.
Actionable comments posted: 1
🤖 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 `@src/routes/consent/consent.test.ts`:
- Around line 179-190: Strengthen the consent page test around consentPage so it
verifies the `.privacy-note` element binds `data.privacyText` rather than merely
finding that text in the raw source. Use distinct privacy and refund values in
the test data, then assert the rendered privacy-note binding specifically while
preserving the existing loadConsent assertions.
🪄 Autofix
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: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a56b063a-8d59-4cca-96cc-7603b2f93c56
📒 Files selected for processing (7)
src/lib/components/landing/TrustBar.sveltesrc/lib/landing/faq.tssrc/lib/landing/legal.test.tssrc/lib/server/legal.tssrc/routes/consent/+page.server.tssrc/routes/consent/+page.sveltesrc/routes/consent/consent.test.ts
Code Review by Qodo
1. Overbroad privacy regex
|
| expect(text, `${name} must scope the claim to account needs`).toMatch(/account needs to run/i); | ||
| expect(text, `${name} makes an absolute zero-data claim`).not.toMatch( | ||
| /we (do not|don't) store/i | ||
| ); |
There was a problem hiding this comment.
1. Overbroad privacy regex 🐞 Bug ⚙ Maintainability
The new legal-copy guard bans any phrase matching "we do not/don't store" even when it is correctly scoped (e.g., "we don't store data beyond what your account needs"), which contradicts the test’s stated intent to only reject absolute zero-data claims. This makes future copy updates brittle and can cause unnecessary CI failures despite compliant wording.
Agent Prompt
### Issue description
A newly added regression test bans `/we (do not|don't) store/i` unconditionally. This rejects both absolute zero-data claims and valid scoped claims (e.g., "we don't store data beyond what your account needs to run"), which conflicts with the test comment saying it should only prevent *absolute* claims.
### Issue Context
The test already uses a scoped negative-lookahead pattern for the separate “stores nothing about you” check, but the “we don’t store” check has no equivalent scoping logic.
### Fix Focus Areas
- src/lib/landing/legal.test.ts[234-240]
### Suggested change
Update the assertion to only fail for **unqualified** "we don't store" statements. For example:
- Replace `/we (do not|don't) store/i` with something like `/we (do not|don't) store\b(?![^.]*\bbeyond\b)/i`, or
- Narrow it to explicitly absolute forms (e.g., "we don't store any data" / "we do not store data on you") while allowing scoped “beyond what your account needs” phrasing.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
- consent.test.ts: fold the privacy-notice assertions into the existing refund-notice test (one notices test, shared no-drift loop) instead of a cloned test. - legal.test.ts: rewrite the scoped-claim guard in compact direct form — no Record+entries loop duplicating neighboring describe blocks. - legal.ts: trim PRIVACY_NOTICE_TEXT JSDoc so it no longer clones the REFUND_NOTICE_TEXT comment.
|




User description
What
Adds the maintainer-requested privacy positioning — "Moderaty doesn't store data on its users beyond what LGPD regulations require" — as marketing-friendly truth: the Privacy Policy stores account data while the account exists (§2), so every claim is scoped to what your account needs to run, never an absolute zero-data claim.
PRIVACY_NOTICE_TEXTinsrc/lib/server/legal.ts(same pattern asREFUND_NOTICE_TEXT— kept out of the evidentiaryCONSENT_CHECKBOX_TEXT), passed by bothloadbranches and rendered under the form: "Moderaty stores nothing about you beyond what your account needs to run, and we never sell or profile your data. The one record we keep by law is this consent acceptance itself (LGPD Art. 16, III)."faq.tsis the single source.)Tests (failing first, per repo rules)
consent.test.ts: both load branches (parked signup, signed-in re-consent) returnprivacyText, the notice carries the LGPD reference, stays out ofCONSENT_CHECKBOX_TEXT, and the page actually renders it.legal.test.tsnew consistency guard: TrustBar, the FAQ LGPD answer, andPRIVACY_NOTICE_TEXTmust scope the claim to account needs and may never make an absolute zero-data claim (we do not store, unqualifiedstores nothing about you).Verification
npm run check— 0 errors, 0 warningsnpm run test— 521/521npm run build— cleanNo LEGAL_VERSION bump (marketing copy, not a legal-doc change). No changes to the legal documents themselves.
CodeAnt-AI Description
Clarify Moderaty’s privacy practices across signup and marketing pages
What Changed
Impact
✅ Clearer privacy expectations during signup✅ More specific LGPD compliance information✅ Fewer misleading zero-data claims💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.