feat(pdf-page-splitter): BTB-026 PDF splitter (double-page to single-page)#5
Merged
vincenthouyi merged 3 commits intovincenthouyi:mainfrom Mar 21, 2026
Merged
Conversation
- PdfPageSplitterTool: upload → split → direct download - PdfProcessor: pdf-lib split logic (vertical middle cut per page) - 7 unit tests (size reject, empty, page count, dimensions, output bytes) - 4 e2e tests (page loads, full flow, oversized reject) - >100MB reject, invalid/empty error handling
onDrop/onDragOver now call e.preventDefault(), read dataTransfer.files[0], and update component state. Adds drag-active CSS class and e2e test covering the drop flow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
BTB-026: PDF Page Splitter (double-page → single-page) Components: - PdfPageSplitterTool: UI (drag-drop, file input → Split → download) - PdfProcessor: pdf-lib wrapper (load → split middle → save bytes) Changes: - src/lib/pdfProcessor.ts + __tests__/pdfProcessor.test.ts (7 tests) - src/tools/pdf-page-splitter/ (tool + CSS) - src/App.tsx, src/registry/tools.ts (routing + registration) - e2e/pdf-page-splitter.spec.ts (4 tests: load/flow/error/size) - e2e/search.spec.ts (16→15 tool count fix) Quality gates: - lint/test/build/e2e pass (118 unit + 72 e2e) - >100MB reject, empty/invalid error handling Spec: docs/spec/BTB-026-pdf-page-splitter/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements BTB-026 spec (docs/spec/BTB-026-pdf-page-splitter/).
REQ coverage:
Changes:
Verification: