-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.log
More file actions
15 lines (13 loc) · 856 Bytes
/
.log
File metadata and controls
15 lines (13 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Execution Log
## 2024-12-23 fix: Plan name shows as undefined on upgrade page
- **Root cause:** Components passed undefined planId directly to getPlanById(), which returns undefined. This undefined value was rendered as text "undefined" in the UI when users had no subscription.
- **Solution:** Added two new helper functions:
- `getDisplayPlanName(planId)` - Returns "Free" for undefined/null/unknown planIds
- `getPlanOrDefault(planId)` - Returns Free plan object for undefined/null/unknown planIds
- Updated UpgradePage.tsx and BillingOverview.tsx to use getPlanOrDefault()
- **Files changed:**
- src/lib/plans.ts (added helper functions)
- src/components/UpgradePage.tsx (use getPlanOrDefault)
- src/components/BillingOverview.tsx (use getPlanOrDefault)
- tests/plan-display.test.ts (added verification tests)
- **Tests:** 19 passing