[Sessions: create / edit / cancel] Create with stable session ID across uncertain retry
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 40/100
Línea de trabajo
Start in lib/sessions/session_repository.dart and the schema in supabase/schemas/dogpack/tables/sessions.sql to see which fields define a matching meeting and how the ID is set. The prerequisites #86 (createSessionMap) and #30 must land first, so check whether they are merged. Done means createSession keeps draft.id across retries, returns the existing row on a 23505 duplicate only when its fields match, and passes other errors on. Verify with flutter test test/sessions/session_repository_dp_s04_2_test.dart and flutter analyze.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What to build
Save a new study meeting without creating duplicates when a request is retried. Keep the same meeting ID after an uncertain network response and recognize an already-created matching meeting.
Files
lib/sessions/session_repository.dart(extend the prerequisite’s file)- Starting example: supabase/schemas/dogpack/tables/sessions.sql
Code to add or extend:Future<SessionRecord> createSession(client,hostId,draft).
Steps
- Insert createSessionMap(draft, hostId) using the current student’s client. Keep
draft.idunchanged for the entire attempt and any retries. - If PostgreSQL returns 23505, read the existing row with that ID and own hostId. Return it only if its allowed creation fields match this draft; otherwise pass on the error.
- After an uncertain network failure, keep the draft and retry with the same ID. Never generate a new ID inside createSession; the screen creates it once when starting the draft.
Example
Retry after dropped response addresses same id and creates at most one session.
Check it works
In test/sessions/session_repository_dp_s04_2_test.dart, check the example above and the failure or limit described in the steps. Run flutter test test/sessions/session_repository_dp_s04_2_test.dart and flutter analyze.
Before starting
References
Assign yourself before starting, or comment to claim the issue. Project setup.
- Lenguaje dominante
- PLpgSQL
- Estrellas
- 0
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de DevDogsUGA/DogPack
-
polish
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
DevDogsUGA/DogPack#131 ·
-
polish
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
DevDogsUGA/DogPack#130 ·
-
moderation
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
DevDogsUGA/DogPack#119 ·
-
moderation
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
DevDogsUGA/DogPack#113 ·
-
discover
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
DevDogsUGA/DogPack#106 ·
Todos los issues de DevDogsUGA/DogPack
Issues similares
-
Stack overflow in `check bans` with `include-dependencies = true` and a dev-dependency cycleAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
EmbarkStudios/cargo-deny#910 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OpenIntegrationEngine/engine#496 ·
Los mantenedores suelen responder en 1 día
-
documentation glm5 llm-model
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
vllm-project/vllm-ascend#19062 ·
Los mantenedores suelen responder en 1 día
-
Author Page: shuai-zhao-llmAbiertoauthor-page correction
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
acl-org/acl-anthology#10496 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día