You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Simplify UsernameBadge to tier-only and add activity feed backfill
## UsernameBadge Simplification
- Simplified UsernameBadge to only require `tier` prop instead of
subscriptionStatus + subscriptionAmount + tier
- APIs now pre-compute effective tier using getEffectiveTier()
- UsernameBadge auto-fetches tier from /api/users/full-profile when not provided
- Updated SubscriptionTierBadge to use tier directly (deprecated old props)
- Updated all 29 call sites across the codebase
Tier values:
- 'inactive' = no subscription ($0/mo) - shows ban icon
- 'tier1' = Supporter ($10/mo) - 1 star
- 'tier2' = Advocate ($20/mo) - 2 stars
- 'tier3' = Champion ($30+/mo) - 3 stars with glow
## Activity Feed Backfill
- When spam filters remove recent content, API now expands time window
automatically (30 → 60 → 90 → 180 days) to find legitimate content
- Users see older but real activity instead of empty "No recent activity"
- Added helpful empty state message with "Adjust Filters" button when
spam filters cause no results
## Filter Toggles
- Added "show author" filter toggle to WhatLinksHere card
- Added "show author" filter toggle to Related Pages by Others card
- Both use animated filter row expansion with localStorage persistence
- Added `subheader` prop to PageLinksCard for filter rows
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: app/admin/design-system/sections/UsernameBadgeSection.tsx
+28-48Lines changed: 28 additions & 48 deletions
Original file line number
Diff line number
Diff line change
@@ -10,40 +10,32 @@ export function UsernameBadgeSection({ id }: { id: string }) {
10
10
id={id}
11
11
title="UsernameBadge"
12
12
path="app/components/ui/UsernameBadge.tsx"
13
-
description="Displays a user's username with subscription tier badge. Supports link and pill variants with different styling options."
13
+
description="Displays a user's username with subscription tier badge. Only requires userId, username, and tier - the tier is pre-computed by APIs. Supports link and pill variants."
<strong>Simplified Props:</strong> Only <codeclassName="bg-muted px-1 rounded">tier</code> is needed now. APIs pre-compute the effective tier.
202
+
</p>
203
+
<pclassName="text-sm text-muted-foreground mb-2">
204
+
<strong>Auto-fetch:</strong> If tier is not provided, the component fetches it from <codeclassName="bg-muted px-1 rounded">/api/users/full-profile</code>.
0 commit comments