Skip to content

feat(labels): a label's QR can hold the code alone - #564

Open
Brandon2255p wants to merge 1 commit into
keptinventory:mainfrom
Brandon2255p:feat/label-qr-code-only
Open

Brandon2255p wants to merge 1 commit into
keptinventory:mainfrom
Brandon2255p:feat/label-qr-code-only

Conversation

@Brandon2255p

Copy link
Copy Markdown

What and why

A label's QR holds <public-url>/l/<code>, so a long public URL makes a dense QR: 29 modules a side for a typical <machine>.<tailnet>.ts.net address, 33 for a longer domain. On small label stocks that is harder to print and to scan.

The print screen now asks what the QR holds, under the stock picker, for stocks that print a QR:

  • The link (the default, as today): any phone camera opens it.
  • The code only: the six-character code, a version 1 QR (21 modules), the smallest there is. Only Kept's scanner reads it; shared/scan.ts already takes a bare code as a Kept label, so labels of both kinds keep working, and nothing changes on the server.

The choice is remembered on this browser, like the stock (kept.labels.qr), and followed by the sheet, its preview and the phone PNGs (qrValue() in components/labels/qr.ts). The QR keeps its size on the label: fewer modules, each one larger.

Five new strings, in every catalogue.

Checks

  • bash scripts/ci-local.sh --fast passes (lint, catalogues, typecheck, unit, eval). Not run: db and e2e (no Docker on this machine); the change is web-only.
  • Tests first: components/labels/qr.test.ts (the value per choice, the code alone is a version 1 QR and the link is larger, the scanner reads the code as a label, the choice is remembered and redraws, and is followed when storage is blocked)
  • Migrations are additive (none)
  • New strings in every catalogue; logical CSS; the picker is the existing ChoiceCards
  • Conventional commit messages; no AI attribution in commits or this description (D173)
  • The CLA signed (once, on your first pull request; see CONTRIBUTING.md)

A label's QR holds `<public-url>/l/<code>`, so a long domain makes a
dense QR: 29 modules a side for a tailnet name, 33 for a longer domain.
The print screen now asks what the QR holds: the link (the default, any
phone camera opens it) or the code alone, 21 modules, the smallest QR
there is. Only Kept's scanner reads that one; shared/scan.ts already
takes a bare code as a Kept label, so labels of both kinds keep working.

The choice is remembered on this browser, like the stock, and shown only
for stocks that print a QR. The sheet, its preview and the phone PNGs
all follow it. Five strings, in every catalogue.
@Brandon2255p
Brandon2255p requested a review from a team as a code owner November 15, 2026 20:34
@github-actions

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant