Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(ui): keep interaction intact while things animate — Collapsible rings, inert exits, focus outlines (MUL-9974) (#11310)
Jiayuan Zhang0ad2cf4b944e
diff --git a/apps/web/features/landing/site/primitives.tsx b/apps/web/features/landing/site/primitives.tsxindex eef8fae64c..8fea0aa298 100644--- a/apps/web/features/landing/site/primitives.tsx+++ b/apps/web/features/landing/site/primitives.tsx@@ -4,7 +4,7 @@ import { ArrowUpRight } from "@multica/ui/icons";import { cn } from "@multica/ui/lib/utils";export const focusRing =- "outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-site-ink";+ "outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-2 focus-visible:outline-site-ink";export function Container({ className, ...props }: ComponentProps<"div">) {return (diff --git a/packages/ui/components/ui/__tests__/collapsible.test.tsx b/packages/ui/components/ui/__tests__/collapsible.test.tsxindex b685ddaa5d..513c726295 100644--- a/packages/ui/components/ui/__tests__/collapsible.test.tsx+++ b/packages/ui/components/ui/__tests__/collapsible.test.tsx@@ -1,9 +1,48 @@import { createRef } from "react";-import { cleanup, render, screen, waitFor } from "@testing-library/react";+import { act, cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";import { afterEach, describe, expect, it } from "vitest";-import { Collapsible, CollapsibleContent } from "../collapsible";+import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../collapsible";-afterEach(cleanup);+afterEach(() => {+ cleanup();+ // Base UI shares one frame scheduler across panels; a frame left queued by+ // one test would swallow the next test's frame requests.+ flushRaf();+ delete (Element.prototype as { getAnimations?: unknown }).getAnimations;+ delete (HTMLElement.prototype as { scrollHeight?: unknown }).scrollHeight;+});++// jsdom has no layout or animations, so Base UI would treat the panel as+// unanimated. An inline transition puts it on its CSS-transition path, a+// stubbed getAnimations() holds that transition open until the test ends it,+// and a non-zero scrollHeight gives it a height to close from.+const TRANSITION = { transitionDuration: "180ms", animationName: "none" };++function stubScrollHeight() {+ Object.defineProperty(HTMLElement.prototype, "scrollHeight", {+ configurable: true,+ get: () => 64,+ });+}++function holdTransitions() {+ let endTransition: () => void = () => {};+ const finished = new Promise<void>((resolve) => {+ endTransition = resolve;+ });+ Element.prototype.getAnimations = () =>+ [{ finished, pending: false, playState: "running" }] as unknown as Animation[];+ return endTransition;+}++async function frames(count = 4) {+ for (let i = 0; i < count; i++) {+ await act(async () => {+ flushRaf();+ await new Promise((resolve) => setTimeout(resolve, 0));+ });+ }+}describe("CollapsibleContent", () => {it("marks the panel settled only while its height is auto", async () => {@@ -35,4 +74,30 @@ describe("CollapsibleContent", () => {rerender(<Collapsible open={false}>{null}</Collapsible>);expect(ref.current).toBeNull();});++ it("leaves rows unreachable while it closes", async () => {+ stubScrollHeight();+ render(+ <Collapsible defaultOpen>+ <CollapsibleTrigger>Toggle</CollapsibleTrigger>+ <CollapsibleContent data-testid="panel" style={TRANSITION}>+ <button type="button">Row</button>+ </CollapsibleContent>+ </Collapsible>,+ );+ await frames();+ const panel = screen.getByTestId("panel");+ expect(panel).not.toHaveAttribute("inert");++ const endTransition = holdTransitions();+ fireEvent.click(screen.getByRole("button", { name: "Toggle" }));+ await frames();+ expect(panel).toHaveAttribute("data-ending-style");+ expect(panel).not.toHaveAttribute("data-settled");+ expect(panel).toHaveAttribute("inert");++ endTransition();+ await frames();+ expect(screen.queryByTestId("panel")).toBeNull();+ });});diff --git a/packages/ui/components/ui/collapsible.tsx b/packages/ui/components/ui/collapsible.tsxindex e2845c6e7f..d3dd9c93c6 100644--- a/packages/ui/components/ui/collapsible.tsx+++ b/packages/ui/components/ui/collapsible.tsx@@ -40,6 +40,7 @@ function observeSettled(panel: HTMLDivElement) {function CollapsibleContent({className,ref,+ render,...props}: CollapsiblePrimitive.Panel.Props) {const panelRef = React.useCallback(@@ -65,6 +66,16 @@ function CollapsibleContent({"flow-root h-(--collapsible-panel-height) overflow-hidden transition-[height,opacity] duration-[180ms] ease-[cubic-bezier(0.23,1,0.32,1)] data-settled:overflow-visible data-starting-style:h-0 data-starting-style:opacity-0 data-ending-style:h-0 data-ending-style:opacity-0 motion-reduce:transition-none",className)}+ // Rows in a closing panel take no clicks or focus.+ render={+ render ??+ ((panelProps, state) => (+ <div+ {...panelProps}+ inert={panelProps.inert || state.transitionStatus === "ending"}+ />+ ))+ }{...props}/>)diff --git a/packages/ui/docs/motion.md b/packages/ui/docs/motion.mdindex dfb6a1fa95..5e03e167ac 100644--- a/packages/ui/docs/motion.md+++ b/packages/ui/docs/motion.md@@ -83,6 +83,15 @@ Counts, progress, copy, send/stop, save state, toggles.- An icon that swaps to confirm an action (copy → check, send → stop) crossfades with a small scale, about 140ms: `CopyCheckIcon` for copy.- Color and background state changes use `transition-colors`.+## Keep interaction intact++An animated container must not break the controls inside it, while it moves or after it settles.++- Clip only while the size changes. A permanent `overflow-hidden` cuts off the focus rings and drop rings of the rows inside it. With motion, put `overflow: "hidden"` in `initial` and `exit`, and end `animate` with `transitionEnd: { overflow: "visible" }`, as `PanelDisclosure` in `packages/views/layout/panel-nav.tsx` and `ChatBarChip` in `packages/views/chat/components/chat-bar.tsx` do. `CollapsibleContent` already clips only while its height moves. A container that clips by design, such as a drawer that slides in from an edge or a card with rounded corners, keeps its rows inside their own scroll area, with room for the ring.+- Content that is leaving takes no clicks and no focus. Read `useIsPresent()` in the component that `AnimatePresence` renders, and set `inert={!isPresent}` on the leaving element. `pointer-events-none` alone still lets Tab land on it. `CollapsibleContent` is inert while it closes.+- motion owns every size it animates. motion writes `width` and `height` as inline styles, which win over a Tailwind class for the same property, such as `max-md:w-full`. When the size depends on the breakpoint, choose motion's target by breakpoint (`useIsMobile()`), as `StepInspectorDrawer` in `packages/views/common/task-transcript/agent-transcript-dialog.tsx` does.+- A focus ring has to be drawn before it can be kept whole. In Tailwind v4, `outline-none` also sets `--tw-outline-style: none`, which `focus-visible:outline-2` reads, so on the same element the two draw nothing. Add `focus-visible:outline-solid`, as `PANEL_ROW_CLASS` in `packages/views/layout/panel-nav.tsx` does. A ring on `::after` (`focus-visible:after:outline-2`) is unaffected, because the variable does not inherit.+## Reduced motionThe Appearance setting "Reduce motion" and the system's `prefers-reduced-motion` both mean instant: no movement, no size animation, no fade in its place.@@ -116,6 +125,7 @@ These stay instant:| Expand and collapse inside a `Collapsible` | `CollapsibleContent` | `packages/ui/components/ui/collapsible.tsx` || Expand and collapse driven by an `open` prop (panel sections, tree rows, object page groups) | `PanelDisclosure` | `packages/views/layout/panel-nav.tsx` || Issue drag lift and drop settle (board, list, swimlanes) | `ISSUE_DRAG_OVERLAY_CLASS`, `createIssueDropAnimation` | `packages/views/issues/components/drag-drop-animation.ts` |+| motion container that clips only while it resizes, and leaves without taking input | `PanelDisclosure`, `ChatBarChip` | `packages/views/layout/panel-nav.tsx`, `packages/views/chat/components/chat-bar.tsx` || Tabs indicator | `Tabs` | `packages/ui/components/ui/tabs.tsx` || Segmented control indicator | `SegmentedToggle` | `packages/views/common/segmented-toggle.tsx` || Reduced motion for motion/react | `MotionProvider` (mounted at the web and desktop roots) | `packages/views/common/motion-provider.tsx` |diff --git a/packages/ui/docs/motion.zh.md b/packages/ui/docs/motion.zh.mdindex 5fdb660f4b..45d3f85799 100644--- a/packages/ui/docs/motion.zh.md+++ b/packages/ui/docs/motion.zh.md@@ -83,6 +83,15 @@ Dialog、AlertDialog、Sheet、Popover、DropdownMenu、ContextMenu、Select、H- 确认操作的图标切换(复制 → 勾、发送 → 停止)交叉淡入并带轻微缩放,约 140ms;复制使用 `CopyCheckIcon`。- 颜色和背景的状态变化使用 `transition-colors`。+## 交互保持完好++动画容器不能破坏里面的控件,动的时候不能,停下来之后也不能。++- 只在尺寸变化期间裁切。常驻的 `overflow-hidden` 会裁掉里面各行的焦点环和拖放 ring。用 motion 时,把 `overflow: "hidden"` 放在 `initial` 和 `exit` 中,`animate` 以 `transitionEnd: { overflow: "visible" }` 收尾,参考 `packages/views/layout/panel-nav.tsx` 中的 `PanelDisclosure` 和 `packages/views/chat/components/chat-bar.tsx` 中的 `ChatBarChip`。`CollapsibleContent` 已经只在高度变化期间裁切。本身就要裁切的容器,比如从边缘滑入的抽屉、带圆角的卡片,要把行放在它们自己的滚动区域里,并给焦点环留出空间。+- 正在退场的内容不接受点击,也不能获得焦点。在 `AnimatePresence` 渲染的组件中读取 `useIsPresent()`,给退场元素加 `inert={!isPresent}`。只加 `pointer-events-none` 时,Tab 仍然能落到它上面。`CollapsibleContent` 在折叠期间是 inert 的。+- motion 动画的尺寸,全程由 motion 接管。motion 把 `width` 和 `height` 写成内联样式,优先级高于同一属性的 Tailwind class,比如 `max-md:w-full`。尺寸随断点变化时,按断点选择 motion 的目标值(`useIsMobile()`),参考 `packages/views/common/task-transcript/agent-transcript-dialog.tsx` 中的 `StepInspectorDrawer`。+- 焦点环先要画得出来,才谈得上完整。在 Tailwind v4 中,`outline-none` 同时会把 `--tw-outline-style` 设为 `none`,而 `focus-visible:outline-2` 读取的正是这个变量,两者在同一个元素上什么都画不出来。要加上 `focus-visible:outline-solid`,参考 `packages/views/layout/panel-nav.tsx` 中的 `PANEL_ROW_CLASS`。画在 `::after` 上的焦点环(`focus-visible:after:outline-2`)不受影响,因为这个变量不继承。+## 减少动态效果外观设置中的「减少动态效果」和系统的 `prefers-reduced-motion` 都表示瞬切:不移动,不做尺寸动画,也不用淡入淡出代替。@@ -116,6 +125,7 @@ Dialog、AlertDialog、Sheet、Popover、DropdownMenu、ContextMenu、Select、H| `Collapsible` 中的展开折叠 | `CollapsibleContent` | `packages/ui/components/ui/collapsible.tsx` || 由 `open` prop 控制的展开折叠(面板区块、树节点、对象页分组) | `PanelDisclosure` | `packages/views/layout/panel-nav.tsx` || Issue 拖拽抬起和放下落位(看板、列表、泳道) | `ISSUE_DRAG_OVERLAY_CLASS`、`createIssueDropAnimation` | `packages/views/issues/components/drag-drop-animation.ts` |+| 只在尺寸变化期间裁切、退场时不接受输入的 motion 容器 | `PanelDisclosure`、`ChatBarChip` | `packages/views/layout/panel-nav.tsx`、`packages/views/chat/components/chat-bar.tsx` || 标签指示器 | `Tabs` | `packages/ui/components/ui/tabs.tsx` || 分段控件指示器 | `SegmentedToggle` | `packages/views/common/segmented-toggle.tsx` || motion/react 的减少动态效果 | `MotionProvider`(挂在 web 和桌面端根部) | `packages/views/common/motion-provider.tsx` |diff --git a/packages/views/chat/components/chat-bar.tsx b/packages/views/chat/components/chat-bar.tsxindex da60c8aea6..0f070747a8 100644--- a/packages/views/chat/components/chat-bar.tsx+++ b/packages/views/chat/components/chat-bar.tsx@@ -107,6 +107,7 @@ function ChatBarChip({const isPresent = useIsPresent();return (<motion.span+ inert={!isPresent}initial={reduceMotion ? false : { opacity: 0, width: 0, scale: 0.95, overflow: "hidden" }}animate={{opacity: 1,@@ -149,7 +150,7 @@ function ChatBarChip({type="button"aria-label={closeLabel}onClick={onClose}- className="absolute top-1 right-1 flex size-4 cursor-pointer items-center justify-center rounded-sm text-muted-foreground opacity-0 outline-none transition-opacity hover:bg-surface-hover hover:text-foreground focus-visible:opacity-100 focus-visible:outline-2 focus-visible:outline-ring group-hover/chip:opacity-100 motion-reduce:transition-none [&_svg]:size-3"+ className="absolute top-1 right-1 flex size-4 cursor-pointer items-center justify-center rounded-sm text-muted-foreground opacity-0 outline-none transition-opacity hover:bg-surface-hover hover:text-foreground focus-visible:opacity-100 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring group-hover/chip:opacity-100 motion-reduce:transition-none [&_svg]:size-3"><X aria-hidden /></button>diff --git a/packages/views/chat/components/chat-input.tsx b/packages/views/chat/components/chat-input.tsxindex abdcd15ce2..498f020033 100644--- a/packages/views/chat/components/chat-input.tsx+++ b/packages/views/chat/components/chat-input.tsx@@ -827,7 +827,7 @@ export function ChatInput({type="button"onClick={() => setAttachedPageKey(null)}aria-label={t(($) => $.input.page_context_remove)}- className="flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground outline-none hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring"+ className="flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground outline-none hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring"><X aria-hidden className="size-3" /></button>diff --git a/packages/views/common/task-transcript/agent-transcript-dialog.tsx b/packages/views/common/task-transcript/agent-transcript-dialog.tsxindex 9f2cb1e6be..bf51443265 100644--- a/packages/views/common/task-transcript/agent-transcript-dialog.tsx+++ b/packages/views/common/task-transcript/agent-transcript-dialog.tsx@@ -1,7 +1,7 @@"use client";import { useState, useRef, useCallback, useEffect, useLayoutEffect, useMemo, forwardRef } from "react";-import { AnimatePresence, motion } from "motion/react";+import { AnimatePresence, motion, useIsPresent } from "motion/react";import { prefersReducedMotion, useReducedMotion } from "@multica/core/appearance";import { useWorkspaceId } from "@multica/core/hooks";import { UI_EASE_IN, UI_EASE_OUT, UI_EASE_OUT_CSS, UI_MOTION_DURATION } from "@multica/ui/lib/motion";@@ -1317,34 +1317,17 @@ export function AgentTranscriptDialog({</div><AnimatePresence initial={false}>{selectedStep && (- <motion.div+ <StepInspectorDrawerkey="step-inspector-drawer"- // Width is always owned by motion: below md the inspector- // fills the dialog (its close button must stay in view), so- // it only fades; from md up it slides in as a drawer.- initial={reduceMotion ? false : { opacity: 0, width: isMobile ? "100%" : 0 }}- animate={{- opacity: 1,- width: isMobile ? "100%" : "auto",- transition: { duration: reduceMotion ? 0 : 0.2, ease: UI_EASE_OUT },- }}- exit={- reduceMotion- ? { opacity: 0, transition: { duration: 0 } }- : {- opacity: 0,- ...(isMobile ? {} : { width: 0 }),- transition: { duration: UI_MOTION_DURATION.fast, ease: UI_EASE_IN },- }- }- className="flex shrink-0 overflow-hidden"+ isMobile={isMobile}+ reduceMotion={reduceMotion}><StepInspectorstep={selectedStep}runStartMs={runStartMs}onClose={() => setSelectedSeq(null)}/>- </motion.div>+ </StepInspectorDrawer>)}</AnimatePresence></div>@@ -1353,6 +1336,44 @@ export function AgentTranscriptDialog({);}+function StepInspectorDrawer({+ isMobile,+ reduceMotion,+ children,+}: {+ isMobile: boolean;+ reduceMotion: boolean;+ children: React.ReactNode;+}) {+ const isPresent = useIsPresent();+ return (+ <motion.div+ inert={!isPresent}+ // Width is always owned by motion: below md the inspector+ // fills the dialog (its close button must stay in view), so+ // it only fades; from md up it slides in as a drawer.+ initial={reduceMotion ? false : { opacity: 0, width: isMobile ? "100%" : 0 }}+ animate={{+ opacity: 1,+ width: isMobile ? "100%" : "auto",+ transition: { duration: reduceMotion ? 0 : 0.2, ease: UI_EASE_OUT },+ }}+ exit={+ reduceMotion+ ? { opacity: 0, transition: { duration: 0 } }+ : {+ opacity: 0,+ ...(isMobile ? {} : { width: 0 }),+ transition: { duration: UI_MOTION_DURATION.fast, ease: UI_EASE_IN },+ }+ }+ className="flex shrink-0 overflow-hidden"+ >+ {children}+ </motion.div>+ );+}+// Provider slugs this view names differently from the runtime list. The daemon// has no display-name override for Claude, so the shared formatter answers// "Claude" — but a run's diagnostics have always named the tool "Claude Code",diff --git a/packages/views/docs/components/doc-page.tsx b/packages/views/docs/components/doc-page.tsxindex 15a96b9bdc..1b8e61037a 100644--- a/packages/views/docs/components/doc-page.tsx+++ b/packages/views/docs/components/doc-page.tsx@@ -1,6 +1,6 @@"use client";import { useCallback, useEffect, useMemo, useRef, useState } from "react";-import { AnimatePresence, motion } from "motion/react";+import { AnimatePresence, motion, useIsPresent } from "motion/react";import { useQuery } from "@tanstack/react-query";import { useReducedMotion } from "@multica/core/appearance";import { UI_EASE_OUT } from "@multica/ui/lib/motion";@@ -600,17 +600,7 @@ function DocEditor({ doc }: { doc: Doc }) {</div><AnimatePresence initial={false}>{commentsOpen && (- <motion.div- key="doc-comments-panel"- initial={reduceMotion ? false : { width: 0, opacity: 0 }}- animate={{ width: 360, opacity: 1 }}- exit={{ width: 0, opacity: 0 }}- transition={{- duration: reduceMotion ? 0 : 0.22,- ease: [0.22, 1, 0.36, 1],- }}- className="flex h-full shrink-0 overflow-hidden"- >+ <DocCommentsDrawer key="doc-comments-panel" reduceMotion={reduceMotion}><DocCommentsPaneldocId={doc.id}threads={threads}@@ -628,7 +618,7 @@ function DocEditor({ doc }: { doc: Doc }) {setNewAnchor(null);}}/>- </motion.div>+ </DocCommentsDrawer>)}</AnimatePresence></div>@@ -644,6 +634,31 @@ function DocEditor({ doc }: { doc: Doc }) {);}+function DocCommentsDrawer({+ reduceMotion,+ children,+}: {+ reduceMotion: boolean;+ children: React.ReactNode;+}) {+ const isPresent = useIsPresent();+ return (+ <motion.div+ inert={!isPresent}+ initial={reduceMotion ? false : { width: 0, opacity: 0 }}+ animate={{ width: 360, opacity: 1 }}+ exit={{ width: 0, opacity: 0 }}+ transition={{+ duration: reduceMotion ? 0 : 0.22,+ ease: [0.22, 1, 0.36, 1],+ }}+ className="flex h-full shrink-0 overflow-hidden"+ >+ {children}+ </motion.div>+ );+}+function LiveStatus({connected,synced,diff --git a/packages/views/docs/components/doc-tree.tsx b/packages/views/docs/components/doc-tree.tsxindex b5a3405bd7..761631a965 100644--- a/packages/views/docs/components/doc-tree.tsx+++ b/packages/views/docs/components/doc-tree.tsx@@ -1,9 +1,7 @@"use client";import { useMemo, useState, type DragEvent, type ReactNode } from "react";-import { AnimatePresence, motion } from "motion/react";import { useQuery } from "@tanstack/react-query";import { toast } from "sonner";-import { useReducedMotion } from "@multica/core/appearance";import {ChevronRight,FileText,@@ -14,8 +12,8 @@ import {Plus,Trash2,} from "@multica/ui/icons";-import { UI_EASE_OUT } from "@multica/ui/lib/motion";import { Button } from "@multica/ui/components/ui/button";+import { Collapsible, CollapsibleContent } from "@multica/ui/components/ui/collapsible";import { IconButton } from "@multica/ui/components/common/icon-button";import { cn } from "@multica/ui/lib/utils";import { TruncatedTooltip } from "@multica/ui/components/common/truncated-tooltip";@@ -457,7 +455,7 @@ export function DocTree() {title={<AppLinkhref={p.docs()}- className="min-w-0 truncate rounded-md outline-none focus-visible:outline-2 focus-visible:outline-ring"+ className="min-w-0 truncate rounded-md outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring">{t(($) => $.kb)}</AppLink>@@ -590,10 +588,9 @@ function DocFolderItem({children: ReactNode;}) {const [open, setOpen] = useState(true);- const reduceMotion = useReducedMotion();return (- <li>+ <Collapsible open={open} render={<li />}><divdata-doc-folder={folderId}{...dragProps}@@ -627,28 +624,14 @@ function DocFolderItem({</TruncatedTooltip>{actions}</div>- <AnimatePresence initial={false}>- {open && (- <motion.div- key="folder-branch"- initial={reduceMotion ? false : { opacity: 0, height: 0, overflow: "hidden" }}- animate={{- opacity: 1,- height: "auto",- transitionEnd: { overflow: "visible" },- }}- exit={{ opacity: 0, height: 0, overflow: "hidden" }}- transition={{ duration: reduceMotion ? 0 : 0.16, ease: UI_EASE_OUT }}- >- <div- className="ml-5 border-l border-surface-border pl-[5px]"- {...dropProps}- >- {children}- </div>- </motion.div>- )}- </AnimatePresence>- </li>+ <CollapsibleContent>+ <div+ className="ml-5 border-l border-surface-border pl-[5px]"+ {...dropProps}+ >+ {children}+ </div>+ </CollapsibleContent>+ </Collapsible>);}diff --git a/packages/views/docs/components/move-dialog.tsx b/packages/views/docs/components/move-dialog.tsxindex 58d323db69..29af7d4f46 100644--- a/packages/views/docs/components/move-dialog.tsx+++ b/packages/views/docs/components/move-dialog.tsx@@ -123,7 +123,7 @@ export function MoveDialog({onClick={() => setSelected(id)}style={{ paddingLeft: 8 + depth * 16 }}className={cn(- "flex h-8 w-full items-center gap-2 rounded-md pr-2 text-left text-body outline-none transition-colors focus-visible:outline-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-40",+ "flex h-8 w-full items-center gap-2 rounded-md pr-2 text-left text-body outline-none transition-colors focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-40",choice === id? "bg-surface-selected text-surface-selected-foreground": "hover:bg-surface-hover",diff --git a/packages/views/inbox/components/inbox-tabs.tsx b/packages/views/inbox/components/inbox-tabs.tsxindex 1160906e88..736ec32f7f 100644--- a/packages/views/inbox/components/inbox-tabs.tsx+++ b/packages/views/inbox/components/inbox-tabs.tsx@@ -105,7 +105,7 @@ export function InboxTabs({tabIndex={active ? 0 : -1}onClick={() => onSelect(id)}className={cn(- "flex items-center rounded-md outline-none transition-colors focus-visible:outline-2 focus-visible:outline-ring",+ "flex items-center rounded-md outline-none transition-colors focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring",section ? "relative h-5 px-1" : "h-7 gap-1 px-2",// The open tab gives up width before the icons do; a label// still too long for the panel (Spanish, French) truncates.diff --git a/packages/views/layout/app-rail.tsx b/packages/views/layout/app-rail.tsxindex e213454fa7..19b33baea8 100644--- a/packages/views/layout/app-rail.tsx+++ b/packages/views/layout/app-rail.tsx@@ -246,7 +246,7 @@ function RailSpaceLink({aria-current={active ? "page" : undefined}onContextMenu={openInNewTab ? rowMenu.openAtPointer : undefined}{...peekHandlers}- className="group relative flex size-12 flex-col items-center justify-center gap-1 rounded-rail-item text-rail-item transition-colors outline-none hover:bg-rail-item-hover hover:text-rail-item-active-foreground focus-visible:outline-2 focus-visible:outline-ring aria-[current=page]:bg-rail-item-active aria-[current=page]:font-medium aria-[current=page]:text-rail-item-active-foreground"+ className="group relative flex size-12 flex-col items-center justify-center gap-1 rounded-rail-item text-rail-item transition-colors outline-none hover:bg-rail-item-hover hover:text-rail-item-active-foreground focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring aria-[current=page]:bg-rail-item-active aria-[current=page]:font-medium aria-[current=page]:text-rail-item-active-foreground"><Icon className="size-5" /><span className="max-w-full truncate px-0.5 text-micro leading-[14px]">{label}</span>diff --git a/packages/views/layout/bottom-bar-styles.ts b/packages/views/layout/bottom-bar-styles.tsindex 3b62f6a054..738c1e3e88 100644--- a/packages/views/layout/bottom-bar-styles.ts+++ b/packages/views/layout/bottom-bar-styles.ts@@ -4,6 +4,6 @@* `rail-styles.ts`).*/export const BOTTOM_BAR_ITEM_CLASS =- "inline-flex h-6 min-w-0 shrink-0 cursor-pointer items-center gap-1.5 rounded-md px-2 text-caption text-muted-foreground transition-colors outline-none hover:bg-sidebar-accent/70 hover:text-sidebar-accent-foreground focus-visible:outline-2 focus-visible:outline-ring aria-pressed:bg-sidebar-accent aria-pressed:text-sidebar-accent-foreground data-popup-open:bg-sidebar-accent data-popup-open:text-sidebar-accent-foreground [&_svg]:size-3.5 [&_svg]:shrink-0";+ "inline-flex h-6 min-w-0 shrink-0 cursor-pointer items-center gap-1.5 rounded-md px-2 text-caption text-muted-foreground transition-colors outline-none hover:bg-sidebar-accent/70 hover:text-sidebar-accent-foreground focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring aria-pressed:bg-sidebar-accent aria-pressed:text-sidebar-accent-foreground data-popup-open:bg-sidebar-accent data-popup-open:text-sidebar-accent-foreground [&_svg]:size-3.5 [&_svg]:shrink-0";export const BOTTOM_BAR_ICON_ITEM_CLASS = `${BOTTOM_BAR_ITEM_CLASS} w-6 justify-center px-0`;diff --git a/packages/views/layout/bottom-bar.tsx b/packages/views/layout/bottom-bar.tsxindex 0655972ed6..db4f4c6f3a 100644--- a/packages/views/layout/bottom-bar.tsx+++ b/packages/views/layout/bottom-bar.tsx@@ -56,7 +56,7 @@ function TeamStatus({ wsId }: { wsId: string }) {><AppLinkhref={teamHref}- className="inline-flex h-[22px] min-w-0 items-center gap-1.5 rounded-md bg-page-canvas pr-2 pl-1.5 text-caption font-medium text-foreground ring-1 ring-surface-border outline-none transition-colors hover:bg-surface-hover focus-visible:outline-2 focus-visible:outline-ring"+ className="inline-flex h-[22px] min-w-0 items-center gap-1.5 rounded-md bg-page-canvas pr-2 pl-1.5 text-caption font-medium text-foreground ring-1 ring-surface-border outline-none transition-colors hover:bg-surface-hover focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring"><TriangleAlert aria-hidden className="size-3.5 shrink-0 text-warning" /><span className="truncate">{t(($) => $.panels.team.stuck, { count: waitingTasks })}</span>diff --git a/packages/views/layout/panel-nav.tsx b/packages/views/layout/panel-nav.tsxindex 3192b9843a..c514e83b5b 100644--- a/packages/views/layout/panel-nav.tsx+++ b/packages/views/layout/panel-nav.tsx@@ -232,7 +232,7 @@ export function PanelSection({aria-controls={collapsed ? undefined : contentId}onClick={() => onCollapsedChange(!collapsed)}className={cn(- "flex size-5 shrink-0 items-center justify-center rounded-md outline-none hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",+ "flex size-5 shrink-0 items-center justify-center rounded-md outline-none hover:text-foreground focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring",// An open section leaves the row to its heading; the// heading itself collapses it (the Inbox's open tab).!collapsed && "sr-only focus-visible:not-sr-only",@@ -251,7 +251,7 @@ export function PanelSection({aria-expanded={!collapsed}aria-controls={collapsed ? undefined : contentId}onClick={() => onCollapsedChange(!collapsed)}- className="-mx-1 flex max-w-full items-center gap-0.5 rounded-md px-1 outline-none hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring"+ className="-mx-1 flex max-w-full items-center gap-0.5 rounded-md px-1 outline-none hover:text-foreground focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring"><span className="truncate">{label}</span>{chevron}@@ -283,7 +283,7 @@ export function PanelList({}export const PANEL_ROW_CLASS =- "flex min-h-[var(--nav-item-height,2rem)] w-full items-center gap-2.5 rounded-nav-item px-3 py-[var(--nav-item-padding-y,0.375rem)] text-left text-body transition-colors outline-none focus-visible:outline-2 focus-visible:outline-ring";+ "flex min-h-[var(--nav-item-height,2rem)] w-full items-center gap-2.5 rounded-nav-item px-3 py-[var(--nav-item-padding-y,0.375rem)] text-left text-body transition-colors outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring";/** The `nav-item` theme anchor; every row with an active state carries it. */export function panelRowAnchor(active: boolean) {diff --git a/packages/views/layout/panels/inbox-section.tsx b/packages/views/layout/panels/inbox-section.tsxindex 03f92b8860..4a0d77bbd2 100644--- a/packages/views/layout/panels/inbox-section.tsx+++ b/packages/views/layout/panels/inbox-section.tsx@@ -388,7 +388,7 @@ export function InboxSection({<buttontype="button"disabled={list.retrying}- className="shrink-0 rounded-md px-1 font-medium text-muted-foreground outline-none hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50"+ className="shrink-0 rounded-md px-1 font-medium text-muted-foreground outline-none hover:text-foreground focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50"onClick={list.retry}>{tInbox(($) => $.list.retry)}@@ -399,7 +399,7 @@ export function InboxSection({<span className="min-w-0 flex-1 truncate">{tInbox(($) => $.filters.empty)}</span><buttontype="button"- className="shrink-0 rounded-md px-1 font-medium text-muted-foreground outline-none hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring"+ className="shrink-0 rounded-md px-1 font-medium text-muted-foreground outline-none hover:text-foreground focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring"onClick={() => clearFilters(wsId)}>{tInbox(($) => $.filters.clear)}@@ -1129,7 +1129,7 @@ function SectionNote({ children, retry }: { children: ReactNode; retry?: { label<buttontype="button"disabled={retry.busy}- className="shrink-0 rounded-md px-1 font-medium text-muted-foreground outline-none hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50"+ className="shrink-0 rounded-md px-1 font-medium text-muted-foreground outline-none hover:text-foreground focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50"onClick={retry.run}>{retry.label}diff --git a/packages/views/layout/panels/sidebar-tree.tsx b/packages/views/layout/panels/sidebar-tree.tsxindex d82a364910..a46526860d 100644--- a/packages/views/layout/panels/sidebar-tree.tsx+++ b/packages/views/layout/panels/sidebar-tree.tsx@@ -36,7 +36,7 @@ export const SIDEBAR_SHIMMER_CLASS ="[--shimmer-text-base:var(--faint-foreground)] [--shimmer-text-spread:22%]";export const TREE_ROW_BUTTON_CLASS =- "relative z-10 flex size-5 shrink-0 items-center justify-center rounded-md outline-none transition-[color,opacity] hover:text-foreground focus-visible:opacity-100 focus-visible:outline-2 focus-visible:outline-ring";+ "relative z-10 flex size-5 shrink-0 items-center justify-center rounded-md outline-none transition-[color,opacity] hover:text-foreground focus-visible:opacity-100 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring";interface TreeRowProps extends React.ComponentProps<"div"> {href: string;@@ -264,7 +264,7 @@ export function PrivateProjectLock() {/** Issues under an expanded row sit flush and a step smaller than the rows* around them, so a group reads as one block. */const TREE_CHILD_ROW_CLASS =- "flex min-h-[26px] w-full items-center gap-2 rounded-lg px-2 py-[3px] text-left text-label transition-colors outline-none focus-visible:outline-2 focus-visible:outline-ring";+ "flex min-h-[26px] w-full items-center gap-2 rounded-lg px-2 py-[3px] text-left text-label transition-colors outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring";/** An issue row whose context menu is open stays lit as if hovered. The* selected row keeps its own fill. */@@ -502,7 +502,7 @@ export function SidebarIssueStatus({aria-label={label}// A pinned row is draggable; pressing its icon must not pick it up.onPointerDown={(event) => event.stopPropagation()}- className="relative z-10 -m-1 flex shrink-0 items-center justify-center rounded-md p-1 outline-none transition-colors hover:bg-surface-selected focus-visible:outline-2 focus-visible:outline-ring data-popup-open:bg-surface-selected"+ className="relative z-10 -m-1 flex shrink-0 items-center justify-center rounded-md p-1 outline-none transition-colors hover:bg-surface-selected focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring data-popup-open:bg-surface-selected"/>);return (diff --git a/packages/views/layout/rail-styles.ts b/packages/views/layout/rail-styles.tsindex b38931a122..2de510c214 100644--- a/packages/views/layout/rail-styles.ts+++ b/packages/views/layout/rail-styles.ts@@ -22,4 +22,4 @@ export const NAV_PEEK_CLASS ="absolute inset-y-0 left-0 z-30 flex w-(--sidebar-width) flex-col overflow-hidden rounded-xl bg-page-canvas shadow-[var(--floating-shadow)] ring-1 ring-floating-border";export const RAIL_ICON_BUTTON_CLASS =- "relative inline-flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-lg text-muted-foreground transition-colors outline-none hover:bg-sidebar-accent/70 hover:text-sidebar-accent-foreground focus-visible:outline-2 focus-visible:outline-ring data-popup-open:bg-sidebar-accent data-popup-open:text-sidebar-accent-foreground aria-[current=page]:bg-sidebar-accent aria-[current=page]:text-sidebar-accent-foreground [&_svg:not([class*='size-'])]:size-[18px]";+ "relative inline-flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-lg text-muted-foreground transition-colors outline-none hover:bg-sidebar-accent/70 hover:text-sidebar-accent-foreground focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring data-popup-open:bg-sidebar-accent data-popup-open:text-sidebar-accent-foreground aria-[current=page]:bg-sidebar-accent aria-[current=page]:text-sidebar-accent-foreground [&_svg:not([class*='size-'])]:size-[18px]";diff --git a/packages/views/layout/rail-workspaces.tsx b/packages/views/layout/rail-workspaces.tsxindex fe630aec15..a83dd86ad6 100644--- a/packages/views/layout/rail-workspaces.tsx+++ b/packages/views/layout/rail-workspaces.tsx@@ -171,7 +171,7 @@ export function RailWorkspaces() {<DropdownMenuTriggeraria-label={label}onContextMenu={tileMenu.openAtPointer}- className="relative inline-flex size-[34px] shrink-0 cursor-pointer items-center justify-center rounded-[var(--avatar-radius,var(--radius-lg))] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"+ className="relative inline-flex size-[34px] shrink-0 cursor-pointer items-center justify-center rounded-[var(--avatar-radius,var(--radius-lg))] outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-2 focus-visible:outline-ring"><WorkspaceAvatarname={current.name}