- Reduce authorization retry attempts from 3 to 2 and optimize retry delays from exponential (3s, 5s, 8s, 12s) to fixed 3s backoff
- Implement team-level circuit breaker: skip member processing when 3+ consecutive 500 errors detected in same team
- Add consecutive 500 error tracking with atomic counter and reset on successful authorization
- Reduce ObtainAuthorizationCode timeout from 3 minutes to 90 seconds with updated error messages
- Optimize Codex API workspace selection retry: reduce max attempts from 5 to 3 with shorter backoff (2s, 4s instead of 3s, 5s, 8s, 12s)
- Reduce S2A OAuth submission retry delays from (4s, 6s) to (2s, 3s) for faster failure detection
- Optimize member stagger timing: reduce from 3s + idx*2s to 1s + idx*1s with reduced jitter (0-1s instead of 0-2s)
- Add early exit for exhausted retries in CompleteWithCodexAPI to prevent unnecessary outer retry attempts
- These changes improve responsiveness and reduce cascading failures during bulk team processing
- Update success message to specifically indicate S2A configuration switch
- Add detailed logging output showing switched API endpoint
- Display concurrency, priority, and group IDs in configuration log
- Add conditional proxy information logging when proxy is enabled
- Improve user visibility into active configuration after switching profiles
- Add exponential backoff with jitter to S2A OAuth submission (3 attempts)
- Implement 5xx error retry mechanism in Codex API workspace selection (5 attempts)
- Add 429 rate limit handling with retry support in Codex API
- Improve team member processing with staggered delays to avoid concurrent conflicts
- Add per-attempt proxy rotation to avoid reusing failed proxies
- Enhance retry delay calculation with random jitter to prevent thundering herd
- Update logging to display retry attempts and delay durations
- Improve error messages with HTTP status codes and response body snippets
- Refactor retry loops to use consistent exponential backoff pattern across modules
- Add expanded state to ProfileCard component for toggling group visibility
- Implement MAX_VISIBLE constant to limit initial group display to 4 items
- Add toggle button to show/hide remaining groups with count indicator
- Display "收起" (collapse) when expanded, "+N 个分组" (N groups) when collapsed
- Wrap group grid in container div to accommodate expand/collapse button
- Improve UX for profiles with many groups by preventing excessive card height
- Add flex flex-col and h-full to Card component for full height layout
- Update CardContent with flex flex-col flex-1 for proper content distribution
- Move action buttons to bottom with mt-auto pt-4 spacing
- Ensures profile cards maintain consistent heights in grid layout and action buttons align to bottom
- Delete getGroupLabel function that was no longer being used in the component
- Simplify group display logic by removing redundant label formatting utility
- Clean up code to improve maintainability and reduce unused function definitions
- Replace badge-style group display with grid-based card layout for better readability
- Add group name and ID display in selected groups section with truncation handling
- Reorganize profile card group summary to use dedicated grid section below parameters
- Remove inline group information from parameter summary badge
- Improve visual hierarchy and spacing in group display components
- Enhance dark mode styling for group cards with better contrast and borders
- Refactor groupNameCache structure to isolate caches by api_base: { [apiBase]: { [groupId]: groupName } }
- Add normalizeBase() utility to remove trailing slashes and prevent cache key mismatches
- Update group fetching logic to deduplicate requests by api_base and admin_key combination
- Auto-fetch available groups when entering edit mode for a profile with valid credentials
- Enhance group label display to show "name #id" format instead of just name or #id
- Sort profiles in list view to display active profile first
- Update ProfileCard to use normalized api_base for groupNameCache lookup
- Simplify group label rendering by removing conditional groupsFetched check
- Add backend endpoint `/api/s2a/fetch-groups` to fetch S2A groups using arbitrary credentials without depending on global config
- Implement `handleFetchGroups` handler with proper error handling and multiple auth header support (Bearer token, X-API-Key, X-Admin-Key)
- Add frontend API function `fetchGroupsWithCredentials` to call the new endpoint and parse S2A standard response format
- Add group fetching UI in S2AConfig edit mode with refresh button and loading state
- Implement batch group name caching in list view to display human-readable group names instead of IDs
- Deduplicate API requests by grouping profiles with identical credentials to avoid redundant calls
- Add fallback to display group ID when name is unavailable
- Add Server icon import from lucide-react for profile display
- Import useConfig hook and S2AProfile type for configuration access
- Implement activeProfile state to track currently selected S2A profile
- Add useEffect hook to fetch and match S2A profiles against current API base configuration
- Replace spacer div with active profile information display component
- Show profile name and API base URL when profile is matched
- Display API base URL directly when configured but profile not found
- Add responsive styling with dark mode support for profile info badge
- Use truncation and flex-shrink to prevent layout overflow on smaller screens
- Provides users with clear visibility of which S2A profile is currently active
- Restructure component to support list and edit view modes for better UX
- Replace single global config state with profile-based management system
- Add ability to create, edit, and delete S2A configuration profiles
- Implement profile activation to set active configuration
- Refactor form state management with dedicated form variables (formName, formApiBase, etc.)
- Add profile name field to distinguish between multiple configurations
- Improve icon usage by removing unused Bookmark and Download icons
- Consolidate message handling with auto-dismiss after 4 seconds
- Add resetForm utility function to clear form state between operations
- Separate fetchActiveConfig from fetchProfiles for cleaner data flow
- Enhance error handling with graceful fallbacks for API failures
- Improve code organization by grouping related state and functions
- Add new `/api/s2a/profiles` endpoint supporting GET, POST, DELETE operations
- Create `s2a_profiles` database table with fields for API configuration, concurrency, priority, group IDs, and proxy settings
- Implement database methods: `GetS2AProfiles()`, `AddS2AProfile()`, `DeleteS2AProfile()`
- Add S2AProfile struct to database models with JSON serialization support
- Implement profile management UI in S2AConfig page with save, load, and delete functionality
- Add profile list display with ability to apply saved configurations
- Add S2AProfile type definition to frontend types
- Enable users to save and reuse S2A configurations as presets for faster setup
- Aggregate total_registered and total_added_to_s2a from batch_team_results table
- Calculate success_rate based on actual S2A additions vs total owners
- Compute duration_seconds from started_at and finished_at timestamps
- Improve stuck batch run recovery by restoring accurate metrics instead of zeroing them out
- Add CleanupStuckProcessingOwners database method to reset owners stuck in processing status back to valid state
- Call cleanup routine on application startup to recover from previous abnormal exits
- Call cleanup routine after batch processing completes to ensure no orphaned processing states remain
- Add markOwnerResult calls in processSingleTeam when team invitations are full to properly track owner status
- Prevents owners from being permanently stuck in processing state due to unexpected shutdowns or errors
- Add localStorage persistence for team process configuration settings
- Initialize state values from saved configuration on component mount
- Implement useEffect hook to automatically save configuration changes to localStorage
- Preserve user preferences for membersPerTeam, concurrentTeams, concurrentS2A, useProxy, includeOwner, and processCount across sessions
- Improve user experience by restoring previous settings when returning to Upload page
- Implement pause/resume mechanism using sync.Cond to halt worker goroutines
- Add consecutive zero S2A counter to detect when no accounts are added for 2+ teams
- Trigger automatic 1-minute pause when consecutive zero entries detected
- Log warning messages with team details when pause is triggered
- Reset counter on successful S2A entries or when pause completes
- Allow stop signal to interrupt pause period for graceful shutdown
- Broadcast resume signal to all waiting workers after pause completes
- Prevents resource exhaustion and provides recovery time during low-activity periods
- Remove redundant username field from password verification payload in CodexAPIAuth
- Update proxy refresh button to use arrow function for proper event handling
- Simplify authentication flow by eliminating unnecessary email parameter in password verification request