Accounts Overview View
Relevant source files
The following files were used as context for generating this wiki page:
The Accounts Overview View provides a centralized management console for monitoring the Freebuff account pool, quota utilization, and system status. It serves as the primary interface for administrators to add accounts, refresh upstream data, and track real-time metrics such as session reuse rates and concurrency limits.
This view integrates account-level details with global statistics to ensure efficient scheduling and resource management. Users can perform actions like one-click sign-ins for the entire pool or individual account probes to verify connectivity and billing status.
View Architecture and Data Flow
The view follows a reactive architecture where the dashboard fetches state from the backend API and renders components dynamically. The renderOverview function serves as the entry point, coordinating data fetching and component mounting.
The diagram shows the sequential data fetching and rendering process within the Overview view.
Data Fetching and State Management
The view fetches global settings to determine thresholds for UI elements, such as the lowBalanceThreshold used for grouping accounts. It then retrieves comprehensive account data from the /api/overview endpoint.
Sources: dashboard/views/overview/index.ts:16-32, dashboard/views/overview/index.ts:40-45
Statistical Monitoring
Stat cards display high-level metrics derived from the account pool. These cards provide immediate visibility into the health and efficiency of the proxy service.
| Metric | Description | Source |
|---|---|---|
| Total Accounts | Total number of credentials in the pool. | dashboard/views/overview/index.ts:98 |
| Available | Accounts that are active and not banned. | dashboard/views/overview/index.ts:100 |
| Banned | Accounts flagged as banned by the upstream provider. | dashboard/views/overview/index.ts:99 |
| Cooling Down | Accounts temporarily rate-limited or under risk control. | dashboard/views/overview/index.ts:101 |
| In-Flight | Total active requests and queue status relative to limits. | dashboard/views/overview/index.ts:102-106 |
| Reuse Rate | Percentage of requests served by existing sessions, saving quota. | dashboard/views/overview/index.ts:109-111 |
Sources: dashboard/views/overview/index.ts:97-129, dashboard/locale/dict/views.ts:25-50
Account Classification and Grouping
Accounts are categorized into logical sections based on their current operational status. The system uses a "worst-case priority" logic to ensure critical issues (like bans) are highlighted.
Accounts are sorted through a priority chain to determine their UI grouping.
Grouping Logic Details
- Banned: Explicitly flagged by the backend or a failed probe indicating a ban.
- Exhausted: Daily quota reached or balance lower than the current model price.
- Low Balance: Balance is above model price but below the user-defined threshold (default 15 FB).
- Warning: Probe failures or active cooldown periods.
- Active: Accounts with live sessions, in-flight requests, or recent usage.
- Fresh: Newly added accounts that have not been used.
Sources: dashboard/views/overview/accounts/sections.ts:42-100, test/suites/entries/smoke/parts/billing/source/copy-sweep.ts:192-198
Management Actions
The view provides several interactive controls to manage the account pool and system behavior.
One-Click Operations
- Refresh All: Updates account status, quota, and the upstream model catalog.
- Re-probe: Only checks account connectivity without refreshing the full catalog.
- Sign In All: Executes a sign-in message for all live accounts to claim daily bonuses. This operation may consume quota if no warm session exists.
Sources: dashboard/views/overview/index.ts:77-88, dashboard/locale/dict/views.ts:59-78
Scheduling Control
Each account row includes a Schedule toggle.
- ON: Account is eligible for selection and new session admission.
- OFF: Account is excluded from the candidate list but retains existing paid sessions until they expire.
- Persistence: The scheduling state is stored in the account ledger and survives restarts.
Sources: README_EN.md:124-131, dashboard/views/overview/accounts/sections.ts:108-116
Summary
The Accounts Overview View acts as the operational hub for the Freebuff Proxy. It balances detailed account-level tracking with high-level system metrics. By categorizing accounts into status-based sections and providing centralized controls for refreshing and signing in, it enables administrators to maximize session reuse and maintain a healthy account pool.