Repository navigation
fix(printer): preserve IR raw ESC/POS financial lines and layout bounds - #273
Merged
Merged
Conversation
18 tasks done
khaira777
added a commit
that referenced
this pull request
Aug 13, 2026
khaira777
force-pushed
the
fix/241-ir-thermal-receipt-safety
branch
from
August 16, 2026 23:49
683460e to
4decc37
Compare
khaira777
marked this pull request as ready for review
August 16, 2026 23:50
khaira777
added a commit
that referenced
this pull request
Aug 17, 2026
… capability (#355) * feat(printers): gate Arabic thermal output behind shaping capability Add an explicit `arabicShaping` capability flag to printer profiles and thread it through every raw ESC/POS encoder (receipt, plugin template, and KOT). Arabic/Persian script is now only emitted when the profile declares shaping support; otherwise it is skipped with a precise warning and financial lines keep their ASCII currency fallback (ریال → IRR), so corrupted or unshaped glyphs can never reach the printer. Defaults to off (safe) for every existing profile, matching the #273 financial-line protection. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <[email protected]> * no-mistakes(document): Verify printer shaping docs and fix thermal lint --------- Co-authored-by: Codebuff <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
ریال) symbol toIRRand enforce Latin numerals for raw ESC/POS thermal printing across backend and frontend encoders while preserving native Persian formatting for browser prints.usePrinterdirectly throughprintWebBillHTML generation rather than decoding ESC/POS byte buffers, and add tests for IR receipt encoding and layout constraints.Risk Assessment
✅ Low: The changes cleanly and safely normalize the Iranian Rial currency symbol to ASCII IRR and enforce Latin numerals for ESC/POS thermal printing while preserving Persian output for browser printing, backed by comprehensive end-to-end receipt formatting tests.
Testing
Executed the full printer test suite and targeted receipt/currency validation suites covering backend thermal formatting, frontend raw ESC/POS encoders, browser HTML print generation, column constraint invariants, and unsupported character warning contracts; all 287 assertions and all 8 test suites passed with zero failures.
Evidence: Browser HTML Receipt (Persian Rial & Numerals Preserved)
/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06FWAEBR1CP1GKM5JMAD0Y9/escpos-receipts-ir.txt) - Evidence: Interactive HTML Preview of Rendered Thermal Receipts (local file:/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06FWAEBR1CP1GKM5JMAD0Y9/rendered-thermal-preview.html)Pipeline
Updates from git push no-mistakes
⏭️ **intent** - skipped
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
ts-node --transpile-only -P tests/tsconfig.json tests/printer.test.tsnpm run test:printer-apinpm run test:printer-width-refreshnpm run test:printer-migrationsnpm run test:receipt-column-widthnpm run test:receipt-printingnpm run test:bills-print-apinpm run test:currencynpm run test:issue-266-currency-symbol-printEnd-to-end receipt rendering artifact generation for Iranian Rial (IR/IRR) across all ESC/POS thermal templates and browser HTML print paths✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.