[Import/Export] Invalidate imported plan caches for its term
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- frontend
Direzione di ricerca
Start in src/hooks/data/useSavedPlans.ts, at the mutation's onSuccess and onError handlers, and read how the submitted items carry their term. Invalidate the per-term plans query for each distinct term plus the term-plan-counts query, and leave failed writes out of any success path. Done when the example in src/hooks/data/useSavedPlans.test.ts passes, the failure case is covered, and pnpm test, pnpm lint and pnpm typecheck all pass. Issue #846 is listed as a prerequisite, so check it has landed first.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What to build
Refresh the correct saved-plan lists after an import. An import into another semester should update that semester’s saved data and plan count, not just the currently selected list.
Files
- src/hooks/data/useSavedPlans.ts
Code to add or extend:mutation onSuccess(data, variables) invalidation.
Steps
- Read the submitted mutation items in onSuccess and collect their effective term IDs.
- Invalidate ["plans",term] for each distinct term plus ["term-plan-counts"].
- Keep failed writes in onError; do not report a successful import or invalidate an unrelated selected term only.
Example
NavbarFall, imported Spring → Spring plan cache invalidated; rejected mutation does not show a success.
Check it works
In src/hooks/data/useSavedPlans.test.ts, check the example above and the failure or limit described in the steps. Run pnpm test -- src/hooks/data/useSavedPlans.test.ts, pnpm lint and pnpm typecheck.
Before starting
- #846 — Write imported plans to the explicit term locally
References
Assign yourself before starting, or comment to claim the issue. Project setup.
- Lingua principale
- TypeScript
- Stelle
- 19
- Fork
- 94
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DevDogsUGA/DogDays
-
map
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DevDogsUGA/DogDays#868 ·
-
map
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
DevDogsUGA/DogDays#865 ·
-
sharing
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
DevDogsUGA/DogDays#854 ·
-
import-export
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
DevDogsUGA/DogDays#850 ·
-
import-export
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DevDogsUGA/DogDays#842 ·
Tutte le issue di DevDogsUGA/DogDays
Issue simili
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
lingdojo/kana-dojo#32590 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
bug p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bastani-inc/atomic#3703 ·
I maintainer di solito rispondono entro 1 giorno
-
backend bug difficulty: medium priority: medium reliability
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
trustflow-protocol/trustflow-backend#730 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
firecrawl/firecrawl-mcp-server#548 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno