Commit 329f69f
committed
feat: Complete admin state simulator integration and authentication fixes
🎭 Admin State Simulator:
- Add comprehensive admin state simulator with authentication, subscription, and token earnings simulation
- Integrate simulator with WriterTokenDashboard to properly reflect simulated token states
- Support unfunded (logged-out/no-subscription), funded pending, and locked available token states
- Add proper USD value calculations (10 tokens = ) matching real system
🔐 Authentication & Session Management:
- Fix session-based authentication for account switching functionality
- Update auth helpers to properly handle session cookies vs Firebase Auth
- Resolve permission-denied errors in earnings page by using correct auth context
- Add SessionAuthInitializer for hybrid session system
🧹 Code Cleanup:
- Remove deprecated test files and debug scripts
- Delete unused UserDonorKPI component and related hooks
- Clean up old demo code from WriterTokenDashboard
- Remove obsolete middleware backup and test files
📊 Analytics & Admin Dashboard:
- Add analytics backfill API route for missing data
- Improve admin dashboard with consolidated tools section
- Add email verification alerts and enhanced error handling
- Update token allocation displays and pie charts
🐛 Bug Fixes:
- Fix compilation errors in WriterTokenDashboard
- Resolve TypeScript issues with token data structures
- Update middleware for proper session handling
- Fix pledge bar integration with simulated states
This comprehensive update establishes a robust admin state simulation system
for testing various user scenarios and fixes critical authentication issues
that were preventing proper functionality of the earnings system.1 parent 96eb0ca commit 329f69f
62 files changed
Lines changed: 3439 additions & 3945 deletions
File tree
- app
- admin
- dashboard
- tools
- api
- account-subscription
- admin/backfill-analytics
- tokens/balance
- auth/switch-account
- components
- admin
- analytics
- editor
- features
- layout
- pages
- payments
- skeletons
- subscription
- ui
- utils
- config
- hooks
- new
- providers
- services
- docs
- pages
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| |||
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
44 | 92 | | |
45 | 93 | | |
46 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
| 313 | + | |
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
| 323 | + | |
321 | 324 | | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | 325 | | |
332 | 326 | | |
333 | 327 | | |
| |||
0 commit comments