Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
feat(mobile): 让安卓折叠屏使用 Duo 的分栏与桌面远控布局
Dasha3f2a82813b1
diff --git a/apps/mobile/modules/cindy-window-layout/android/build.gradle b/apps/mobile/modules/cindy-window-layout/android/build.gradlenew file mode 100644index 0000000000..bf86a2d00d--- /dev/null+++ b/apps/mobile/modules/cindy-window-layout/android/build.gradle@@ -0,0 +1,19 @@+plugins {+ id 'com.android.library'+ id 'expo-module-gradle-plugin'+}++group = 'com.cindy.windowlayout'+version = '0.1.0'++android {+ namespace 'com.cindy.windowlayout'+ defaultConfig {+ versionCode 1+ versionName '0.1.0'+ }+}++dependencies {+ implementation 'androidx.window:window:1.5.1'+}diff --git a/apps/mobile/modules/cindy-window-layout/android/src/main/AndroidManifest.xml b/apps/mobile/modules/cindy-window-layout/android/src/main/AndroidManifest.xmlnew file mode 100644index 0000000000..cc947c5679--- /dev/null+++ b/apps/mobile/modules/cindy-window-layout/android/src/main/AndroidManifest.xml@@ -0,0 +1 @@+<manifest />diff --git a/apps/mobile/modules/cindy-window-layout/android/src/main/java/com/cindy/windowlayout/CindyWindowLayoutModule.kt b/apps/mobile/modules/cindy-window-layout/android/src/main/java/com/cindy/windowlayout/CindyWindowLayoutModule.ktnew file mode 100644index 0000000000..494abe3015--- /dev/null+++ b/apps/mobile/modules/cindy-window-layout/android/src/main/java/com/cindy/windowlayout/CindyWindowLayoutModule.kt@@ -0,0 +1,107 @@+package com.cindy.windowlayout++import android.content.Context+import android.util.Log+import android.view.ViewTreeObserver+import androidx.window.layout.FoldingFeature+import androidx.window.layout.WindowInfoTracker+import expo.modules.kotlin.AppContext+import expo.modules.kotlin.modules.Module+import expo.modules.kotlin.modules.ModuleDefinition+import expo.modules.kotlin.viewevent.EventDispatcher+import expo.modules.kotlin.views.ExpoView+import kotlinx.coroutines.CoroutineScope+import kotlinx.coroutines.Dispatchers+import kotlinx.coroutines.Job+import kotlinx.coroutines.cancel+import kotlinx.coroutines.flow.catch+import kotlinx.coroutines.launch++class CindyWindowLayoutModule : Module() {+ override fun definition() = ModuleDefinition {+ Name("CindyWindowLayout")+ Constant("windowLayoutAvailable") { true }+ View(CindyWindowLayoutView::class) {+ Events("onGeometryChange")+ }+ }+}++/** One transparent probe per React window, matching the iOS geometry contract. */+class CindyWindowLayoutView(context: Context, appContext: AppContext) : ExpoView(context, appContext) {+ private val onGeometryChange by EventDispatcher()+ private var scope: CoroutineScope? = null+ private var folds: List<FoldingFeature> = emptyList()+ private var lastGeometry: Map<String, Any>? = null+ private val layoutListener = ViewTreeObserver.OnGlobalLayoutListener { publishGeometry() }++ init {+ importantForAccessibility = IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS+ isClickable = false+ isFocusable = false+ // React's hit test ignores the JS pointerEvents prop on ExpoView, so this+ // full-window probe would capture every touch. It treats a disabled view+ // as box-none, and the probe has no children to receive touches.+ isEnabled = false+ }++ override fun onAttachedToWindow() {+ super.onAttachedToWindow()+ lastGeometry = null+ viewTreeObserver.addOnGlobalLayoutListener(layoutListener)+ val activity = appContext.currentActivity ?: return+ scope = CoroutineScope(Job() + Dispatchers.Main.immediate).also { observer ->+ observer.launch {+ WindowInfoTracker.getOrCreate(context).windowLayoutInfo(activity)+ .catch { error ->+ Log.w("CindyWindowLayout", "Fold observation unavailable", error)+ folds = emptyList()+ publishGeometry()+ }+ .collect { info ->+ // Flat continuous displays have a crease but no logical division.+ // Physical hinges remain separating even when opened flat.+ folds = info.displayFeatures.filterIsInstance<FoldingFeature>().filter { it.isSeparating }+ publishGeometry()+ }+ }+ }+ }++ override fun onDetachedFromWindow() {+ viewTreeObserver.removeOnGlobalLayoutListener(layoutListener)+ scope?.cancel()+ scope = null+ folds = emptyList()+ lastGeometry = null+ super.onDetachedFromWindow()+ }++ private fun publishGeometry() {+ if (!isAttachedToWindow || width <= 0 || height <= 0) return+ val density = resources.displayMetrics.density+ val origin = IntArray(2)+ getLocationInWindow(origin)+ val regions = folds.map { fold ->+ val bounds = fold.bounds+ // WindowManager uses window-relative physical pixels; RN uses local dp.+ // Do not Rect.intersect/isEmpty: zero-thickness folds are valid separators.+ mapOf(+ "kind" to "division",+ "x" to (bounds.left - origin[0]) / density,+ "y" to (bounds.top - origin[1]) / density,+ "width" to bounds.width() / density,+ "height" to bounds.height() / density,+ )+ }+ val geometry: Map<String, Any> = mapOf(+ "width" to width / density,+ "height" to height / density,+ "regions" to regions,+ "reservedRegionsSupported" to true,+ )+ if (geometry == lastGeometry) return+ lastGeometry = geometry+ onGeometryChange(geometry)+ }+}diff --git a/apps/mobile/modules/cindy-window-layout/expo-module.config.json b/apps/mobile/modules/cindy-window-layout/expo-module.config.jsonnew file mode 100644index 0000000000..1d283397d1--- /dev/null+++ b/apps/mobile/modules/cindy-window-layout/expo-module.config.json@@ -0,0 +1,6 @@+{+ "platforms": ["android"],+ "android": {+ "modules": ["com.cindy.windowlayout.CindyWindowLayoutModule"]+ }+}diff --git a/apps/mobile/src/__tests__/AdaptiveWindow.test.tsx b/apps/mobile/src/__tests__/AdaptiveWindow.test.tsxnew file mode 100644index 0000000000..70196898d9--- /dev/null+++ b/apps/mobile/src/__tests__/AdaptiveWindow.test.tsx@@ -0,0 +1,66 @@+// @vitest-environment jsdom+// Component: Android fold bridge -> shared geometry. Existing pure geometry+// tests cannot detect lost native events, stale bounds after rotation/IME resize,+// or safe-area updates being overwritten by an Android snapshot.+import { act, createElement, useContext } from 'react';+import { createRoot } from 'react-dom/client';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { AdaptiveWindowProvider } from '@/platform/AdaptiveWindow';+import { GeometryContext } from '@/platform/AdaptiveWindowContext';+import type { WindowGeometry } from '@/platform/windowGeometry';++const fixture = vi.hoisted(() => ({+ size: { width: 700, height: 900 },+ insets: { top: 24, bottom: 24, left: 0, right: 0 },+ emit: null as null | ((event: { nativeEvent: Partial<WindowGeometry> }) => void),+}));+vi.mock('react-native', () => ({+ Platform: { OS: 'android' },+ View: ({ children }: any) => createElement('div', {}, children),+ StyleSheet: { create: (styles: unknown) => styles, absoluteFill: {} },+ useWindowDimensions: () => fixture.size,+}));+vi.mock('react-native-safe-area-context', () => ({ useSafeAreaInsets: () => fixture.insets }));+vi.mock('expo-modules-core', () => ({+ requireOptionalNativeModule: (name: string) => name === 'CindyWindowLayout' ? { windowLayoutAvailable: true } : null,+ requireNativeViewManager: () => ({ onGeometryChange }: any) => { fixture.emit = onGeometryChange; return null; },+}));++let host: HTMLDivElement;+let root: ReturnType<typeof createRoot>;+let latest: WindowGeometry;+function Consumer() { latest = useContext(GeometryContext)!; return null; }+function render() { act(() => root.render(<AdaptiveWindowProvider><Consumer /></AdaptiveWindowProvider>)); }+function emit(snapshot: Partial<WindowGeometry>) { act(() => fixture.emit!({ nativeEvent: snapshot })); }+const fold = { kind: 'division' as const, x: 0, y: 450, width: 700, height: 0 };+beforeEach(() => {+ (globalThis as any).IS_REACT_ACT_ENVIRONMENT = true;+ fixture.size = { width: 700, height: 900 };+ fixture.insets = { top: 24, bottom: 24, left: 0, right: 0 };+ host = document.createElement('div');+ root = createRoot(host);+});+afterEach(() => act(() => root.unmount()));++it('keeps responsive fallback until a native snapshot arrives and clears the fold when flat', () => {+ render();+ expect(latest).toMatchObject({ regions: [], reservedRegionsSupported: false });+ emit({ ...fixture.size, regions: [fold], reservedRegionsSupported: true });+ expect(latest).toMatchObject({ regions: [fold], insets: fixture.insets, barEdge: 'none' });+ fixture.insets = { top: 0, bottom: 32, left: 24, right: 0 };+ render();+ expect(latest.insets).toEqual(fixture.insets);+ emit({ ...fixture.size, regions: [], reservedRegionsSupported: true });+ expect(latest.regions).toEqual([]);+});++it('drops stale bounds during window resize and accepts the next local-dp snapshot', () => {+ render();+ emit({ ...fixture.size, regions: [fold], reservedRegionsSupported: true });+ fixture.size = { width: 900, height: 700 };+ render();+ expect(latest).toMatchObject({ ...fixture.size, regions: [] });+ const rotated = { ...fold, x: 450, y: 0, width: 0, height: 700 };+ emit({ ...fixture.size, regions: [rotated], reservedRegionsSupported: true });+ expect(latest.regions).toEqual([rotated]);+});diff --git a/apps/mobile/src/__tests__/windowGeometry.test.ts b/apps/mobile/src/__tests__/windowGeometry.test.tsindex 02e2288309..948a39fb8e 100644--- a/apps/mobile/src/__tests__/windowGeometry.test.ts+++ b/apps/mobile/src/__tests__/windowGeometry.test.ts@@ -8,6 +8,30 @@ const window = (patch: Partial<WindowGeometry> = {}): WindowGeometry => ({regularWidth: true, regularHeight: true, barEdge: 'right', regions: [], reservedRegionsSupported: true, ...patch,});describe('adaptive window regions', () => {+ // Android FoldingFeature reports a crease as a zero-width/height line.+ // Existing Duo cases only cover positive-area hinges. Exercise the production+ // pane/control layouts so Android cannot silently fall back to one pane.+ it('splits at zero-thickness Android folds without inventing a hinge gap', () => {+ const g = window({ width: 700, height: 900, insets: { top: 24, bottom: 24, left: 0, right: 0 },+ regions: [{ kind: 'division', x: 340, y: 0, width: 0, height: 900 }] });+ const panes = sessionPaneLayout(g);+ expect(panes.persistent).toBe(true);+ expect(panes.sidebarWidth).toBe(340);+ expect(panes.sidebarGap).toBe(0);+ expect(panes.detail).toEqual({ x: 340, y: 24, width: 360, height: 852 });+ const tabletop = { ...g, regions: [{ kind: 'division' as const, x: 0, y: 450, width: 700, height: 0 }] };+ expect(foldDesktopLayout(tabletop, 0, 240, false)?.media).toEqual({ x: 0, y: 24, width: 700, height: 426 });+ expect(controlRegion(tabletop)).toEqual({ x: 0, y: 450, width: 700, height: 426 });+ });+ it('rejects empty points, negative dimensions and folds that do not cross the window', () => {+ for (const region of [+ { x: 300, y: 300, width: 0, height: 0 },+ { x: 300, y: 0, width: -1, height: 700 },+ { x: 0, y: 300, width: 900, height: -1 },+ { x: 300, y: 800, width: 0, height: 700 },+ { x: 1000, y: 300, width: 900, height: 0 },+ ]) expect(windowDivision(window({ regions: [{ ...region, kind: 'division' }] }))).toBeNull();+ });it('reserves independent safe edges and room for both navigation and content', () => {const p = sessionPaneLayout(window());expect(p.persistent).toBe(true);diff --git a/apps/mobile/src/platform/AdaptiveWindow.tsx b/apps/mobile/src/platform/AdaptiveWindow.tsxindex d0eb2034c8..fa3c369d19 100644--- a/apps/mobile/src/platform/AdaptiveWindow.tsx+++ b/apps/mobile/src/platform/AdaptiveWindow.tsx@@ -5,22 +5,26 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';import type { WindowGeometry } from './windowGeometry';import { GeometryContext } from './AdaptiveWindowContext';-const native = Platform.OS === 'ios'- ? requireOptionalNativeModule<{ windowLayoutAvailable?: boolean }>('XdtIosActionSheet') : null;+// Android supplies fold bounds only; safe-area-context remains its inset source.+type GeometrySnapshot = Pick<WindowGeometry, 'width' | 'height' | 'regions' | 'reservedRegionsSupported'> & Partial<WindowGeometry>;+const moduleName = Platform.OS === 'ios' ? 'XdtIosActionSheet' : Platform.OS === 'android' ? 'CindyWindowLayout' : null;+const native = moduleName+ ? requireOptionalNativeModule<{ windowLayoutAvailable?: boolean }>(moduleName) : null;const Probe = native?.windowLayoutAvailable- ? requireNativeViewManager<ViewProps & { onGeometryChange(event: { nativeEvent: WindowGeometry }): void }>('XdtIosActionSheet') : null;+ ? requireNativeViewManager<ViewProps & { onGeometryChange(event: { nativeEvent: GeometrySnapshot }): void }>(moduleName!) : null;/** One observation source per window; old packages and other platforms keep normal responsive layout. */export function AdaptiveWindowProvider({ children }: { children: ReactNode }) {const window = useWindowDimensions();const insets = useSafeAreaInsets();- const [geometry, setGeometry] = useState<WindowGeometry | null>(null);+ const [geometry, setGeometry] = useState<GeometrySnapshot | null>(null);const current = geometry && Math.abs(geometry.width - window.width) < 1 && Math.abs(geometry.height - window.height) < 1? geometry : null;- const value = useMemo<WindowGeometry>(() => current ?? ({+ const value = useMemo<WindowGeometry>(() => ({width: window.width, height: window.height, insets,regularWidth: window.width >= 600, regularHeight: window.height >= 600,barEdge: 'none', regions: [], reservedRegionsSupported: false,+ ...current,}), [current, window.width, window.height, insets]);return <GeometryContext.Provider value={value}><View style={styles.root}>diff --git a/apps/mobile/src/platform/windowGeometry.ts b/apps/mobile/src/platform/windowGeometry.tsindex baf448bfb8..7f9bcf879d 100644--- a/apps/mobile/src/platform/windowGeometry.ts+++ b/apps/mobile/src/platform/windowGeometry.ts@@ -24,12 +24,16 @@ export function safeWindowRect(g: WindowGeometry): LayoutRect {export function windowDivision(g: WindowGeometry): { axis: 'vertical' | 'horizontal'; first: LayoutRect; second: LayoutRect } | null {const safe = safeWindowRect(g);for (const r of g.regions) {- if (r.kind !== 'division' || ![r.x, r.y, r.width, r.height].every(Number.isFinite)) continue;- if (r.height >= safe.height * 0.8 && r.width > 0 && r.x > safe.x && r.x + r.width < safe.x + safe.width) {+ if (r.kind !== 'division' || ![r.x, r.y, r.width, r.height].every(Number.isFinite) || r.width < 0 || r.height < 0) continue;+ // Android flexible displays report a line, not an occluding rectangle.+ // Check the actual overlap as a feature may lie outside a resized window.+ const spanY = Math.min(r.y + r.height, safe.y + safe.height) - Math.max(r.y, safe.y);+ const spanX = Math.min(r.x + r.width, safe.x + safe.width) - Math.max(r.x, safe.x);+ if (r.height > 0 && spanY >= safe.height * 0.8 && r.x > safe.x && r.x + r.width < safe.x + safe.width) {return { axis: 'vertical', first: { ...safe, width: r.x - safe.x },second: { ...safe, x: r.x + r.width, width: safe.x + safe.width - r.x - r.width } };}- if (r.width >= safe.width * 0.8 && r.height > 0 && r.y > safe.y && r.y + r.height < safe.y + safe.height) {+ if (r.width > 0 && spanX >= safe.width * 0.8 && r.y > safe.y && r.y + r.height < safe.y + safe.height) {return { axis: 'horizontal', first: { ...safe, height: r.y - safe.y },second: { ...safe, y: r.y + r.height, height: safe.y + safe.height - r.y - r.height } };}diff --git a/apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx b/apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsxindex b31d4fb112..b17ffd6be2 100644--- a/apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx+++ b/apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx@@ -578,7 +578,7 @@ export function RemoteDesktopSession({keyboard,);const [foldSkin, setFoldSkin] = useState<FoldDesktopSkin>("macii");- const foldSkinAvailable = Platform.OS === "ios" && Boolean(foldLayout);+ const foldSkinAvailable = Boolean(foldLayout);const retroDesktop =foldSkinAvailable &&foldSkin !== "modern" &&diff --git a/apps/mobile/src/remote-desktop/__tests__/screen.test.tsx b/apps/mobile/src/remote-desktop/__tests__/screen.test.tsxindex eea424c90d..d30730e6ee 100644--- a/apps/mobile/src/remote-desktop/__tests__/screen.test.tsx+++ b/apps/mobile/src/remote-desktop/__tests__/screen.test.tsx@@ -5567,6 +5567,45 @@ describe("remote desktop controls", () => {).toBeGreaterThanOrEqual(82);expect(render(geometry)).toMatchObject({ top: 26, left: 16 });});+ // Android fold support: exercise the real screen (not a layout copy). Previous+ // coverage used iOS only and missed its platform-gated skin selector. Folding,+ // keyboard resize and unfolding must not replace the viewer/control lease.+ it("offers the same tabletop keyboard on Android and retains the viewer across posture changes", async () => {+ fixture.platform = "android";+ fixture.size = { width: 700, height: 900 };+ fixture.safe = { top: 24, bottom: 24, left: 0, right: 0 };+ const geometry: WindowGeometry = {+ ...fixture.size, insets: fixture.safe, regularWidth: true, regularHeight: true,+ barEdge: "none", reservedRegionsSupported: true,+ regions: [{ kind: "division", x: 0, y: 450, width: 700, height: 0 }],+ };+ const render = (g: WindowGeometry) => act(() => root.render(+ <GeometryContext.Provider value={g}><RemoteDesktopScreen /></GeometryContext.Provider>,+ ));+ render(geometry);+ await connect();+ const viewer = host.querySelector('[data-testid="remoteDesktop.viewer"]');+ const starts = requests().filter((r) => r.op === "start").length;+ const stops = requests().filter((r) => r.op === "stop").length;+ expect(host.querySelector('[data-testid="remoteDesktop.retroKeys"]')).not.toBeNull();+ expect(fixture.views["remoteDesktop.skinSwitch"]).toBeDefined();+ const letter = fixture.views["remoteDesktop.retroKey.KeyA"];+ act(() => letter.onPressIn());+ act(() => letter.onPressOut());+ expect(sent()).toContainEqual({ type: "events", events: [{ kind: "key", code: "KeyA", down: true }] });+ // Android IME resizes the window instead of adding an iOS keyboard inset.+ fixture.size = { width: 700, height: 550 };+ render({ ...geometry, ...fixture.size });+ expect(host.querySelector('[data-testid="remoteDesktop.retroKeys"]')).toBeNull();+ fixture.size = { width: 700, height: 900 };+ render(geometry);+ expect(host.querySelector('[data-testid="remoteDesktop.retroKeys"]')).not.toBeNull();+ render({ ...geometry, regions: [] });+ expect(host.querySelector('[data-testid="remoteDesktop.retroKeys"]')).toBeNull();+ expect(host.querySelector('[data-testid="remoteDesktop.viewer"]')).toBe(viewer);+ expect(requests().filter((r) => r.op === "start")).toHaveLength(starts);+ expect(requests().filter((r) => r.op === "stop")).toHaveLength(stops);+ });it("folding and unfolding preserve the viewer and control lease", async () => {const geometry: WindowGeometry = {width: 900,diff --git a/docs/design-rules/DESIGN.md b/docs/design-rules/DESIGN.mdindex 62441b9655..a5d001f64c 100644--- a/docs/design-rules/DESIGN.md+++ b/docs/design-rules/DESIGN.md@@ -808,6 +808,7 @@ There is one mobile home, as on Desktop (owner decision, 2026-10-24): no separat- Full-screen custom overlays (remote desktop) keep back and tools on the right in both Duo landscape rotations, centered on one rail below the system status area. Back comes before tools. Respect safe areas and reserved folds; do not mirror the rail from a video orientation event.- Portrait tabletop remote desktop on iPhone Duo defaults to the Macintosh II-inspired case and functional keyboard (owner request, 2026-10-24). The lower-pane appearance rail accepts left/right swipes and an accessible tap to cycle directionally through classic, slim classic, full-screen retro, Macintosh II, PowerBook 170, ThinkPad 701C and modern (wrapping at either end), retaining the choice for this viewer. Slim and full-screen variants maximize the viewport and use a nearly full-width keyboard and invisible palmrest pointer surface; retain the original classic as a comparison. Switching between any two appearances releases held input. Pointer gestures cover the entire palmrest below the keys, independently of the much smaller visible touchpad, trackball or buttons; never extend this region over the keyboard or appearance rail. Use photorealistic classic Macintosh-inspired hardware artwork: textured ivory plastic, a deep CRT recess, a floppy slot and beveled keycaps (owner refinement, 2026-10-24). Hardware artwork keeps each model’s material in Light/Dark mode, with Light text tokens on ivory keycaps and Dark text tokens on graphite keycaps. Macintosh II and PowerBook retain their rainbow Apple badge; ThinkPad retains its black material and red TrackPoint. These are space-adapted homages, not mechanically exact replicas; surrounding app chrome follows the active theme. Fit the live viewer within the screen opening. Do not substitute flat CSS/vector panels for the physical material. Keep the live viewer and lease mounted across switches. Unfolded/landscape layouts and system keyboard panels retain their ordinary appearance. Implementation: `apps/mobile/src/remote-desktop/FoldDesktopSkin.tsx` and `RemoteDesktopScreen.tsx`.- Duo retro hardware draws the upper display case and lower keyboard deck edge-to-edge across their respective physical halves, meeting at the fold center. Scale the original artwork itself; never fill unsafe strips with a separate texture, tiled background or substitute image. Only the live screen, keyboard and interactive controls respect safe regions and toolbar clearance (owner correction, 2026-10-24).+- Android foldables share the same adaptive pane and portrait tabletop remote-desktop layouts, including the keyboard, touchpad and appearance selector (owner request, 2026-10-24). Use Jetpack WindowManager's separating folds/hinges in local dp; a zero-thickness crease is valid. Flat continuous screens return to ordinary responsive layout, while a physical hinge stays reserved. Preserve Android's own safe areas, navigation appearance and keyboard-driven window resize; do not emulate iOS vertical system bars or infer a fold from a device name or aspect ratio. Unsupported devices and older packages retain the responsive fallback.- Retain the first three appearances (classic, slim classic, full-screen retro), but apply the same space optimization to all three: enlarged host-aspect screen openings, nearly full-width keys, shared beveled spacebar and bounded legends. This supersedes keeping the classic layout unchanged as a comparison. Reserve the lower safe area and toolbar before allocating keyboard height; a short lower pane scrolls the keys rather than pushing the palmrest outside the screen (owner refinement, 2026-10-24).- Floating back/menu controls use the shared `navigationChrome.target` size; grouped actions use the same target breadth, without an extra outer padding ring. Use native Liquid Glass (regular for app navigation; clear over immersive remote desktop imagery), circle for a single icon and capsule for a group; do not tint neutral glass with opaque surface colors. Use semantic foregrounds and the existing non-glass fallback in both themes.- Clear glass over remote imagery follows the navigation theme: dark icons in Light and light icons in Dark. A localized light/dark backing inside the control outline protects contrast, with a matching translucent selected-state fill. Keep the material clear and the desktop outside the controls unchanged. This explicit two-mode palette is Cindy’s design choice; Clear material does not provide automatic foreground adaptation.