SurfSense/surfsense_web/components
Vonic 4eb6ed18d6 Epic 5 Complete: Billing, Subscriptions, and Admin Features
Resolve all 5 deferred items from Epic 5 adversarial code review:
- Migration 124: Add CASCADE to subscriptionstatus enum drop (prevent orphaned references)
- Stripe rate limiting: In-memory per-user limiter (20 calls/60s) on verify-checkout-session
- Subscription request cooldown: 24h cooldown before resubmitting rejected requests
- Token reset date: Initialize on first subscription activation
- Checkout URL validation: Confirmed HTTPS-only (Stripe always returns HTTPS)

Implement Story 5.4 (Usage Tracking & Rate Limit Enforcement):
- Page quota pre-check at HTTP upload layer
- Extend UserRead schema with token quota fields
- Frontend 402 error handling in document upload
- Quota indicator in dashboard sidebar

Story 5.5 (Admin Seed & Approval Flow):
- Seed admin user migration with default credentials warning
- Subscription approval/rejection routes with admin guard
- 24h rejection cooldown enforcement

Story 5.6 (Admin-Only Model Config):
- Global model config visible across all search spaces
- Per-search-space model configs with user access control
- Superuser CRUD for global configs

Additional fixes from code review:
- PageLimitService: PAST_DUE subscriptions enforce free-tier limits
- TokenQuotaService: PAST_DUE subscriptions enforce free-tier limits
- Config routes: Fixed user_id.is_(None) filter on mutation endpoints
- Stripe webhook: Added guard against silent plan downgrade on unrecognized price_id

All changes formatted with Ruff (Python) and Biome (TypeScript).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 03:54:45 +07:00
..
announcements feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
assistant-ui chore: merge upstream with local feature additions 2026-04-13 23:31:52 +07:00
auth chore: linting 2026-03-27 03:17:05 -07:00
chat-comments chore: ran linting 2026-04-07 05:55:39 +05:30
connectors feat: enhance OneDrive folder management by adding mimeType handling and integrating DriveFolderTree component for improved UI 2026-03-29 03:29:31 +05:30
contact feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
crypto feat(crypto): add SurfSense 2.0 Crypto Co-Pilot UI components 2026-02-04 02:19:57 +07:00
desktop Formatting 2026-04-07 20:28:07 +02:00
documents feat: show spinner on export button during export 2026-04-09 14:00:25 +02:00
editor feat: enhance MemoryContent and TeamMemoryManager components with improved memory display and user prompts for empty memory states 2026-04-10 00:29:53 +05:30
editor-panel Merge remote-tracking branch 'upstream/dev' into feat/unified-etl-pipeline 2026-04-06 22:04:51 +05:30
hitl-edit-panel chore: linting 2026-03-31 14:45:46 -07:00
homepage feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
icons/providers feat: complete MiniMax LLM provider integration 2026-03-13 07:27:47 +08:00
layout Epic 5 Complete: Billing, Subscriptions, and Admin Features 2026-04-15 03:54:45 +07:00
new-chat Epic 5 Complete: Billing, Subscriptions, and Admin Features 2026-04-15 03:54:45 +07:00
pricing Epic 5 Complete: Billing, Subscriptions, and Admin Features 2026-04-15 03:54:45 +07:00
prompt-kit refactor: improve write_todos tool and UI components 2025-12-26 17:49:56 +05:30
providers feat: integrate Stripe for page purchases and reconciliation tasks 2026-03-31 18:39:45 -07:00
public-chat chore: linting 2026-04-08 16:14:26 -07:00
public-chat-snapshots Merge pull request #1208 from SohamBhattacharjee2003/fix/snapshot-delete-error-feedback 2026-04-09 14:01:09 -07:00
report-panel feat: replace loading skeleton in ReportPanel with a new animated skeleton component 2026-04-10 12:53:12 +05:30
seo feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
settings Epic 5 Complete: Billing, Subscriptions, and Admin Features 2026-04-15 03:54:45 +07:00
shared chore: ran linting 2026-04-08 05:20:03 +05:30
sources Epic 5 Complete: Billing, Subscriptions, and Admin Features 2026-04-15 03:54:45 +07:00
theme chore: linting 2026-03-27 03:17:05 -07:00
tool-ui fix: resolve runtime crashes in tool-ui components and backend import errors 2026-04-14 13:42:31 +07:00
ui refactor: simplify alert descriptions, improved icons, improved UI in LLM settings 2026-04-10 19:07:35 +05:30
container.tsx feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
document-viewer.tsx Biome: fixes for compontents directory 2025-07-27 10:41:15 -07:00
inference-params-editor.tsx feat: integrate document upload dialog in ComposerAction and update sidebar components for improved user interaction and styling consistency 2026-03-07 03:29:46 +05:30
json-metadata-viewer.tsx chore: linting 2026-02-09 16:49:11 -08:00
LanguageSwitcher.tsx feat: add support for additional languages in LanguageSwitcher and SidebarUserProfile components 2026-02-11 00:39:01 -08:00
Logo.tsx feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
markdown-viewer.tsx refactor: remove unused drizzle-orm import from markdown-viewer 2026-04-08 06:36:50 +05:30
onboarding-tour.tsx perf: add passive option to scroll and touch event listeners 2026-04-04 22:03:06 -07:00
platform-gate.tsx feat: enhance keyboard shortcut management and improve app responsiveness 2026-04-07 00:43:40 -07:00
pricing.tsx feat(story-5.1): add subscription pricing UI with Stripe checkout integration 2026-04-14 23:28:14 +07:00
search-space-form.tsx ui: adjust dashboard search spaces heading text and padding responsiveness 2026-01-03 01:09:33 +07:00
TokenHandler.tsx Formatting 2026-04-07 20:28:07 +02:00
UserDropdown.tsx fix: replace window.location with router.push for client-side navigation 2026-04-08 00:01:30 -07:00