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
@@ -169,6 +169,7 @@ export const DEFAULT_SETTINGS_SCHEMA = Object.freeze({
stepTableColumns: DEFAULT_STEP_TABLE_COLUMNS,
experimentalQuotaReservation: true,
accountQuotaRefreshMinutes: DEFAULT_ACCOUNT_QUOTA_REFRESH_MINUTES,
accountSwitchRiskAccepted: false,
contextWindowRiskAccepted: false,
contextWindowMainEnabled: true,
contextWindowSwarmEnabled: false,
@@ -256,6 +257,7 @@ export function normalizeFullSettings(rawInput) {
accountQuotaRefreshMinutes: normalizeAccountQuotaRefreshMinutes(
safeRaw.accountQuotaRefreshMinutes
),
accountSwitchRiskAccepted: safeRaw.accountSwitchRiskAccepted === true,
contextWindowRiskAccepted: safeRaw.contextWindowRiskAccepted === true,
contextWindowMainEnabled: safeRaw.contextWindowMainEnabled !== false,
contextWindowSwarmEnabled: safeRaw.contextWindowSwarmEnabled === true,