mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-24 10:46:50 -06:00
An icon-set rule without stored thresholds (every rule made by home.conditionalFormat, and the sales sample) was written as an empty <iconSet>, which CT_IconSet forbids (cfvo minOccurs 2); openpyxl drops it. The writer now always emits one cfvo per icon: the stored thresholds when there is one per icon, the lower bound prepended when it is missing, else Excel's defaults (percent 0/33/67, 0/25/50/75, 0/20/40/60/80). Evaluation read the thresholds as one fewer than the icons, but files carry one per icon (the first is the lower bound), so thresholds read from a file were ignored. Both now share icon_count and default_icon_thresholds in gridcraft-model; icon_count is clamped to 3..=5 so a set name like "0Foo" can't underflow k - 1. generated with Claude Code