Repository navigation
The editor's own exports lost every row it wasn't showing - #64
Open
vhladiienko wants to merge 1 commit into
Open
vhladiienko wants to merge 1 commit into
vhladiienko wants to merge 1 commit into
Conversation
A capture too long for a responsive editor opens trimmed, and a page past shot-core's per-image cap opens as part 1 of N — while the banner said nothing was dropped. True only of the popup's exports: the editor's own Download PNG and Export PDF wrote exactly the canvas, which for a 1600×29000 capture was a 28,589-row file, and for a split capture part 1 alone. Exports now reassemble the whole page: part 1 recomposed at full height from the kept compressed blob with the annotated canvas over its top rows, parts 2..N streamed from the background's blob store over a new read-only port. A crop or frame redefines the image, so the canvas alone is then the export; a device that refuses the full-size compose falls back to the visible rows and says so instead of passing a shortened file off as the page. Popup paths were already whole-page and are untouched.
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.
What this changes
A capture longer than the editor's responsive budget opens trimmed ("Showing the first 22,791 rows of 28,916…"), and a page past shot-core's per-image cap opens as part 1 of N — while the banner tells the reader "nothing was dropped". That claim was only true of the popup's export buttons. The editor's own "Download PNG" and "Export PDF" wrote exactly the canvas as the file: a 1600×29000 capture exported as 28,589 rows, and a split capture exported as part 1 alone — which reads as data loss, the exact thing the banner promised against.
This PR makes the editor's exports reassemble the whole page:
loadImage()keeps the compressed capture blob plus its load dimensions — not a decoded bitmap, so nothing large stays pinned for the session.lastCaptureParts, same chunked-base64 pattern as the existing editor-image port, same Firefox private-window partitioning reason).-page-i-of-Nwhen it did, matching the popup's PNG answer. Export PDF builds one multi-page PDF through the existingimagesToPdf(a single image still goes throughpngToPdf).Two-way door, small blast radius: the popup's paths were already whole-page and are untouched, and the new editor path degrades to the old behaviour the moment the canvas stops being the untouched top of the capture.
How it was tested
npm run typecheck— clean.npm test— 110 passed.cargo test --workspace— 43 passed (36 shot-core incl. proptests, 7 shot-qa CLI).e2e/too-long.spec.tsgained those assertions, so the partial-export bug now fails the suite instead of only failing a person. The popup's own exports were verified complete the same way (in both this tree and the released v1.0.1), which is why this PR leaves them alone.watermark tool: tiled pattern respects location/orientation…, which fails identically on an unmodified checkout when the privatewatermark-premiumsubmodule is absent (the build falls back to the draw-nothing stub). Environmental, not from this change.Contributor Licence Agreement
This project is AGPL-3.0-or-later and is also distributed under app-store
terms that the AGPL cannot satisfy, which is only possible while one party
holds copyright in the whole work. See CLA.md for why.
You tick this once, on your first pull request; later ones are covered by it.