Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s OpenAPI contract (synced from dotto-typespec) and adjusts the frontend to match API shape changes, notably the move from dayOfWeek/period fields to a nested slot object and the shift from semester to semesters[] query parameters.
Changes:
- Update
openapi/openapi.yamlwith new endpoints/schemas and pluralized query parameters (e.g.,semesters,grades,classes). - Update timetable UI components to read/write
TimetableItem.slotinstead ofdayOfWeek/period. - Update server actions to send
semesters: [semester]for affected GET endpoints.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/timetable/TimetableItemTable.tsx | Read weekday/period from item.slot with a fallback when missing |
| src/components/timetable/TimetableItemForm.tsx | Submit timetable item creation using { slot: { dayOfWeek, period } } |
| src/components/timetable/TimetableItemDeleteDialog.tsx | Display deletion description using item.slot |
| src/app/dotto/timetable/actions.ts | Update timetable list query param from semester to semesters[] |
| src/app/dotto/course-registrations/actions.ts | Update registrations list query param from semester to semesters[] |
| openapi/openapi.yaml | Sync OpenAPI changes: new PersonalCalendarItems endpoint, new schemas, and pluralized query params |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| allOf: | ||
| - $ref: '#/components/schemas/DottoFoundationV1.TimetableSlot' |
There was a problem hiding this comment.
AcademicService.TimetableItem.slot is documented as being null for intensive lectures, but the schema does not allow null (OpenAPI 3.1 uses JSON Schema; allOf: [$ref] alone won’t permit null). Either update the schema to allow null (e.g., anyOf with {type: "null"}) or adjust the description to match the actual contract (e.g., “omitted when not in timetable”).
| allOf: | |
| - $ref: '#/components/schemas/DottoFoundationV1.TimetableSlot' | |
| anyOf: | |
| - $ref: '#/components/schemas/DottoFoundationV1.TimetableSlot' | |
| - type: 'null' |
| 「{subjectName}( | ||
| {item?.slot ? DAY_OF_WEEK_LABEL[item.slot.dayOfWeek] : ""} | ||
| {item?.slot ? PERIOD_LABEL[item.slot.period] : ""} | ||
| )」を削除します。 |
There was a problem hiding this comment.
This multiline JSX inside AlertDialogDescription will introduce extra whitespace/newlines around the weekday/period and before the closing parenthesis when rendered (HTML collapses newlines into spaces). Consider rendering this as a single continuous string (or explicitly controlling spaces with {" "}) to avoid UI formatting regressions, and avoid repeating the item?.slot conditional twice by computing the label once.
This PR updates the OpenAPI schema from dotto-typespec.
Triggered by: fun-dotto/dotto-typespec@1ed56ee