Skip to content

Conversation

@chamika
Copy link
Owner

@chamika chamika commented Jan 5, 2026

No description provided.

@chamika chamika requested a review from Copilot January 5, 2026 20:08
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 5, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

Copy link

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

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/sync endpoint 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.

@chamika
Copy link
Owner Author

chamika commented Jan 5, 2026

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

Copilot AI commented Jan 5, 2026

@chamika I've opened a new pull request, #9, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 5 commits January 5, 2026 20:20
- 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
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 5, 2026

Deploying tabletennis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2a4f9b7
Status: ✅  Deploy successful!
Preview URL: https://de42d25d.tabletennis.pages.dev
Branch Preview URL: https://add-sync.tabletennis.pages.dev

View logs

@chamika chamika changed the title Add sync Add fixture synchronization with ELTTL URL Jan 5, 2026
@chamika chamika merged commit 988236d into main Jan 5, 2026
4 checks passed
@chamika chamika deleted the add-sync branch January 5, 2026 20:45
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