Fix saved timetable duplicate checks and local storage syncing

Offen
#262 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
react, typescript
Bereich
database, frontend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
TypeScript
Sterne
7
Forks
39
Ø Merge
4 Std. 24 Min.
Gemergte PRs (30 T.)
53

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus CodeChefVIT/ffcs

Alle Issues in CodeChefVIT/ffcs

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.