fix: show missing section warnings on schedule load - #3
Open
ronaldw07 wants to merge 5 commits into
Open
Conversation
ronaldw07
force-pushed
the
fix-missing-section-warnings-on-load
branch
from
January 18, 2026 09:03
ca62049 to
c280960
Compare
When courses are restored from saved state on page load, missing section warnings now appear for courses that require additional sections (e.g., lab, discussion) that weren't saved. Changes: - Add checkForMissingSections() method to AppStore that detects and displays warnings for courses missing required sections - Call checkForMissingSections() after successful schedule load - Extract sectionTypeToName() utility function to eliminate code duplication - Refactor getMissingSections.ts to use shared utility function Fixes icssc#1399
ronaldw07
force-pushed
the
fix-missing-section-warnings-on-load
branch
from
January 18, 2026 09:16
c280960 to
66ce27c
Compare
When loading a saved schedule, getCourseInfo was called with specific sectionCodes, causing WebSOC to return only those sections. This resulted in incomplete sectionTypes arrays, which prevented missing section warnings from appearing correctly. Now fetches full course data for each unique course to get complete sectionTypes, ensuring the MUI Alert warnings appear when sections are missing. Fixes icssc#1399
Instead of making individual WebSOC queries for each course, group courses by (term, deptCode) and query all courses in a department at once. This reduces the number of API calls significantly.
… warnings When fetching complete sectionTypes on schedule load, the previous approach queried all courses in a department which caused cross-department contamination (e.g. PHYSICS 3A and SOC SCI 3A polluting MATH 3A sectionTypes with Lab). Now queries each unique (term, deptCode, courseNumber) individually and filters results to only match the correct department and course number.
ronaldw07
had a problem deploying
to
staging-3
February 24, 2026 07:33 — with
GitHub Actions
Failure
…or sectionTypes lookup
ronaldw07
had a problem deploying
to
staging-3
February 27, 2026 05:36 — with
GitHub Actions
Failure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes icssc#1399 - Show missing section warnings for saved courses on page load
When AntAlmanac loads and restores courses from
fromScheduleSaveState, the app now detects and displays warnings for courses that are missing required sections (e.g., lab, discussion).Changes
checkForMissingSections()method to AppStore that:sectionTypesarray) with enrolled section typescheckForMissingSections()after successful schedule load inloadSchedule()sectionTypeToName()utility function: Created a reusable utility to convert section type codes to readable namesgetMissingSections.ts: Updated to use the shared utility function, eliminating code duplicationHow It Works
The
getCourseInfoAPI endpoint (called byfromScheduleSaveState) already returns the fullsectionTypesarray containing all available section types for a course. After a schedule loads successfully,checkForMissingSections()compares the required section types with the sections the user has enrolled in and displays warnings for any missing required sections.Example Output
If a user has saved a schedule with only Lecture + Lab sections of a course that requires Lecture + Lab + Discussion, they'll see:
For multiple courses:
Test plan