Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 13, 2025

Dashboard was only counting resources that users had interacted with in localStorage, not the total available resources. Privacy Policy and Terms of Use pages contained only placeholder text.

Changes

Dashboard Logic Fix (LearnerDashboard.jsx)

  • Import categorized content files and attach to roadmap configuration
  • Calculate total resources from content data, not localStorage keys
  • Track completion against actual totals

Before: Dashboard showed only marked resources (e.g., 5 total if user marked 5)
After: Dashboard shows 376 total resources (25 Prerequisites + 149 ML + 132 DL + 70 GenAI)

// Load total from content, completed from localStorage
roadmaps.forEach(roadmap => {
  // Count ALL available resources
  Object.keys(roadmap.content).forEach(topicName => {
    totalVideos += roadmap.content[topicName].length;
  });
  
  // Count only completed from localStorage
  const saved = JSON.parse(localStorage.getItem(roadmap.id) || '{}');
  Object.keys(saved).forEach(key => {
    if (saved[key] === true) completedVideos++;
  });
});

Privacy Policy (PrivacyPolicy.jsx)

Added comprehensive content covering:

  • Data collection (local storage, analytics)
  • User rights and controls
  • Third-party services disclosure
  • Contact information

Terms of Use (TermsOfUse.jsx)

Added comprehensive content covering:

  • Service description and license terms
  • Educational disclaimers
  • Intellectual property rights
  • Liability limitations

Screenshots

Fixed Dashboard

Dashboard showing correct resource counts

Privacy Policy

Privacy Policy with comprehensive content

Terms of Use

Terms of Use with comprehensive content

Original prompt

dashboard logic is flawed, it does not shows the real count of the resources. correct it and improve the dashboard. also add content to privacy and terms page.


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


Note

Fixes dashboard resource counting to use full content totals and adds comprehensive Privacy Policy and Terms of Use pages.

  • Dashboard
    • Attach categorized content to roadmaps in LearnerDashboard.jsx and compute total resources from content rather than localStorage.
    • Recalculate overall and per-roadmap stats (total, completed, %) using content totals and stored completion flags.
  • Legal Pages
    • Replace placeholders with full content in PrivacyPolicy.jsx and TermsOfUse.jsx, including last-updated metadata, sections on data/analytics, user rights, disclaimers, IP, liability, and contact info.

Written by Cursor Bugbot for commit ffeb4ff. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Nov 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
mldl-frontend Ready Ready Preview Comment Nov 13, 2025 7:47am

Co-authored-by: anshaneja5 <128882734+anshaneja5@users.noreply.github.com>
Co-authored-by: anshaneja5 <128882734+anshaneja5@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix flawed dashboard logic and improve resource count Fix dashboard resource counting and add privacy/terms content Nov 13, 2025
Copilot AI requested a review from anshaneja5 November 13, 2025 07:51
Copilot finished work on behalf of anshaneja5 November 13, 2025 07:51
Copy link
Owner

@anshaneja5 anshaneja5 left a comment

Choose a reason for hiding this comment

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

good work

@anshaneja5 anshaneja5 marked this pull request as ready for review November 14, 2025 01:05
@anshaneja5 anshaneja5 merged commit aa89935 into main Nov 14, 2025
2 checks passed
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.

2 participants