Repository navigation
Conversation
Starts the build of the first checkpoint: package files copied from the sibling plugin's shape, a Payload-free layout engine (tokens, fitting, sheet positions, the 4 x 6 in preset), the provider contract types, and a plugin that registers the three collections with writes closed by default. Not tested: any database, PDF or SVG output, the print endpoint, the admin UI, site filtering for scopeField. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reads, creates, updates and deletes now stay inside the person's own scope when scopeField is set, with scopeOf resolving the scope and failing closed. Shared (no scope) templates are readable by all and changed only by a platform admin. Covered on an in-memory MongoDB with two made-up sites. Not tested: the print endpoint's scope check (not built), a real site, a browser. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Both outputs draw the same marks, with barcodes, QR and Data Matrix as vectors from bwip-js (MIT) and the PDF written with pdfkit (MIT). The PDF writer is its own export so the plugin config does not load pdfkit. Not tested: PDF in a viewer or printer, SVG in a browser, scanning a printed code, sheet pages, images. Co-Authored-By: Claude Opus 5.5 <[email protected]>
POST /api/labels/print renders a PDF for given documents and a template. It refuses signed-out requests, people with no scope, another scope's template, any document the person cannot read and more than 2,000 labels, and writes one log entry of ids and counts. Not tested: over real HTTP, render time at 2,000 labels, sets, media choice, sheet pages. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The plugin now throws at config time unless access.manage or access.print is set, and no longer lets any signed-in person read templates or print. access.print decides printing, otherwise access.manage does. Template lookup tries the key, then the id as given, so numeric ids work on SQL databases. Not tested: numeric ids on a real SQL database; the cost of reading documents at depth 3. Co-Authored-By: Claude Opus 5.5 <[email protected]>
An admin field component for a template's elements. A layers list with keyboard selection and announced reorder, hide and delete; an inspector for the selected layer; and an SVG preview from the same layout as printing, with a sample record and a warnings list. Styled with Payload theme variables. Not tested: a real browser, a screen reader, the Payload admin, color contrast. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main took the core branch by rebase, so the same changes sit under new commit ids. Main's tree matches the core branch exactly, so this keeps the branch tree. Nothing is rewritten. Tests: see pull request. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
Security and privacy review (EXTANT APE, Head of Research for Simon)Verdict: changes. The live preview has a stored XSS. Checked: CI green. Local: 54 of 54 tests pass. No new endpoints, and template access is unchanged. The new dependencies are all MIT. The README's keyboard and announcement claims match the code (listbox with Fix before merge
Also
🤖 Generated with Claude Code |
The review found a stored XSS: thickness and rotation reached the live preview unescaped, and the elements field had no checks. Elements are now validated on the server and every SVG number is coerced to a finite number. Tested: 4 new tests (58 pass). Not tested: the editor in a browser. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Captive Origins task: K6. Stacks on #1 (base is
co/labels-core; retarget to main after #1 merges). Follows: the design's builder section and D13.What's in it
/clienteditor on the template'selementsfield: layers list (arrow keys, move up/down, hide, delete, add, announced results), inspector (position, size, rotation, text and tokens, font size, fit rule, barcode type and value), live SVG preview fromlayout()with an editable sample record, and a warnings list by layer.Tested: 54 vitest tests (10 new, jsdom); typecheck, build and leak check pass.
Not tested: a real browser, a screen reader, the Payload admin, color contrast, the field wrapper that reads the form.
No version bump.
🤖 Generated with Claude Code