You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(scheduling): Stop counting published change requests in the badge - #8914
The Scheduling badge counted change requests that were published straight away. The time it filtered on was fixed when the page loaded, so anything committed after that looked scheduled until a refresh.
Adds a getScheduledChangeRequests endpoint that always sends committed=true and the current time with each request. The sidebar badge and the Scheduling page both use it. getChangeRequests is unchanged.
The Scheduling page refetches each time it opens, since its arguments no longer change between visits.
The change request E2E test now checks the Scheduling badge stays empty after publishing, before the page reloads.
How did you test this code?
E2E: the new check fails on main (Scheduling1) and passes on this branch.
Manually, locally and on staging:
Open an environment with change requests turned on and keep the tab open.
Create a change request in that tab, approve it with another user, then publish it straight away without reloading.
main shows a Scheduling badge of 1; this branch shows none.
The Scheduling badge and page pinned live_from_after to mount time, so
change requests published immediately after mount counted as scheduled.
A dedicated getScheduledChangeRequests endpoint reads the time on every
request, so the refetch after a commit uses the current time.
Closes#8774
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No actionable comments were generated in the recent review.
Walkthrough
The frontend adds a paged query for scheduled change requests. The query requires an environment ID and sets committed: true and live_from_after when the query runs. The environment navbar and Scheduling page use the new query hook. An end-to-end test checks that the Scheduling link text is exactly “Scheduling” after publishing.
The scheduled-query change is mergeable with bounded test-coverage limitations: the badge check can pass before a delayed or failed refresh is detected. No concrete production regression was established.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 165aae2b-6d14-4ced-9dfb-7f4654c4be80
Commits
Reviewing files that changed from the base of the PR and between 11a3cfe and 6f8200a.
Files selected for processing: 1
frontend/e2e/tests/change-request-test.pw.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Additional comments: 1
frontend/common/services/useChangeRequest.ts: 1
83-83: Minor · Potential issue · Poor tradeoff
Unverified finding
We couldn't verify this from the code. It is shown for review, not as a verified issue.
The endpoint generates a new cutoff for each paged request. If the server uses offset pagination, entries becoming due between page requests can shift the result set, so page 2 need not continue where page 1 ended.
A still-scheduled change can be skipped from the paginated list.
This can occur when: A user loads page 1 of 50 scheduled changes; one of those changes becomes due before they request page 2.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 7129dd3c-9331-4825-a8ff-415207559f9e
Commits
Reviewing files that changed from the base of the PR and between 13539af and 1c9bfca.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
Unverified finding
We couldn't verify this from the code. It is shown for review, not as a verified issue.
The new query obtains the time filter at each request, so offset-based pages can use different eligible sets. A change expiring from an earlier page between requests can shift a still-scheduled record across the page boundary.
The remaining scheduled change that shifted onto page one may be omitted from the pages the user viewed, or the second-page request may fail if the server rejects an out-of-range page.
This can occur when: There are 51 scheduled changes, one on the first page goes live after that page is loaded, and the user requests page two.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 31e69a58-5fe9-4456-bf59-360f149e3533
Commits
Reviewing files that changed from the base of the PR and between 1c9bfca and 3278a21.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
talissoncosta
changed the title
fix(Scheduling): Only count change requests that are still scheduled
fix(scheduling): Only count change requests that are still scheduled
Nov 9, 2026
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: c22e4105-5e78-4e4d-a4b0-3fdc1dbc43ab
Commits
Reviewing files that changed from the base of the PR and between 3278a21 and 11a3cfe.
Files selected for processing: 1
frontend/e2e/tests/change-request-test.pw.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
…e checking the badge"
This reverts commit 11a3cfe. The timing code made a one-line regression
check hard to read. The plain check already fails on main and passes with
the fix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
talissoncosta
changed the title
fix(scheduling): Only count change requests that are still scheduled
fix(Scheduling): Stop counting published change requests in the badge
Nov 9, 2026
talissoncosta
changed the title
fix(Scheduling): Stop counting published change requests in the badge
fix(scheduling): Stop counting published change requests in the badge
Nov 9, 2026
This branch was successfully deployed
2 active
deployments
Preview – flagsmith-frontend-preview—6f8200adDeployedNov 9, 2026 by
vercel[bot]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fixfront-endIssue related to the React Front End Dashboard
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs/if required so people know about the feature.Changes
Closes #8774
The Scheduling badge counted change requests that were published straight away. The time it filtered on was fixed when the page loaded, so anything committed after that looked scheduled until a refresh.
getScheduledChangeRequestsendpoint that always sendscommitted=trueand the current time with each request. The sidebar badge and the Scheduling page both use it.getChangeRequestsis unchanged.How did you test this code?
main(Scheduling1) and passes on this branch.mainshows a Scheduling badge of1; this branch shows none.