Skip to content

chore(website): Update NUSMods for AY2026/2027#4433

Open
jloh02 wants to merge 5 commits into
masterfrom
codex/ay26-27-pr2-frontend
Open

chore(website): Update NUSMods for AY2026/2027#4433
jloh02 wants to merge 5 commits into
masterfrom
codex/ay26-27-pr2-frontend

Conversation

@jloh02

@jloh02 jloh02 commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

  • switch the website config to AY2026/2027 while keeping the current semester unchanged for the Special Term overlap window
  • keep examAvailability unchanged because it is keyed by semester number, and previous AY Special Term exam data should remain visible during overlap
  • add AY2026/2027 semester start dates to the academic calendar package so previous-AY Special Term I/II auto-routing ends when new AY Semester 1 starts
  • update the new-course-data announcement for AY2026/2027

Special Term rollover

specialTermAcademicYear remains null. The existing calendar-based overlap logic continues to source Semesters 3 and 4 from AY2025/2026 until AY2026/2027 Semester 1 starts on 10 Aug 2026. The separate PR3 step in MAINTENANCE.md should handle setting semester to 1 and adding AY2025/2026 to archiveYears closer to that date.

Data sources

Verification

  • pnpm --filter nusmods typecheck
  • pnpm --filter nusmods test src/config/config.test.ts src/utils/specialTerm.test.ts src/views/components/module-info/ModuleWorkload.test.tsx src/actions/moduleBank.test.ts

Note: pnpm reported the repo's Node 22 engine warning because this local shell is running Node 24.14.0.

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
nusmods-export Ignored Ignored Preview Jun 27, 2026 4:19am
nusmods-website Ignored Ignored Preview Jun 27, 2026 4:19am

Request Review

@jloh02 jloh02 changed the title Update NUSMods for AY2026/2027 chore(website): Update NUSMods for AY2026/2027 Jun 23, 2026
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.31%. Comparing base (988c6fd) to head (a3fe698).
⚠️ Report is 245 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4433      +/-   ##
==========================================
+ Coverage   54.52%   57.31%   +2.78%     
==========================================
  Files         274      317      +43     
  Lines        6076     7173    +1097     
  Branches     1455     1748     +293     
==========================================
+ Hits         3313     4111     +798     
- Misses       2763     3062     +299     

☔ View full report in Codecov by Harness.
📢 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.

@jloh02 jloh02 force-pushed the codex/ay26-27-pr2-frontend branch from 9e15d6f to f2765eb Compare June 23, 2026 11:56
@greptile-apps

greptile-apps Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR rolls the website configuration forward for AY2026/2027. The main changes are:

  • Updates the website academic year while keeping the current semester setting.
  • Adds AY2026/2027 semester start dates to the academic calendar package.
  • Refreshes ModReg schedule dates for several registration rounds.
  • Updates the new-course-data announcement copy and key.
  • Adjusts maintenance checklist notes for the AY rollover process.

Confidence Score: 3/5

Merge should wait for the CourseReg schedule data to be corrected so CPEx and notification behavior match the AY2026/2027 rollout.

The changes are narrow configuration/data updates with targeted test coverage reported, but one stale CPEx date path was reproduced to hide the relevant window and suppress reminders.

website/src/data/modreg-schedule.json

T-Rex T-Rex Logs

What T-Rex did

  • Ran a targeted Node harness against the CPEx schedule with the clock fixed to 2026-07-20T10:00:00+08:00 to verify CPEx dates remained stale.
  • Created two artifacts documenting the CPEx stale-date reproduction.
  • Inspected the calendar data baseline and the post-change state to observe AY2026/2027 data and initial routing behavior around the new calendar start.
  • Observed that, after the 2026-08-10T00:00:00+08:00 mark, previousActive remained true and routing did not stop until 2026-08-11T00:00:00+08:00, indicating lingering state beyond the initial date.

View all artifacts

T-Rex Ran code and verified through T-Rex

