Repository navigation
fix(ci): format codeql workflow and fix flaky one.gov.sg test - #2404
Merged
Merged
Conversation
The CodeQL workflow grafted in #2310 uses 1-space indentation and has no trailing newline, so `prettier --check` in the lint job fails on every push. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
react-router 6.3 sets the ready flag for useNavigate in a passive useEffect. After the async login redirect, React can commit the Campaigns button before that effect runs. findByRole then resolves, the click calls navigate(-1) while the flag is still false, and react-router drops it with the "call navigate() in a React.useEffect()" warning. CI hit this on 30b68d0 and 299b237. Retry the click inside waitFor until the prior page renders. Verified by patching the installed react-router to delay the flag by 100 ms for every useNavigate after the first. The old test then fails with the same error as CI, and the new test passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
seancze
marked this pull request as ready for review
October 9, 2026 03:52
jia1
approved these changes
Oct 9, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Two CI checks fail on
staging, and neither failure comes from #2403.lintfails because.github/workflows/codeql.yml, grafted in graft: migrate to org-wide CodeQL configuration #2310, uses 1-space indentation and has no trailing newline, soprettier --checkrejects it.test-frontendfails some of the time inone-gov-sg-navigation.test.tsx(on 30b68d0 and 299b237). react-router 6.3 marksnavigateas ready inside a passiveuseEffect. After the async login redirect, the Campaigns button can appear in the DOM before that effect runs. The test clicks it in that gap, and react-router dropsnavigate(-1)with the "call navigate() in a React.useEffect()" warning.Solution
Bug Fixes:
codeql.yml. The change is whitespace and quotes only.waitForuntil the prior page renders.Tests
npm run lint-no-fixpasses at the repo rootnavigatereadiness for everyuseNavigateafter the first, the old test fails with the CI error and the new test passes