Fix claim status update after aborted registry pull#386
Fix claim status update after aborted registry pull#386kojibai wants to merge 4 commits intocodex/review-note-upload-keystream-verificationfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35487b0b04
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (ac.signal.aborted) { | ||
| setNoteClaimRemoteStatus("stale"); | ||
| return; |
There was a problem hiding this comment.
Avoid stale update from aborted prior request
When noteClaimKey changes, the previous effect is aborted in the cleanup. With this change, if the old request resolves after the abort, it now sets noteClaimRemoteStatus to "stale". That update can race with the new request and leave the new key stuck in a stale state: the subsequent effect short-circuits on noteClaimRemoteStatus === "stale" && noteClaimRemoteCheckedRef.current === noteClaimKey, so the new key won't be rechecked. This regression only happens when a prior fetch finishes after being aborted due to key change or unmount.
Useful? React with 👍 / 👎.
Motivation
Description
src/pages/VerifyPage.tsxto setnoteClaimRemoteStatusto"stale"and return early when the AbortController signal is observed afterpullAndImportRemoteUrlscompletes.Testing
Codex Task