Comments Outside Diff (2)

  1. website/src/data/modreg-schedule.json, line 40-43 (link)

    P1 CPEx dates stayed stale

    The CourseReg rounds were moved to the AY2026/2027 Semester 1 window, but the CPEx entry still ends on 13 Mar 2026. /cpex reads this entry through config.modRegSchedule while the page constants already say AY2026/2027 Semester 1, so any visit after March renders “CPEx has ended for AY2026/2027 Semester 1” and hides the upcoming/current CPEx window. The ModReg notification selector also drops ended rounds, so CPEx reminders will not appear for the new exercise until these dates are updated.

    Artifacts

    Repro: targeted CPEx stale date harness

    • Contains supporting evidence from the run (text/javascript; charset=utf-8).

    Repro: harness output showing stale CPEx is ended and omitted from notifications

    • Keeps the command output available without making the summary code-heavy.

    View artifacts

    T-Rex Ran code and verified through T-Rex

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: website/src/data/modreg-schedule.json
    Line: 40-43
    
    Comment:
    **CPEx dates stayed stale**
    
    The CourseReg rounds were moved to the AY2026/2027 Semester 1 window, but the CPEx entry still ends on 13 Mar 2026. `/cpex` reads this entry through `config.modRegSchedule` while the page constants already say AY2026/2027 Semester 1, so any visit after March renders “CPEx has ended for AY2026/2027 Semester 1” and hides the upcoming/current CPEx window. The ModReg notification selector also drops ended rounds, so CPEx reminders will not appear for the new exercise until these dates are updated.
    
    How can I resolve this? If you propose a fix, please make it concise.
  2. General comment

    P1 Previous-AY special-term routing remains active on the AY2026/2027 Semester 1 start date

    • Bug
      • The PR contract requires previous-AY Special Term I/II auto-routing to end when AY2026/2027 Semester 1 starts on 10 Aug 2026. Runtime validation of head shows calendar-2026/2027-sem1-start: [2026,8,10], but for 2026-08-10T00:00:00+08:00 the code still returns previousActive:true, effectiveSpecialTermAcademicYear:"2025/2026", and routes Semesters 3 and 4 to the previous AY. It does not stop previous-AY routing until 2026-08-11T00:00:00+08:00.
    • Cause
      • The calendar stores semester starts as local dates via new Date(year, month - 1, day), which is midnight in the runtime timezone. The validation scenario uses Singapore-time timestamps (+08:00), so 2026-08-10T00:00:00+08:00 is still before new Date(2026, 7, 10) in a UTC runtime. The changed AY2026/2027 calendar line packages/nusmods-academic-calendar/academic-calendar.json:65 supplies [2026, 8, 10], but the date comparison boundary is timezone-sensitive and therefore misses the Singapore start-of-day contract.
    • Fix
      • Make academic-calendar date comparisons timezone-stable for the NUS/Singapore academic calendar, for example by normalizing comparisons to Singapore local dates or by constructing semester boundary instants explicitly at Asia/Singapore start-of-day. Then add a regression test asserting isUsingPreviousAySpecialTermData('2026/2027', null, new Date('2026-08-10T00:00:00+08:00')) === false and Semesters 3/4 no longer use the previous AY at that instant.

    T-Rex Ran code and verified through T-Rex

Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
website/src/data/modreg-schedule.json:40-43
**CPEx dates stayed stale**

The CourseReg rounds were moved to the AY2026/2027 Semester 1 window, but the CPEx entry still ends on 13 Mar 2026. `/cpex` reads this entry through `config.modRegSchedule` while the page constants already say AY2026/2027 Semester 1, so any visit after March renders “CPEx has ended for AY2026/2027 Semester 1” and hides the upcoming/current CPEx window. The ModReg notification selector also drops ended rounds, so CPEx reminders will not appear for the new exercise until these dates are updated.

### Issue 2 of 2
website/src/data/modreg-schedule.json:6-19
**Round dates mismatch**

Please re-check these Select Courses dates against the official AY2026/27 Semester 1 CourseReg schedule. The NUS schedule excerpt for undergraduate/CPE students lists Select Courses Round 1 on 26-Jul-26, but this data starts Round 1 on 20-Jul-26. Since ModReg notifications and the report-error visibility window are driven directly from this JSON, a shifted Round 1 date can notify students and open the enhanced reporting window almost a week early.

Reviews (5): Last reviewed commit: "chore: update PR2 instructions" | Re-trigger Greptile

Comment thread website/src/config/app-config.json Outdated
Comment thread website/src/config/app-config.json
@jloh02 jloh02 force-pushed the codex/ay26-27-pr2-frontend branch from f2765eb to de4f118 Compare June 23, 2026 12:24
Comment thread website/src/config/app-config.json
Comment thread MAINTENANCE.md
## Every Semester

- [ ] Update semester in `website/src/config/app-config.json`
- [ ] In `app-config.json`, add semester to `examAvailability` to indicate exam information is available for the semester

@leslieyip02 leslieyip02 Jun 27, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Correct me if I'm wrong, but this doesn't seem needed anymore. We haven't been doing it for the past few years anyways.

@leslieyip02

Copy link
Copy Markdown
Member

Greptile Summary

Switching academicYear to 2026/2027 makes AY2025/2026 the immediate previous year, but archiveYears still stops at AY2024/2025. fetchAllModuleArchive(), isArchiveLoading(), and availableArchive() only iterate this list, so a course that is no longer offered in AY2026/2027 but existed in AY2025/2026 will show the plain 404 page instead of the AY2025/2026 archive link.

The remaining comment on archiveYears will be fixed in PR3.

@leslieyip02 leslieyip02 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@jloh02 Can you take another look? I added the CourseReg dates so it should be good to go now.

Comment thread website/src/data/modreg-schedule.json
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