[Sessions: create / edit / cancel] Create with stable session ID across uncertain retry
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 40/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- PLpgSQL
- Star
- 0
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DevDogsUGA/DogPack
-
polish
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
DevDogsUGA/DogPack#131 ·
-
polish
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
DevDogsUGA/DogPack#130 ·
-
moderation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DevDogsUGA/DogPack#119 ·
-
moderation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
DevDogsUGA/DogPack#113 ·
-
discover
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
DevDogsUGA/DogPack#106 ·
Tất cả issue của DevDogsUGA/DogPack
Issue tương tự
-
md/asciidoc/csv: an explicit `encoding="utf-8"` keeps a leading BOM, the auto-detect path drops itĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
docling-project/docling#4846 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/sessions comp/dashboard comp/desktop comp/gateway comp/tui duplicate P2 sweeper:risk-session-state type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NousResearch/hermes-agent#138914 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
mozilla/experimenter#17760 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
huggingface/huggingface_hub#5169 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày