Skip to content

Convert school countdown from calendar-list view to pure attendance-days countdown#25

Draft
Copilot wants to merge 17 commits intomainfrom
copilot/create-sveltekit-countdown-app
Draft

Convert school countdown from calendar-list view to pure attendance-days countdown#25
Copilot wants to merge 17 commits intomainfrom
copilot/create-sveltekit-countdown-app

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 8, 2026

The page was functioning as a calendar (event list + misc countdowns) rather than a focused countdown to the last day of school. Additionally, the big "Days" figure was raw calendar days (weekends/holidays included), making its meaning ambiguous.

Changes

Always show a countdown (+page.ts)

  • load() now always returns a populated CalendarData — fetch failure no longer yields calendar: null
  • Added hardcoded getLastDayFallback() → May 22 2026 as the final fallback target; ensures the countdown renders even when the external ICS feed is unreachable
  • Dropped the 60-day upcoming-events query; events is always []

Countdown-only UI (+page.svelte)

  • Removed "School Calendar" event list and "Upcoming Countdowns" sections entirely
  • Removed the {#if !calendar && !error} loading gate; hero renders immediately since calendar is now always non-null
  • Error/offline notice demoted to a subtle gold info banner instead of a red alert

School days as the primary metric

The big "Days" number now shows attendance days (schoolDaysRemaining from the bell schedule) instead of raw calendar days, with an unambiguous label:

const schoolDays  = $derived(calendar?.schoolDaysRemaining ?? 0);
const daysDisplay = $derived(schoolDays > 0 ? schoolDays : heroCountdown.days);
const daysLabel   = $derived(schoolDays > 0 ? 'School Days' : 'Calendar Days');
  • Removed the now-redundant "attendance days remaining" strip beneath the H:M:S clock — that metric is promoted to the main counter
  • H:M:S still counts down to the precise last-day timestamp
Original prompt

Create a complete SvelteKit countdown application that tracks school events and remaining school days by integrating with two ICS calendars.

Requirements

Calendar Integration

  1. Main Events Calendar: https://phs.psdr3.org/calendar/calendar_362.ics

    • Parse and display major school events
    • Focus on tracking "Last Day of School" and other significant events
  2. Bell Schedule Calendar: https://calendar.google.com/calendar/ical/c_ihdnrdu2e4s0d01qeinmvbjms4%40group.calendar.google.com/public/basic.ics

    • Use to determine actual school days when students are in the building
    • Count only days with bell schedules (excludes weekends, holidays, breaks)

Features

  • Live Countdowns: Display real-time countdowns showing days, hours, minutes, and seconds remaining until key events
  • School Days Counter: Track the number of actual school days remaining (not just calendar days)
  • Event Display: Show upcoming events from the calendar in a clean, organized format
  • Auto-refresh: Automatically update countdowns in real-time
  • Responsive Design: Modern, mobile-friendly UI that works on all devices
  • School-appropriate Styling: Clean, professional design suitable for educational setting

Technical Requirements

  • Use SvelteKit with TypeScript
  • Implement ICS calendar parsing (use a library like ical.js or similar)
  • Use SvelteKit's static adapter for easy deployment
  • Implement proper error handling for calendar fetching
  • Add loading states while fetching calendar data
  • Make the app easy to deploy (GitHub Pages, Vercel, Netlify compatible)

Project Structure

  • Set up a complete SvelteKit project from scratch
  • Include proper configuration files (package.json, svelte.config.js, tsconfig.json, etc.)
  • Create reusable Svelte components for countdowns and event displays
  • Implement stores or reactive state management for countdown timers
  • Add appropriate styling (CSS or use a framework like Tailwind if preferred)

Additional Considerations

  • Handle timezone differences appropriately
  • Cache calendar data to reduce unnecessary requests
  • Provide fallback UI if calendars fail to load
  • Include a README with setup and deployment instructions
  • Add appropriate dependencies to package.json

The goal is to completely replace the existing repository contents with a modern, fully-functional SvelteKit countdown application.

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits March 8, 2026 15:30
- Remove Express.js files (index.html, index.js, replit.nix, .replit)
- Add SvelteKit app with svelte.config.js, vite.config.ts, tsconfig.json
- Add src/app.html and src/app.css with responsive design
- Add TypeScript types in src/lib/types.ts
- Add ICS calendar parsing utilities in src/lib/utils/ical.ts
- Add countdown calculation utilities in src/lib/utils/countdown.ts
- Add Countdown.svelte component with live second-by-second updates
- Add EventCard.svelte component for displaying upcoming events
- Add SchoolDaysCounter.svelte component for school days remaining
- Add +page.ts load function fetching two ICS calendars
- Add +page.svelte main page with header, countdowns, event list, footer
- Use @sveltejs/adapter-static for static site generation
- Update .gitignore for SvelteKit (add .svelte-kit/, build/, .env)
- Update README.md with full setup and deployment documentation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: ParkerH27 <91337218+ParkerH27@users.noreply.github.com>
@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 8, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​sveltejs/​adapter-static@​3.0.101001007284100
Added@​sveltejs/​kit@​2.53.4991008198100
Updatedical.js@​1.5.0 ⏵ 2.2.197100100 +18170
Added@​sveltejs/​vite-plugin-svelte@​5.1.11001008196100
Addedvite@​6.4.1861008398100
Addedsvelte@​5.53.7881008898100
Updatedtypescript@​5.0.4 ⏵ 5.9.310010090 +110090
Addedsvelte-check@​4.4.59910010096100

View full report

@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 8, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm svelte is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: package-lock.jsonnpm/svelte@5.53.7

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/svelte@5.53.7. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm vite is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: package-lock.jsonnpm/vite@6.4.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/vite@6.4.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Co-authored-by: ParkerH27 <91337218+ParkerH27@users.noreply.github.com>
Copilot AI changed the title [WIP] Add SvelteKit countdown application for tracking school events Replace Express/Socket.IO server with SvelteKit countdown app Mar 8, 2026
Co-authored-by: ParkerH27 <91337218+ParkerH27@users.noreply.github.com>
Copilot AI changed the title Replace Express/Socket.IO server with SvelteKit countdown app Publish to GitHub Pages via Actions workflow Mar 8, 2026
Co-authored-by: ParkerH27 <91337218+ParkerH27@users.noreply.github.com>
Copilot AI changed the title Publish to GitHub Pages via Actions workflow Add GitHub Pages deployment with PR branch previews Mar 8, 2026
Co-authored-by: ParkerH27 <91337218+ParkerH27@users.noreply.github.com>
Copilot AI changed the title Add GitHub Pages deployment with PR branch previews Add PR preview deployments via gh-pages branch Mar 8, 2026
Co-authored-by: ParkerH27 <91337218+ParkerH27@users.noreply.github.com>
Copilot AI changed the title Add PR preview deployments via gh-pages branch Switch Pages deployment to GitHub Actions source mode Mar 8, 2026
Copilot AI changed the title Fix GitHub Pages deploying README instead of SvelteKit app Publish SvelteKit countdown app to GitHub Pages Mar 8, 2026
Copilot stopped work on behalf of ParkerH27 due to an error March 8, 2026 16:38
Copilot stopped work on behalf of ParkerH27 due to an error March 8, 2026 16:38
Copilot AI and others added 2 commits March 8, 2026 16:50
Co-authored-by: ParkerH27 <91337218+ParkerH27@users.noreply.github.com>
…on, next-year transition

Co-authored-by: ParkerH27 <91337218+ParkerH27@users.noreply.github.com>
Copilot AI changed the title Publish SvelteKit countdown app to GitHub Pages Pattonville branding, accurate school-day counting, and cinematic end-of-year countdown UI Mar 8, 2026
…ctive-period highlight

Co-authored-by: ParkerH27 <91337218+ParkerH27@users.noreply.github.com>
Copilot AI changed the title Pattonville branding, accurate school-day counting, and cinematic end-of-year countdown UI Pattonville branding, accurate attendance counting, animated end-of-year countdown UI, and live bell schedule widget Mar 8, 2026
Copilot AI changed the title Pattonville branding, accurate attendance counting, animated end-of-year countdown UI, and live bell schedule widget Add live bell schedule widget (A/B/C/X day detection + active period highlight) Mar 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 8, 2026

🚀 Preview Deployment

Your preview is ready!

https://psdtools.github.io/year-countdown/previews/copilot-create-sveltekit-countdown-app/

This preview will be automatically removed when the PR is closed.

Copilot AI changed the title Add live bell schedule widget (A/B/C/X day detection + active period highlight) Investigate and resolve stale GitHub Pages deployment Mar 8, 2026
…ith fallback date

Co-authored-by: ParkerH27 <91337218+ParkerH27@users.noreply.github.com>
Copilot AI changed the title Investigate and resolve stale GitHub Pages deployment Convert page from calendar list to pure countdown with offline fallback Mar 8, 2026
Co-authored-by: ParkerH27 <91337218+ParkerH27@users.noreply.github.com>
Copilot AI changed the title Convert page from calendar list to pure countdown with offline fallback Convert school countdown from calendar-list view to pure attendance-days countdown Mar 8, 2026
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