Repository navigation
Fix dayTime merge logic to always use Comcigan's values - #16
Merged
Merged
Conversation
The auto merge fell back to NEIS `dayTime` whenever Comcigan's was empty. NEIS never publishes period start times (its `dayTime` is always `[]`), so that fallback could only ever propagate a wrong or invented value. Take Comcigan's bell times unconditionally, even when empty. Adds a regression test and updates the API description and docs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H4z4vv7pn6R3DbuNNKqQwe
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
Changed the timetable merge logic to always use Comcigan's
dayTime(bell times) instead of falling back to NEIS when Comcigan's is empty. This reflects the fact that NEIS doesn't provide period start times, making itsdayTimedata unusable as a fallback.Key Changes
packages/client/src/timetable/merge.ts): ChangeddayTimemerging from conditional fallback (comcigan.dayTime.length > 0 ? comcigan.dayTime : neis.dayTime) to always using Comcigan's values ([...comcigan.dayTime])src/test/timetable-merge.ts): New test verifies that Comcigan's emptydayTimeis preserved and never filled from NEISsrc/app.tsandopenapi.jsonapps/docs/content/docs/api/timetable.mdxandapps/docs/content/docs/client/timetable.mdxpackages/client/README.mdImplementation Details
dayTimeis a Comcigan-only field with no NEIS equivalent, unliketeacherwhich can fall back to NEISday_timealways comes from Comcigan and is blank when Comcigan has no datahttps://claude.ai/code/session_01H4z4vv7pn6R3DbuNNKqQwe