Offline match queue

Open
#33 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
html, javascript
Domain
frontend, mobile

Research direction

Start with the frontend v1 proposal and related issue #22 to find the app entry points and match submission flow. Read config/api_errors.py and apps/matches/services.py:1105-1117 in the backend, plus plans/frontend-v1/research/backend-api.md, to understand response handling. Done means pending matches persist in IndexedDB, retry on app open and the online event, handle each listed response, and show queue state and validation errors without silently dropping items.

Written by the indexing model from the issue text.

Description

enhancement

Why
Players record matches on courts with poor signal. Frontend v1 needs a connection to submit a match. We deferred offline entry from v1 so v1 stays small. Frontend #22 first listed it.

What
Queue match submissions on the device and send them later.

  • Store pending submissions in IndexedDB (the full MatchCreateIn body).
  • Flush the queue when the app opens and on the online event. iOS has no Background Sync, so do not depend on it.
  • Handle each response:
    • 2xx: remove from the queue.
    • 409 duplicate_match: count as sent if it names the player's own match (backend record_match treats a retry by the same submitter as the same result).
    • 401: keep the item, ask the player to sign in, retry after login.
    • 422: remove it from the queue and show the player the field errors so they can fix and resubmit.
    • 5xx or network error: keep and retry later.
  • Show the queue state in the UI ("2 matches waiting to send").
  • Do not drop an item silently.

Context

Dominant language
HTML
Stars
0
Forks
1
Avg merge
42m
Merged PRs (30d)
108

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openpickleball/frontend

All issues in openpickleball/frontend

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.