Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(usage): 满额礼花按供应商跨任务去重 (#4348)
Dash2082d6db5e44
diff --git a/apps/desktop/src/renderer/__tests__/todaySpendChip.test.ts b/apps/desktop/src/renderer/__tests__/todaySpendChip.test.tsindex bbfc1c9afb..414b3a3041 100644--- a/apps/desktop/src/renderer/__tests__/todaySpendChip.test.ts+++ b/apps/desktop/src/renderer/__tests__/todaySpendChip.test.ts@@ -177,7 +177,7 @@ describe('TodaySpendChip dashboard routing', () => {expect(compact(source)).toContain(compact("import { QuotaResetConfetti } from './QuotaResetConfetti';"),);- expect(compact(source)).toContain(compact('if (celebrating && !prevCelebratingRef.current)'));+ expect(compact(source)).toContain(compact('const key = quotaFullCelebrations.observe('));expect(compact(source)).toContain(compact('segmentElsRef.current[window.key] = el;'));expect(compact(source)).toContain(compact('?? chipRef.current;'));expect(compact(source)).toContain(compact('<QuotaResetConfetti'));diff --git a/apps/desktop/src/renderer/components/status/TodaySpendChip.tsx b/apps/desktop/src/renderer/components/status/TodaySpendChip.tsxindex 4674b3c9dd..99044baee9 100644--- a/apps/desktop/src/renderer/components/status/TodaySpendChip.tsx+++ b/apps/desktop/src/renderer/components/status/TodaySpendChip.tsx@@ -103,6 +103,7 @@ import {type QuotaHoverCardTurnUsage,} from './QuotaHoverCard';import { QuotaResetConfetti } from './QuotaResetConfetti';+import { quotaFullCelebrations } from './quotaFullCelebrations';import {buildClaudeUsageCard,buildCodexUsageCard,@@ -782,8 +783,9 @@ export function TodaySpendChip({const { providers: localQuotaProviders } = useProviders();const { providers: deviceQuotaProviders } = useDeviceProviders(deviceLinkDeviceId ?? undefined);const quotaProviders = isDeviceLinkRemote ? deviceQuotaProviders : localQuotaProviders;- const selectedQuotaProvider = quotaProviders.find(provider => provider.id === providerId);- const isClaudeAccount = providerId === 'anthropic' || selectedQuotaProvider?.auth?.native === 'claude';+ const selectedQuotaProvider = quotaProviders.find((provider) => provider.id === providerId);+ const isClaudeAccount =+ providerId === 'anthropic' || selectedQuotaProvider?.auth?.native === 'claude';const isXaiAccount = providerId === 'xai' || selectedQuotaProvider?.auth?.native === 'xai';// Remote provider ids belong to the controlled device. Reuse its existing provider// catalog (also used by the model selector), never the controller's same-named account.@@ -821,7 +823,9 @@ export function TodaySpendChip({// - chatgpt/ → 与 codex 同一 ChatGPT 账户,复用 codex 订阅 chip 形态(限额窗口 + 价值估算);// - xai/ → SuperGrok 账号周用量(cli-chat-proxy billing) + 尽力显示限流头。// 优先级高于 Claude 订阅形态(model 前缀决定实际消耗的额度)。- const isOpenAiAccount = providerId === 'openai' || isOpenAiSubscriptionProvider(quotaProviders.find((provider) => provider.id === providerId));+ const isOpenAiAccount =+ providerId === 'openai' ||+ isOpenAiSubscriptionProvider(quotaProviders.find((provider) => provider.id === providerId));const isChatgptBridge =(vendorKey === 'cc' || vendorKey === 'pi') &&(providerId == null || isOpenAiAccount) &&@@ -976,7 +980,10 @@ export function TodaySpendChip({usesXaiQuotaForm && !isAnyRemoteSession,providerId ?? 'xai',);- const remoteXaiSubscriptionUsage = useRemoteXaiSubscriptionUsage(remoteXaiDeviceId, providerId ?? 'xai');+ const remoteXaiSubscriptionUsage = useRemoteXaiSubscriptionUsage(+ remoteXaiDeviceId,+ providerId ?? 'xai',+ );const xaiSubscriptionUsage = isDeviceLinkRemote? remoteXaiSubscriptionUsage: localXaiSubscriptionUsage;@@ -999,7 +1006,9 @@ export function TodaySpendChip({providerId ?? 'anthropic',);const remoteClaudeSubscriptionUsage = useRemoteClaudeSubscriptionUsage(- isDeviceLinkRemoteClaudeSubscription && !isSubscriptionBridge ? (deviceLinkDeviceId ?? null) : null,+ isDeviceLinkRemoteClaudeSubscription && !isSubscriptionBridge+ ? (deviceLinkDeviceId ?? null)+ : null,providerId ?? 'anthropic',);const claudeSubscriptionUsage = isDeviceLinkRemote@@ -1247,31 +1256,37 @@ export function TodaySpendChip({);});- // 揭晓仪式: 重置滚动动画启动的上升沿放一次撒花粒子(QuotaResetConfetti,- // DESIGN §14.4 sanctioned 豁免) —— 与 0%→100% 数字滚动同一瞬间开始,- // 锚点取正在揭晓的窗口段元素(兜底 chip 容器)。+ // 礼花按供应商共享去重,不依赖任务组件的挂载或数字滚动状态。const chipRef = React.useRef<HTMLDivElement | null>(null);- const celebratingKey = rollupA?.celebrating- ? (windowSlotA?.key ?? null)- : rollupB?.celebrating- ? (windowSlotB?.key ?? null)- : null;- const prevCelebratingRef = React.useRef(false);+ const celebrationProvider = JSON.stringify([+ isDeviceLinkRemote ? deviceLinkDeviceId : 'local',+ providerId ?? (usesCodexQuotaForm ? 'openai' : usesXaiQuotaForm ? 'xai' : 'anthropic'),+ ]);+ const quotaSnapshotUpdatedAt = usesCodexQuotaForm+ ? accountUsage?.updatedAt+ : usesXaiQuotaForm+ ? xaiSubscriptionUsage?.updatedAt+ : claudeSubscriptionUsage?.updatedAt;const [confettiBurst, setConfettiBurst] = React.useState<{nonce: number;anchor: HTMLElement;} | null>(null);React.useEffect(() => {- const celebrating = celebratingKey !== null;- if (celebrating && !prevCelebratingRef.current) {- const anchor =- (celebratingKey ? segmentElsRef.current[celebratingKey] : null) ?? chipRef.current;- if (anchor) {- setConfettiBurst((prev) => ({ nonce: (prev?.nonce ?? 0) + 1, anchor }));- }- }- prevCelebratingRef.current = celebrating;- }, [celebratingKey]);+ if (!chipRef.current) return;+ const key = quotaFullCelebrations.observe(+ celebrationProvider,+ chipWindows,+ quotaSnapshotUpdatedAt,+ );+ if (+ key === null ||+ (typeof window.matchMedia === 'function' &&+ window.matchMedia('(prefers-reduced-motion: reduce)').matches)+ )+ return;+ const anchor = segmentElsRef.current[key] ?? chipRef.current;+ setConfettiBurst((prev) => ({ nonce: (prev?.nonce ?? 0) + 1, anchor }));+ });// 窗口 reset 时点列表以值签名 memo —— chipWindows 数组身份每次渲染都变// (含滚动动画的每一帧), 直接进 tick effect 依赖会让定时器反复重建。@@ -1321,13 +1336,15 @@ export function TodaySpendChip({// 本机催本机(按所选供应商账号,#4197);不得拿本机通道替远程会话催刷(账号不同)。if (isChatgptBridge || (isDeviceLinkRemote && usesCodexQuotaForm)) {if (isDeviceLinkRemote) {- if (deviceLinkDeviceId) requestRemoteCodexAccountRefresh(deviceLinkDeviceId, providerId ?? 'openai');+ if (deviceLinkDeviceId)+ requestRemoteCodexAccountRefresh(deviceLinkDeviceId, providerId ?? 'openai');} else {requestCodexAccountRefresh(providerId ?? undefined);}} else if (usesXaiQuotaForm) {if (isDeviceLinkRemote) {- if (deviceLinkDeviceId) requestRemoteXaiSubscriptionRefresh(deviceLinkDeviceId, providerId ?? 'xai');+ if (deviceLinkDeviceId)+ requestRemoteXaiSubscriptionRefresh(deviceLinkDeviceId, providerId ?? 'xai');} else {requestXaiSubscriptionRefresh(providerId ?? 'xai');}diff --git a/apps/desktop/src/renderer/components/status/__tests__/TodaySpendChip.popover.test.tsx b/apps/desktop/src/renderer/components/status/__tests__/TodaySpendChip.popover.test.tsxindex feb3423679..4dfa960ce1 100644--- a/apps/desktop/src/renderer/components/status/__tests__/TodaySpendChip.popover.test.tsx+++ b/apps/desktop/src/renderer/components/status/__tests__/TodaySpendChip.popover.test.tsx@@ -163,6 +163,7 @@ vi.mock('@/lib/makerChatStore', () => ({}));import { TodaySpendChip } from '../TodaySpendChip';+import { QuotaFullCelebrations, quotaFullCelebrations } from '../quotaFullCelebrations';const CLAUDE_USAGE_URL = 'https://claude.ai/settings/usage';const TURN_USAGE_DETAILS = {@@ -220,6 +221,8 @@ function openCardFromHover() {}beforeEach(() => {+ const history = new QuotaFullCelebrations();+ vi.spyOn(quotaFullCelebrations, 'observe').mockImplementation(history.observe.bind(history));vi.useFakeTimers();setLatestUsageMessage();mocks.sessionUsage = {@@ -277,7 +280,7 @@ describe('TodaySpendChip Claude subscription popover', () => {);it.each([false, true])(- 'only celebrates a Claude reset for the same account (changed: %s)',+ 'does not throw confetti for a partial Claude recovery (account changed: %s)',(changed) => {mocks.claudeSnapshot = {accountFingerprint: 'account-a',@@ -298,7 +301,7 @@ describe('TodaySpendChip Claude subscription popover', () => {sessionId="session-1"/>,);- expect(screen.queryByTestId('quota-reset-confetti') !== null).toBe(!changed);+ expect(screen.queryByTestId('quota-reset-confetti')).toBeNull();if (changed) {expect(screen.getByRole('button', { name: '打开 Claude 用量页面' }).textContent).toContain('98%',@@ -307,6 +310,70 @@ describe('TodaySpendChip Claude subscription popover', () => {},);+ it('celebrates first 100% once across task switches and remounts', () => {+ mocks.claudeSnapshot = { source: 'oauth-endpoint', fiveHour: { utilization: 0 } };+ const view = renderClaudeSubscriptionChip();+ expect(screen.queryByTestId('quota-reset-confetti')).not.toBeNull();+ view.unmount();+ const next = render(+ <TodaySpendChip vendorKey="cc" providerId="anthropic" sessionId="session-2" />,+ );+ expect(screen.queryByTestId('quota-reset-confetti')).toBeNull();+ mocks.claudeSnapshot = { source: 'oauth-endpoint', fiveHour: { utilization: 30 } };+ next.rerender(<TodaySpendChip vendorKey="cc" providerId="anthropic" sessionId="session-2" />);+ mocks.claudeSnapshot = { source: 'oauth-endpoint', fiveHour: { utilization: 0 } };+ next.rerender(<TodaySpendChip vendorKey="cc" providerId="anthropic" sessionId="session-2" />);+ expect(screen.queryByTestId('quota-reset-confetti')).not.toBeNull();+ });++ it('celebrates an official extra reset without changing the deadline and ignores old task snapshots', () => {+ const resetsAt = Date.now() / 1000 + 18_000;+ mocks.claudeSnapshot = {+ source: 'oauth-endpoint',+ updatedAt: 1000,+ fiveHour: { utilization: 0, resetsAt },+ };+ const first = renderClaudeSubscriptionChip();+ expect(screen.queryByTestId('quota-reset-confetti')).not.toBeNull();+ first.unmount();+ mocks.claudeSnapshot = {+ source: 'oauth-endpoint',+ updatedAt: 2000,+ fiveHour: { utilization: 40, resetsAt },+ };+ const next = renderClaudeSubscriptionChip();+ expect(screen.queryByTestId('quota-reset-confetti')).toBeNull();+ mocks.claudeSnapshot = {+ source: 'oauth-endpoint',+ updatedAt: 3000,+ fiveHour: { utilization: 0, resetsAt },+ };+ next.rerender(<TodaySpendChip vendorKey="cc" providerId="anthropic" sessionId="session-2" />);+ expect(screen.queryByTestId('quota-reset-confetti')).not.toBeNull();+ next.unmount();+ mocks.claudeSnapshot = {+ source: 'oauth-endpoint',+ updatedAt: 2000,+ fiveHour: { utilization: 40, resetsAt },+ };+ const stale = renderClaudeSubscriptionChip();+ mocks.claudeSnapshot = {+ source: 'oauth-endpoint',+ updatedAt: 3000,+ fiveHour: { utilization: 0, resetsAt },+ };+ stale.rerender(<TodaySpendChip vendorKey="cc" providerId="anthropic" sessionId="session-2" />);+ expect(screen.queryByTestId('quota-reset-confetti')).toBeNull();+ });++ it('skips full-quota confetti under reduced motion', () => {+ vi.stubGlobal('matchMedia', () => ({ matches: true }));+ mocks.claudeSnapshot = { source: 'oauth-endpoint', fiveHour: { utilization: 0 } };+ renderClaudeSubscriptionChip();+ expect(screen.queryByTestId('quota-reset-confetti')).toBeNull();+ vi.unstubAllGlobals();+ });+it('完整渲染 Claude 的 5h 与当前模型周窗口', () => {mocks.claudeSnapshot = {source: 'oauth-endpoint',diff --git a/apps/desktop/src/renderer/components/status/__tests__/quotaFullCelebrations.test.ts b/apps/desktop/src/renderer/components/status/__tests__/quotaFullCelebrations.test.tsnew file mode 100644index 0000000000..5fb6e7780c--- /dev/null+++ b/apps/desktop/src/renderer/components/status/__tests__/quotaFullCelebrations.test.ts@@ -0,0 +1,115 @@+import { afterEach, describe, expect, it } from 'vitest';+import { __testing as ownerTesting, setDataOwnerGeneration } from '@/contexts/dataOwnerGeneration';+import { QuotaFullCelebrations } from '../quotaFullCelebrations';++const slot = (remainingPercent: number, resetsAtMs: number | null = null, key = 'primary') => ({+ key,+ remainingPercent,+ resetsAtMs,+ resetPending: false,+});++afterEach(() => ownerTesting.reset());++describe('QuotaFullCelebrations', () => {+ it('celebrates first full observation, but not repeated task mounts or source changes', () => {+ const history = new QuotaFullCelebrations();+ expect(history.observe('openai', [slot(100)])).toBe('primary');+ expect(history.observe('openai', [])).toBeNull();+ expect(history.observe('openai', [slot(100, null, 'another-session-source')])).toBeNull();+ expect(history.observe('anthropic', [slot(100)])).toBe('primary');+ });++ it('isolates login owners while preserving history across same-owner generation changes', () => {+ setDataOwnerGeneration('owner-a', 1);+ const history = new QuotaFullCelebrations();+ expect(history.observe('openai', [slot(100)], 9000)).toBe('primary');+ setDataOwnerGeneration('owner-a', 2);+ expect(history.observe('openai', [slot(100)], 9001)).toBeNull();+ setDataOwnerGeneration('owner-b', 3);+ expect(history.observe('openai', [slot(100)], 1000)).toBe('primary');+ history.observe('openai', [slot(50)], 2000);+ expect(history.observe('openai', [slot(100)], 3000)).toBe('primary');+ });++ it('does not mistake switching model quota buckets for recovery', () => {+ const history = new QuotaFullCelebrations();+ history.observe('openai', [slot(50, null, 'bucket-a')], 1000);+ expect(history.observe('openai', [slot(100, null, 'bucket-b')], 2000)).toBe('bucket-b');+ history.observe('openai', [slot(50, null, 'bucket-a')], 3000);+ expect(history.observe('openai', [slot(100, null, 'bucket-b')], 4000)).toBeNull();+ expect(history.observe('openai', [slot(100, null, 'bucket-c')], 5000)).toBeNull();+ expect(history.observe('openai', [slot(100, null, 'bucket-a')], 6000)).toBe('bucket-a');+ });++ it('requires 100 and rearms after consumption without requiring a deadline', () => {+ const history = new QuotaFullCelebrations();+ expect(history.observe('openai', [slot(98)])).toBeNull();+ expect(history.observe('openai', [slot(100)])).toBe('primary');+ expect(history.observe('openai', [slot(99.9)])).toBeNull();+ expect(history.observe('openai', [slot(100)])).toBe('primary');+ });++ it('requires a drop before another burst, regardless of reset deadlines', () => {+ const history = new QuotaFullCelebrations();+ expect(history.observe('openai', [slot(100, 200)])).toBe('primary');+ expect(history.observe('openai', [slot(100, 300)])).toBeNull();+ expect(history.observe('openai', [slot(50, 100)])).toBeNull();+ expect(history.observe('openai', [slot(100, 100)])).toBe('primary');+ expect(history.observe('openai', [slot(100, 400)])).toBeNull();+ expect(history.observe('openai', [slot(80, 400)])).toBeNull();+ expect(history.observe('openai', [slot(100, 300)])).toBe('primary');+ });++ it.each([0, -1000])(+ 'recognizes an extra reset with deadline offset %s and ignores stale task snapshots',+ (offset) => {+ const history = new QuotaFullCelebrations();+ const future = Date.now() + 60_000;+ expect(history.observe('openai', [slot(100, future)], 1000)).toBe('primary');+ expect(history.observe('openai', [slot(50, future)], 2000)).toBeNull();+ expect(history.observe('openai', [slot(100, future + offset)], 3000)).toBe('primary');+ expect(history.observe('openai', [slot(50, future)], 2000)).toBeNull();+ expect(history.observe('openai', [slot(100, future + offset)], 3000)).toBeNull();+ expect(history.observe('openai', [slot(100, future + offset)], 4000)).toBeNull();+ expect(history.observe('openai', [slot(30, future + offset)], 5000)).toBeNull();+ expect(history.observe('openai', [slot(100, future + offset)], 6000)).toBe('primary');+ },+ );++ it('accepts equal-timestamp live updates after a versioned full snapshot', () => {+ const history = new QuotaFullCelebrations();+ expect(history.observe('openai', [slot(100)], 1000)).toBe('primary');+ expect(history.observe('openai', [slot(20)], 1000)).toBeNull();+ expect(history.observe('openai', [slot(20)])).toBeNull();+ expect(history.observe('openai', [slot(100)], 2000)).toBe('primary');+ });++ it('consumes simultaneous windows together and keeps independent windows armed', () => {+ const history = new QuotaFullCelebrations();+ expect(history.observe('openai', [slot(100), slot(100, null, 'weekly')])).toBe('primary');+ expect(history.observe('openai', [slot(100), slot(100, null, 'weekly')])).toBeNull();+ history.observe('openai', [slot(90), slot(100, null, 'weekly')]);+ expect(history.observe('openai', [slot(100), slot(100, null, 'weekly')])).toBe('primary');+ });++ it('does not replay full quota when a future deadline is corrected or windows reorder', () => {+ const history = new QuotaFullCelebrations();+ const future = Date.now() + 60_000;+ expect(history.observe('openai', [slot(100, future)])).toBe('primary');+ expect(history.observe('openai', [slot(100, future + 1000)])).toBeNull();+ history.observe('openai', [slot(80, future), slot(100, future, 'weekly')]);+ expect(history.observe('openai', [slot(100, future, 'weekly')])).toBeNull();+ expect(history.observe('another-device:openai', [slot(100, future)])).toBe('primary');+ });++ it('ignores pending and invalid values, and does not replay when deadline metadata arrives', () => {+ const history = new QuotaFullCelebrations();+ expect(history.observe('openai', [{ ...slot(100), resetPending: true }])).toBeNull();+ expect(history.observe('openai', [slot(NaN)])).toBeNull();+ expect(history.observe('openai', [slot(100)])).toBe('primary');+ expect(history.observe('openai', [slot(100, 200)])).toBeNull();+ expect(history.observe('openai', [slot(100, null)])).toBeNull();+ expect(history.observe('openai', [slot(100, 200)])).toBeNull();+ });+});diff --git a/apps/desktop/src/renderer/components/status/quotaFullCelebrations.ts b/apps/desktop/src/renderer/components/status/quotaFullCelebrations.tsnew file mode 100644index 0000000000..d5a1e91e43--- /dev/null+++ b/apps/desktop/src/renderer/components/status/quotaFullCelebrations.ts@@ -0,0 +1,70 @@+import { getDataOwnerGeneration } from '@/contexts/dataOwnerGeneration';+import type { ChipWindowSlot } from './quotaResetRollup';++interface Observation {+ full: boolean;+ updatedAt: number | null;+}++/** View-only history shared across task mounts for the lifetime of this renderer. */+export class QuotaFullCelebrations {+ private ownerId = getDataOwnerGeneration().dataOwnerId;+ private readonly providers = new Map<+ string,+ {+ celebrated: boolean;+ windows: Map<string, Observation>;+ }+ >();++ observe(+ provider: string,+ windows: readonly (Pick<ChipWindowSlot, 'key' | 'remainingPercent'> & {+ resetPending: boolean;+ })[],+ snapshotUpdatedAt?: number | null,+ ): string | null {+ const ownerId = getDataOwnerGeneration().dataOwnerId;+ if (ownerId !== this.ownerId) {+ this.providers.clear();+ this.ownerId = ownerId;+ }+ let history = this.providers.get(provider);+ if (!history) {+ history = { celebrated: false, windows: new Map() };+ this.providers.set(provider, history);+ }+ const updatedAt =+ typeof snapshotUpdatedAt === 'number' &&+ Number.isFinite(snapshotUpdatedAt) &&+ snapshotUpdatedAt > 0+ ? snapshotUpdatedAt+ : null;+ let celebratingKey: string | null = null;+ windows.forEach((window) => {+ // Pending windows show text, not a percentage. Missing data never rearms a burst.+ if (window.resetPending || !Number.isFinite(window.remainingPercent)) return;+ const previous = history.windows.get(window.key);+ // Snapshot timestamps only reject stale task data; reset deadlines play no role.+ if (previous?.updatedAt != null) {+ // Equal timestamps are valid for live notifications that retain the+ // snapshot's timestamp; only strictly older task snapshots are stale.+ if (updatedAt === null || updatedAt < previous.updatedAt) return;+ }+ const full = window.remainingPercent === 100;+ const recovered = full && (previous ? !previous.full : !history.celebrated);+ history.windows.set(window.key, {+ full,+ updatedAt,+ });+ if (recovered) {+ history.celebrated = true;+ celebratingKey ??= window.key;+ }+ });+ // Consume all full windows together: one supplier update produces at most one burst.+ return celebratingKey;+ }+}++export const quotaFullCelebrations = new QuotaFullCelebrations();diff --git a/docs/design-rules/DESIGN.md b/docs/design-rules/DESIGN.mdindex 1bbc71f655..6c901dad64 100644--- a/docs/design-rules/DESIGN.md+++ b/docs/design-rules/DESIGN.md@@ -853,8 +853,8 @@ Only the two registered chart members inside Usage History may enlarge their non- **Morphing-dropdown tier (+/permission/model)**: bare at rest (`border border-transparent bg-transparent`); the pill outline appears only on hover (`hover:border-[var(--border-default)]` + `composer-pill-bg`); selected/danger tiers tint the text only, never the fill.- **Persistent-tool tier (voice/send)**: permanent outline / solid CTA (voice: `composer-pill-bg` + `border-default`, hover `model-trigger-hover`, recording state `surface-chip` fill + red-dot timer expansion; send: `send-btn-*` neutral-inverse solid).- **In-session (default) and the create dialog (create-agent) must match verbatim**: the five shared controls (+/permission/model/voice/send) no longer fork styles by `visualVariant`; `create-agent-control-*` / `create-agent-send-*` must not be used for these five controls (they remain only for the create dialog's own Claude|Codex segmented switch and its top mode/project/branch pills). Changing any control's chrome changes both surfaces. Contract test: `newMakerCreateAgentVisualContract.test.ts`.-- **Quota-reset confetti** — the third sanctioned motion class (approved 2026-07-23), **only** for the status-bar usage chip's "quota window reset reveal" (countdown hits zero → suspense "resetting…" → new snapshot lands):- - **Definition**: the instant the new snapshot confirms the reset, throw confetti once from the center of the revealing window segment, simultaneous with the 0%→100% percentage roll — making "the quota is back" a perceptible moment of celebration.+- **Quota-reset confetti** — the third sanctioned motion class (approved 2026-07-23), **only** for the status-bar usage chip’s full-quota reveal (updated by user decision, 2026-09-12):+ - **Definition**: the first observation of 100% remaining quota throws confetti once from the full window segment, including the first visit. Deduplicate by provider across task switches and component remounts. After that first burst, the quota must drop below 100% and return to 100% before another burst. Remaining at 100% never replays, even across scheduled cycles. Reset deadlines do not participate in this decision; official extra resets follow the same rule. Snapshot update timestamps only reject stale task data. The percentage roll keeps its own reset detection.- **Form** (finalized over four/five review rounds, 2026-07-23): **true parabolic toss + vanish on landing** — all particles launch simultaneously from the segment center in a ~**100° fan** (±50° of straight up) at equal speed, **constant horizontal velocity + constant vertical gravity** (decelerating up, accelerating down past the apex), so perceived speed is consistent from burst to fall; wider-angle particles fly lower arcs, travel farther, land earlier — the scatter comes from physics, not scripting. The final stretch before the ground line ends in a **short fade**: landing is fine, but lingering after landing ("corpsing") or vanishing without a fade is forbidden; the ground line jitters randomly so landing points don't queue up.- **Parameter red lines**: a one-shot celebration — simultaneous launch, no stagger delay; per-particle duration follows arc physics clamped to 0.9s–1.6s, total ≈1.6s (the number roll settles at 1.2s, then the last confetti falls a few tenths more; arc scale and rhythm are user-tuned, finalized 2026-07-23); ≤18 particles, 3–5px, torn down when done, never looping or persistent; particles are HTML elements animating only `transform` / `opacity` (compositor-only, engineering conventions §7; x/y split across two nested spans keeps horizontal velocity constant); colors come only from the four status-dot hue exemptions (done green / awaiting teal / thinking orange / error red), same values in both modes; must skip entirely under `prefers-reduced-motion`.- **Scope boundary**: this one spot only. Confetti must not leak into task completion, send success, or anywhere else — those stay on the §14.4 baseline (a new exemption requires a new entry here). Implementation: `apps/desktop/src/renderer/components/status/QuotaResetConfetti.tsx`.