You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix receipt financial value truncation (F1) in main/printers/thermal.ts and main/printers/formatting-helpers.ts: never truncate or ellipsize quantities, unit rates, tax rates, or amounts on plugin/pack or standard receipts across 32 and 48 physical columns at normal, large, and extra-large text sizes; wrap or stack overflowed financial columns within paper-cell bounds, fail before sending bytes with an explicit overflow error if complete output is impossible, add behavioral tests measured with the ESC/POS column oracle, and open a PR against main.
What Changed
Borrow spare column width and stack overflowing item quantities, unit rates, tax rates (@rate%), addon prices, and summary amounts onto right-aligned continuation lines across standard, compact, compliance-pack, and raster receipt renderers (main/printers/formatting-helpers.ts, main/printers/thermal.ts, main/printers/document-classic.ts, main/printers/document-compact.ts, and shared/print/raster-canvas.ts) instead of truncating or ellipsizing financial digits.
Add assertFinancialValueFitsColumns and layout line-width guards to fail with an explicit overflow error before emitting print bytes when an unbreakable financial token exceeds the available column width.
Update docs/architecture/printing.md with the financial overflow rules and add ESC/POS column-oracle regression tests in tests/printer-text-size.test.ts covering 32- and 48-column receipts across normal, large, and extra-large text sizes.
Risk Assessment
✅ Low: The changes cleanly prevent truncation of financial quantities, rates, tax rates, and amounts across standard, plugin/pack, and raster receipt paths by rebalancing spare width, stacking overflowed financial columns, and failing early when an unbreakable financial token exceeds the printable width.
Testing
Installed workspace dependencies with npm ci (and npm --prefix frontend ci), fixed taxBreakdownRows in main/printers/formatting-helpers.ts and the frOrder addon fixture in tests/printer-text-size.test.ts, ran targeted suites (test:printer-text-size, test:receipt-column-oracle, test:receipt-column-width, test:print-parity, test:receipt-printing, test:print-document, test:raster), and drove all four live scenarios against the running FloCafe Express API server and a local TCP network printer socket; this is a thermal ESC/POS byte-generation backend change with no visual UI surface change, and all live and automated checks passed.
Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario
Result
Live
Evidence
Print a bill with 4-digit quantities (1250), multi-thousand line amounts ($24,987.50), multi-rate tax breakdowns (9+2.5, VAT @5%, CGST @9%, SGST @2.5%), negative adjustments ($-45.50), and discounts (…
Print the same high-value bill using standard classic and compact receipt templates across 32 and 48 physical columns and normal, large, and extra_large text sizes via POST /api/printers/print-bill to…
Print a French-locale receipt with space-grouped thousands (EUR1 234,56 / CHF1 234,56 and EUR24 987,50 / CHF24 987,50), a long decimal tax rate (@12.3456789%), and a zero-gap wrapped financial column…
Adversarial boundary: attempt to print a bill with an unbreakable 19-cell financial amount ($100,000,000,000.99) on a 32-column printer configured with extra_large text (16 effective columns) via POST…
🚨 main/printers/document-classic.ts:872 - Tax breakdown rows can still truncate or split tax rates instead of preserving them or throwing an overflow error. In main/printers/document-classic.ts:872-882 and main/printers/document-compact.ts:351-356, when rawLabel (${title} @${rate}%) plus value exceeds cols, labelOf(line.label) is truncated to Math.max(1, cols - 1 - displayCellWidth(rateSuffix)). Because truncate() in main/printers/formatting-helpers.ts:371-373 uses Math.max(1, length - 2) + '..', passing length <= 2 (e.g., on cols = 16 at extra_large when rateSuffix is 13-14 cells such as @12.3456789%) returns a 3-cell string ("S.."), making displayCellWidth(label) >= 16; financialRows() at main/printers/formatting-helpers.ts:270 then truncates safeLabel to cols - 1 (15 cells), chopping off the trailing % and digits of rateSuffix. Moreover, truncating labelOf(line.label) to cols - 1 - displayCellWidth(rateSuffix) always makes labelWidth = cols - 1, forcing financialRows() to stack onto 2 lines even when truncating the title to cols - 1 - displayCellWidth(value.trimStart()) - displayCellWidth(rateSuffix) would fit on 1 line. Finally, neither main/printers/document-classic.ts:863, main/printers/document-compact.ts:348, nor main/printers/thermal.ts:2794 (pluginSummaryRow at main/printers/thermal.ts:3372) calls assertFinancialValueFitsColumns on @${rate}%, so an unbreakably wide tax rate is silently truncated or split across lines by wrapText (main/printers/thermal.ts:3380), and main/printers/thermal.ts:3409-3412 still calls truncate(normalizedLabel, cols - 12) when labelCells <= Math.max(1, cols - 12).
🚨 main/printers/thermal.ts:2745 - In escposLineTemplateV1Lines (main/printers/thermal.ts:2745-2751), priced item addons on plugin/pack receipts are formatted via pushWrapped(addonLines, addonLabel + (addon.price ? ' ' + addonAmount : ''), cols, lang, capabilities). pushWrapped delegates to wrapToDisplayCells, which trims leading indentation and splits on whitespace (/\s+/). Because formatCurrency (main/printers/formatting-helpers.ts:351) converts non-breaking group spaces (\u00A0, \u202F) to ASCII spaces, any locale with space thousands grouping (e.g., fr-FR producing " €1 234,56") or space-separated currency prefix can be split mid-amount across two lines when wrapping occurs; even without internal spaces, wrapped addon prices are emitted left-aligned instead of right-aligned like addonRows (main/printers/formatting-helpers.ts:207-253). Use addonRows or right-aligned financial row stacking so pack addon prices are never split across lines.
🚨 main/printers/thermal.ts:3110 - In main/printers/thermal.ts:3110-3112, isPluginItemColumn treats any column with column.wrap === true as an item-label column (return column.wrap === true || column.key === 'item'). If a pack template sets wrap: true on a financial column (quantity, rate, taxRate, or amount), pluginItemRows (main/printers/thermal.ts:3195,3213,3224) skips assertFinancialValueFitsColumns and routes the financial column through wrapPluginItemColumn (main/printers/thermal.ts:3148-3168), which wraps and truncates/ellipsizes financial digits with ... Additionally, when layout.lineItems is omitted (main/printers/thermal.ts:3057-3080) or gap === 0 (main/printers/thermal.ts:2360,3116), fitPluginRowColumns shrinks columns down to displayCellWidth(value) with zero separator spaces, concatenating adjacent columns (e.g., "Co1250$24,987.50" at cols = 16 or adjacent numeric columns). Ensure financial column keys (quantity, rate, taxRate, amount) are never classified as item columns and preserve at least 1 cell of separation between adjacent single-line columns or stack when separation cannot fit.
⚠️shared/print/raster-canvas.ts:100 - In shared/print/raster-canvas.ts:100-167, paintRasterRequest only rebalances column widths when hasRatios is true (which is false for summaryLayout in main/printers/thermal.ts:2579-2585 and main/printers/document-classic.ts:998-1004, where columns.length === 2 caps widths[1] at Math.floor(available * 0.45) at shared/print/raster-canvas.ts:138-142), and when financial columns (index >= 1) still exceed their single-row pixel allocation (for example, a 4-column pack row with 'Café', 2, '$617.28', '$1,234.56' at extra_large on 32 columns where scaleX = 2 requires 408px for the financial columns alone on a 384px head), shared/print/raster-canvas.ts:159 calls wrap(column.text, widths[index]) on every column and splits financial numbers mid-token across lines (e.g., '$6' / '17' / '.2' / '8'). When any financial column (index >= 1) cannot fit on a single raster row after borrowing spare width, stack the wrapped label row(s) and right-aligned full-width financial continuation line(s) instead of wrapping financial tokens mid-number (and fail if a single financial token exceeds request.widthDots).
🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario
Result
Live
Evidence
Print a bill with 4-digit quantities (1250), multi-thousand line amounts ($24,987.50), multi-rate tax breakdowns (9+2.5, VAT @5%, CGST @9%, SGST @2.5%), negative adjustments ($-45.50), and discounts (…
Print the same high-value bill using standard classic and compact receipt templates across 32 and 48 physical columns and normal, large, and extra_large text sizes via POST /api/printers/print-bill to…
Print a French-locale receipt with space-grouped thousands (EUR1 234,56 / CHF1 234,56 and EUR24 987,50 / CHF24 987,50), a long decimal tax rate (@12.3456789%), and a zero-gap wrapped financial column…
Adversarial boundary: attempt to print a bill with an unbreakable 19-cell financial amount ($100,000,000,000.99) on a 32-column printer configured with extra_large text (16 effective columns) via POST…
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
Preserve overflowing financial values on thermal receipts
🐞 Bug fix🧪 Tests📝 Documentation🕐 40+ Minutes
AI Description
• Borrow space or stack financial values instead of truncating them across receipt formats.
• Reject values that cannot fit before emitting print bytes.
• Document overflow rules and test physical widths across paper sizes and text scales.
The following are alternative approaches to this PR:
1. Unified financial-row layout plan
➕ Could centralize overflow decisions across text and raster renderers.
➖ Requires a broader renderer refactor and must reconcile character-cell and pixel measurements.
Recommendation: Keep the targeted approach for this fix: shared text helpers cover standard receipts, while pack and raster paths retain their distinct layout requirements. Consider a unified layout plan only if further cross-renderer changes justify the migration.
Files changed (7) +1704 / -227
Bug fix (5) +978 / -226
document-classic.tsPreserve tax rates in classic receipt breakdowns+9/-2
Preserve tax rates in classic receipt breakdowns
• Routes tax breakdown rows through the new layout helper instead of truncating the label containing the rate.
formatting-helpers.tsFit or stack standard receipt financial rows+163/-32
Fit or stack standard receipt financial rows
• Adds explicit width checks and adjusts item, addon, summary, and tax-breakdown rows to retain complete financial values. Values that exceed the available line width now raise an overflow error.
• Rebalances pack item columns or stacks financial values when a row cannot fit, without ellipsizing them. Pack addons use the shared financial-row helper, and tax summary amounts and rate tokens receive width checks.
printer-text-size.test.tsExercise receipt financial overflow across renderers+720/-0
Exercise receipt financial overflow across renderers
• Adds ESC/POS column-oracle checks for 32- and 48-column receipts at multiple text sizes. Tests also cover unprintable values, tax rates, localized addon prices, zero-gap pack layouts, and raster fitting.
khaira777
changed the title
fix(printers): stack overflowing receipt financial values without truncation
fix(print): stack overflowing receipt amounts
Oct 28, 2026
assertFinancialValueFitsColumns rejects the width of the entire normalized amount, even when each
whitespace-delimited group fits on a line. On a 32-column printer at extra-large size, a
French-formatted EUR123 456 789,90 amount throws in financialRows or itemRows before receipt
bytes are built, although its groups can be wrapped within the 16-column layout.
ⓘ Recommendations generated based on similar findings in past PRs
Evidence
formatCurrency retains locale grouping spaces, while layoutColumnsForTextSize halves 32 columns
to 16 for extra-large text. The new whole-value check throws before the row helpers can emit
continuation lines; the existing display-cell wrapper demonstrates that whitespace-delimited groups
can instead occupy separate lines.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
The financial-width assertion rejects a complete locale-grouped value that exceeds one line even when every whitespace-delimited group fits. Simply removing the assertion is insufficient: the current stacked paths pad a complete value onto one line, where later encoding can truncate it.
## Fix Focus Areas
- main/printers/formatting-helpers.ts[114-129]
- main/printers/formatting-helpers.ts[182-203]
- main/printers/formatting-helpers.ts[269-291]
- main/printers/thermal.ts[3299-3327]
## Recommended Fix
Reject only financial groups that cannot fit a physical line, and emit longer breakable values as multiple complete, right-aligned lines. Apply the same rule to item, addon, summary, and plugin continuation paths; test grouped amounts at the 16-column extra-large layout.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
2. Tax-rate overflow check is written three times✗ Dismissed
Description
The compliance-pack tax loop in escposLineTemplateV1Lines builds rateToken and calls
assertFinancialValueFitsColumns(rateToken, cols, 'tax rate'). Its own callee pluginSummaryRow
then pulls the same @rate% back out of the label with a regex and asserts it again, and
taxBreakdownRows has a third copy of the same has-rate and rate-token logic. If someone later
changes how rates are formatted or validated (for example the % suffix or spacing) and updates
only one copy, the regex in pluginSummaryRow can stop matching and that renderer's rate check
stops running without any error.
Duplication is plausible, but history lacks a close precedent for consolidating these tax-rate
validations.
ⓘ Recommendations generated based on similar findings in past PRs
Evidence
thermal.ts:2805-2810 checks the rate token before calling pluginSummaryRow, and pluginSummaryRow
(thermal.ts:3437-3440) runs the same check again by regex-matching the label. taxBreakdownRows in
formatting-helpers.ts:302-307 repeats the has-rate and token-building logic.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
The `@rate%` token is built and checked for overflow in three separate places. `pluginSummaryRow` gets the rate back by running a regex over a label that its caller already built.
## Fix Focus Areas
- main/printers/thermal.ts[2805-2810]
- main/printers/thermal.ts[3437-3440]
- main/printers/formatting-helpers.ts[302-307]
## Recommended Fix
Export a `formatTaxRateToken(rate, cols)` helper from formatting-helpers.ts. It should return the token, or '' when there is no rate, and run the overflow check. Call it from `taxBreakdownRows` and from the thermal.ts tax loop. Then delete the regex check in `pluginSummaryRow`, or give the function an explicit rate parameter instead.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
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
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.
Intent
Fix receipt financial value truncation (F1) in
main/printers/thermal.tsandmain/printers/formatting-helpers.ts: never truncate or ellipsize quantities, unit rates, tax rates, or amounts on plugin/pack or standard receipts across 32 and 48 physical columns at normal, large, and extra-large text sizes; wrap or stack overflowed financial columns within paper-cell bounds, fail before sending bytes with an explicit overflow error if complete output is impossible, add behavioral tests measured with the ESC/POS column oracle, and open a PR againstmain.What Changed
@rate%), addon prices, and summary amounts onto right-aligned continuation lines across standard, compact, compliance-pack, and raster receipt renderers (main/printers/formatting-helpers.ts,main/printers/thermal.ts,main/printers/document-classic.ts,main/printers/document-compact.ts, andshared/print/raster-canvas.ts) instead of truncating or ellipsizing financial digits.assertFinancialValueFitsColumnsand layout line-width guards to fail with an explicit overflow error before emitting print bytes when an unbreakable financial token exceeds the available column width.docs/architecture/printing.mdwith the financial overflow rules and add ESC/POS column-oracle regression tests intests/printer-text-size.test.tscovering 32- and 48-column receipts across normal, large, and extra-large text sizes.Risk Assessment
✅ Low: The changes cleanly prevent truncation of financial quantities, rates, tax rates, and amounts across standard, plugin/pack, and raster receipt paths by rebalancing spare width, stacking overflowed financial columns, and failing early when an unbreakable financial token exceeds the printable width.
Testing
Installed workspace dependencies with npm ci (and npm --prefix frontend ci), fixed taxBreakdownRows in main/printers/formatting-helpers.ts and the frOrder addon fixture in tests/printer-text-size.test.ts, ran targeted suites (test:printer-text-size, test:receipt-column-oracle, test:receipt-column-width, test:print-parity, test:receipt-printing, test:print-document, test:raster), and drove all four live scenarios against the running FloCafe Express API server and a local TCP network printer socket; this is a thermal ESC/POS byte-generation backend change with no visual UI surface change, and all live and automated checks passed.
Evidence: Live FloCafe server and TCP printer receipt overflow verification transcript
=== Live FloCafe Server started on http://127.0.0.1:34101, TCP Printer listening on 127.0.0.1:62529 === Created default network printer via POST /api/printers: id=f7cd9766-aff5-41b4-ae05-12d81f8857fd --- SCENARIO 1: Pack receipt across 32 & 48 physical columns and all text sizes --- [PASS] Pack cols-32 text_size=normal: bytes=1063, maxCells=32/32, unconsumedControlBytes=0 [PASS] Pack cols-32 text_size=large: bytes=1063, maxCells=32/32, unconsumedControlBytes=0 [PASS] Pack cols-32 text_size=extra_large: bytes=936, maxCells=32/32, unconsumedControlBytes=0 [PASS] Pack cols-48 text_size=normal: bytes=1360, maxCells=48/48, unconsumedControlBytes=0 [PASS] Pack cols-48 text_size=large: bytes=1360, maxCells=48/48, unconsumedControlBytes=0 [PASS] Pack cols-48 text_size=extra_large: bytes=1113, maxCells=48/48, unconsumedControlBytes=0 --- SCENARIO 2: Standard classic and compact receipts across 32 & 48 physical columns and all text sizes --- [PASS] Standard classic cols-32 text_size=normal: bytes=821, maxCells=32/32 [PASS] Standard classic cols-32 text_size=large: bytes=821, maxCells=32/32 [PASS] Standard classic cols-32 text_size=extra_large: bytes=730, maxCells=32/32 [PASS] Standard classic cols-48 text_size=normal: bytes=1032, maxCells=48/48 [PASS] Standard classic cols-48 text_size=large: bytes=1032, maxCells=48/48 [PASS] Standard classic cols-48 text_size=extra_large: bytes=764, maxCells=48/48 [PASS] Standard compact cols-32 text_size=normal: bytes=919, maxCells=32/32 [PASS] Standard compact cols-32 text_size=large: bytes=919, maxCells=32/32 [PASS] Standard compact cols-32 text_size=extra_large: bytes=796, maxCells=32/32 [PASS] Standard compact cols-48 text_size=normal: bytes=1162, maxCells=48/48 [PASS] Standard compact cols-48 text_size=large: bytes=1162, maxCells=48/48 [PASS] Standard compact cols-48 text_size=extra_large: bytes=846, maxCells=48/48 --- SCENARIO 3: French EUR receipt with space-grouped thousands, long decimal tax rate, and zero-gap wrapped financial columns --- [PASS] FR template=fr-zero-gap-live cols-32 text_size=normal: preview EUR maxCells=32/32, TCP CHF maxCells=32/32 [PASS] FR template=fr-zero-gap-live cols-32 text_size=large: preview EUR maxCells=32/32, TCP CHF maxCells=32/32 [PASS] FR template=fr-zero-gap-live cols-32 text_size=extra_large: preview EUR maxCells=32/32, TCP CHF maxCells=32/32 [PASS] FR template=classic cols-32 text_size=normal: preview EUR maxCells=32/32, TCP CHF maxCells=32/32 [PASS] FR template=classic cols-32 text_size=large: preview EUR maxCells=32/32, TCP CHF maxCells=32/32 [PASS] FR template=classic cols-32 text_size=extra_large: preview EUR maxCells=32/32, TCP CHF maxCells=32/32 [PASS] FR template=compact cols-32 text_size=normal: preview EUR maxCells=32/32, TCP CHF maxCells=32/32 [PASS] FR template=compact cols-32 text_size=large: preview EUR maxCells=32/32, TCP CHF maxCells=32/32 [PASS] FR template=compact cols-32 text_size=extra_large: preview EUR maxCells=32/32, TCP CHF maxCells=32/32 --- SCENARIO 4: Adversarial guard - Unbreakable financial value exceeding line width fails before sending bytes --- [PASS] Adversarial overflow rejected for template=us-pack-overflow-live: HTTP 502, detail="Receipt item rate column "$100,000,000,000.99" (19 cells) overflows available line width (16 columns)", TCP jobs emitted=0 [PASS] Adversarial overflow rejected for template=classic: HTTP 502, detail="Receipt item amount "$100,000,000,000.99" (19 cells) overflows available line width (16 columns)", TCP jobs emitted=0 [PASS] Adversarial overflow rejected for template=compact: HTTP 502, detail="Receipt item amount "$100,000,000,000.99" (19 cells) overflows available line width (16 columns)", TCP jobs emitted=0Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 4 issues found → auto-fixed ✅
main/printers/document-classic.ts:872- Tax breakdown rows can still truncate or split tax rates instead of preserving them or throwing an overflow error. Inmain/printers/document-classic.ts:872-882andmain/printers/document-compact.ts:351-356, whenrawLabel(${title} @${rate}%) plusvalueexceedscols,labelOf(line.label)is truncated toMath.max(1, cols - 1 - displayCellWidth(rateSuffix)). Becausetruncate()inmain/printers/formatting-helpers.ts:371-373usesMath.max(1, length - 2) + '..', passinglength <= 2(e.g., oncols = 16atextra_largewhenrateSuffixis 13-14 cells such as@12.3456789%) returns a 3-cell string ("S.."), makingdisplayCellWidth(label) >= 16;financialRows()atmain/printers/formatting-helpers.ts:270then truncatessafeLabeltocols - 1(15 cells), chopping off the trailing%and digits ofrateSuffix. Moreover, truncatinglabelOf(line.label)tocols - 1 - displayCellWidth(rateSuffix)always makeslabelWidth = cols - 1, forcingfinancialRows()to stack onto 2 lines even when truncating the title tocols - 1 - displayCellWidth(value.trimStart()) - displayCellWidth(rateSuffix)would fit on 1 line. Finally, neithermain/printers/document-classic.ts:863,main/printers/document-compact.ts:348, normain/printers/thermal.ts:2794(pluginSummaryRowatmain/printers/thermal.ts:3372) callsassertFinancialValueFitsColumnson@${rate}%, so an unbreakably wide tax rate is silently truncated or split across lines bywrapText(main/printers/thermal.ts:3380), andmain/printers/thermal.ts:3409-3412still callstruncate(normalizedLabel, cols - 12)whenlabelCells <= Math.max(1, cols - 12).main/printers/thermal.ts:2745- InescposLineTemplateV1Lines(main/printers/thermal.ts:2745-2751), priced item addons on plugin/pack receipts are formatted viapushWrapped(addonLines, addonLabel + (addon.price ? ' ' + addonAmount : ''), cols, lang, capabilities).pushWrappeddelegates towrapToDisplayCells, which trims leading indentation and splits on whitespace (/\s+/). BecauseformatCurrency(main/printers/formatting-helpers.ts:351) converts non-breaking group spaces (\u00A0,\u202F) to ASCII spaces, any locale with space thousands grouping (e.g.,fr-FRproducing" €1 234,56") or space-separated currency prefix can be split mid-amount across two lines when wrapping occurs; even without internal spaces, wrapped addon prices are emitted left-aligned instead of right-aligned likeaddonRows(main/printers/formatting-helpers.ts:207-253). UseaddonRowsor right-aligned financial row stacking so pack addon prices are never split across lines.main/printers/thermal.ts:3110- Inmain/printers/thermal.ts:3110-3112,isPluginItemColumntreats any column withcolumn.wrap === trueas an item-label column (return column.wrap === true || column.key === 'item'). If a pack template setswrap: trueon a financial column (quantity,rate,taxRate, oramount),pluginItemRows(main/printers/thermal.ts:3195,3213,3224) skipsassertFinancialValueFitsColumnsand routes the financial column throughwrapPluginItemColumn(main/printers/thermal.ts:3148-3168), which wraps and truncates/ellipsizes financial digits with... Additionally, whenlayout.lineItemsis omitted (main/printers/thermal.ts:3057-3080) orgap === 0(main/printers/thermal.ts:2360,3116),fitPluginRowColumnsshrinks columns down todisplayCellWidth(value)with zero separator spaces, concatenating adjacent columns (e.g.,"Co1250$24,987.50"atcols = 16or adjacent numeric columns). Ensure financial column keys (quantity,rate,taxRate,amount) are never classified as item columns and preserve at least 1 cell of separation between adjacent single-line columns or stack when separation cannot fit.shared/print/raster-canvas.ts:100- Inshared/print/raster-canvas.ts:100-167,paintRasterRequestonly rebalances column widths whenhasRatiosis true (which is false forsummaryLayoutinmain/printers/thermal.ts:2579-2585andmain/printers/document-classic.ts:998-1004, wherecolumns.length === 2capswidths[1]atMath.floor(available * 0.45)atshared/print/raster-canvas.ts:138-142), and when financial columns (index >= 1) still exceed their single-row pixel allocation (for example, a 4-column pack row with'Café',2,'$617.28','$1,234.56'atextra_largeon 32 columns wherescaleX = 2requires 408px for the financial columns alone on a 384px head),shared/print/raster-canvas.ts:159callswrap(column.text, widths[index])on every column and splits financial numbers mid-token across lines (e.g.,'$6' / '17' / '.2' / '8'). When any financial column (index >= 1) cannot fit on a single raster row after borrowing spare width, stack the wrapped label row(s) and right-aligned full-width financial continuation line(s) instead of wrapping financial tokens mid-number (and fail if a single financial token exceedsrequest.widthDots).🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
npm run test:printer-text-sizenpm run test:receipt-column-oraclenpm run test:receipt-column-widthnpm run test:print-paritynpm run test:receipt-printingnpm run test:print-documentnpm run test:rasternode tests/run-electron-node-test.cjs /tmp/live-receipt-overflow-e2e.ts✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.