Skip to content

fix(apocalypse): ignore stale PDF search results - #2834

Merged
esokullu merged 2 commits into
webbrain-one:mainfrom
fly1d:codex/pdf-search-race
Aug 17, 2026
Merged

fix(apocalypse): ignore stale PDF search results#2834
esokullu merged 2 commits into
webbrain-one:mainfrom
fly1d:codex/pdf-search-race

Conversation

@fly1d

@fly1d fly1d commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make Emergency PDF text search latest-query-wins so delayed extraction and errors cannot overwrite a newer query
  • render pages offscreen and commit only after operation ownership checks, preserving the latest page, zoom, and resize request
  • invalidate searches on manual navigation and guard repeated-target request rollback

Reproduction

  1. Start a search whose text extraction stalls on page 2.
  2. Submit a second search that finds page 3 and finishes first.
  3. Release the first extraction. Before this fix, it could still navigate to its old match and replace the newer status and canvas.

The regression test also covers pending-page resize, quick next/previous navigation, repeated same-target requests, stale failures, and search-result render failures.

Testing

  • node test/run.js (1818 passed, 1 failed; the unrelated failure is the missing upstream artifact dist/webbrain-chrome-32.1.0.zip)
  • npm run test:toolbar-guard (33 passed)
  • npm run test:security (60/60 passed)
  • git diff --check
  • Chrome/Firefox source parity checks

@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

@fly1d is attempting to deploy a commit to the esokullu's projects Team on Vercel.

A member of the Team first needs to authorize it.

@esokullu esokullu closed this Aug 17, 2026
@esokullu esokullu reopened this Aug 17, 2026
@esokullu
esokullu force-pushed the codex/pdf-search-race branch from 881d5ce to 31fbf82 Compare August 17, 2026 08:39
@esokullu
esokullu merged commit 2eeac0d into webbrain-one:main Aug 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants