Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Sessions: create / edit / cancel] Create with stable session ID across uncertain retry

Đang mở
#87 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
dart, postgresql
Lĩnh vực
backend, database

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ả

sessions

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

Steps

  1. Insert createSessionMap(draft, hostId) using the current student’s client. Keep draft.id unchanged for the entire attempt and any retries.
  2. 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.
  3. 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

  • #86 — Map a session draft to an allowed insert
  • #30 — Declare a plain Discover query result

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DevDogsUGA/DogPack

Tất cả issue của DevDogsUGA/DogPack

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.