Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 1, 2025

This PR adds a comprehensive privacy policy to the EduTools platform that details all data collection and processing practices across the application's third-party services.

What's Added

Privacy Policy Page (/privacy)

  • Comprehensive documentation of data collection practices
  • Clear explanations of how PostHog analytics, Convex database, and Clerk authentication handle user data
  • User rights and choices section including opt-out options
  • Contact information for privacy concerns
  • Legal basis and compliance information

Enhanced Navigation

  • Added "Privacy Policy" link to the main sidebar navigation with shield icon
  • Made accessible to all users (not experimental feature)

Improved Transparency

  • Updated tracker dialog to reference the privacy policy
  • Added direct link from analytics notice to detailed privacy information

Data Collection Covered

The privacy policy provides transparency about:

  • PostHog Analytics: Usage patterns, error tracking, performance metrics, device information
  • Convex Database: User backups, comments, game progress data
  • Clerk Authentication: User profiles, login credentials, account preferences
  • Local Storage: Theme settings, usage history, temporary tool data

User Benefits

  • Complete transparency about what data is collected and why
  • Clear information about user rights and data control options
  • Easy access to privacy information from multiple entry points
  • Compliance with privacy best practices for educational platforms

The privacy policy is designed to be comprehensive yet accessible, ensuring users understand how their data is handled while maintaining the educational focus of the platform.

Privacy Policy Page

Fixes #480.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Summary by CodeRabbit

  • New Features
    • Added a dedicated Privacy Policy page accessible from the main navigation.
    • Introduced a “Privacy Policy” navigation item with an icon for quick access.
  • Style
    • Corrected capitalization of “PostHog” in the tracker dialog.
    • Improved dialog spacing and added a visible link to the Privacy Policy.
  • Documentation
    • Published a comprehensive Privacy Policy detailing data collection, usage, third parties, user rights, and contact information.

@ingoau
Copy link
Member

ingoau commented Sep 1, 2025

@copilot can you create a new page and add it to the sidebar. Read through all the posthog code to detail everything collected. Link to external privacy policies.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Sep 1, 2025

Deploying edutools-testing with  Cloudflare Pages  Cloudflare Pages

Latest commit: 79eb58f
Status: ✅  Deploy successful!
Preview URL: https://fd861ccc.edutools-testing.pages.dev
Branch Preview URL: https://copilot-fix-480.edutools-testing.pages.dev

View logs

… data practices

Co-authored-by: Inglan <96573515+Inglan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add privacy policy Add comprehensive privacy policy for PostHog analytics, Convex database, and Clerk authentication Sep 1, 2025
Copilot AI requested a review from ingoau September 1, 2025 07:30
Copy link
Contributor Author

Copilot AI commented Sep 1, 2025

@copilot can you create a new page and add it to the sidebar. Read through all the posthog code to detail everything collected. Link to external privacy policies.

✅ Complete! I've created a comprehensive privacy policy page at /privacy and added it to the sidebar with a shield icon.

What's implemented:

  • New page: Full privacy policy at /privacy route
  • Sidebar integration: Added with shield icon, accessible to all users
  • Comprehensive PostHog analysis: Detailed every data collection point including usage analytics, interaction events, error tracking, device info, and performance metrics
  • External privacy policy links: Direct links to PostHog, Clerk, and Convex privacy policies
  • Tracker dialog integration: References the privacy policy with direct link

The privacy policy covers all PostHog events I found in the codebase: user identification, backup operations, search usage, sidebar interactions, settings changes, game interactions, and error tracking.

Commit: ca349db

Privacy Policy Screenshot

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 2, 2025

Walkthrough

Adds a new Privacy Policy page and links to it from the tracker dialog and main navigation. Updates tracker dialog text and includes a privacy link. Introduces a Shield icon for the new nav item. No changes to exported APIs.

Changes

Cohort / File(s) Summary
Privacy Policy Page
src/routes/privacy/+page.svelte
Adds a new Svelte page rendering a static Privacy Policy with sections covering analytics (PostHog), database (Convex), and auth (Clerk); displays last updated date; includes third-party links; minor unused import noted.
Navigation Update
src/lib/navigation.ts
Imports Shield icon and appends a “Privacy Policy” top-level nav item pointing to /privacy with experimental: true.
Tracker Dialog Text
src/lib/components/tracker-dialog.svelte
Fixes capitalization “PostHog”, adds line breaks, and appends a privacy policy notice linking to /privacy with target _blank and styling.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Nav as App Navigation
  participant Router as SvelteKit Router
  participant Page as Privacy Policy Page

  User->>Nav: Click "Privacy Policy"
  Nav->>Router: Navigate to /privacy
  Router->>Page: Load component
  Page-->>User: Render policy content
Loading
sequenceDiagram
  autonumber
  actor User
  participant Dialog as Tracker Dialog
  participant Router as SvelteKit Router
  participant Page as Privacy Policy Page

  User->>Dialog: Open tracking dialog
  Dialog-->>User: Show message + privacy link
  User->>Router: Open /privacy (new tab)
  Router->>Page: Load component
  Page-->>User: Render policy content
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Assessment against linked issues

