Fix saved timetable duplicate checks and local storage syncing

Aperta
#262 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
database, frontend

Direzione di ricerca

Start in src/components/cards/ViewTimeTable.tsx and the saved timetable screens, src/app/saved/saved.tsx and saved-mobile.tsx. Trace how saved entries are matched, loaded, deleted, and scoped to an account, then check the existing tests or add coverage for reordered timetables, deleted entries, and account switching. Done when duplicate checks use a stable identity and local state stays in sync with database deletions and visibility changes.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Saved timetable tracking currently mixes database records with a browser-wide savedTimetables list. Matching uses JSON.stringify(a) === JSON.stringify(b), which depends on entry ordering, and deleted or private records can stay around locally.

This can lead to false duplicate messages or attempts to reuse stale share IDs, especially on a browser used by more than one account.

What needs to be done

  • Make local saved-timetable state account-specific (or rely on the server as the source of truth).
  • Compare timetables using a normalized identity rather than raw JSON order.
  • Sync deletions and visibility changes consistently.
  • Handle entries that no longer exist in the database.
  • Cover same timetable/different ordering, deleted entries and account switching.

Files: src/components/cards/ViewTimeTable.tsx, src/app/saved/saved.tsx and saved-mobile.tsx.

Lingua principale
TypeScript
Stelle
7
Fork
39
Merge medio
4h 24m
PR unite (30g)
53

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CodeChefVIT/ffcs

Tutte le issue di CodeChefVIT/ffcs

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.