Skip to content

Fix main typecheck: pin Buffer<ArrayBuffer> in cdp-ws-proxy mid-print test - #7263

Merged
brennanb2025 merged 1 commit into
mainfrom
brennanb2025/fix-cdp-pdf-test-typecheck
Jul 3, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
brennanb2025/fix-cdp-pdf-test-typecheck

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Jul 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • pnpm typecheck fails on current main: src/main/browser/cdp-ws-proxy.test.ts(653,9) resolves new Promise<Buffer> to Buffer<ArrayBufferLike>, which no longer satisfies the mocked printToPDF return type Promise<Buffer<ArrayBuffer>> (introduced by the mid-print disconnect test in #7044; the break only appears against current main's typings, so its own PR checks were green).
  • Pin the deferred-resolve promise and resolver parameter to Buffer<ArrayBuffer>. Type-only change.
  • This is currently failing the PR Checks / verify job on every open PR based on main (e.g. Bump mobile app.json to 0.0.22 #7261, Update stale mobile Android download links to 0.0.21 #7262).

Verification

  • pnpm exec tsgo --noEmit -p config/tsconfig.node.json → clean
  • pnpm vitest run src/main/browser/cdp-ws-proxy.test.ts → 30 passed

Made with Orca 🐋

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 91fd867b-ff89-4e6e-9eb1-fbfde1440783

📥 Commits

Reviewing files that changed from the base of the PR and between 02dfb4b and 523045e.

📒 Files selected for processing (1)
  • src/main/browser/cdp-ws-proxy.test.ts

📝 Walkthrough

Walkthrough

This change updates a test file's type annotations, changing the generic type used for resolvePrint and printToPDF mock functions from Buffer to Buffer<ArrayBuffer> within a single test case verifying behavior when a client disconnects mid-print operation. No exported or public API declarations are affected.

Changes

File Change Summary
src/main/browser/cdp-ws-proxy.test.ts Updated mock type annotations for resolvePrint and printToPDF from Buffer to Buffer<ArrayBuffer> in a single test case.

Related issues: None specified.

Related PRs: None specified.

Suggested labels: tests, low-risk

Suggested reviewers: None specified.

Poem

A rabbit types with careful paws,
Buffer now wears ArrayBuffer's clause,
No PDF stream survives the fall,
When clients vanish, mid-print call,
A tiny fix, correct and small. 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes Summary and Verification, but it omits required Screenshots, AI Review Report, Security Audit, and Notes sections. Add the missing template sections, including Screenshots/no visual change, Testing checklist, AI Review Report, Security Audit, and Notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the type-only Buffer fix in the mid-print cdp-ws-proxy test.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@brennanb2025
brennanb2025 merged commit 700b492 into main Jul 3, 2026
2 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/fix-cdp-pdf-test-typecheck branch July 3, 2026 20:30
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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