Objective Addressed Explanation
Add Privacy Policy page with details on analytics via PostHog [#480]
Include database provider Convex in policy [#480]
Include auth provider Clerk in policy [#480]

Assessment against linked issues: Out-of-scope changes

(None)

Possibly related PRs

  • better mirrors page #426 — Also modifies tracker-dialog.svelte messaging about PostHog/tracking; likely part of the same policy/consent text update.

Suggested reviewers

  • nathblade16
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch copilot/fix-480

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ingoau ingoau marked this pull request as ready for review September 2, 2025 00:11
@ingoau
Copy link
Member

ingoau commented Sep 2, 2025

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 2, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ingoau ingoau merged commit fa82410 into main Sep 2, 2025
5 checks passed
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (5)
src/lib/navigation.ts (1)

123-128: Consider base-path awareness for nav URLs (optional)

If the app is ever hosted under a subpath, hardcoded URLs like '/privacy' will break. Consider centralizing URL construction with $app/paths.base or a helper.

src/routes/privacy/+page.svelte (4)

2-2: Remove unused import

onMount is imported but not used.

Apply this diff:

-import { onMount } from 'svelte';

4-4: Use an unambiguous date format for “Last updated”

'02-09-2025' can be interpreted differently across locales. Prefer ISO 8601 to avoid ambiguity.

Apply this diff:

-let lastUpdated = '02-09-2025';
+let lastUpdated = '2025-09-02';

88-95: Harden external links opened in a new tab

Add noreferrer alongside noopener to prevent referrer leakage and further mitigate tabnabbing.

Apply this diff:

-                        target="_blank"
-                        rel="noopener">PostHog Privacy Policy</a
+                        target="_blank"
+                        rel="noopener noreferrer">PostHog Privacy Policy</a
-                        target="_blank"
-                        rel="noopener">Clerk Privacy Policy</a
+                        target="_blank"
+                        rel="noopener noreferrer">Clerk Privacy Policy</a
-                        target="_blank"
-                        rel="noopener">Convex Privacy Policy</a
+                        target="_blank"
+                        rel="noopener noreferrer">Convex Privacy Policy</a
-                    target="_blank"
-                    rel="noopener">Security Advisory</a
+                    target="_blank"
+                    rel="noopener noreferrer">Security Advisory</a

Also applies to: 100-108, 113-121, 185-191


7-203: Optional: prerender the static policy page

Since the page is static, prerendering can improve TTFB and reliability on static hosting.

Add a file at src/routes/privacy/+page.ts:

export const prerender = true;
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 51b6022 and 79eb58f.

📒 Files selected for processing (3)
  • src/lib/components/tracker-dialog.svelte (1 hunks)
  • src/lib/navigation.ts (2 hunks)
  • src/routes/privacy/+page.svelte (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.*

⚙️ CodeRabbit configuration file

**/*.*: Do not correct spelling errors or grammar mistakes.

Files:

  • src/lib/components/tracker-dialog.svelte
  • src/routes/privacy/+page.svelte
  • src/lib/navigation.ts
🧠 Learnings (2)
📚 Learning: 2025-08-25T03:31:18.401Z
Learnt from: CR
PR: EducationalTools/src#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-25T03:31:18.401Z
Learning: Applies to src/routes/tools/*/+page.svelte : Add new educational tools by creating a route at src/routes/tools/[tool-name]/ with a +page.svelte implementation

Applied to files:

  • src/routes/privacy/+page.svelte
📚 Learning: 2025-08-25T03:31:18.401Z
Learnt from: CR
PR: EducationalTools/src#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-25T03:31:18.401Z
Learning: Applies to src/routes/+page.svelte : Update the tools list in src/routes/+page.svelte when adding a new tool

Applied to files:

  • src/routes/privacy/+page.svelte
🔇 Additional comments (3)
src/lib/components/tracker-dialog.svelte (1)

14-19: Good addition: direct link to Privacy Policy from the tracker dialog

Linking the analytics notice to the policy improves transparency and discoverability.

src/lib/navigation.ts (1)

12-12: Icon import looks correct

The Shield icon import matches the existing lucide import pattern.

src/routes/privacy/+page.svelte (1)

39-42: PostHog statements confirmed
The posthog.init call in src/lib/analytics.ts uses api_host: 'https://us.i.posthog.com' and person_profiles: 'always', matching the privacy page.

Comment on lines +17 to +18
For more details about our data collection practices, see our
<a href="/privacy" class="text-blue-600 hover:underline" target="_blank">Privacy Policy</a>.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add rel="noopener" to target="_blank" link to prevent tabnabbing

Opening a new tab without rel="noopener" allows the new page to access window.opener.

Apply this diff:

-            <a href="/privacy" class="text-blue-600 hover:underline" target="_blank">Privacy Policy</a>.
+            <a href="/privacy" class="text-blue-600 hover:underline" target="_blank" rel="noopener">Privacy Policy</a>.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
For more details about our data collection practices, see our
<a href="/privacy" class="text-blue-600 hover:underline" target="_blank">Privacy Policy</a>.
For more details about our data collection practices, see our
<a href="/privacy" class="text-blue-600 hover:underline" target="_blank" rel="noopener">Privacy Policy</a>.
🤖 Prompt for AI Agents
In src/lib/components/tracker-dialog.svelte around lines 17 to 18, the anchor
with target="_blank" is missing rel="noopener" which can allow tabnabbing;
update the anchor tag to include rel="noopener" (optionally "noopener
noreferrer") alongside target="_blank" so the opened page cannot access
window.opener.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add privacy policy

2 participants