Skip to content

Ver/2.5#23

Open
Ntropy86 wants to merge 7 commits into
mainfrom
ver/2.5
Open

Ver/2.5#23
Ntropy86 wants to merge 7 commits into
mainfrom
ver/2.5

Conversation

@Ntropy86

@Ntropy86 Ntropy86 commented Apr 22, 2026

Copy link
Copy Markdown
Owner

Added Ver 2.5 Changes Including:

  • New UI Supporting Light Mode and Dark mode and Proper Settings page
  • Containerization & separation for proper Dev & Prod Environments
  • MAJOR Backend Engine Optimizations
  • Removal of Legacy code which has been here since v1
  • Optimized DB and cache system

Note

High Risk
High risk because it replaces core backend API routes and MongoDB schemas (moving streak tracking to a new submissions collection and introducing deterministic daily-problem selection), plus changes cron scheduling and environment/CORS behavior which can break existing clients and data if migration is incomplete.

Overview
Introduces a new V3 backend contract: replaces legacy /problemset/* endpoints and controllers with /users, /problems (daily + range), and /submissions APIs, including shared controller error/validation helpers (lib/http.js).

Switches the daily-problem engine to a deterministic, no-write selector (lib/dailyProblem.js + services/problemService.js) and moves streak state to a new Submission model with server-side streak computation (services/streakService.js), alongside new Problem/User schemas and a V2→V3 migration script.

Updates ops/dev tooling: adds GitHub Actions CI (lint/format/test matrix with coverage artifact), Docker Compose for Mongo+backend, tighter .gitignore for env/config files, backend lint/format/test configs (ESLint/Prettier/Jest), CORS origin via CORS_ORIGIN, and makes in-process cron opt-in (ENABLE_CRON) with only weekly refresh/prune jobs plus dev-only /test/cron triggers.

Reviewed by Cursor Bugbot for commit 0055953. Bugbot is set up for automated code reviews on this repo. Configure here.

@Ntropy86 Ntropy86 requested a review from the-anantkumar April 22, 2026 23:13
@Ntropy86 Ntropy86 self-assigned this Apr 22, 2026
@Ntropy86 Ntropy86 added the feature Adding a new Feature or New Major Release label Apr 22, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0055953. Configure here.

timezone: "Asia/Kolkata" // Explicitly set to IST
});
// Sunday 06:07 — prune submissions >90 days old.
schedule("07 6 * * 0", "prune-submissions", () => submissionService.pruneOldSubmissions());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Submission pruning at 90 days silently truncates streaks

High Severity

The prune-submissions cron job deletes submissions older than 90 days, but streakService.getCurrentStreak has a maxLookbackDays of 400, clearly intending to support streaks up to ~400 days. Once the prune job runs, any streak longer than 90 days is silently broken — the consecutive-day walk hits a gap where pruned records used to be, reporting a shorter streak than reality. This is a data-loss scenario affecting a core user-facing feature.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0055953. Configure here.

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

Labels

feature Adding a new Feature or New Major Release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants