You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor security section and standardize session terminology
This commit comprehensively refactors the security section component and API to improve code quality, performance, and consistency:
**Component Improvements:**
- Extract deleteSessions utility function outside component for better performance
- Add useMemo for webSessions and cliSessions filtering to prevent unnecessary re-renders
- Create proper Session TypeScript type definition for better type safety
- Consolidate session logout logic with cleaner if/else structure
- Remove redundant handleRevokeSession wrapper function
**API Standardization:**
- Convert sessionType from 'browser' to 'web' for consistency with database schema
- Use database session type directly instead of converting to 'browser'
- Move PAT filtering to SQL query for better performance
**Benefits:**
- Better React performance with memoization
- Improved type safety and maintainability
- Consistent terminology across frontend, backend, and database
- Cleaner, more readable code structure
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
0 commit comments