Skip to content

fix(viewer): actively cancel superseded PDF.js work on current parent - #445

Draft
seonghobae wants to merge 2 commits into
fix/viewer-generation-safe-renderingfrom
fix/viewer-active-pdfjs-cancellation-after-current-323-20260814
Draft

fix(viewer): actively cancel superseded PDF.js work on current parent#445
seonghobae wants to merge 2 commits into
fix/viewer-generation-safe-renderingfrom
fix/viewer-active-pdfjs-cancellation-after-current-323-20260814

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Objective

Reconstruct stale stacked PR #347's unique active PDF.js resource-cancellation delta on the exact current #323 parent without moving #323 or importing obsolete ancestry.

Exact stack identity

  • parent PR: fix(viewer): suppress stale PDF render publication #323;
  • exact parent head/base: 75e49391ddc13de378b8572d444bf02d686ef84c;
  • test-only RED commit: 4fd6398fdba14cc72a0103cdcac0bdcd5a9b3d6e;
  • exact GREEN candidate head: 54d77fbc07645a8eee45ad8662700c3c0845ccc9;
  • changed paths: scripts/test_viewer_pdfjs_resource_cancellation.py and viewer.js;
  • emitted child CI and fuzz: terminal-success;
  • unresolved review threads: zero.

RED → GREEN contract

The executable Node/unittest regression holds an active RenderTask.promise and an unresolved PDFDocumentLoadingTask.promise. Supersession must call RenderTask.cancel() exactly once and loadingTask.destroy() exactly once when those APIs exist. Production installs a one-shot abort listener, cancels active render work, destroys unresolved loading work, suppresses cancellation errors only when the caller actually aborted, removes the listener in finally, and still destroys a resolved PDFDocumentProxy.

Scope boundary

This child depends on #323's stale-publication suppression. It does not yet provide signed-token lifecycle parity, rapid three-generation/error-state coverage, terminal focus ownership, or a distributed/browser-process cancellation contract. Issue #322 remains open.

Merge gate

Keep Draft while #323 remains unmerged. Child CI/fuzz success is useful review evidence but not protected-main merge evidence. After #323 reaches protected main, rebuild or retarget this two-file delta onto the new exact protected base and regenerate all main-targeted CI, Security Scan, SAST, fuzz, current-head reviews, and independent approval. No evidence from #347 or predecessor heads transfers.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9bdceb17-f442-4b9e-938c-cf1a1c07799a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Collaborator Author

Read-only child-head review request for 54d77fbc07645a8eee45ad8662700c3c0845ccc9 over exact parent #323 head 75e49391ddc13de378b8572d444bf02d686ef84c. Emitted CI and fuzz are terminal-success; this remains Draft and is not eligible for protected-main merge evidence. Review deterministic active RenderTask cancellation, unresolved loading-task destruction, listener cleanup, abort-only error suppression, and resolved-document destruction. Do not mutate or merge the branch.

@opencode-agent review
@cwl-noema-review review
@strix review
@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

@seonghobae have exceeded the limit for the number of chat messages per hour. Please wait 42 minutes and 55 seconds before sending another message.

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.

1 participant