Skip to content

feat: privacy language on homepage and consent page - #102

Merged
Bonobo791 merged 2 commits into
mainfrom
feat-privacy-copy
Aug 5, 2026
Merged

feat: privacy language on homepage and consent page#102
Bonobo791 merged 2 commits into
mainfrom
feat-privacy-copy

Conversation

@Bonobo791

@Bonobo791 Bonobo791 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

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.

  • Consent/signup page: new PRIVACY_NOTICE_TEXT in src/lib/server/legal.ts (same pattern as REFUND_NOTICE_TEXT — kept out of the evidentiary CONSENT_CHECKBOX_TEXT), passed by both load branches 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)."
  • Homepage TrustBar: microcopy gains "We keep no data on you beyond what your account needs to run, and nothing after you leave that the LGPD does not require."
  • Homepage FAQ: the "Is Moderaty LGPD compliant?" answer gains the user-data side — erased on the spot on account deletion except the consent record; no selling data, no ad profiling, no training models on you. (JSON-LD updates automatically — faq.ts is the single source.)

Tests (failing first, per repo rules)

  • consent.test.ts: both load branches (parked signup, signed-in re-consent) return privacyText, the notice carries the LGPD reference, stays out of CONSENT_CHECKBOX_TEXT, and the page actually renders it.
  • legal.test.ts new consistency guard: TrustBar, the FAQ LGPD answer, and PRIVACY_NOTICE_TEXT must scope the claim to account needs and may never make an absolute zero-data claim (we do not store, unqualified stores nothing about you).

Verification

  • npm run check — 0 errors, 0 warnings
  • npm run test — 521/521
  • npm run build — clean

No 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

  • Consent and re-consent pages now explain that Moderaty keeps only account data needed to operate, plus the legally required consent record.
  • The homepage trust message and LGPD FAQ now describe account deletion, limits on data use, and the absence of selling, ad profiling, or model training on user data.
  • Privacy wording is checked across these surfaces to avoid absolute claims that could conflict with the Privacy Policy.

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:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

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:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

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.

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).
@cla-bot cla-bot Bot added the cla-signed label Aug 5, 2026
@codeant-ai

codeant-ai Bot commented Aug 5, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 2176c47 Aug 05, 2026 · 15:13 15:16

@codeant-ai

codeant-ai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@Bonobo791, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a3706dcd-2075-4e57-8dc9-4d6757920b1b

📥 Commits

Reviewing files that changed from the base of the PR and between 2176c47 and 731c4b5.

📒 Files selected for processing (3)
  • src/lib/landing/legal.test.ts
  • src/lib/server/legal.ts
  • src/routes/consent/consent.test.ts
📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added a privacy notice to the consent page, including clearer guidance on data retention, legal consent records, and data-use limits.
    • Expanded LGPD FAQ and trust-bar copy to better explain how user data is handled.
  • Bug Fixes

    • Updated consent page content so privacy details appear consistently in both pending and existing consent flows.
    • Improved legal copy to avoid absolute “no data stored” wording and reflect account-related retention more accurately.
  • Tests

    • Added coverage to verify privacy notice text appears across the landing, FAQ, and consent pages.

Walkthrough

The 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.

Changes

Privacy notice consistency

Layer / File(s) Summary
Legal messaging and claim validation
src/lib/components/landing/TrustBar.svelte, src/lib/landing/faq.ts, src/lib/server/legal.ts, src/lib/landing/legal.test.ts
Privacy statements describe account-required retention, the consent-record exception, and restrictions on selling, profiling, and model training. Tests reject absolute zero-data claims.
Consent privacy-text data flow
src/routes/consent/+page.server.ts
Both pending-consent and existing-consent load paths return privacyText from PRIVACY_NOTICE_TEXT.
Consent privacy-note rendering
src/routes/consent/+page.svelte, src/routes/consent/consent.test.ts
The consent page displays and styles the privacy notice. Tests verify both load paths, separation from CONSENT_CHECKBOX_TEXT, and rendering.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding privacy language to the homepage and consent page.
Description check ✅ Passed The description is directly related to the changeset, detailing privacy-focused updates across multiple files with clear scope and verification results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-privacy-copy

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Aug 5, 2026
@codeant-ai

codeant-ai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Sequence Diagram

This 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
Loading

Generated by CodeAnt AI

@codeant-ai

codeant-ai Bot commented Aug 5, 2026

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: 731c4b59
Scan Time: 2026-08-05 15:25:31 UTC

✅ Overall Status: PASSED

Quality Gate Details

Quality Gate Status Details
Secrets ✅ PASSED 0 secrets found
Duplicate Code ✅ PASSED 0.0% duplicated
SAST ✅ PASSED No security issues
Bugs ✅ PASSED Rating S: No bugs
IAC ✅ PASSED No IAC issues

View Full Results

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Add scoped privacy copy to homepage and consent flow (LGPD-aware)

✨ Enhancement 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Add scoped privacy messaging to homepage TrustBar and LGPD FAQ answer.
• Introduce a consent-page privacy notice text, wired through server load to UI.
• Add tests to prevent “zero-data” claims and ensure all consent flows render notice.
Diagram

graph TD
  A["server/legal.ts"] --> B["consent +page.server.ts"] --> C["consent +page.svelte"]
  D["landing/TrustBar.svelte"] --> E["Homepage"]
  F["landing/faq.ts"] --> E
  A --> G(["Tests"])
  D --> G
  F --> G
  C --> G
Loading
High-Level Assessment

The chosen approach (centralized copy constants + wiring to each surface + regression tests preventing absolute “zero-data” claims) is the most robust for marketing/legal-sensitive text. Alternatives like duplicating copy per component or relying on reviewer vigilance would increase drift risk and reduce auditability.

Files changed (7) +63 / -5

Enhancement (5) +27 / -4
TrustBar.svelteExtend TrustBar microcopy with scoped privacy claim +2/-1

Extend TrustBar microcopy with scoped privacy claim

• Appends LGPD-scoped privacy positioning to the homepage TrustBar microcopy, explicitly limiting the claim to data required to run an account and nothing beyond LGPD after departure.

src/lib/components/landing/TrustBar.svelte

faq.tsExpand LGPD FAQ answer with user-data retention/deletion details +1/-1

Expand LGPD FAQ answer with user-data retention/deletion details

• Updates the “Is Moderaty LGPD compliant?” answer to include user account data scoping, deletion behavior (erased on deletion except consent record), and commitments (no selling/profiling/model training).

src/lib/landing/faq.ts

legal.tsIntroduce PRIVACY_NOTICE_TEXT for consent page +12/-0

Introduce PRIVACY_NOTICE_TEXT for consent page

• Adds PRIVACY_NOTICE_TEXT with LGPD reference and documentation clarifying why it is scoped and kept out of CONSENT_CHECKBOX_TEXT, mirroring the refund notice pattern.

src/lib/server/legal.ts

+page.server.tsExpose privacyText from consent load for all flows +5/-2

Expose privacyText from consent load for all flows

• Adds PRIVACY_NOTICE_TEXT to the consent page server load return payload in both branches (parked signup and signed-in re-consent), enabling UI rendering.

src/routes/consent/+page.server.ts

+page.svelteRender privacy notice under consent form +7/-0

Render privacy notice under consent form

• Displays the new privacy notice below the existing refund note and adds matching styling for the privacy-note paragraph.

src/routes/consent/+page.svelte

Tests (2) +36 / -1
legal.test.tsAdd guard preventing absolute zero-data marketing claims +22/-1

Add guard preventing absolute zero-data marketing claims

• Imports PRIVACY_NOTICE_TEXT and adds a consistency test ensuring the TrustBar, LGPD FAQ answer, and consent privacy notice all scope the claim to “account needs to run” and avoid unqualified zero-storage phrasing.

src/lib/landing/legal.test.ts

consent.test.tsTest privacy notice is provided and rendered in consent flows +14/-0

Test privacy notice is provided and rendered in consent flows

• Adds coverage asserting PRIVACY_NOTICE_TEXT includes the LGPD reference, remains outside CONSENT_CHECKBOX_TEXT, is returned by both consent load branches, and is referenced in the page template for rendering.

src/routes/consent/consent.test.ts

@codacy-production

codacy-production Bot commented Aug 5, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 30 complexity · 0 duplication

Metric Results
Complexity 30 (≤ 100 complexity)
Duplication 0 (≤ 1 duplication)

View in Codacy

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.

@netlify

netlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Deploy Preview for moderaty ready!

Name Link
🔨 Latest commit 731c4b5
🔍 Latest deploy log https://app.netlify.com/projects/moderaty/deploys/6a73552f5d9fce0008ef1d00
😎 Deploy Preview https://deploy-preview-102--moderaty.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 89
Accessibility: 97
Best Practices: 100
SEO: 100
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codeant-ai

codeant-ai Bot commented Aug 5, 2026

Copy link
Copy Markdown

PR Code Suggestions ✨

Latest suggestions up to commit 2176c47
CategorySuggestion                                                                                                                                    SeverityGenerated at (UTC)
Api mismatch
Account deletion is inaccurately described as erasing everything except the consent record

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.

src/lib/landing/faq.ts [60]

Why it matters? 🤔
  • ❌ Homepage FAQ misstates deletion and retention obligations.
  • ⚠️ Paid users may expect billing records erased immediately.
  • ⚠️ FAQ JSON-LD repeats the inaccurate retention claim.

Fix in Cursor Fix in VSCode Claude

(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
Major2026-08-05 15:16
Logic error
The homepage retention promise contradicts documented post-account-deletion retention periods

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.

src/lib/components/landing/TrustBar.svelte [34-35]

Why it matters? 🤔
  • ⚠️ Homepage privacy messaging conflicts with Privacy Policy retention terms.
  • ⚠️ Deleted users may reasonably expect support and security records erased immediately.
  • ⚠️ Inconsistent retention disclosures create legal and compliance risk.

Fix in Cursor Fix in VSCode Claude

(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
Major2026-08-05 15:16

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

👉 Steps to fix this

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

📥 Commits

Reviewing files that changed from the base of the PR and between e618cb3 and 2176c47.

📒 Files selected for processing (7)
  • src/lib/components/landing/TrustBar.svelte
  • src/lib/landing/faq.ts
  • src/lib/landing/legal.test.ts
  • src/lib/server/legal.ts
  • src/routes/consent/+page.server.ts
  • src/routes/consent/+page.svelte
  • src/routes/consent/consent.test.ts

Comment thread src/routes/consent/consent.test.ts Outdated
@qodo-code-review

qodo-code-review Bot commented Aug 5, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Overbroad privacy regex 🐞 Bug ⚙ Maintainability
Description
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.
Code

src/lib/landing/legal.test.ts[R234-237]

+			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
+			);
Relevance

●●● Strong

Team often refines regex-based guards to match intent and avoid brittle/overbroad matches causing
false CI failures.

PR-#51
PR-#32
PR-#88

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The test comment says the guard is meant to prevent absolute zero-data claims, but the regex used
will match any "we don't store" substring regardless of qualifying text; unlike the following
assertion, it does not check for an allowed scope like “beyond”.

src/lib/landing/legal.test.ts[223-241]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### 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


Grey Divider

Context used
✅ Compliance rules (platform): 81 rules

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

Comment thread src/lib/landing/legal.test.ts Outdated
Comment on lines +234 to +237
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
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

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.
@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

@Bonobo791
Bonobo791 merged commit d9fc2f0 into main Aug 5, 2026
17 of 20 checks passed
@Bonobo791
Bonobo791 deleted the feat-privacy-copy branch August 5, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant