fix(#3945): require a non-empty denominator for milestone-complete (#4164)

* test(#3945): 0-of-0 milestone counters must not render complete

Regression coverage for the string-truthiness vacuous equality in both
statusline renderers: '0' counters, boundary 1/1 vs 0/1 vs 1/0, compact
parity.

* fix(#3945): require a non-empty denominator for milestone-complete

Both statusline renderers compared the regex-captured string counters
directly, so '0' && '0' && '0' === '0' fired Scene 3 on the empty set.
Numeric coercion plus total > 0 restores the guard's intent; all
non-zero shapes and percent=100 render byte-identically.

* chore(#3945): add changeset fragment

* chore(#3945): backfill changeset pr number

---------

Co-authored-by: sim <sim@local>
This commit is contained in:
Tom Boucher
2026-09-01 20:43:39 -04:00
committed by GitHub
parent c9bff8d2b9
commit 4c6643a8d7
3 changed files with 52 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
---
type: Fixed
pr: 4164
---
**Statusline no longer shows milestone complete at 0 of 0 phases** — the 0-of-0 counters a freshly-roadmapped milestone carries no longer read as every-phase-done (string truthiness made the equality vacuous); both the full and compact renderers now require a non-zero denominator. (#3945)