Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(desktop): 第六轮 review 收尾——共享节流不顺延本地窗口;warning-accent 登记
Kafeifeid85f8b90c9ef
diff --git a/apps/desktop/src/renderer/__tests__/tapdbConsentGate.test.ts b/apps/desktop/src/renderer/__tests__/tapdbConsentGate.test.tsindex d5b021aaa0..b6bd8dac08 100644--- a/apps/desktop/src/renderer/__tests__/tapdbConsentGate.test.ts+++ b/apps/desktop/src/renderer/__tests__/tapdbConsentGate.test.ts@@ -498,7 +498,9 @@ describe('engagement-driven activity reporting', () => {expect(tapdb.pvEvent).not.toHaveBeenCalled();- vi.advanceTimersByTime(10 * 60 * 1000); // 共享窗口也过期+ // 让位后本窗口对齐共享窗口终点(还剩 9.5 分钟),而不是自己再吃满 10 分钟 ——+ // 共享窗口一过就能上报,交替交互不会把间隔拉到近 20 分钟。+ vi.advanceTimersByTime(9 * 60 * 1000 + 31 * 1000);fireWindowEvent('keydown');expect(tapdb.pvEvent).toHaveBeenCalledWith({ '#tag': 'app_engaged' });diff --git a/apps/desktop/src/renderer/analytics/tapdbClient.ts b/apps/desktop/src/renderer/analytics/tapdbClient.tsindex 749f9a5dfe..2a27d5c798 100644--- a/apps/desktop/src/renderer/analytics/tapdbClient.ts+++ b/apps/desktop/src/renderer/analytics/tapdbClient.ts@@ -381,6 +381,9 @@ function reportActive(tag: 'app_start' | 'app_engaged'): void {now - sharedLast < ENGAGED_REPORT_INTERVAL_MS &&getLocalDateKey(new Date(sharedLast)) === getLocalDateKey(new Date(now))) {+ // 让位时本窗口的下一次尝试对齐共享窗口终点,而不是从现在顺延满 10 分钟 ——+ // 否则两窗口交替交互会把实际上报间隔拉长到近 20 分钟。+ nextEngagedReportAt = sharedLast + ENGAGED_REPORT_INTERVAL_MS;return;}window.localStorage.setItem(ENGAGED_SHARED_LAST_REPORT_KEY, String(now));diff --git a/docs/design-rules/DESIGN.md b/docs/design-rules/DESIGN.mdindex bf2d8162d5..8f65080dee 100644--- a/docs/design-rules/DESIGN.md+++ b/docs/design-rules/DESIGN.md@@ -73,7 +73,7 @@ Small interactive chips (button backgrounds, tag pills, avatar fills, selected-nThe grayscale rule is near-absolute. The following are the **only** sanctioned non-gray colors in the system — each tightly scoped to a specific surface. New semantic colors must not be introduced without being recorded here first.- **Focus Blue** (`#417CDD` at 50%; tokens `--focus-ring` / `--focus-ring-soft`): the keyboard-accessibility focus ring, finalized 2026-07-17 (replaces Tailwind's default `#3b82f6`). Never visible in normal interaction flow.-- **Thinking / Warning Orange** (`#EA6B17`, finalized 2026-07-17, replaces the frozen `#FF6600`): the shared warning-accent family, identical in both modes. Sanctioned consumers only — the ChatView Running Status Bar (sparkles icon + status text, e.g. `Spelunking...`, no background fill), running-state breathing icons in the sidebar, the collaboration toggle ON state, the plan-approve icon, the Full Access permission highlight, and the settings integration warning (see the §10 exemption table and §15 for the full token list: `--warning-accent` and its follower tokens). Any NEW consumer must be registered in §10 first.+- **Thinking / Warning Orange** (`#EA6B17`, finalized 2026-07-17, replaces the frozen `#FF6600`): the shared warning-accent family, identical in both modes. Sanctioned consumers only — the ChatView Running Status Bar (sparkles icon + status text, e.g. `Spelunking...`, no background fill), running-state breathing icons in the sidebar, the collaboration toggle ON state, the plan-approve icon, the Full Access permission highlight, the settings integration warning, and the workflow agent status strip's running cells (2×2px filled squares in the background-tasks panel detail and the workflow chat card, registered 2026-07-28 — running-state semantics, same family as the sidebar breathing icons; the done/failed/queued cells stay on their own semantic tokens) (see the §10 exemption table and §15 for the full token list: `--warning-accent` and its follower tokens). Any NEW consumer must be registered in §10 first.> **Additional narrowly-scoped exceptions** (documented in their respective component specs, do NOT generalize as system semantic colors):>