~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

A pull's card keeps a green square for a line added beside many removed

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:serve/card-squares

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::squares gave 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 squares test adds size(1, 1000), now (1, 4), and size(1000, 1), (4, 1). CI runs it.

🤖 Generated with Claude Code

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.

Merged as ad73a18