Skip to content

fix(signal): finish the two hand-offs — badge overflow and a comment that lied - #500

Merged
runyourempire merged 2 commits into
mainfrom
fix/handoff-badge-and-stale-comment
Aug 21, 2026
Merged

fix(signal): finish the two hand-offs — badge overflow and a comment that lied#500
runyourempire merged 2 commits into
mainfrom
fix/handoff-badge-and-stale-comment

Conversation

@runyourempire

Copy link
Copy Markdown
Collaborator

Finishing the two hand-offs from #499

Both files were claimed in flight by peer lanes when the surrounding work landed, so they were documented and deliberately left alone rather than handing an active peer a mid-flight merge conflict. Both lanes have since released them.

Badge overflow

Subscription renewed is 20 characters against a ~16 budget, and the email header has no media query to save it — Gmail strips <style> in several contexts, so the three header cells must fit unaided on a 320px phone. It overflowed, wrapped the row and squeezed the wordmark. Now Renewal.

The test pinning the old string failed, which is exactly what it was for. Rather than just swap the literal, the assertion now checks the budget: it extracts whatever badge was rendered and fails if it exceeds BADGE_MAX_CHARS. The next person who writes a more descriptive badge fails here instead of in a customer's inbox.

Revert-checked — restoring Subscription renewed makes it fail, naming both the offending string and its length.

A comment that lied

license/activate.js said "there is no event-id dedup store" while dedup has existed since #494 — twenty lines from the LICENSE_KV call that implements it. #497 moved the file and carried the wrong comment along with it.

The fix is deliberately not deletion. The guard that comment sits above is still load-bearing, and saying so is the whole point:

  • dedup suppresses a redelivery of the same event id
  • this guard catches a genuinely new invoice.paid arriving after a refund or dispute

Two different defences against two different failures. The comment now says which is which, instead of denying that the other one exists.

Verification

212 script tests pass. The badge guard is revert-checked in both directions.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Fq96xWyPQjx2bCCzWtsnC9

…that lied

Both files were claimed in flight by peer lanes when the surrounding work
landed (#499), so they were documented and left alone rather than handed a
mid-flight merge conflict. Both lanes have since released them.

BADGE. `Subscription renewed` is 20 characters against a ~16 budget, and
the email header has no media query to save it -- Gmail strips <style> in
several contexts, so the three header cells must fit unaided on a 320px
phone. It overflowed, wrapped the row and squeezed the wordmark. Now
`Renewal`.

The test that pinned the old string failed, which is exactly what it was
for. Rather than just swap the literal, the assertion now checks the
BUDGET: it extracts whatever badge was rendered and fails if it exceeds
BADGE_MAX_CHARS. The next person who writes a more descriptive badge fails
here instead of in a customer's inbox. Revert-checked -- restoring
`Subscription renewed` makes it fail naming the string and its length.

STALE COMMENT. license/activate.js said "there is no event-id dedup store"
while dedup has existed since #494, twenty lines from the LICENSE_KV call
that implements it. #497 moved the file, carrying the wrong comment with
it.

The fix is not deletion: the guard the comment sits above is still
load-bearing, and saying so is the point. Dedup only suppresses a REDELIVERY
of the same event id; this guard catches a genuinely NEW invoice.paid
arriving after a refund or dispute. Two different defences against two
different failures, and the comment now says which is which.

212 script tests pass.
@runyourempire
runyourempire enabled auto-merge (squash) August 21, 2026 02:04
@runyourempire
runyourempire merged commit 78fef93 into main Aug 21, 2026
10 checks passed
@runyourempire
runyourempire deleted the fix/handoff-badge-and-stale-comment branch August 21, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant