Scheduling badge counts change requests that aren't scheduled
Maintainer thường phản hồi trong vòng 1 ngày
Đá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
- 68/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ệ
- react, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Dấu thời gian lỗi thời đến từ useRef(moment().toISOString()) tại frontend/web/components/navigation/navbars/EnvironmentNavbar.tsx:24, và cùng một mẫu xuất hiện ở useMemo(..., []) tại frontend/web/components/pages/ScheduledChangesPage.tsx:40. Bắt đầu bằng cách tái hiện huy hiệu với hai change request được commit ngay lập tức, sau đó tính live_from_after tại thời điểm yêu cầu được gửi đi. Hoàn thành khi huy hiệu vẫn trống sau khi commit mà không cần làm mới trang, và trang Scheduling vẫn chỉ liệt kê các thay đổi có ngày trong tương lai.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
How are you running Flagsmith
- SaaS at flagsmith.com
Describe the bug
The Scheduling item in the environment sidebar shows a count badge for change requests that were committed for immediate publish, not scheduled. The Scheduling page itself correctly shows no scheduled changes, and the badge clears on a page refresh.
Steps To Reproduce
- Enable change requests on an environment.
- Load the dashboard and leave the tab open.
- Create two change requests, approve and commit them, publishing immediately (no schedule).
- Look at Scheduling in the environment sidebar — it shows a
2badge. - Refresh the page — the badge disappears.
Expected behavior
No badge, as there are no scheduled changes.
Likely cause
frontend/web/components/navigation/navbars/EnvironmentNavbar.tsx:24 pins live_from_after to the time the navbar mounted:
const date = useRef(moment().toISOString())
const { data: scheduledData } = useGetChangeRequestsQuery({
committed: true, environmentId, live_from_after: date.current, page_size: 1,
})
A change request published immediately gets a live_from of its commit time, which is after that pinned timestamp, so the list endpoint returns it and the badge counts it as scheduled. Committing invalidates the ChangeRequest LIST tag, so the query refetches — but with the same stale timestamp. A refresh re-mounts the navbar with a current timestamp, so the change request drops out.
frontend/web/components/pages/ScheduledChangesPage.tsx:40 pins the same value with useMemo(..., []), so a long-lived session on that page will drift the same way.
Computing live_from_after at request time rather than at mount, or filtering server-side on "live in the future", would both fix it.
- Ngôn ngữ chính
- Python
- Star
- 6.6k
- Fork
- 591
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 131
Chuẩn bị môi trường
- Có Dockerfile hoặc 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 Flagsmith/flagsmith
-
Expose whether an organisation is blocked for API usageCó thể đã có người làm @PiUnknown đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Flagsmith/flagsmith#8773 · 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 75/100
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 85/100
Flagsmith/flagsmith#8681 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Flag dependency needs user documentationCó thể đã có người làm @emyller đã nhận 13 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Flagsmith/flagsmith#8524 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
influx_query_manager doesn't catch ApiException, so Influx error responses 500Có thể đã có người làm @siddiqueirshad đã nhận 28 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Flagsmith/flagsmith#8510 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Flagsmith/flagsmith
Issue tương tự
-
[Bug] Unit tests reach real Bedrock call paths without patching the modelCó thể đã có người làm @proton0210 đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
aws-samples/sample-aws-genai-db-modernizer#1318 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pyarrow-25.0.1-cp310-cp310-manylinux_2_28_x86_64.whl: 1 vulnerabilities (highest severity is: 5.3)Đang mởMend: dependency security vulnerability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
capitalone/locopy#394 ·
-
[Bug] Unhandled ValueError terminates watchdog thread when GISRC value contains multiple colonsĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sdk-typescript: unquoted COPY globs in shell form are silently dropped from the image build contextĐang mởbug javascript
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
ietf-tools/datatracker#11922 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày