Repository navigation
Print button that hands labels to a local print agent - #1626
Draft
francisrath wants to merge 5 commits into
Draft
francisrath wants to merge 5 commits into
francisrath wants to merge 5 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a Tools entry for the print agent page and documents the agent contract. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bulk lot action and hand-typed ids can contain spaces, ';' or empty entries, which agents don't have to accept. Also: lowercase pairing key, popup without opener, per-profile labels on the menu icons, and the docs now say which bytes form the HMAC key and how agents should check ts, replays and src. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 29, 2026
This branch has not been deployed
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.
Part of #1625. This is the smallest of three alternative PRs; each one builds on the previous:
Pick whichever level you're comfortable with, or none.
What it does
/label/agent) connects the current browser to a print agent. The agent's settings page links there with#url=<agent>&key=<pairing key>. The fragment never reaches the server, and the connection is kept only in this browser's local storage./v1/handoff?src&type&ids&profile&ts&sig, HMAC-SHA256 with the pairing key). The agent then fetches the PDF itself through the existingPOST /api/labels/generatewith its own read-only API token.This is a top-level navigation, so it needs no CSP change and isn't affected by Chrome's local-network fetch rules. Part-DB never talks to the agent itself and stores nothing on the server.
The agent contract is documented in
docs/usage/labels.md("Printing with a print agent"). It isn't tied to one agent: any program that implements the handoff URL works. I wrote one for Brother QL printers, pdb-print (MIT).Limitations
Tests
tests/Controller/LabelControllerTest.php: the connect page, and the buttons with and without a profile./label/agentis added to the availability test.Screenshots
🤖 Generated with Claude Code