Detect and penalize ghost courses as missing in SPA solver#21
Detect and penalize ghost courses as missing in SPA solver#21google-labs-jules[bot] wants to merge 1 commit intomainfrom
Conversation
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This change addresses an issue where courses with invalid time data (e.g., "Free Time" or unparsable time bitmaps) were silently ignored by the scheduler, leading to incomplete schedules without any warning or penalty.
Key changes in
dist/static/js/solver.js:isValidCandidateto explicitly reject candidates that have "自由时间" (Free Time) in their location text or whose schedule bitmaps parse to zero (i.e., no valid time slots).generateSchedulesto capture the set of all course names the user intended to schedule (allRequiredNames) before any filtering occurs. The "missing course" check now compares the final schedule against this comprehensive list, ensuring that even if a group is completely filtered out (becoming empty/ghost), it is correctly identified as missing.Verified with a Node.js unit test and a Playwright frontend test (mocking the API to return ghost courses).
PR created automatically by Jules for task 5984943680112991797 started by @OsakaLOOP