Refactor: Consolidate Sessions into Security Tab

This commit is contained in:
gpt-engineer-app[bot]
2025-10-14 18:20:51 +00:00
parent 6698ee9a29
commit 098ca9f3b0
4 changed files with 143 additions and 149 deletions

View File

@@ -1,5 +1,31 @@
# Account Security Improvements
## UI Consolidation: Sessions Merged into Security Tab
**Date**: 2025-01-14
**Changes**:
- Merged `SessionsTab` functionality into `SecurityTab` "Active Sessions & Login History" section
- Removed redundant `SessionsTab.tsx` component
- Reduced settings navigation from 7 tabs to 6 tabs
- Added proper TypeScript types with `DeviceInfo` interface
**Benefits**:
- All security-related features in one location (password, 2FA, social accounts, sessions)
- Eliminated 123 lines of duplicate code
- Improved UX with logical grouping of authentication and session management
- Simplified navigation structure
- Better type safety with typed device information
**Technical Details**:
- Session management uses existing `user_sessions` table with proper RLS
- Real-time session fetching via Supabase query
- Device detection from `device_info` JSONB column
- Session revocation with proper error handling and toast notifications
- Type-safe interfaces for `DeviceInfo` and `UserSession`
---
## Implemented Security Enhancements
This document outlines all security improvements made to the account settings system.