Conversation
- show immediate loading state for disable/enable course confirmations - prevent duplicate dialog actions while disable/enable is pending - hide “Jump to Today” in calendar empty state when selected date is today - auto-switch login method selector while typing email/phone in login field - add regression tests for calendar CTA visibility and login method auto-detection
Contributor
|
✅ Version already bumped to No automatic version bump needed - the PR already includes a version update. This PR is ready for review! 🚀 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines a few key UI behaviors around attendance actions and login UX, and bumps the app/API version to 3.0.7 with dependency updates.
Changes:
- Add login identifier auto-detection to switch the login input type (username/email/phone) while typing, plus regression tests.
- Improve disable/enable course dialogs with immediate pending/loading UI and attempts to block duplicate actions.
- Hide the “Jump to Today” CTA in the calendar empty state when the selected date is already today, plus regression test.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/user/login-form.tsx | Adds login-method auto-detection and wires it into the login field onChange. |
| src/components/user/tests/login-form.test.tsx | Adds regression tests for login method auto-detection. |
| src/components/attendance/course-card.tsx | Adds pending/loading UI + disables dialog actions while enable/disable is in progress. |
| src/components/attendance/attendance-calendar.tsx | Hides “Jump to Today” when the selected date is already today. |
| src/components/attendance/tests/attendance-calendar.test.tsx | Adds regression test ensuring the CTA is hidden when redundant. |
| public/openapi/openapi.yaml | Bumps OpenAPI version to 3.0.7. |
| package.json | Bumps app version to 3.0.7. |
| package-lock.json | Updates lockfile for version bump + dependency changes. |
| .example.env | Bumps NEXT_PUBLIC_APP_VERSION to 3.0.7. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/components/attendance/course-card.tsx:672
- The disable/enable helpers from useDisabledCourses() are a no-op when the semester key can’t be constructed (academicYear/semester are null/undefined). In that case this handler will still close the dialog and show a success toast, which can mislead users into thinking the course was disabled when nothing was persisted. Add a guard that blocks the action (and/or shows an error toast) until both academicYearData and semesterData are available, or until the semester key is non-null.
event.preventDefault();
if (!courseCode || disableInFlightRef.current) return;
disableInFlightRef.current = true;
const reason = isOtherReason ? customReason.trim() : disableReason;
setIsDisabling(true);
try {
await disableCourse(courseCode, reason);
setShowDisableDialog(false);
toast.success(`${courseCode} disabled`, {
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Devanarayanan <fusion@devakesu.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Devanarayanan <fusion@devakesu.com>
src/components/attendance/__tests__/attendance-calendar.test.tsx
Outdated
Show resolved
Hide resolved
devakesu-admin
approved these changes
Mar 6, 2026
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.
Pull Request
Description
fix(ui): improve attendance actions and login input auto-detection
chore(deps): Update dependencies
Type of Change
Version Bump
node scripts/bump-version.js(fork PRs)