Commit Graph

6 Commits

Author SHA1 Message Date
Adrian Flores Cortes
67e54d6519 [REMEDIATION] feat: Frontend remediation across auth, payments, portfolio, trading, marketplace modules
Enhance SecuritySettings page, PortfolioDetailPage, AgentsPage. Add marketplace
and payment services/types. Fix barrel exports across 8 modules.
Addresses frontend gaps from TASK-2026-02-05 analysis.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 23:17:22 -06:00
Adrian Flores Cortes
295bd5e31e [SPRINT-1] feat: Resolve routing and improve auth session management
SUBTASK-001: Routing fixes
- Add lazy-loaded route for /portfolio/:portfolioId
- Add navigation links from PortfolioDashboard to portfolio detail
- Verify /settings/billing is intentional dual-route (no changes needed)

SUBTASK-002: Auth improvements
- Extend ActiveSession type with device details (deviceType, browser, os, location)
- DeviceCard now uses backend data when available, falls back to userAgent parsing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:49:26 -06:00
Adrian Flores Cortes
954da4656c [Sprint-2] feat: Add hooks for Feature Flags, 2FA, and Audit
Created React Query hooks:
- useFeatureFlags.ts: Feature flag evaluation and management
- use2FA.ts: Two-factor authentication setup/verify/disable
- useAuditLogs.ts: Audit logs query with filters and stats

Hooks include:
- useFlagCheck() for simple feature checks
- useFeatures() for multiple flags
- use2FAStatus(), useSetup2FA(), useEnable2FA()
- useAuditLogs(), useAuditStats(), useSecurityEvents()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 15:38:25 -06:00
Adrian Flores Cortes
261dc4c71c feat: Add 2FA frontend components (TwoFactorSetup, TwoFactorVerifyModal, TwoFactorSettings)
Created three complete 2FA components integrating with existing backend endpoints:

1. TwoFactorSetup.tsx (auth/components)
   - 3-step wizard for 2FA setup
   - QR code display with manual entry fallback
   - TOTP code verification
   - Backup codes display with copy functionality
   - Integrates with POST /auth/2fa/setup and /auth/2fa/enable

2. TwoFactorVerifyModal.tsx (auth/components)
   - Modal for 2FA verification during login
   - Support for both TOTP (6 digits) and backup codes (8 digits)
   - Auto-submit for TOTP codes
   - Switch between code types
   - Auto-focus input field

3. TwoFactorSettings.tsx (settings/components)
   - Management panel for 2FA in settings
   - Enable/disable 2FA with confirmation
   - Regenerate backup codes
   - Status display with activation date
   - Integrates with all 2FA endpoints

All components follow project patterns:
- Tailwind CSS styling matching existing components
- lucide-react icons
- Centralized apiClient with auto-refresh
- Complete TypeScript types
- No placeholders or TODOs

Related: GAP-P1-004 2FA Frontend Flow

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:23:06 -06:00
Adrian Flores Cortes
42d18759b5 feat: Implement BLOCKER-001 proactive refresh + E2E video tests (frontend)
BLOCKER-001: Token Refresh Improvements (FASE 4 frontend)
- Proactive refresh scheduler: refresh 5min before token expiry
- Multi-tab synchronization with BroadcastChannel API
- Automatic scheduling on X-Token-Expires-At header reception
- Background token refresh to prevent user interruption

E2E Tests: Video Upload Module (frontend - 62 tests)
- Suite 1: Form tests (27 tests) - 3-step wizard validation
- Suite 2: Service tests (20 tests) - Multipart upload logic
- Suite 3: Integration tests (15 tests) - Complete flow validation

Test infrastructure:
- vitest.config.ts (NEW) - Vitest configuration with jsdom
- src/__tests__/setup.ts (NEW) - Global test setup and mocks
- Updated payments-stripe-elements.test.tsx to use Vitest (vi.mock)

Changes:
- apiClient.ts: Proactive refresh scheduler + BroadcastChannel sync
- payments-stripe-elements.test.tsx: Migrated from Jest to Vitest

Tests created:
- video-upload-form.test.tsx (27 tests) - Component validation
- video-upload-service.test.ts (20 tests) - Service logic validation
- video-upload-integration.test.tsx (15 tests) - Integration flow

Additional documentation:
- Module README.md files for assistant, auth, education, investment, payments, portfolio, trading
- Investment module: Analysis, contracts, gaps, delivery documentation
- Payments module: Stripe integration, wallet specification

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 01:44:40 -06:00
5b53c2539a feat: Initial commit - Trading Platform Frontend
React frontend with:
- Authentication UI
- Trading dashboard
- ML signals display
- Portfolio management

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 04:30:39 -06:00