feat(account): add quota trend chart and multi-account risk gate

- Gate multi-account login, import, switch, backup quota polling, and vault controls behind explicit risk consent (accountSwitchRiskAccepted), restricting unaccepted sessions to active-account quota viewing
- Add collinear-compressed per-account quota history tracking and a full-bleed 184px AccountQuotaTrendCard supporting cycle, preset, all-time, and custom ranges with cycle-boundary pre-reset filtering and isolated impulse spike sanitization
- Unify Account tab controls onto shared SegmentedControl, CustomSelect, CustomDateTimePicker, .ctx-risk-mask, and global status/button primitives while removing bespoke .account-* CSS and balancing card padding
This commit is contained in:
fish
2026-11-25 03:42:33 +09:00
parent 1330b31ef7
commit e520efe84e
20 changed files with 4103 additions and 1235 deletions
@@ -14,6 +14,7 @@ import {
dispatchBridgeApiRequest,
} from './api-actions.mjs';
import { computeRuntimeCodeVersion } from './config.mjs';
import { flushAccountQuotaHistoryNow } from './account-quota-history.mjs';
import { flushAllEndpointCachesNow } from './endpoint-registry.mjs';
let shuttingDown = false;
@@ -52,6 +53,7 @@ async function gracefulStop() {
shuttingDown = true;
clearInterval(driftWatchTimer);
try {
flushAccountQuotaHistoryNow();
flushAllEndpointCachesNow();
} catch {
// Ignore cache flush errors