Skip to content

fix: shrink device-flow QR and tighten dialog layout - #40

Merged
bergetjakob merged 5 commits into
mainfrom
feat/device-flow
Sep 14, 2026
Merged

bergetjakob merged 5 commits into
mainfrom
feat/device-flow

Conversation

@bergetjakob

Copy link
Copy Markdown
Contributor

Vad

Förbättringar av device flow-dialogen efter manuell testning i opencode TUI (uppföljning till #39):

  • Mindre QR-matris: EC-nivå M → L räcker för vår URL-längd → QR version 4 (33×33) istället för 5. Sparar flera terminalrader — viktigt eftersom opencodes instructions-dialog inte scrollar och är vertikalt centrerad.
  • Halvblock-rendering med quiet zone 2: kvadratiska pixlar (1 modul = 1 teckenbredd × 0,5 teckenhöjd), verifierat scanningsbar. Kvadrant- och sextant-rendering testades och förkastades (avlång/oskannbar — dokumenterat i commit-historiken).
  • Tätare layout: ─ or ─-dividern borttagen, giltighetstiden ihopslagen med fallback-raden (−4 rader).

Testat

  • Scannad med telefon mot både stage och prod
  • typecheck, lint, 66 tester gröna

Use EC level 'L' (one QR version smaller for our URL length) and a
1-module quiet zone, saving ~6 rows. The OpenCode instructions dialog
is not scrollable, so an oversized QR clips the modal on small screens.
2x2 modules per character (▘▝▖▗-style glyphs) instead of half-blocks:
the v4/L matrix now takes ~19 rows and ~19 cols instead of ~19 rows
and ~35 cols... i.e. half the width and half the height, so the
centered dialog fits small terminals. Verified decodable to the exact
verification_uri_complete with a ZXing round-trip.
Quadrant glyphs assume square terminal cells; cells are ~1:2 (w:h), so
the QR rendered twice as tall as wide. Half-blocks give square pixels
(1 module = 1 char wide, half a char tall). Keeps EC 'L' and a 2-module
quiet zone.
Drop the '─ or ─' divider and merge the validity note into the fallback
line, saving 4 rows of vertical space.
@bergetjakob
bergetjakob merged commit 2a8ca6c into main Sep 14, 2026
1 check passed
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