-
Notifications
You must be signed in to change notification settings - Fork 0
Add fixture synchronization with ELTTL URL #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Introduce tab navigation for the availability page
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tabletennis | 2a4f9b7 | Commit Preview URL Branch Preview URL |
Jan 05 2026, 08:43 PM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request implements a comprehensive fixture synchronization feature that allows users to sync fixture data from the ELTTL website. The feature handles rescheduled matches by automatically clearing availability and selections when dates change, while preserving data for unchanged fixtures.
Key Changes:
- New
/api/availability/:teamId/syncendpoint that fetches current fixtures from ELTTL and intelligently updates the database - Three-tab UI reorganization (Fixtures, Stats, Management) with the sync functionality in the Management tab
- Database methods for fixture matching, date updates, and availability clearing
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| worker/wrangler.toml | Removed deprecated type = "javascript" configuration |
| worker/src/types.ts | Added SyncResponse interface for sync API response |
| worker/src/database.ts | Added getFixtureByTeams, updateFixtureDate, and clearAvailabilityForFixture methods |
| worker/src/index.ts | Implemented new sync endpoint with fixture matching and update logic |
| worker/src/index.test.ts | Added 6 comprehensive unit tests for sync endpoint |
| worker/src/database.integration.test.ts | Added integration tests for new database methods |
| worker/src/scraper.test.ts | Anonymized test data (changed real team/player names to generic placeholders) |
| frontend/src/lib/types/availability.ts | Added SyncResponse type definition |
| frontend/src/lib/api/availability.ts | Added syncFixtures API client function |
| frontend/src/routes/availability/[teamId]/+page.svelte | Implemented three-tab navigation with sync UI, confirmation dialog, and loading states |
| frontend/e2e/availability-validation.test.ts | Added e2e tests for tab navigation and sync workflow |
| design/sync/TODO.md | Comprehensive implementation checklist and requirements |
| design/sync/SUMMARY.md | Complete implementation summary and API documentation |
| design/sync/IMPLEMENTATION_NOTES.md | Technical notes, limitations, and recommendations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot open a new pull request to apply changes based on the comments in this thread |
- Replace unused existingFixtures variable with in-memory Map lookup - Add batch database operations (batchUpdateFixture, batchCreateFixtureWithAvailability) - Use batch operations instead of multiple sequential DB calls for better performance - Remove role="button" from dialog backdrop (accessibility fix) - Fix dialog keydown handler to allow Escape key propagation - Replace arbitrary timeouts with proper Playwright waiting mechanisms in tests - Remove unused syncingButton variable in tests - Update test expectations to verify batch operations Co-authored-by: chamika <754909+chamika@users.noreply.github.com>
Co-authored-by: chamika <754909+chamika@users.noreply.github.com>
Co-authored-by: chamika <754909+chamika@users.noreply.github.com>
Co-authored-by: chamika <754909+chamika@users.noreply.github.com>
Optimize sync endpoint with batch operations and fix accessibility issues
Deploying tabletennis with
|
| Latest commit: |
2a4f9b7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://de42d25d.tabletennis.pages.dev |
| Branch Preview URL: | https://add-sync.tabletennis.pages.dev |
No description provided.