Repository navigation
Description
Problem
The billing model has too many statuses for what is, in practice, one question: does this person pay?
Today a member who doesn't pay can show up as any of these, depending on how they got there:
| Where | Values |
|---|---|
STATUS.exemption (lib/ui/status.ts) |
comp, exempt, grandfathered, notRequired |
User.exemptReason (free-form string, prisma/schema.prisma) |
"comp", "grandfathered", "invite", plus whatever toggleExempt is passed |
Membership.exemption (lib/member/membership.ts) |
"comp" or "notRequired" (a different split again) |
SubscriptionStatus + none |
ACTIVE, PAST_DUE, UNPAID, CANCELED, INCOMPLETE, none |
Several of these mean the same thing to an admin and behave identically in code. evaluateRevokeGuard, lib/access.ts and the Discord role metadata only look at isExempt and never at the reason. The reason is only used to pick a badge label. The result is a Subscription column and a Billing tab where "Comp", "Exempt", "Grandfathered" and "Not required" all read as distinct states.
I also don't like "grandfathered". It's jargon, it describes history rather than the current state, and it only exists because of the one-time migration that exempted everyone when Stripe was first enabled (see docs/stripe.md#grandfathering-existing-members).
Proposal
Use one word for members who don't pay: Exempt.
isExemptstays the only thing that grants access without a subscription. Behavior oflib/access.ts, the revoke guard, watchlist entitlement and Discord metadata does not change.- Collapse the badge states to
Exempt(non-paying member) andNot required(admins and the owner, who are implied exempt and never need a toggle). Dropcompandgrandfatheredas distinct labels. - Keep a short, optional free-text note (e.g. "friend of the family", "IT support") for the admin's own context. Show it as the sub-line on the badge, where
Set by {by}is today. It carries no behavior. - Rename in the UI and docs: "Grant comp access" becomes "Mark as exempt" or similar, and the dialogs, toasts, README,
docs/stripe.mdanddocs/operations.mdstop saying comp / grandfather. The one-time migration instructions can say "exempt all existing members" instead. - Simplify
SubscriptionStatusdisplay too:PAST_DUEandUNPAIDalready render as the same "Past due" badge; confirm nothing else needs both values and merge in the UI.
Data
- Migration that normalizes
exemptReason: existing"comp","grandfathered"and"invite"values map to a note, or to null where the old value carries no information. Decide whether to keepexemptReasonas the note field or rename it (exemptNote). Needs aCHANGELOG.mdentry under Unreleased, since it touchesprisma/migrations/**. - Review
INVITE_EXEMPTIONinlib/invites/redemption.ts: invite-redeemed members become exempt with no reason at all, or with a note like "Joined by invite", rather than their own status.
Open questions
- Do invited members count as exempt, or "Free"? Today invite redemption marks them exempt with reason
invite. If invites remain a free path, "Exempt" covers it; otherwise "Free" might read better for them than "Exempt". Pick one word for the whole product. - Is there any real difference between comp'd and exempt in how you want to treat them? For example, should a comp'd member's access end at a date? If so, that is a new feature (exemption expiry), not a label.
- Keep a reason at all, or only a note? I lean toward only a free-text note.
Acceptance criteria
- The admin Users table, user detail Billing tab and member
/membershippage show at most one non-paying state (Exempt) plus Not required for admins/owner. - No user-facing copy, docs or README text uses "comp" or "grandfather" (the design-system check
npm run design:checkcan gain a rule for it). - Access decisions are unchanged: existing tests in
__tests__/lib/access.test.ts,lib/queue/jobs/stripe.tsrevoke-guard tests and watchlist entitlement tests pass without logic edits. - Migration maps existing
exemptReasonvalues, is reversible in effect (no data loss of who is exempt), and has a CHANGELOG entry. - Unit tests updated:
lib/ui/__tests__/status.test.ts, billing dialogs, users table, membership details.
Activity