Add label preview before full generation#9
Merged
Conversation
- POST /preview endpoint returns base64 first-sheet PDF without storing anything in Supabase (10/hour rate limit, same validation as /upload) - PDFSheetGenerator.generate_preview_sheet() renders to BytesIO instead of disk, calibrates on all labels for accurate bar widths - generate_label_preview() in label_service mirrors upload parsing but skips zip creation, DB writes, and storage upload - New LabelPreview component decodes base64 -> Blob URL, renders PDF in an iframe with loading state, exposes Generate All and Close actions - labelUploader splits into side-by-side layout when preview is active; preview panel is sticky so it stays visible while scrolling the form Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
🚅 Deployed to the BarcodeGenerator-pr-9 environment in LabelGenius
|
railway-app
Bot
temporarily deployed
to
LabelGenius / BarcodeGenerator-pr-9
April 23, 2026 01:49
Destroyed
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.
Summary
POST /previewendpoint generates only the first sheet as a base64 PDF — no Supabase storage, no DB writes, 10/hour rate limitPDFSheetGenerator.generate_preview_sheet()writes toBytesIOinstead of disk and calibrates bar widths against all labels so the preview is accurateLabelPreviewcomponent (self-contained) decodes base64 → Blob URL and renders the PDF in an iframe; exposes Generate All and Close actionslabelUploaderswitches to a side-by-side layout when a preview is active — form stays on the left (580px), preview panel fills the remaining width and sticks as the user scrollsTest plan
🤖 Generated with Claude Code