Skip to content

Conversation

@thejus03
Copy link
Contributor

@thejus03 thejus03 commented Dec 3, 2025

Context

Implementation

  • Added default slots for unassigned lessons

@vercel
Copy link

vercel bot commented Dec 3, 2025

@thejus03 is attempting to deploy a commit to the modsbot's projects Team on Vercel.

A member of the Team first needs to authorize it.

@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

❌ Patch coverage is 40.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.64%. Comparing base (988c6fd) to head (81fe1a5).
⚠️ Report is 154 commits behind head on master.

Files with missing lines Patch % Lines
.../optimiser/OptimiserContainer/OptimiserContent.tsx 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4264      +/-   ##
==========================================
+ Coverage   54.52%   56.64%   +2.11%     
==========================================
  Files         274      297      +23     
  Lines        6076     6935     +859     
  Branches     1455     1674     +219     
==========================================
+ Hits         3313     3928     +615     
- Misses       2763     3007     +244     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thejus03 thejus03 changed the title Chore/UI updates fix(optimiser): Add default slots to unallocated lessons Dec 3, 2025
@vercel
Copy link

vercel bot commented Dec 15, 2025

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

Project Deployment Review Updated (UTC)
nusmods-export Ready Ready Preview, Comment Dec 15, 2025 1:19am
nusmods-website Ready Ready Preview, Comment Dec 15, 2025 1:19am

Copy link
Member

@leslieyip02 leslieyip02 left a comment

Choose a reason for hiding this comment

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

The code is LGTM, but I'm not convinced that assigning a default slot is necessarily better than doing nothing. I feel that omitting unassigned modules makes it more explicit to the user that they need to tinker a bit with those modules (and/or adjust their preferences).

However, that's just my opinion so maybe a better way is to add an opt-in for this? So some sort of checkbox for "Assign default lessons if needed".

Warning Result Timetable
Screenshot 2025-12-14 at 5 23 58 PM Screenshot 2025-12-14 at 5 24 08 PM

What do you think?

@thejus03
Copy link
Contributor Author

Sure, I think adding an opt-in would make sense for some people. However, the reason why I would think most would want to have the default slot is because, let’s say, from the above example, CS2100 Lecture was unassigned. Now, if no default slots are added, he needs to go and remove the mod and re-add CS2100. Doing this, however, resets the other slots chosen for the other CS2100 lessons by the optimiser, like tutorial, lab, etc.

So I thought adding a default slot was better because now users can just modify the slot for CS2100 Lec without having the need to re-add and lose the other lessons chosen by the optimiser.

Hope that makes sense. I am okay with anything. Maybe what we can do is put the default state for the opt-in as 'assign default slot' ?

@jloh02
Copy link
Member

jloh02 commented Dec 21, 2025

alternatively, what if we do a flow where we show the warning, then have a button to auto-assign to default slots. i reckon this would not require a new Vercel function call, and allows for both behaviours. if we feel this is too convoluted, i'm more in favor of a warning due to the above reasons @leslieyip02 mentioned

@thejus03 thejus03 requested a review from leslieyip02 December 21, 2025 17:32
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.

Optimiser partial timetable does not show unallocated lessons

3 participants