Skip to content

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

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

Brandon2255p wants to merge 3 commits into
keptinventory:mainfrom
Brandon2255p:feat/label-qr-code-only

Conversation

@Brandon2255p

@Brandon2255p Brandon2255p commented Nov 15, 2026 •

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)

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

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

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Brandon2255p Brandon2255p changed the title feat(labels): a label's QR can hold the code alone feat(labels): a label's QR can hold the code alone (small QR) Nov 16, 2026
@Brandon2255p

Copy link
Copy Markdown
Author

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

@Brandon2255p Brandon2255p reopened this Nov 16, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 16, 2026
@keptinventory keptinventory unlocked this conversation Nov 30, 2026
github-actions Bot added a commit that referenced this pull request Nov 30, 2026
- The phone PNGs' query keys carry the choice, so picking the code alone
  after the PNGs were made ahead makes new ones instead of sharing the
  old link QR (the thing's label preview and the print page).
- Tests: a browser that remembered the code starts on the code before
  anything is picked, and a label cell draws the 21-module QR for the code
  alone and a larger one for the link. qr.test.ts becomes .tsx to render it.
- Short IDs and labels, Printing: what each choice holds, that only Kept's
  scanner reads a code-only label, and that the choice is remembered on
  this browser; in every docs language.
- A straight apostrophe in "Kept's scanner".

Signed-off-by: Ibrahim Roshdy <22573766+ibrahimroshdy@users.noreply.github.com>

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.

2 participants