Skip to content

Conversation

@RuffLogix
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings July 8, 2025 12:19
@RuffLogix RuffLogix changed the base branch from main to dev July 8, 2025 12:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds the Firstdate registration and login flows, server-side health endpoint, global font imports, new layout components, and performance-testing UI on the home page.

  • Import IBM Plex Sans Thai and Zen Dots fonts in global CSS
  • Enhance index.astro with backend health check, 8K image load timing, and performance info panel
  • Scaffold /firstdate pages with staff/user register & login forms and updated layouts

Reviewed Changes

Copilot reviewed 41 out of 65 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/styles/global.css Added custom font imports & body font-family
src/pages/index.astro Integrated API health check & 8K backdrop + performance UI
src/pages/api/health.ts New /api/health route for status & responseTime
src/pages/firstdate/** Created register/login pages for staff & users
src/layouts/MainLayout.astro Switched to English <html lang>, added Header & Footer
src/components/common/Navbar.astro Mobile menu always hidden due to incorrect classes
src/components/firstdate/Footer.astro Stray closing </a> before Website link
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (3)

src/layouts/firstdate/WithoutNavbar.astro:3

  • The Navbar import isn’t used in this layout; consider removing it to reduce clutter.
import Navbar from "@firstdate/Navbar.astro";

src/pages/index.astro:156

  • The newly created apiLoadTimeElement is never appended or used; you can remove this unused variable.
  const apiLoadTimeElement = document.createElement('span');

src/components/firstdate/Footer.astro:48

  • There’s a stray closing </a> tag before the Website link; remove the extra tag to fix the HTML structure.
        </a>

<main class="flex-grow">
<slot />
</main>
<Footer varient="firstdate"/>
Copy link

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

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

The prop varient appears to be a misspelling of variant; renaming it will improve clarity.

Suggested change
<Footer varient="firstdate"/>
<Footer variant="firstdate"/>

Copilot uses AI. Check for mistakes.
Comment on lines 174 to 176
fetch('https://dev.freshmenfest2025.com/api/health')
.then(() => {
const apiPerfEntries = performance.getEntriesByName('https://dev.freshmenfest2025.com/api/health');
Copy link

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

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

Hardcoding the full dev URL makes this feature environment-specific; consider using a relative path (/api/health) or location.origin for flexibility.

Suggested change
fetch('https://dev.freshmenfest2025.com/api/health')
.then(() => {
const apiPerfEntries = performance.getEntriesByName('https://dev.freshmenfest2025.com/api/health');
const apiHealthUrl = `${location.origin}/api/health`;
fetch(apiHealthUrl)
.then(() => {
const apiPerfEntries = performance.getEntriesByName(apiHealthUrl);

Copilot uses AI. Check for mistakes.
<div class="flex w-full justify-center">
<div class="flex flex-col w-4/5 gap-y-2 my-3">
<DummyButton href="/firstdate/home/">
<img src="/firstdate/home/qrcode.svg"> QR CODE
Copy link

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

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

This <img> tag lacks an alt attribute; please add meaningful alt text (e.g. alt="QR Code for CU First Date").

Suggested change
<img src="/firstdate/home/qrcode.svg"> QR CODE
<img src="/firstdate/home/qrcode.svg" alt="QR Code for CU First Date"> QR CODE

Copilot uses AI. Check for mistakes.

<div class="text-center">
<a
href="/register"
Copy link

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

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

The link points to /register, but the registration page is at /firstdate/register; update the href to match the actual route.

Suggested change
href="/register"
href="/firstdate/register"

Copilot uses AI. Check for mistakes.
Comment on lines 82 to 102
<label htmlFor="">อาหารที่แพ้</label>
<div className="flex gap-2 justify-between w-full px-12">
<div className="flex items-center gap-2">
<input
type="checkbox"
className="w-4 h-4"
checked={healthInfo.hasAllergies === true}
onChange={() => handleAllergiesChange(true)}
/>
<label htmlFor="">มี</label>
</div>
<div className="flex items-center gap-2">
<input
type="checkbox"
className="w-4 h-4"
checked={healthInfo.hasAllergies === false}
onChange={() => handleAllergiesChange(false)}
/>
<label htmlFor="">ไม่มี</label>
</div>
</div>
Copy link

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

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

Labels use an empty htmlFor and inputs lack id attributes, which hinders screen-reader association; assign matching id/htmlFor values.

Suggested change
<label htmlFor="">อาหารที่แพ้</label>
<div className="flex gap-2 justify-between w-full px-12">
<div className="flex items-center gap-2">
<input
type="checkbox"
className="w-4 h-4"
checked={healthInfo.hasAllergies === true}
onChange={() => handleAllergiesChange(true)}
/>
<label htmlFor="">มี</label>
</div>
<div className="flex items-center gap-2">
<input
type="checkbox"
className="w-4 h-4"
checked={healthInfo.hasAllergies === false}
onChange={() => handleAllergiesChange(false)}
/>
<label htmlFor="">ไม่มี</label>
</div>
</div>
<label htmlFor="allergies">อาหารที่แพ้</label>
<div className="flex gap-2 justify-between w-full px-12">
<div className="flex items-center gap-2">
<input
type="checkbox"
className="w-4 h-4"
id="allergies-yes"
checked={healthInfo.hasAllergies === true}
onChange={() => handleAllergiesChange(true)}
/>
<label htmlFor="allergies-yes">มี</label>
</div>
<div className="flex items-center gap-2">
<input
type="checkbox"
className="w-4 h-4"
id="allergies-no"
checked={healthInfo.hasAllergies === false}
onChange={() => handleAllergiesChange(false)}
/>
<label htmlFor="allergies-no">ไม่มี</label>
</div>

Copilot uses AI. Check for mistakes.
@RuffLogix RuffLogix changed the title Feat/firstdate/register [Feature] [FD] register / login page Jul 12, 2025
@RuffLogix RuffLogix changed the title [Feature] [FD] register / login page [Feature] [Firstdate] register / login page Jul 12, 2025
setValue: UseFormSetValue<LoginFormData>;
onSubmit: (e?: React.BaseSyntheticEvent) => Promise<void>;
onBack?: () => void;
userType: "student" | "staff";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
userType: "student" | "staff";
userType: "FRESHMAN" | "STAFF";

Copy link
Member Author

Choose a reason for hiding this comment

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

@MasterIceZ done kub

@MasterIceZ MasterIceZ merged commit daa2cfc into dev Jul 13, 2025
7 checks passed
@MasterIceZ MasterIceZ deleted the feat/firstdate/register branch July 13, 2025 13:34
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