Goals: the error banner and the "No goals yet" hint show at the same time

Đang mở Phù hợp với người mới
#3,872 6 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@KartikeyG-world đang làm issue này rồi.

Từ ngày 29/11/2026.

  • #3952 của @KartikeyG-world — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
73/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
nextjs, react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu trong src/components/GoalTracker.tsx, tại nhánh goals.length === 0 khoảng dòng 627, rồi theo dõi cách lỗi đồng bộ hóa và kết quả tải được biểu diễn. Thêm hoặc cập nhật kiểm thử component cho các lần tải rỗng thất bại và thành công. Hoàn tất khi lần tải thất bại hiển thị lỗi và thao tác thử lại hoặc làm mới mà không hiển thị gợi ý trạng thái rỗng, còn lần tải rỗng thành công hiển thị gợi ý; phối hợp với #3824, issue này cũng thay đổi tệp đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

good first issue level 1 level:beginner status:assigned type:bug
Summary

When loading goals fails, the Goals card shows "Failed to load goals. Please try again." and "No goals yet. Set your first one below..." together. The second message is wrong: we don't know there are no goals, we just couldn't load them.

Where

src/components/GoalTracker.tsx (the goals.length === 0 branch around line 627 renders regardless of the sync error)

Expected outcome

While the load error is showing, don't show the empty-state hint (keep the retry/refresh action). Show the hint only after a successful load that returned no goals.

Acceptance criteria
  • A component test: a failed load shows the error and not the empty hint; a successful empty load shows the hint
  • Note: #3824 translates this file; coordinate or rebase on it
Ngôn ngữ chính
TypeScript
Star
246
Fork
436
Merge trung bình
9 giờ 33 phút
Pull request đã merge (30 ngày)
213

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 Priyanshu-byte-coder/devtrack

Tất cả issue của Priyanshu-byte-coder/devtrack

Issue tương tự

Thêm issue về TypeScript

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.