fix(po): keep export stamp clear of the signature (no overlap) #61

Merged
shad0w merged 1 commit from fix/stamp-no-overlap into master 2026-06-21 10:07:25 +00:00
Owner

Follow-up to #60. In the XLSX export, the company stamp slightly overlapped the right tail of the (centred) signature. Because uploaded signatures/stamps aren't always transparent PNGs, an opaque stamp would cover the signature or name there.

Fix

  • Extracted the signatory-block geometry into a tested helper lib/po-export-layout.tssignatoryLayout: the signature is centred over the name, and the stamp sits to its right with a 10px gap so it never overlaps the signature or name. With no signature, the stamp right-aligns in the block.
  • The export route now uses the helper instead of the inline overlap math.

Verification

  • Real export inspected from the file: signature 175–328px (centred in the 503px A-D block), stamp 338–405px → 10px gap, no overlap; stamp still drawn before the signature so it layers behind if a future asset is wide enough to touch.
  • New unit test po-export-layout.test.ts asserts centring + no-overlap (incl. the widest sig+stamp case). pnpm test green (204), type-check clean.

🤖 Generated with Claude Code

Follow-up to #60. In the XLSX export, the company stamp slightly overlapped the right tail of the (centred) signature. Because uploaded signatures/stamps **aren't always transparent PNGs**, an opaque stamp would cover the signature or name there. ## Fix - Extracted the signatory-block geometry into a tested helper `lib/po-export-layout.ts` → `signatoryLayout`: the signature is centred over the name, and the stamp sits to its **right with a 10px gap** so it never overlaps the signature or name. With no signature, the stamp right-aligns in the block. - The export route now uses the helper instead of the inline overlap math. ## Verification - Real export inspected from the file: signature 175–328px (centred in the 503px A-D block), stamp 338–405px → **10px gap, no overlap**; stamp still drawn before the signature so it layers behind if a future asset is wide enough to touch. - New unit test `po-export-layout.test.ts` asserts centring + no-overlap (incl. the widest sig+stamp case). `pnpm test` green (204), type-check clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
shad0w added 1 commit 2026-06-21 10:05:28 +00:00
fix(po): keep the export stamp clear of the signature (no overlap)
All checks were successful
PR checks / checks (pull_request) Successful in 35s
PR checks / integration (pull_request) Successful in 26s
65a9335de1
Uploaded signatures/stamps aren't always transparent PNGs, so an opaque stamp
overlapping the signature/name would cover them. Extract the signatory-block
geometry into a tested helper (signatoryLayout): the signature is centred over
the name and the stamp sits to its RIGHT with a 10px gap — never overlapping.

- lib/po-export-layout.ts (signatoryLayout) + unit test
- export route uses it instead of inline overlap math

Verified in a real export: signature 175-328px (centred), stamp 338-405px
(10px gap, no overlap), stamp drawn behind the signature.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Author
Owner

Reference issue #53

Reference issue #53
shad0w merged commit e4c4c370f6 into master 2026-06-21 10:07:25 +00:00
Sign in to join this conversation.
No description provided.