Skip to content

fix(cli): render scannable QR on Apple Terminal with full-cell ANSI - #135

Merged
snhsish merged 1 commit into
snhsish:mainfrom
okaynaffo:fix/cli-apple-terminal-qr-scannable
Oct 15, 2026
Merged

snhsish merged 1 commit into
snhsish:mainfrom
okaynaffo:fix/cli-apple-terminal-qr-scannable

Conversation

@okaynaffo

Copy link
Copy Markdown
Contributor

Closes #133.

Apple Terminal adds inter-line spacing and uses fonts that distort half-block glyph QRs (qrcode-terminal small:true with those block characters), so the mobile app could not scan the code.

Changes:

  • New packages/crosscode/src/qr.ts renders each module as a full terminal cell with explicit ANSI black/white backgrounds, EC M and 4-module quiet zone by default. No half-block glyphs, theme independent.
  • printTunnelQr keeps its provider signature and now supports --no-qr (URL only) and --small-qr / CROSSCODE_QR_SMALL=1 (compact full-cell, margin 2 + EC L).
  • Swaps qrcode-terminal for maintained qrcode (already used by web).
  • Docs (docs/cli.md) and changeset included.

Verified:

  • pnpm --filter crosscode build passes, tsc --noEmit clean.
  • Render check: 45-module payload yields 53 rows with margin 4, ANSI cells present, zero half-block chars; small mode 41 modules yields 45 rows.
  • node dist/cli.js help shows new flags; bundle no longer contains qrcode-terminal.

Replace qrcode-terminal half-block glyphs (small:true) with full-cell ANSI background rendering plus spec quiet zone, fixing unscannable codes on Terminal.app line spacing/fonts. Adds --no-qr and --small-qr options. Closes snhsish#133.
@vercel

vercel Bot commented Oct 15, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the snehasish Team on Vercel.

A member of the Team first needs to authorize it.

@snhsish
snhsish self-requested a review October 15, 2026 16:25
@snhsish
snhsish merged commit 5a40406 into snhsish:main Oct 15, 2026
4 of 5 checks passed
@okaynaffo

Copy link
Copy Markdown
Contributor Author

Superseded: force-push with corrected commit author did not sync to this PR. Opening a fresh PR from the corrected branch.

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.

CrossCode CLI (Apple Terminal) rendered QR fails to get scanned

2 participants