Same issue as the cards just removed from cream-elegance: a hardcoded
['РЫБНЫЕ','МЯСНЫЕ','ВЕГЕТАРИАНСКИЕ','САЛАТЫ','ДЕСЕРТЫ'] tab row that
had nothing to do with what was actually in the order (an order with
zero vegetarian items still showed a "ВЕГЕТАРИАНСКИЕ" tab as if
active/relevant). Now derives the chip row from the distinct
categoryName values actually present on the order's items, and
renders nothing if that data isn't available.
Verified this pass end-to-end rather than just by inspection:
- Real "Скачать PDF" pipeline (sunClientOfferDebugPdf) produces a
valid application/pdf blob with a correct %PDF-1.4 header, not just
canvases.
- Confirmed Canvas text genuinely falls back through the font stack
(measured identical metrics for an unregistered font vs. Georgia
directly, and document.fonts.load() resolves instantly for a
never-registered family) -- so a blocked/unreachable Google Fonts
degrades silently to Georgia/Arial instead of hanging or erroring,
which matters given this app already had to work around Russia
connectivity issues elsewhere.
- Re-rendered all 6 templates against deliberately adversarial data
(150+ word event name, 44-char client name, 350 guests, a
million-ruble price, an item with no photo/price/category, a long
promo code) -- no crashes, no overlap, graceful ellipsis truncation
throughout.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>