Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(sidebar): 在显示设置中标出归档筛选提示来源
Dashdac0414369ab
diff --git a/apps/desktop/scripts/fixtures/teammate-task-filter/ui-page.mjs b/apps/desktop/scripts/fixtures/teammate-task-filter/ui-page.mjsindex 0ccc094635..134f642e06 100644--- a/apps/desktop/scripts/fixtures/teammate-task-filter/ui-page.mjs+++ b/apps/desktop/scripts/fixtures/teammate-task-filter/ui-page.mjs@@ -9,8 +9,26 @@ export default {'src/renderer/features/device-link/useMachineSwitcher': `export const useEffectiveSelectedMachineId=()=> 'all';`,'src/renderer/features/cc-agent/hooks/useRemoteHostProjectOrders': `export const useLocalHostProjectOrder=()=>({snapshot:undefined}); export const useRemoteHostProjectOrders=()=>({orders:new Map()}); export const projectOrderWriteScopeForSelection=()=>({kind:'viewer'}); export const controllerManualOrderForDevice=()=>[];`,},- cases: { default: { about: 'Legacy choice migration → one Cindy across computers → unrestricted → single/multiple/reset; archived creator avatar' } },+ cases: {+ default: { about: 'Legacy choice migration → one Cindy across computers → unrestricted → single/multiple/reset; archived creator avatar' },+ 'archived-reminder': { about: 'Display settings → Task status → Archived shows reminder at every level; Active/All clear it' },+ },async check(page, ui) {+ if (ui.case === 'archived-reminder') {+ const statusRow = page.getByRole('menuitem').filter({ hasText: await ui.t('ccAgent.sidebar.taskStatusHeading') }).first();+ await statusRow.press('ArrowRight');+ const archived = page.getByRole('menuitem', { name: await ui.t('ccAgent.sidebar.taskStatus.archived'), exact: true });+ for (const reset of ['all', 'active']) {+ await archived.click();+ await statusRow.locator('[data-filter-reminder]').waitFor();+ assert.equal(await archived.locator('[data-filter-reminder]').count(), 1);+ assert.equal(await page.locator('button [data-filter-reminder]').count(), 1);+ await ui.capture(`archived-before-${reset}`);+ await page.getByRole('menuitem', { name: await ui.t(`ccAgent.sidebar.taskStatus.${reset}`), exact: true }).click();+ assert.equal(await page.locator('[data-filter-reminder]').count(), 0);+ }+ return;+ }const rows = page.locator('[data-task]');assert.equal(await rows.count(), 4);const filterHeading = await ui.t('ccAgent.sidebar.filterHeading');diff --git a/apps/desktop/src/renderer/features/cc-agent/sidebar/FilterReminderDot.tsx b/apps/desktop/src/renderer/features/cc-agent/sidebar/FilterReminderDot.tsxindex ea2999fcec..52a5df3e2c 100644--- a/apps/desktop/src/renderer/features/cc-agent/sidebar/FilterReminderDot.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/sidebar/FilterReminderDot.tsx@@ -3,13 +3,15 @@* 6px 强调色小圆点,落在筛选 / 视图设置按钮的右上角,提醒「当前列表不是默认的进行中视图」:* 搜索框旁的筛选按钮有筛选条件生效时、整理侧边栏按钮在查看「已归档」时都用它,* 位置 / 大小 / 颜色只此一处,不要在调用方另写一份。- * 纯装饰:状态由按钮的 aria-label 播报。宿主按钮须带 `relative`。+ * inline 用于菜单内对应的设置项。纯装饰:状态由按钮或菜单行的名称 / 当前值播报。+ * 默认角标的宿主按钮须带 `relative`。*/-export function FilterReminderDot() {+export function FilterReminderDot({ inline = false }: { inline?: boolean }) {return (<spanaria-hidden- className="pointer-events-none absolute right-0.5 top-0.5 size-1.5 rounded-full bg-[var(--status-bar-accent)]"+ data-filter-reminder=""+ className={`pointer-events-none size-1.5 shrink-0 rounded-full bg-[var(--status-bar-accent)] ${inline ? '' : 'absolute right-0.5 top-0.5'}`}/>);}diff --git a/apps/desktop/src/renderer/features/cc-agent/sidebar/SidebarFilterPopover.tsx b/apps/desktop/src/renderer/features/cc-agent/sidebar/SidebarFilterPopover.tsxindex 2b875d3a4a..dfc505445c 100644--- a/apps/desktop/src/renderer/features/cc-agent/sidebar/SidebarFilterPopover.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/sidebar/SidebarFilterPopover.tsx@@ -234,6 +234,7 @@ function MenuSubRow({value,valueNode,valueEmphasized = false,+ filterReminder = false,Icon,contentClassName,children,@@ -250,6 +251,7 @@ function MenuSubRow({valueNode?: ReactNode;/** 偏离默认值时右侧摘要转正文色,提示筛选生效。 */valueEmphasized?: boolean;+ filterReminder?: boolean;contentClassName?: string;children: ReactNode;}) {@@ -258,6 +260,7 @@ function MenuSubRow({<DropdownMenuSubTrigger className={MENU_ROW_CLASS}><MenuItemIcon Icon={Icon} /><span className="truncate" title={label}>{label}</span>+ {filterReminder && <FilterReminderDot inline />}<spanclassName={cn('ml-auto max-w-[96px] truncate text-right',@@ -295,6 +298,7 @@ function SelectMenuItem({onSelect,Icon,tip,+ filterReminder = false,}: {label: string;selected: boolean;@@ -302,6 +306,7 @@ function SelectMenuItem({Icon?: LucideIcon;/** 可选 hover 说明(见 Option.tipKey);为空时 Tip 透明透传,不挂 tooltip。 */tip?: string;+ filterReminder?: boolean;}) {return (// side="right":菜单本身贴着侧栏右缘,提示往上/下会压住相邻选项,往右才有空间@@ -318,6 +323,7 @@ function SelectMenuItem({><MenuItemIcon Icon={Icon} /><span className="truncate">{label}</span>+ {filterReminder && <FilterReminderDot inline />}{selected && (<Check size={15} className="ml-auto shrink-0 text-[var(--msg-assistant-text)]" />)}@@ -692,6 +698,7 @@ export function SidebarFilterPopover({<MenuSubRowlabel={t('ccAgent.sidebar.taskStatusHeading')}value={statusValue}+ filterReminder={status === 'archived'}Icon={ListChecks}>{STATUS_OPTIONS.map((option) => (@@ -699,6 +706,7 @@ export function SidebarFilterPopover({key={option.value}label={t(option.labelKey)}selected={status === option.value}+ filterReminder={status === 'archived' && option.value === 'archived'}Icon={option.Icon}onSelect={() => setStatus(option.value)}/>diff --git a/apps/mobile/assets/navigation/README.md b/apps/mobile/assets/navigation/README.mdindex 70e936b7a5..dfc2786e58 100644--- a/apps/mobile/assets/navigation/README.md+++ b/apps/mobile/assets/navigation/README.md@@ -22,3 +22,10 @@ archived tasks, ellipsis-attention-light.svg / ellipsis-attention-dark.svg. Theyshare the same 26pt canvas and Lucide Ellipsis geometry as the Android header;the attention variants add the same 6pt dot at the upper right in statusAccentand are rendered as original images, so each theme has its own glyph color.++`filter-reminder.png` (1x / 2x / 3x) carries that reminder into the native toolbar+menu's Task status and selected Archived rows. It is a 6pt circle centered in a+20pt transparent canvas, filled from `palettes.light.statusAccent` (the same value+in Dark), rendered as an original image. Generate it with Sharp from an SVG circle+at `(10, 10)`, radius `3`, scaling the canvas to 20 / 40 / 60 pixels. It is bundled+by Metro and does not add a native asset catalog or change the runtime fingerprint.diff --git a/apps/mobile/assets/navigation/filter-reminder.png b/apps/mobile/assets/navigation/filter-reminder.pngnew file mode 100644index 0000000000..dfbc261679Binary files /dev/null and b/apps/mobile/assets/navigation/filter-reminder.png differdiff --git a/apps/mobile/assets/navigation/[email protected] b/apps/mobile/assets/navigation/[email protected]new file mode 100644index 0000000000..d2f51d5cdfBinary files /dev/null and b/apps/mobile/assets/navigation/[email protected] differdiff --git a/apps/mobile/assets/navigation/[email protected] b/apps/mobile/assets/navigation/[email protected]new file mode 100644index 0000000000..f5ac8cc21eBinary files /dev/null and b/apps/mobile/assets/navigation/[email protected] differdiff --git a/apps/mobile/src/components/FilterReminderDot.tsx b/apps/mobile/src/components/FilterReminderDot.tsxindex 4251d85a7e..5c10bbba8a 100644--- a/apps/mobile/src/components/FilterReminderDot.tsx+++ b/apps/mobile/src/components/FilterReminderDot.tsx@@ -6,11 +6,19 @@ import { radius } from "@/theme/tokens";* 筛选提醒点(DESIGN.md「筛选提醒点」,2026-10-20 登记):6pt 强调色小圆点,落在筛选 / 视图设置* 按钮的右上角,提醒「当前列表不是默认的进行中视图」。搜索栏的筛选钮有筛选条件生效时、首页* 「⋯」显示设置钮在查看「已归档」时共用它;大小与颜色只此一处,调用方只给相对宿主按钮的偏移。- * 纯装饰:状态由按钮的无障碍名称 / 状态播报。宿主按钮须是定位容器。+ * 不传 offset 时作为菜单行内提示。纯装饰:状态由按钮或菜单行的无障碍名称 / 状态播报。+ * 角标的宿主按钮须是定位容器。*/-export function FilterReminderDot({ offset, testID }: { offset: StyleProp<ViewStyle>; testID?: string }) {+export function FilterReminderDot({ offset, testID }: { offset?: StyleProp<ViewStyle>; testID?: string }) {const styles = useThemedStyles(makeStyles);- return <View pointerEvents="none" style={[styles.dot, offset]} testID={testID} />;+ return (+ <View+ pointerEvents="none"+ accessible={false}+ style={[styles.dot, offset ? styles.positioned : undefined, offset]}+ testID={testID}+ />+ );}const makeStyles = (colors: ThemeColors) =>@@ -19,7 +27,8 @@ const makeStyles = (colors: ThemeColors) =>backgroundColor: colors.statusAccent,borderRadius: radius.pill,height: 6,- position: "absolute",+ flexShrink: 0,width: 6,},+ positioned: { position: "absolute" },});diff --git a/apps/mobile/src/platform/chrome/AnchoredPullDownMenu.android.tsx b/apps/mobile/src/platform/chrome/AnchoredPullDownMenu.android.tsxindex 2b3989123d..0a85598435 100644--- a/apps/mobile/src/platform/chrome/AnchoredPullDownMenu.android.tsx+++ b/apps/mobile/src/platform/chrome/AnchoredPullDownMenu.android.tsx@@ -36,6 +36,7 @@ import {useTheme,} from "@/theme";import { Text as AppText } from "@/components/AppText";+import { FilterReminderDot } from "@/components/FilterReminderDot";import type { NativePullDownAction } from "./NativePullDownMenu";/** Compose's exported modifiers lack a tri-state semantic setter. Keep one RN@@ -115,6 +116,7 @@ function CheckedMenuItem({</AppText>) : null}</View>+ {action.filterReminder ? <FilterReminderDot /> : null}{action.subactions?.length || action.state !== "off" ? (<AppTextstyle={{@@ -297,18 +299,24 @@ export function AnchoredPullDownMenu({}}onClick={() => choose(action)}>- {action.icon ? (+ {action.icon || action.filterReminder ? (<DropdownMenuItem.LeadingIcon><RNHostView matchContents>- <action.icon- color={action.disabled- ? colors.textTertiary- : action.destructive- ? colors.destructive- : colors.textPrimary}- size={iconSize.md}- strokeWidth={iconStroke.regular}- />+ <View>+ {action.filterReminder ? (+ <FilterReminderDot />+ ) : action.icon ? (+ <action.icon+ color={action.disabled+ ? colors.textTertiary+ : action.destructive+ ? colors.destructive+ : colors.textPrimary}+ size={iconSize.md}+ strokeWidth={iconStroke.regular}+ />+ ) : null}+ </View></RNHostView></DropdownMenuItem.LeadingIcon>) : null}diff --git a/apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx b/apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsxindex 41dd19e397..347e3760ea 100644--- a/apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx+++ b/apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx@@ -30,6 +30,7 @@ import {import { useSafeAreaInsets } from "react-native-safe-area-context";import { Check, ChevronLeft, ChevronRight, Minus } from "lucide-react-native";import { Text } from "@/components/AppText";+import { FilterReminderDot } from "@/components/FilterReminderDot";import { useReduceMotionEnabled } from "@/hooks/useReduceMotion";import type { NativePullDownAction } from "@/platform/chrome/NativePullDownMenu";import {@@ -434,6 +435,7 @@ function MenuRow({</Text>) : null}</View>+ {action.filterReminder ? <FilterReminderDot /> : null}{submenu ? (<ChevronRightcolor={colors.textTertiary}diff --git a/apps/mobile/src/platform/chrome/NativePullDownMenu.tsx b/apps/mobile/src/platform/chrome/NativePullDownMenu.tsxindex a6279bc73c..df7b1882b0 100644--- a/apps/mobile/src/platform/chrome/NativePullDownMenu.tsx+++ b/apps/mobile/src/platform/chrome/NativePullDownMenu.tsx@@ -15,6 +15,8 @@ export type NativePullDownAction = {disabled?: boolean;destructive?: boolean;displayInline?: boolean;+ /** 跟随筛选入口的提醒点,标出当前收窄列表的选项。 */+ filterReminder?: boolean;id: string;image?: MenuAction["image"];/** 与 iOS image 对应的跨平台菜单图标。 */@@ -51,12 +53,14 @@ function toMenuAction(title: action.title,// Fabric defaults the library's optional Int32 imageColor to transparent.// Always pair a symbol with a visible semantic color.- ...(action.image+ ...(action.image || action.filterReminder? {- image: action.image,- imageColor: action.destructive- ? colors.destructive- : colors.textPrimary,+ image: action.filterReminder ? "circle.fill" : action.image,+ imageColor: action.filterReminder+ ? colors.statusAccent+ : action.destructive+ ? colors.destructive+ : colors.textPrimary,}: {}),...(action.subtitle ? { subtitle: action.subtitle } : {}),diff --git a/apps/mobile/src/platform/chrome/nativeToolbarMenuItems.tsx b/apps/mobile/src/platform/chrome/nativeToolbarMenuItems.tsxindex 371d7b10ac..a760682d81 100644--- a/apps/mobile/src/platform/chrome/nativeToolbarMenuItems.tsx+++ b/apps/mobile/src/platform/chrome/nativeToolbarMenuItems.tsx@@ -2,20 +2,24 @@ import type { ComponentProps, ReactNode } from 'react';import { Stack } from 'expo-router';import type { NativePullDownAction } from './NativePullDownMenu';+const filterReminderIcon = require('../../../assets/navigation/filter-reminder.png');+// Return actual toolbar elements: Expo Router inspects their types before rendering.export function nativeToolbarMenuItems(actions: readonly NativePullDownAction[], onAction: (id: string) => void): ReactNode {return actions.map(action => action.subactions?.length ? (<Stack.Toolbar.Menu key={action.id} title={action.title} inline={action.displayInline}subtitle={action.subtitle}- icon={action.image as ComponentProps<typeof Stack.Toolbar.Menu>['icon']}+ icon={action.filterReminder ? filterReminderIcon : action.image as ComponentProps<typeof Stack.Toolbar.Menu>['icon']}+ iconRenderingMode={action.filterReminder ? 'original' : undefined}disabled={action.disabled} destructive={action.destructive}>{nativeToolbarMenuItems(action.subactions, onAction)}</Stack.Toolbar.Menu>) : (<Stack.Toolbar.MenuAction key={action.id} disabled={action.disabled}destructive={action.destructive} isOn={action.state === 'on'} subtitle={action.subtitle}- icon={action.image as ComponentProps<typeof Stack.Toolbar.MenuAction>['icon']}+ icon={action.filterReminder ? filterReminderIcon : action.image as ComponentProps<typeof Stack.Toolbar.MenuAction>['icon']}+ iconRenderingMode={action.filterReminder ? 'original' : undefined}unstable_keepPresented={action.keepPresented} onPress={() => onAction(action.id)}>{action.title}</Stack.Toolbar.MenuAction>diff --git a/apps/mobile/src/session/homeChromeMenus.ts b/apps/mobile/src/session/homeChromeMenus.tsindex a82e235520..99b8fea8f6 100644--- a/apps/mobile/src/session/homeChromeMenus.ts+++ b/apps/mobile/src/session/homeChromeMenus.ts@@ -311,9 +311,14 @@ export function buildHomeDisplayPullDownActions(input: {return [section("organize", organize),section("narrow", [- submenu("status", t(`${MENU}.statusHeading`), t(`${MENU}.status.${state.statusFilter}`), "checklist",- STATUS_OPTIONS.map((status) =>- checkable(`status.${status}`, t(`${MENU}.status.${status}`), state.statusFilter === status))),+ {+ ...submenu("status", t(`${MENU}.statusHeading`), t(`${MENU}.status.${state.statusFilter}`), "checklist",+ STATUS_OPTIONS.map((status) => ({+ ...checkable(`status.${status}`, t(`${MENU}.status.${status}`), state.statusFilter === status),+ filterReminder: state.statusFilter === "archived" && status === "archived",+ }))),+ filterReminder: state.statusFilter === "archived",+ },filter,]),section("appearance", [diff --git a/docs/design-rules/DESIGN.md b/docs/design-rules/DESIGN.mdindex 888eb94c33..8e3d2b15a0 100644--- a/docs/design-rules/DESIGN.md+++ b/docs/design-rules/DESIGN.md@@ -307,6 +307,15 @@ _Dark Mode text uses softened neutrals to reduce eye strain: **Soft Gray** (`#d4- **None in the core UI.** Cindy uses no gradients; visual separation comes from flat color blocks and single-pixel borders. This is a deliberate, almost philosophical design choice. (The login canvas is also flat by ruling — see §16.5.)- **Session-loading wordmark sheen — narrow functional exception (Desktop approved 2026-08-10).** `BrandLoadingMark` may use one neutral `transparent → --text-primary → transparent` gradient solely as a mask-clipped highlight inside the official Light/Dark wordmark while a session's message tree is deferred. It is a loading-progress signal, not a background, separator, fill, or reusable surface treatment. It may appear only after the 200ms delayed-reveal threshold, disappears as soon as the message tree mounts, and may not leak to messages, cards, dialogs, sidebars, or static branding. Full motion and brand-surface constraints are registered in §14.4 and §15.7.+### Filter reminder inside display settings (2026-10-28)++When the sidebar display-settings trigger shows the archived-view reminder, repeat+the same static accent dot on the Task status submenu and its selected Archived+option. Desktop and Mobile retain neutral labels and selection checkmarks. Active+and All remove the whole reminder path. Native iOS menus use their image slot for+the dot; custom menus use the shared inline dot. This extends the existing filter+reminder registration without changing which settings light the entry indicator.+## 3. Typography Rules### Font Family