chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
A pull's card keeps a green square for a line added beside many removed
Merged Approved
This caps the red squares at 4 when any line was added, so the added side keeps at least one green square. I checked the edge cases by hand. (1, 1000) gives (1, 4). (1000, 1) gives (4, 1) because red rounds up to 1. (0, 3) stays (0, 5), and (1, 1) is unchanged at (2, 3). Nothing is left to fix, and the new test assertions cover both directions.
All checks have passed
8 passed, 2 skipped
Merged as ad73a18
What changes
A pull's card that adds a few lines and removes many now shows at least one green square, as it does a red one for the reverse. With 1 line added and 1000 removed, the squares were five red and are now one green and four red.
Why
Size::squaresgave the removed side its square by rounding up, and nothing kept one for the added side. The review of A pull's card counts what it changes, and cards show when, not state asked for this, and that pull merged before the fix reached it.How it was checked
The
squarestest addssize(1, 1000), now(1, 4), andsize(1000, 1),(4, 1). CI runs it.🤖 Generated with Claude Code