Skip to content

feat(dsa): add progress tracking with localStorage persistence - #79

Merged
pari-28 merged 1 commit into
pari-28:mainfrom
arnavgoel17:feat/dsa-progress-tracking
Aug 27, 2026
Merged

pari-28 merged 1 commit into
pari-28:mainfrom
arnavgoel17:feat/dsa-progress-tracking

Conversation

@arnavgoel17

Copy link
Copy Markdown
Contributor

Pull Request

📌 Related Issue

Fixes #35


📝 Description

Adds DSA progress tracking so users can mark topics as completed, see their overall completion percentage, and reset their progress. State persists across refreshes via localStorage.

Changes in src/components/DsaModule.tsx:

  • Per-topic checkbox in the problems table — click to toggle completion (emerald check when done), with accessible labels (aria-label, title).
  • Workspace toggle — a "Mark as Completed" / "Completed" button in the problem workspace header (aria-pressed state), synced with the table checkboxes.
  • Persistence — completion state is stored under the prepverse_dsa_completed_topics localStorage key; reads are wrapped in try/catch so corrupted storage falls back safely to an empty map.
  • Overall progress panel — header widget showing a percentage with an animated gradient progress bar and an "X of Y topics completed" counter.
  • Reset — a Reset button that asks for confirmation before clearing all progress.

🚀 Type of Change

  • New feature (non-breaking change which adds functionality)
  • UI/UX improvement

🧪 Testing

Verified end-to-end against the live dev server:

  • Tested locally
  • Existing tests pass
  • Added/updated tests (if applicable) — not applicable (no test infrastructure for this repo's UI)

Validation performed:

  • npm run lint (tsc --noEmit): passes clean
  • npm run build: production build succeeds
  • Toggle checkbox → percentage updated 20% → 40%, count 1/5 → 2/5, localStorage written correctly
  • Page refresh → 40% and both checked rows restored from localStorage (persistence verified)
  • Workspace "Mark as Completed" button toggles state and updates the same percentage
  • Reset → confirmation dialog, progress cleared to 0/5 and localStorage emptied

📸 Screenshots / Demo

Validated functionally via live browser automation on localhost (checkbox toggles, percentage bar updates, refresh persistence, reset flow all confirmed working).


✅ Checklist

  • My code follows the project's coding style.
  • I have performed a self-review of my code.
  • I have tested my changes locally.
  • I have not introduced unrelated changes.
  • Documentation has been updated where necessary. — not needed for this change
  • My changes do not introduce new warnings or errors.
  • This PR is linked to the appropriate issue.

💬 Additional Notes

The completion state is intentionally scoped per browser (localStorage, guest mode) consistent with the existing bookmark behavior pattern in this module.

- Add per-topic completion checkboxes in the problems table
- Add 'Mark as Completed' toggle in the workspace header
- Persist completion state to localStorage (survives refresh)
- Show overall completion percentage with progress bar
- Add reset button with confirmation to clear all progress

Closes pari-28#35
@arnavgoel17
arnavgoel17 requested a review from pari-28 as a code owner August 25, 2026 21:13
@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

@arnavgoel17 is attempting to deploy a commit to the Pari's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the frontend Frontend development label Aug 25, 2026

@pari-28 pari-28 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for the contribution! The implementation fulfills all the requirements of Issue #35, including per-topic completion tracking, localStorage persistence, overall completion percentage, persistence after refresh, and progress reset. The additional workspace completion control is also closely related to the same feature and uses the existing progress-tracking logic. All CI checks are passing. Approved!

@pari-28 pari-28 added ECSoC26 Required label for ECSoC 2026 contributions enhancement New feature or request good first issue Good for newcomers level: beginner labels Aug 27, 2026
@pari-28
pari-28 merged commit 4407b17 into pari-28:main Aug 27, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ECSoC26-L1 ECSoC26 Required label for ECSoC 2026 contributions enhancement New feature or request frontend Frontend development good first issue Good for newcomers level: beginner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add DSA Progress Tracking

2 participants