Skip to content

Fix claim status update after aborted registry pull#386

Open
kojibai wants to merge 4 commits intocodex/review-note-upload-keystream-verificationfrom
codex/fix-verification-hang-issue
Open

Fix claim status update after aborted registry pull#386
kojibai wants to merge 4 commits intocodex/review-note-upload-keystream-verificationfrom
codex/fix-verification-hang-issue

Conversation

@kojibai
Copy link
Owner

@kojibai kojibai commented Feb 1, 2026

Motivation

  • Prevent the verify flow from getting stuck in the "VERIFYING" state when a remote registry pull is aborted by marking the remote check as stale so subsequent logic can re-check and surface an "unclaimed" state.

Description

  • Update src/pages/VerifyPage.tsx to set noteClaimRemoteStatus to "stale" and return early when the AbortController signal is observed after pullAndImportRemoteUrls completes.

Testing

  • No automated tests were run for this change.

Codex Task

@vercel
Copy link

vercel bot commented Feb 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
phi-network-5aii Ready Ready Preview, Comment Feb 1, 2026 8:52pm

Request Review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +1234 to +1236
if (ac.signal.aborted) {
setNoteClaimRemoteStatus("stale");
return;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant