Skip to content

Open pages by QR code keys in the front matter - #83

Open
markusressel wants to merge 1 commit into
masterfrom
qr-codes
Open

markusressel wants to merge 1 commit into
masterfrom
qr-codes

Conversation

@markusressel

Copy link
Copy Markdown
Member

QR/NFC stickers on things in the house open a wiki page, stable across rename and move. Requested by the web client; contract in docs/qr.md.

  • Front matter qr: a key, a list, or {key, label} entries. Keys are lowercased and must match [a-z0-9][a-z0-9-]{0,63}.
  • Tree meta.qr: [{key, label}] (valid keys only). There is no own event, since tree-changed covers it.
  • GET /qr/{key}/ (every role): 200 {key, label, item, title, lastScannedAt}, 409 qr-conflict, 410 qr-gone with lastPath, 404.
  • ?scan=1 records the scan time, for known keys only.
  • GET /qr/: codes, conflicts, invalid, gone.
  • activity.db migration 4: qr_codes(key, last_path, label, last_scanned_at). It is updated on tree changes, and rows are kept, so 410 keeps working.
  • Feature qr-codes in /server-info/. OpenAPI updated.

Tests: go test ./... and golangci-lint are clean.

🤖 Generated with Claude Code

Pages carry keys in the front matter `qr`. GET /qr/{key}/ finds the page,
409 for a key on two pages, 410 with the last path for a key no page has
any more. activity.db remembers the keys and the scans (?scan=1).
GET /qr/ lists codes, conflicts, invalid values and gone keys. The tree
meta has `qr`. Feature `qr-codes`, see docs/qr.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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