Skip to content

⚡ Bolt: Scope lesson progress query to target course in PendingLessons#70

Open
projectamazonph wants to merge 1 commit into
mainfrom
perf/scope-pending-lessons-progress-15601523946284624473
Open

⚡ Bolt: Scope lesson progress query to target course in PendingLessons#70
projectamazonph wants to merge 1 commit into
mainfrom
perf/scope-pending-lessons-progress-15601523946284624473

Conversation

@projectamazonph

@projectamazonph projectamazonph commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Optimizes the lesson progress query in the PendingLessons component on the course certificate page. Instead of querying all completed lesson progress for the student across the entire database, we use { lessonId: { in: lessonIds } } to scope the query exactly to the target course's lessons. This significantly reduces payload size, database overhead, and memory footprints as students complete more courses.


PR created automatically by Jules for task 15601523946284624473 started by @projectamazonph

Summary by CodeRabbit

  • Performance Improvements
    • Improved course certificate progress checks by limiting completion data to lessons in the current course.
    • Reduced unnecessary data retrieval and memory usage, especially for users with extensive lesson history.

Scope db.lessonProgress.findMany query to the active course's lesson IDs in the PendingLessons component on the course certificate page. This prevents loading the student's entire completed lesson progress history into memory across all courses, reducing database CPU usage, payload size, and memory overhead.

Co-authored-by: projectamazonph <286085559+projectamazonph@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI review requested due to automatic review settings July 21, 2026 13:46

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b895ec24-6234-4257-b6c1-2ee36496a59b

📥 Commits

Reviewing files that changed from the base of the PR and between dabee94 and 5895341.

📒 Files selected for processing (2)
  • .jules/bolt.md
  • src/app/(dashboard)/courses/[courseSlug]/certificate/page.tsx

📝 Walkthrough

Walkthrough

The certificate page now queries completed lesson progress only for lessons in the current course, skips the query when no lessons exist, and documents the optimization in the journal.

Changes

Course Progress Scope

Layer / File(s) Summary
Scope completed progress to course lessons
src/app/(dashboard)/courses/[courseSlug]/certificate/page.tsx, .jules/bolt.md
PendingLessons derives course lesson IDs, filters completed progress with an in constraint, skips the query for empty lesson lists, and records the optimization in the journal.

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

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: scoping the PendingLessons lesson progress query to the active course.
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
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch perf/scope-pending-lessons-progress-15601523946284624473

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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

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