description: Lab case QR share link — access token, focus page, auth redirect, Cases QR UI. Use when changing share links, /lab-case/[token], lab-case-access API, or post-login redirect from share URLs.
---
# Lab case share link
Shipped cases get a stable **access token** and share URL. QR + link open a focused tasks page with comments — not a public page; JWT + org context required.
| QR UI | `LabCaseShareQrCode`, `LabCaseShareQrDialog`, thumb in `CaseDetailPanel` |
| QR package | `react-qr-code` (frontend only — no backend QR generation) |
**Cases detail header:** attachment preview **left**, QR thumb **right**, same row (`w-24 sm:w-32`). QR opens dialog (large QR + URL + copy); no inline copy on panel. Only when `shareUrl` present (sent case).
3. After login + org ready: **one**`consumeAuthRedirect()` on login page (wait for `!isLoading` and org selected).
4.**Do not**`consumeAuthRedirect()` inside `useAuth.login()` — double consume sends user to `/today`.
5. Multi-org: redirect stays in storage until `selectOrganization()` consumes it.
## Tasks tab interaction
Grouped sort (`sortBy=date`): **one comments control on case header** (`expandedCommentsCaseId`), not per task row. Flat sort unchanged (`showCommentsButton={flatMode}`).
## i18n
-`cases.*` — QR dialog strings (`shareQrDialogTitle`, `copyShareLink`, …)
-`labCaseAccess.*` — focus page strings
-`errors.LAB_CASE_ACCESS_DENIED` — all three locales
## Verify
- Backend: `npm run build`; apply migration for `accessToken`.