[Plan Sharing] Create or reuse an owner share ID
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 50/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- data
Direzione di ricerca
Read src/hooks/data/useSavedPlans.ts as the pattern for data hooks, then create src/hooks/data/usePlanSharing.ts exposing createShare(plan). The issue depends on #803 adding a nullable unique shareId column, so confirm that has landed before starting. Done means src/hooks/data/usePlanSharing.test.ts shows that two calls on an already-shared plan return the same /share/ URL and that signed-out calls fail with a readable message; run the test, pnpm lint and pnpm typecheck.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What to build
Create a sharing identifier for a plan owned by the signed-in student. Reusing an existing identifier should keep the current shared link working rather than producing a new link every time.
Files
src/hooks/data/usePlanSharing.ts(new file)- Starting example: src/hooks/data/useSavedPlans.ts
Code to add or extend:usePlanSharing().createShare(plan): Promise<string>.
Steps
- For a signed-in owner, use existing shareId if set; otherwise generate
crypto.randomUUIDand update own plan row by id/userId. - Return
${window.location.origin}/share/${shareId}and invalidate the affected plan cache. - Signed-out calls yield a readable sign-in requirement; never write someone else’s id.
Example
Two create calls for same already-shared plan return the same URL.
Check it works
In src/hooks/data/usePlanSharing.test.ts, check the example above and the failure or limit described in the steps. Run pnpm test -- src/hooks/data/usePlanSharing.test.ts, pnpm lint and pnpm typecheck.
Before starting
- #803 — Add nullable unique shareId to saved plans
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
-
enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OWASP/cve-lite-cli#1335 ·
I maintainer di solito rispondono entro 1 giorno
-
Windows: main-screen mouse tracking requires WT_SESSION, so it never enables inside herdr panesAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
code-yeongyu/senpi#3353 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Channels status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
mastra-ai/mastra#27093 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement needs-triage ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno