Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
MUL-8991: remove unreferenced frontend code and make knip blocking (#10331)
Jiayuan Zhang940d9eddf028
diff --git a/.github/actions/frontend-quality/action.yml b/.github/actions/frontend-quality/action.ymlindex 452b5313fb..06c3c00f86 100644--- a/.github/actions/frontend-quality/action.yml+++ b/.github/actions/frontend-quality/action.yml@@ -26,8 +26,6 @@ runs:run: |node --test scripts/theme-check.test.mjs- # Keep existing knip findings advisory in either caller.- name: Check for dead code and phantom dependencies (knip)- continue-on-error: trueshell: bashrun: pnpm knipdiff --git a/apps/docs/components/architecture-diagram.tsx b/apps/docs/components/architecture-diagram.tsxdeleted file mode 100644index 25b7039ee2..0000000000--- a/apps/docs/components/architecture-diagram.tsx+++ /dev/null@@ -1,157 +0,0 @@-/**- * Multica architecture diagram for §1.2 "How Multica Works".- *- * Boundary-style layout: one large panel for "Your side" (where all the- * interesting stuff happens — code, keys, compute), one smaller panel for- * "Multica" (metadata store and coordinator). The asymmetric sizes and the- * brand-tinted left panel visually argue Multica's core thesis: AI runs on- * your machine, not ours.- *- * No SVG arrows. Relationships are carried by the layout itself — client- * side vs. server side is the universal mental model, readers don't need- * arrows to understand it.- */-export function ArchitectureDiagram() {- return (- <div className="not-prose my-8">- {/* Desktop: asymmetric two-panel with connector */}- <div className="hidden md:grid md:grid-cols-[1.7fr_auto_1fr] md:gap-4 md:items-stretch">- <YourSide />- <Connector horizontal />- <MulticaSide />- </div>-- {/* Mobile: stacked */}- <div className="md:hidden space-y-4">- <YourSide />- <Connector horizontal={false} />- <MulticaSide />- </div>- </div>- );-}--function YourSide() {- return (- <div className="rounded-lg border border-brand/30 bg-brand/[0.03] p-6 flex flex-col">- <div className="text-[11px] font-semibold uppercase tracking-[0.12em] text-brand mb-5">- Your side- </div>-- <div className="flex-1 space-y-5">- {/* Client surfaces */}- <div>- <SectionLabel>Client</SectionLabel>- <div className="flex flex-wrap gap-2">- <Pill>Web app</Pill>- <Pill>CLI</Pill>- </div>- </div>-- {/* Horizontal separator */}- <div className="h-px bg-brand/15" />-- {/* Daemon + local tools */}- <div>- <SectionLabel>Daemon</SectionLabel>- <div className="text-xs text-muted-foreground mb-2.5">- Polls work from Multica. Invokes local AI coding tools:- </div>- <div className="flex flex-wrap gap-1.5">- <Pill>Claude Code</Pill>- <Pill>Codex</Pill>- <Pill>Cursor</Pill>- <Pill>Copilot</Pill>- <Pill muted>+ 6 more</Pill>- </div>- </div>- </div>-- {/* Tagline */}- <div className="mt-6 pt-4 border-t border-brand/20 flex items-center justify-center gap-3 text-[13px] font-medium text-brand">- <span>Your code.</span>- <span className="text-brand/40">·</span>- <span>Your keys.</span>- <span className="text-brand/40">·</span>- <span>Your CPU.</span>- </div>- </div>- );-}--function MulticaSide() {- return (- <div className="rounded-lg border border-border/70 bg-muted/25 p-6 flex flex-col">- <div className="text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground mb-5">- Multica- </div>-- <div className="flex-1 flex flex-col">- <SectionLabel>Server</SectionLabel>- <div className="text-xs text-muted-foreground mb-4">- Cloud or self-hosted- </div>-- <div className="text-xs space-y-1.5 text-foreground/80">- <div>Workspaces</div>- <div>Issues & tasks</div>- <div>Agent definitions</div>- <div>Realtime (WebSocket)</div>- </div>- </div>-- <div className="mt-6 pt-4 border-t border-border/60 text-[11px] text-muted-foreground text-center uppercase tracking-[0.08em]">- No AI execution here.- </div>- </div>- );-}--function Connector({ horizontal }: { horizontal: boolean }) {- if (horizontal) {- return (- <div- className="flex items-center justify-center text-muted-foreground/50 text-xl select-none px-1"- aria-hidden="true"- >- ⇄- </div>- );- }- return (- <div- className="text-center text-muted-foreground/50 text-xl select-none"- aria-hidden="true"- >- ⇅- </div>- );-}--function SectionLabel({ children }: { children: React.ReactNode }) {- return (- <div className="text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground/70 mb-1.5">- {children}- </div>- );-}--function Pill({- children,- muted = false,-}: {- children: React.ReactNode;- muted?: boolean;-}) {- return (- <span- className={`inline-flex items-center rounded-md border px-2 py-1 text-[11px] font-medium ${- muted- ? "border-border/50 bg-background/50 text-muted-foreground"- : "border-border/70 bg-background text-foreground"- }`}- >- {children}- </span>- );-}diff --git a/apps/docs/components/mermaid.tsx b/apps/docs/components/mermaid.tsxdeleted file mode 100644index 6ad47e9615..0000000000--- a/apps/docs/components/mermaid.tsx+++ /dev/null@@ -1,156 +0,0 @@-"use client";--import { useEffect, useId, useState } from "react";-import { useTheme } from "next-themes";--/**- * Client-side Mermaid diagram renderer.- *- * Dynamic-imports the mermaid package so it's only loaded on pages that- * actually use it (~400 KB). Re-renders when the page theme flips.- *- * Themed to pick up Multica design tokens at runtime via getComputedStyle,- * so the diagram tracks both light / dark mode and any future token changes- * without a rebuild.- */-export function Mermaid({ chart }: { chart: string }) {- const reactId = useId();- const { resolvedTheme } = useTheme();- const [svg, setSvg] = useState<string | null>(null);- const [error, setError] = useState<string | null>(null);-- useEffect(() => {- let cancelled = false;-- void import("mermaid").then(({ default: mermaid }) => {- const css = getComputedStyle(document.documentElement);- // Mermaid's khroma parser only understands legacy color syntax (hex /- // rgb / hsl / named). Our tokens are authored in oklch(), which- // getComputedStyle preserves verbatim, and a `color-mix(in srgb, ...)`- // round-trip still serializes as `color(srgb r g b)` per CSS Color 4.- // Rasterize each token through a 1x1 canvas: fillStyle accepts any CSS- // <color>, getImageData returns concrete 8-bit sRGB bytes regardless- // of the input's color space.- const canvas = document.createElement("canvas");- canvas.width = 1;- canvas.height = 1;- const ctx = canvas.getContext("2d", { willReadFrequently: true });-- const v = (name: string, fallback: string) => {- const raw = css.getPropertyValue(name).trim();- if (!raw || !ctx) return fallback;- // fillStyle silently ignores unparseable input; prime with a known- // baseline so a parse failure paints black, not whatever was last set.- ctx.fillStyle = "#000";- ctx.fillStyle = raw;- ctx.fillRect(0, 0, 1, 1);- const [r, g, b] = ctx.getImageData(0, 0, 1, 1).data;- return `rgb(${r}, ${g}, ${b})`;- };-- const brand = v("--brand", "#3b82f6");- const brandFg = v("--brand-foreground", "#ffffff");- const background = v("--background", "#ffffff");- const foreground = v("--foreground", "#111111");- const muted = v("--muted", "#f5f5f5");- const mutedFg = v("--muted-foreground", "#6b7280");- const border = v("--border", "#e5e5e5");- const accent = v("--accent", muted);-- mermaid.initialize({- startOnLoad: false,- theme: "base",- securityLevel: "strict",- fontFamily: "inherit",- themeVariables: {- // Canvas- background,- mainBkg: background,- // Nodes — soft muted fill with full-contrast text and a subtle border- primaryColor: muted,- primaryTextColor: foreground,- primaryBorderColor: border,- secondaryColor: accent,- secondaryTextColor: foreground,- secondaryBorderColor: border,- tertiaryColor: background,- tertiaryTextColor: foreground,- tertiaryBorderColor: border,- // Edges + labels- lineColor: mutedFg,- textColor: foreground,- edgeLabelBackground: background,- labelBackground: background,- // Clusters (subgraph boxes)- clusterBkg: accent,- clusterBorder: border,- titleColor: foreground,- // Notes / callouts- noteBkgColor: muted,- noteTextColor: foreground,- noteBorderColor: border,- // Brand accent — used for active / start states in state diagrams,- // user-decision diamonds in flowcharts, etc.- activeTaskBkgColor: brand,- activeTaskBorderColor: brand,- altBackground: muted,- // Sequence / git diagrams (harmless if unused)- actorBkg: muted,- actorBorder: border,- actorTextColor: foreground,- actorLineColor: mutedFg,- signalColor: foreground,- signalTextColor: foreground,- // Fine print- errorBkgColor: muted,- errorTextColor: foreground,- },- });-- // mermaid requires a DOM-valid id; useId returns ":r0:" which isn't.- const domId = `mermaid-${reactId.replace(/:/g, "")}`;-- mermaid- .render(domId, chart.trim())- .then((result) => {- if (!cancelled) {- setSvg(result.svg);- setError(null);- }- })- .catch((err: unknown) => {- if (!cancelled) {- setError(err instanceof Error ? err.message : String(err));- setSvg(null);- }- });- });-- return () => {- cancelled = true;- };- }, [chart, reactId, resolvedTheme]);-- if (error) {- return (- <pre className="my-4 rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive">- Mermaid error: {error}- </pre>- );- }-- if (!svg) {- return (- <div className="my-4 text-sm text-muted-foreground">- Rendering diagram…- </div>- );- }-- return (- <div- className="my-6 flex justify-center overflow-x-auto rounded-md border border-border/60 bg-muted/20 p-6 [&_.label_foreignObject>div]:!font-[inherit] [&_.nodeLabel]:!font-[inherit] [&_.edgeLabel]:!font-[inherit] [&_text]:!font-[inherit]"- dangerouslySetInnerHTML={{ __html: svg }}- />- );-}diff --git a/apps/docs/package.json b/apps/docs/package.jsonindex 5a90e36bab..faeeee8d90 100644--- a/apps/docs/package.json+++ b/apps/docs/package.json@@ -17,7 +17,6 @@"fumadocs-core": "catalog:","fumadocs-mdx": "catalog:","fumadocs-ui": "catalog:",- "mermaid": "catalog:","next": "catalog:","next-themes": "catalog:","react": "catalog:",diff --git a/apps/web/test/helpers.tsx b/apps/web/test/helpers.tsxdeleted file mode 100644index 6118e1b24f..0000000000--- a/apps/web/test/helpers.tsx+++ /dev/null@@ -1,112 +0,0 @@-import React from "react";-import { vi } from "vitest";-import { render, type RenderOptions } from "@testing-library/react";-import type { User, Workspace, MemberWithUser, Agent } from "@multica/core/types";--// Mock user-export const mockUser: User = {- id: "user-1",- name: "Test User",- email: "[email protected]",- avatar_url: null,- onboarded_at: "2026-01-01T00:00:00Z",- onboarding_questionnaire: {},- language: null,- timezone: null,- profile_description: "",- created_at: "2026-01-01T00:00:00Z",- updated_at: "2026-01-01T00:00:00Z",-};--// Mock workspace-export const mockWorkspace: Workspace = {- id: "ws-1",- name: "Test Workspace",- slug: "test-ws",- description: "A test workspace",- context: null,- settings: {},- repos: [],- issue_prefix: "TES",- avatar_url: null,- created_at: "2026-01-01T00:00:00Z",- updated_at: "2026-01-01T00:00:00Z",-};--// Mock members-export const mockMembers: MemberWithUser[] = [- {- id: "member-1",- workspace_id: "ws-1",- user_id: "user-1",- role: "owner",- created_at: "2026-01-01T00:00:00Z",- name: "Test User",- email: "[email protected]",- avatar_url: null,- },-];--// Mock agents-export const mockAgents: Agent[] = [- {- id: "agent-1",- workspace_id: "ws-1",- runtime_id: "runtime-1",- name: "Claude Agent",- description: "",- instructions: "",- avatar_url: null,- status: "idle",- runtime_mode: "cloud",- runtime_config: {},- custom_args: [],- visibility: "workspace",- permission_mode: "public_to",- invocation_targets: [{ target_type: "workspace", target_id: null }],- max_concurrent_tasks: 3,- model: "",- owner_id: null,- skills: [],- created_at: "2026-01-01T00:00:00Z",- updated_at: "2026-01-01T00:00:00Z",- archived_at: null,- archived_by: null,- },-];--// Mock auth context value--export const mockAuthValue: Record<string, any> = {- user: mockUser,- workspace: mockWorkspace,- members: mockMembers,- agents: mockAgents,- isLoading: false,- login: vi.fn(),- logout: vi.fn(),- updateWorkspace: vi.fn(),- updateCurrentUser: vi.fn(),- getMemberName: (userId: string) => {- const m = mockMembers.find((m) => m.user_id === userId);- return m?.name ?? "Unknown";- },- getAgentName: (agentId: string) => {- const a = mockAgents.find((a) => a.id === agentId);- return a?.name ?? "Unknown Agent";- },- getActorName: (type: string, id: string) => {- if (type === "member") {- const m = mockMembers.find((m) => m.user_id === id);- return m?.name ?? "Unknown";- }- if (type === "agent") {- const a = mockAgents.find((a) => a.id === id);- return a?.name ?? "Unknown Agent";- }- return "System";- },- getActorInitials: (type: string, id: string) => {- return "TU";- },-};diff --git a/knip.jsonc b/knip.jsoncindex 20c540bcbb..e7d44333d3 100644--- a/knip.jsonc+++ b/knip.jsonc@@ -34,7 +34,15 @@"apps/desktop": {// window-state.node-test.mjs is run by hand (`node --test`, see its// header) rather than by a package script, so nothing imports it.- "entry": ["eslint.config.mjs", "src/main/*.node-test.mjs"],+ // bundle-cli.node-test.mjs is run the same way. test/electron-guard.ts+ // is the `electron` alias target in vitest.config.ts, a path string+ // knip does not follow.+ "entry": [+ "eslint.config.mjs",+ "src/main/*.node-test.mjs",+ "scripts/*.node-test.mjs",+ "test/electron-guard.ts"+ ],// Consumed by `extends` in tsconfig.node.json / tsconfig.web.json.// knip follows `extends` from the default tsconfig.json only."ignoreDependencies": ["@multica/tsconfig"]@@ -61,11 +69,20 @@// export and knip picks that directory back up; the script reads the same// manifest, so the two stay in step without overlapping."packages/ui": {- "entry": ["eslint.config.mjs"],+ // shimmer-text-bundle.mjs is imported by e2e/shimmer-text.spec.ts, which+ // sits outside every workspace, and hands the fixture to esbuild as an+ // entry-point path.+ "entry": [+ "eslint.config.mjs",+ "test/shimmer-text-bundle.mjs",+ "test/shimmer-text-fixture.tsx"+ ],"project": ["**/*.{ts,tsx}"]},"packages/views": {- "entry": ["eslint.config.mjs"],+ // Passed to vitest as `--reporter=./test/timing-reporter.ts` when+ // refreshing shard timings (packages/views/test/README.md).+ "entry": ["test/timing-reporter.ts"],"project": ["**/*.{ts,tsx}"]},"packages/core": {@@ -73,6 +90,9 @@"project": ["**/*.{ts,tsx}"]},+ "packages/plugin-sdk": {+ "entry": ["eslint.config.mjs"]+ },"packages/eslint-config": {},"packages/tsconfig": {},"packages/vitest-setup": {}diff --git a/packages/views/agents/components/create-agent-dialog.test.tsx b/packages/views/agents/components/create-agent-dialog.test.tsxdeleted file mode 100644index ed04fd554a..0000000000--- a/packages/views/agents/components/create-agent-dialog.test.tsx+++ /dev/null@@ -1,411 +0,0 @@-// @vitest-environment jsdom--import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";-import { QueryClient, QueryClientProvider } from "@tanstack/react-query";-import { render, screen, fireEvent, cleanup } from "@testing-library/react";-import type { Agent, MemberWithUser, RuntimeDevice } from "@multica/core/types";-import { I18nProvider } from "@multica/core/i18n/react";-import { WorkspaceSlugProvider } from "@multica/core/paths";-import { configStore } from "@multica/core/config";-import { COMPOSIO_MCP_APPS_FLAG } from "@multica/core/feature-flags";-import { NavigationProvider, type NavigationAdapter } from "../../navigation";-import enCommon from "../../locales/en/common.json";-import enAgents from "../../locales/en/agents.json";--const navigationStub: NavigationAdapter = {- push: vi.fn(),- replace: vi.fn(),- back: vi.fn(),- pathname: "/",- searchParams: new URLSearchParams(),- hash: "",- getShareableUrl: (path: string) => path,-};--const TEST_RESOURCES = { en: { common: enCommon, agents: enAgents } };--vi.mock("@multica/core/hooks", () => ({- useWorkspaceId: () => "ws-1",-}));--// ModelDropdown talks to the api; the create dialog only needs it as a-// stand-in here, so swap it out.-vi.mock("./model-dropdown", () => ({- ModelDropdown: () => null,-}));--// Provider logos don't matter for these assertions but they pull in SVGs.-vi.mock("../../runtimes/components/provider-logo", () => ({- ProviderLogo: () => null,-}));--// Avatars hit the api for member metadata.-vi.mock("../../common/actor-avatar", () => ({- ActorAvatar: () => null,-}));--vi.mock("sonner", () => ({- toast: { error: vi.fn(), success: vi.fn() },-}));--import { CreateAgentDialog } from "./create-agent-dialog";--const ME = "user-me";-const OTHER = "user-other";--const members: MemberWithUser[] = [- {- id: "m-me",- user_id: ME,- workspace_id: "ws-1",- role: "member",- name: "Me",- email: "[email protected]",- avatar_url: null,- created_at: "2026-01-01T00:00:00Z",- },- {- id: "m-other",- user_id: OTHER,- workspace_id: "ws-1",- role: "member",- name: "Other",- email: "[email protected]",- avatar_url: null,- created_at: "2026-01-01T00:00:00Z",- },-];--function makeRuntime(overrides: Partial<RuntimeDevice>): RuntimeDevice {- return {- id: "rt",- workspace_id: "ws-1",- daemon_id: null,- name: "Test Runtime",- runtime_mode: "local",- provider: "claude",- launch_header: "",- status: "online",- device_info: "host.local",- metadata: {},- owner_id: ME,- visibility: "private",- last_seen_at: "2026-04-27T11:59:50Z",- created_at: "2026-04-01T00:00:00Z",- updated_at: "2026-04-01T00:00:00Z",- ...overrides,- };-}--function makeDuplicateSource(runtimeId: string): Agent {- return {- id: "agent-source",- workspace_id: "ws-1",- runtime_id: runtimeId,- name: "Source Agent",- description: "",- instructions: "",- avatar_url: null,- runtime_mode: "local",- runtime_config: {},- custom_args: [],- visibility: "private",- permission_mode: "private",- invocation_targets: [],- status: "idle",- max_concurrent_tasks: 1,- model: "",- owner_id: ME,- skills: [],- created_at: "2026-04-01T00:00:00Z",- updated_at: "2026-04-01T00:00:00Z",- archived_at: null,- archived_by: null,- };-}--function renderDialog(runtimes: RuntimeDevice[], template?: Agent) {- const queryClient = new QueryClient({- defaultOptions: { queries: { retry: false } },- });- const onCreate = vi.fn().mockResolvedValue(undefined);- const onClose = vi.fn();- render(- <I18nProvider locale="en" resources={TEST_RESOURCES}>- <QueryClientProvider client={queryClient}>- <WorkspaceSlugProvider slug="test-ws">- <NavigationProvider value={navigationStub}>- <CreateAgentDialog- runtimes={runtimes}- members={members}- currentUserId={ME}- template={template}- onClose={onClose}- onCreate={onCreate}- />- </NavigationProvider>- </WorkspaceSlugProvider>- </QueryClientProvider>- </I18nProvider>,- );- return { onCreate, onClose };-}--describe("CreateAgentDialog runtime visibility gate", () => {- beforeEach(() => vi.clearAllMocks());- // Base UI Dialog renders into a portal on document.body and leaves- // focus-guard / inert wrapper divs around after the React tree unmounts.- // The auto-cleanup from @testing-library/react drops the container but- // not the portal residue, so two-tests-in-a-row queries see double- // matches ("All", "My Runtime"). Force cleanup + wipe body between tests.- afterEach(() => {- cleanup();- document.body.innerHTML = "";- });-- it("disables another member's private runtime in the picker", () => {- const mine = makeRuntime({ id: "rt-mine", name: "My Runtime", owner_id: ME, visibility: "private" });- const othersPrivate = makeRuntime({- id: "rt-others-private",- name: "Others Private",- owner_id: OTHER,- visibility: "private",- });- renderDialog([mine, othersPrivate]);-- // Flip to "All" so other-owned runtimes show.- fireEvent.click(screen.getByText("All"));- // Open the picker.- fireEvent.click(- screen.getByText("My Runtime", { selector: "span.truncate" }),- );-- const disabledRow = screen- .getByText("Others Private")- .closest("button") as HTMLButtonElement;- expect(disabledRow).not.toBeNull();- expect(disabledRow).toHaveAttribute("aria-disabled", "true");- });-- it("lets a plain member pick another member's public runtime", () => {- const mine = makeRuntime({ id: "rt-mine", name: "My Runtime", owner_id: ME, visibility: "private" });- const othersPublic = makeRuntime({- id: "rt-others-public",- name: "Others Public",- owner_id: OTHER,- visibility: "public",- });- renderDialog([mine, othersPublic]);-- fireEvent.click(screen.getByText("All"));- fireEvent.click(- screen.getByText("My Runtime", { selector: "span.truncate" }),- );-- const publicRow = screen- .getByText("Others Public")- .closest("button") as HTMLButtonElement;- expect(publicRow).not.toBeNull();- expect(publicRow.disabled).toBe(false);- });-- it("defaults the selected runtime to a usable one, not a locked private", () => {- const othersPrivate = makeRuntime({- id: "rt-others-private",- name: "Others Private",- owner_id: OTHER,- visibility: "private",- });- const mine = makeRuntime({- id: "rt-mine",- name: "My Runtime",- owner_id: ME,- visibility: "private",- });- renderDialog([othersPrivate, mine]);-- // The trigger label shows the selected runtime name. The picker must- // not seed with the other-owned private runtime even if it sorted- // first in the input list.- expect(screen.queryByText("Others Private", { selector: "span.truncate" })).toBeNull();- expect(screen.getByText("My Runtime", { selector: "span.truncate" })).toBeInTheDocument();- });-- it("in duplicate mode, does not pre-fill the source agent's runtime when it's now locked", async () => {- // The source runtime is owned by someone else and now private — the- // duplicate flow used to seed with it anyway, leaving the user with- // a Create button that 403s server-side. Now we fall back to the- // first usable runtime instead.- const othersPrivate = makeRuntime({- id: "rt-others-private",- name: "Others Private",- owner_id: OTHER,- visibility: "private",- });- const mine = makeRuntime({- id: "rt-mine",- name: "My Runtime",- owner_id: ME,- visibility: "private",- });- const duplicateSource = makeDuplicateSource("rt-others-private");- const { onCreate } = renderDialog([othersPrivate, mine], duplicateSource);-- expect(- screen.getByText("My Runtime", { selector: "span.truncate" }),- ).toBeInTheDocument();- expect(- screen.queryByText("Others Private", { selector: "span.truncate" }),- ).toBeNull();-- // Sanity check: with a usable selection seeded, Create should submit.- fireEvent.click(screen.getByText("Create"));- await new Promise((r) => setTimeout(r, 0));- expect(onCreate).toHaveBeenCalledTimes(1);- expect(onCreate.mock.calls[0]?.[0].runtime_id).toBe("rt-mine");- });-- it("disables Create when the selected runtime is locked (duplicate source + no usable fallback)", () => {- // Edge case: the source agent points at a locked runtime AND the workspace- // has no usable alternatives in scope. The defense-in-depth gate on- // the Create button must keep the user from submitting a 403.- const onlyOthersPrivate = makeRuntime({- id: "rt-only-others-private",- name: "Only Others Private",- owner_id: OTHER,- visibility: "private",- });- // Flip the picker to "All" so the locked runtime is at least- // visible — that's the scope where the selected-but-locked state- // can persist after the initial seed search returns nothing.- const duplicateSource = makeDuplicateSource("rt-only-others-private");- renderDialog([onlyOthersPrivate], duplicateSource);-- // The Create button is rendered by lucide-free CTA text "Create".- const createBtn = screen- .getAllByRole("button")- .find((b) => b.textContent === "Create");- expect(createBtn).toBeDefined();- expect((createBtn as HTMLButtonElement).disabled).toBe(true);- });-});--describe("CreateAgentDialog access picker (MUL-4010, feature-flag gated)", () => {- beforeEach(() => {- vi.clearAllMocks();- // The dialog's default (workspace) still needs to be usable by ME:- // reset flags before every test so a stray "on" state in one test- // can't bleed into the next.- configStore.getState().setFeatureFlags({});- });-- afterEach(() => {- cleanup();- document.body.innerHTML = "";- configStore.getState().setFeatureFlags({});- });-- it("keeps the legacy Workspace/Personal toggle when the flag is OFF", async () => {- configStore.getState().setFeatureFlags({ [COMPOSIO_MCP_APPS_FLAG]: false });- const mine = makeRuntime({ id: "rt-mine", name: "My Runtime", owner_id: ME });- const { onCreate } = renderDialog([mine]);-- // Legacy copy is rendered — matches VISIBILITY_DESCRIPTION.- expect(screen.getByText(/All members can assign/i)).toBeInTheDocument();-- fireEvent.change(screen.getByPlaceholderText("e.g. Deep Research Agent"), {- target: { value: "Legacy Agent" },- });- fireEvent.click(screen.getByText("Create"));- await new Promise((r) => setTimeout(r, 0));-- const payload = onCreate.mock.calls[0]?.[0];- expect(payload).toBeDefined();- // Legacy path submits visibility, NOT permission_mode/invocation_targets.- expect(payload.visibility).toBe("workspace");- expect(payload.permission_mode).toBeUndefined();- expect(payload.invocation_targets).toBeUndefined();- });-- it("submits permission_mode=public_to + workspace target when the flag is ON (default)", async () => {- configStore.getState().setFeatureFlags({ [COMPOSIO_MCP_APPS_FLAG]: true });- const mine = makeRuntime({ id: "rt-mine", name: "My Runtime", owner_id: ME });- const { onCreate } = renderDialog([mine]);-- // New copy replaces the old one.- expect(screen.getByText("Only you can run this agent")).toBeInTheDocument();- expect(screen.getByText("Entire workspace")).toBeInTheDocument();- expect(screen.getByText("Specific people")).toBeInTheDocument();-- fireEvent.change(screen.getByPlaceholderText("e.g. Deep Research Agent"), {- target: { value: "Access Agent" },- });- fireEvent.click(screen.getByText("Create"));- await new Promise((r) => setTimeout(r, 0));-- const payload = onCreate.mock.calls[0]?.[0];- expect(payload).toBeDefined();- // MUL-3963 payload shape.- expect(payload.visibility).toBeUndefined();- expect(payload.permission_mode).toBe("public_to");- expect(payload.invocation_targets).toEqual([- { target_type: "workspace" },- ]);- });-- it("submits permission_mode=private with empty targets when Private is chosen", async () => {- configStore.getState().setFeatureFlags({ [COMPOSIO_MCP_APPS_FLAG]: true });- const mine = makeRuntime({ id: "rt-mine", name: "My Runtime", owner_id: ME });- const { onCreate } = renderDialog([mine]);-- fireEvent.change(screen.getByPlaceholderText("e.g. Deep Research Agent"), {- target: { value: "Private Agent" },- });- // Click the Private card. The Private description doubles as a stable- // click target inside the button.- fireEvent.click(screen.getByText("Only you can run this agent"));- fireEvent.click(screen.getByText("Create"));- await new Promise((r) => setTimeout(r, 0));-- const payload = onCreate.mock.calls[0]?.[0];- expect(payload).toBeDefined();- expect(payload.permission_mode).toBe("private");- expect(payload.invocation_targets).toEqual([]);- });-- it("does not create when specific-people scope has no member", async () => {- configStore.getState().setFeatureFlags({ [COMPOSIO_MCP_APPS_FLAG]: true });- const mine = makeRuntime({ id: "rt-mine", name: "My Runtime", owner_id: ME });- const { onCreate } = renderDialog([mine]);-- fireEvent.change(screen.getByPlaceholderText("e.g. Deep Research Agent"), {- target: { value: "Empty Public Agent" },- });- fireEvent.click(screen.getByRole("radio", { name: /^Specific people/i }));- fireEvent.click(screen.getByText("Create"));- await new Promise((r) => setTimeout(r, 0));-- expect(onCreate).not.toHaveBeenCalled();- });-- it("includes ticked members in the invocation_targets payload", async () => {- configStore.getState().setFeatureFlags({ [COMPOSIO_MCP_APPS_FLAG]: true });- const mine = makeRuntime({ id: "rt-mine", name: "My Runtime", owner_id: ME });- const { onCreate } = renderDialog([mine]);-- fireEvent.change(screen.getByPlaceholderText("e.g. Deep Research Agent"), {- target: { value: "Shared Agent" },- });- fireEvent.click(screen.getByRole("radio", { name: /^Specific people/i }));- fireEvent.click(screen.getByRole("checkbox", { name: /^Other/ }));- fireEvent.click(screen.getByText("Create"));- await new Promise((r) => setTimeout(r, 0));-- const payload = onCreate.mock.calls[0]?.[0];- expect(payload).toBeDefined();- expect(payload.permission_mode).toBe("public_to");- expect(payload.invocation_targets).toEqual([- { target_type: "member", target_id: OTHER },- ]);- });-});diff --git a/packages/views/agents/components/create-agent-dialog.tsx b/packages/views/agents/components/create-agent-dialog.tsxdeleted file mode 100644index d3351c811d..0000000000--- a/packages/views/agents/components/create-agent-dialog.tsx+++ /dev/null@@ -1,670 +0,0 @@-"use client";--import { useState } from "react";-import { Globe, Lock, Users } from "@multica/ui/icons";-import { useQueryClient } from "@tanstack/react-query";-import { ModelDropdown } from "./model-dropdown";-import { RuntimePicker } from "./runtime-picker";-import { isRuntimeUsableForUser } from "@multica/core/runtimes";-import { InstructionsEditor } from "./instructions-editor";-import { SkillMultiSelect } from "./skill-multi-select";-import { AvatarUploadControl } from "../../common/avatar-upload-control";-import { api } from "@multica/core/api";-import { useWorkspaceId } from "@multica/core/hooks";-import { useFeatureEnabled } from "@multica/core/config";-import { COMPOSIO_MCP_APPS_FLAG } from "@multica/core/feature-flags";-import { workspaceKeys } from "@multica/core/workspace/queries";-import type {- Agent,- AgentInvocationTargetInput,- AgentPermissionMode,- AgentVisibility,- RuntimeDevice,- MemberWithUser,- CreateAgentRequest,-} from "@multica/core/types";-import { isImeComposing } from "@multica/core/utils";-import {- Dialog,- DialogContent,- DialogHeader,- DialogTitle,- DialogDescription,-} from "@multica/ui/components/ui/dialog";-import { Button } from "@multica/ui/components/ui/button";-import { TooltipHint } from "@multica/ui/components/common/tooltip-hint";-import { Checkbox } from "@multica/ui/components/ui/checkbox";-import { Input } from "@multica/ui/components/ui/input";-import { Label } from "@multica/ui/components/ui/label";-import { toast } from "sonner";-import {- AGENT_DESCRIPTION_MAX_LENGTH,- VISIBILITY_DESCRIPTION,- VISIBILITY_LABEL,-} from "@multica/core/agents";-import { ActorAvatar } from "../../common/actor-avatar";-import { CharCounter } from "./char-counter";-import { useT } from "../../i18n";--export function CreateAgentDialog({- runtimes,- runtimesLoading,- members,- currentUserId,- template,- squadId,- onClose,- onCreate,-}: {- runtimes: RuntimeDevice[];- runtimesLoading?: boolean;- members: MemberWithUser[];- currentUserId: string | null;- // When provided, the dialog opens in "Duplicate" mode: the visible- // fields (name / description / runtime / visibility / model) are- // pre-populated from this agent, and the hidden fields- // (instructions / custom_args / custom_env / max_concurrent_tasks)- // are forwarded to the create call so the new agent is a true clone.- // Skills are copied separately by the caller after createAgent- // succeeds — they're not part of CreateAgentRequest.- template?: Agent | null;- // When set, every successful create is followed by- // addSquadMember(squadId, agent) so the new agent joins this squad.- // If the squad-join call fails the agent still exists and the dialog- // surfaces a warning toast — the user can add it manually from the- // Members tab.- squadId?: string;- onClose: () => void;- // Returns the created Agent so the dialog can run a follow-up- // setAgentSkills with the IDs the user picked in the form. Pre-skill-- // section callers can keep returning `void`; the dialog tolerates a- // falsy return (no follow-up runs).- onCreate: (data: CreateAgentRequest) => Promise<Agent | void>;-}) {- const { t } = useT("agents");- const isDuplicate = !!template;- const queryClient = useQueryClient();- const wsId = useWorkspaceId();- // MUL-4010: rolls out the private / public_to access model in the create- // flow to match the AccessPicker on the agent detail page. Shares the- // `composio_mcp_apps` switch with the Composio rollout — the MUL-3963- // permission model exists to gate Composio sharing, so both surfaces flip- // together. Defaults OFF so production stays on the legacy Workspace /- // Personal toggle until Composio is greenlit.- const accessPickerEnabled = useFeatureEnabled(COMPOSIO_MCP_APPS_FLAG, false);-- // Name defaults: duplicate uses "<original> copy". Manual-create starts blank.- const [name, setName] = useState(- template ? `${template.name}${t(($) => $.create_dialog.duplicate_copy_suffix)}` : "",- );- const [description, setDescription] = useState(template?.description ?? "");- // Legacy visibility state. Kept as the source of truth when- // `accessPickerEnabled` is false; only used to seed the new access state- // when the flag flips on for a duplicate.- const [visibility, setVisibility] = useState<AgentVisibility>(- template?.visibility ?? "workspace",- );-- // New access state (MUL-3963 aligned). When duplicating, seed from the- // template so the clone lands with the source agent's grants; otherwise- // default to public_to + workspace, matching the legacy "Workspace" default- // so a plain "click Create" produces the same result as before.- const [permissionMode, setPermissionMode] = useState<AgentPermissionMode>(- template?.permission_mode ?? "public_to",- );- const [workspaceTargetOn, setWorkspaceTargetOn] = useState<boolean>(() => {- if (template) {- return (template.invocation_targets ?? []).some(- (tgt) => tgt.target_type === "workspace",- );- }- return true;- });- const [selectedMemberIds, setSelectedMemberIds] = useState<Set<string>>(- () =>- new Set(- (template?.invocation_targets ?? [])- .filter((tgt) => tgt.target_type === "member" && tgt.target_id)- .map((tgt) => tgt.target_id as string),- ),- );-- // Team targets on the template are preserved across the create so we don't- // silently drop a grant type the picker doesn't expose yet (mirrors- // AccessPicker's `teamIds` pass-through).- const templateTeamTargets: AgentInvocationTargetInput[] = (- template?.invocation_targets ?? []- )- .filter((tgt) => tgt.target_type === "team" && tgt.target_id)- .map((tgt) => ({- target_type: "team" as const,- target_id: tgt.target_id as string,- }));-- const [model, setModel] = useState(template?.model ?? "");- const [instructions, setInstructions] = useState(template?.instructions ?? "");- const [avatarUrl, setAvatarUrl] = useState<string | null>(template?.avatar_url ?? null);- const [selectedSkillIds, setSelectedSkillIds] = useState<Set<string>>(- () => new Set(template?.skills.map((s) => s.id) ?? []),- );- const [creating, setCreating] = useState(false);-- // Duplicate-mode pre-fill: clone lands on the source agent's runtime so- // the user doesn't have to re-pick. Skipped when that runtime is now- // locked for the caller (Create would 403). Empty fallback hands the- // job to RuntimePicker — it owns filter state, so it's the only place- // that knows which runtimes are visible right now.- const [selectedRuntimeId, setSelectedRuntimeId] = useState(() => {- const templateRuntime = template?.runtime_id- ? runtimes.find((r) => r.id === template.runtime_id)- : undefined;- if (templateRuntime && isRuntimeUsableForUser(templateRuntime, currentUserId)) {- return templateRuntime.id;- }- return "";- });-- const selectedRuntime = runtimes.find((d) => d.id === selectedRuntimeId) ?? null;- // Defense-in-depth: even if a locked runtime somehow ends up selected- // (e.g. duplicate of an agent whose template runtime is now locked, and- // the workspace has no usable fallback), gate Create on it so we don't- // submit a request the backend will reject with 403.- const selectedRuntimeLocked =- selectedRuntime != null &&- !isRuntimeUsableForUser(selectedRuntime, currentUserId);- const accessSelectionInvalid =- accessPickerEnabled &&- permissionMode === "public_to" &&- !workspaceTargetOn &&- selectedMemberIds.size === 0 &&- templateTeamTargets.length === 0;-- // Shared squad-join follow-up. Returns nothing — the caller has- // already shown its create-success toast; we only need to surface a- // warning when the agent landed but the squad-join failed. Cache- // invalidation for the squad's members list rides along so the- // Members tab re-renders without a manual refetch.- const attachToSquad = async (agentId: string, displayName: string) => {- if (!squadId) return;- try {- await api.addSquadMember(squadId, {- member_type: "agent",- member_id: agentId,- });- if (wsId) {- queryClient.invalidateQueries({- queryKey: [...workspaceKeys.squads(wsId), squadId, "members"],- });- queryClient.invalidateQueries({- queryKey: [...workspaceKeys.squads(wsId), squadId],- });- }- } catch (err) {- toast.warning(- t(($) => $.create_dialog.squad_join_failed_toast, {- name: displayName,- error: err instanceof Error ? err.message : "unknown error",- }),- );- }- };-- const handleSubmit = async () => {- if (- !name.trim() ||- !selectedRuntime ||- selectedRuntimeLocked ||- accessSelectionInvalid- ) {- return;- }- setCreating(true);-- try {- const trimmedInstructions = instructions.trim();- const data: CreateAgentRequest = {- name: name.trim(),- description: description.trim(),- runtime_id: selectedRuntime.id,- model: model.trim() || undefined,- instructions: trimmedInstructions || undefined,- avatar_url: avatarUrl ?? undefined,- skill_ids: [...selectedSkillIds],- };- if (accessPickerEnabled) {- // New MUL-3963 shape: send the authoritative permission fields and- // let the backend derive the legacy `visibility` field. Mirror the- // AccessPicker `emit` normalisation — a public_to with zero targets- // collapses to private as defense in depth so the backend never sees- // an "empty public" request. Team targets from the template survive.- const invocationTargets: AgentInvocationTargetInput[] = [];- if (permissionMode === "public_to") {- if (workspaceTargetOn) {- invocationTargets.push({ target_type: "workspace" });- } else {- for (const id of selectedMemberIds) {- invocationTargets.push({ target_type: "member", target_id: id });- }- for (const tgt of templateTeamTargets) {- invocationTargets.push(tgt);- }- }- }- const collapseToPrivate =- permissionMode === "public_to" && invocationTargets.length === 0;- data.permission_mode = collapseToPrivate ? "private" : permissionMode;- data.invocation_targets = collapseToPrivate ? [] : invocationTargets;- } else {- // Legacy path: send the visibility toggle unchanged. The backend- // maps this to permission_mode + invocation_targets server-side.- data.visibility = visibility;- }- if (template) {- // Duplicate path: forward the hidden config fields the source- // agent had so the clone is functional out of the box (args /- // concurrency). Skills flow through the dialog form. As of- // MUL-2600 the agent resource shape no longer carries- // custom_env values, so duplication cannot copy env at all —- // the user has to re-set env on the clone via the env tab- // (which now goes through the audited `/env` endpoint). The- // dialog's create call still accepts custom_env at create- // time, but the source values aren't available here.- if (template.custom_args.length) data.custom_args = template.custom_args;- if (template.max_concurrent_tasks) {- data.max_concurrent_tasks = template.max_concurrent_tasks;- }- }- const createdAgent = await onCreate(data);- // Squad context: attach the agent after skills land so the- // squad's Members tab shows the agent with its skills already- // in place. Atomicity is best-effort by design (see plan in- // MUL-2178) — a partial failure surfaces a warning toast and- // the user can retry from the Add Member dialog.- if (createdAgent && squadId) {- await attachToSquad(createdAgent.id, createdAgent.name);- }- onClose();- } catch (err) {- toast.error(err instanceof Error ? err.message : t(($) => $.create_dialog.create_failed_toast));- setCreating(false);- }- };-- const headerTitle = isDuplicate- ? t(($) => $.create_dialog.title_duplicate)- : t(($) => $.create_dialog.title_create);-- return (- <Dialog open onOpenChange={(v) => { if (!v) onClose(); }}>- <DialogContent className="p-0 gap-0 flex flex-col overflow-hidden !top-1/2 !left-1/2 !-translate-x-1/2 !-translate-y-1/2 !w-full !max-w-2xl !h-[85vh]">- <DialogHeader className="border-b px-5 py-3 space-y-0">- <DialogTitle className="text-title-sm font-semibold">{headerTitle}</DialogTitle>- {isDuplicate && template && (- <DialogDescription className="mt-1 text-caption">- {t(($) => $.create_dialog.description_duplicate, { name: template.name })}- </DialogDescription>- )}- </DialogHeader>-- <div className="flex-1 overflow-y-auto p-5">- <div className="space-y-4 min-w-0">- {/* Identity row: avatar (left) + name & description stack- (right). The avatar visually anchors the identity of- what the user is creating; pairing it with the Name- field reads as "this is the agent's face + name",- same shape as detail-page header so the affordance is- instantly familiar. */}- <div className="flex items-start gap-4">- <AvatarUploadControl- variant="agent"- value={avatarUrl}- name={name}- size={64}- onUploaded={setAvatarUrl}- onEmojiSelected={setAvatarUrl}- onClear={() => setAvatarUrl(null)}- />- <div className="flex-1 min-w-0 space-y-3">- <div>- <Label className="text-caption text-muted-foreground">{t(($) => $.create_dialog.name_label)}</Label>- <Input- autoFocus- type="text"- value={name}- onChange={(e) => setName(e.target.value)}- placeholder={t(($) => $.create_dialog.name_placeholder)}- className="mt-1"- onKeyDown={(e) => {- if (isImeComposing(e)) return;- if (e.key === "Enter") handleSubmit();- }}- />- </div>-- <div>- <Label className="text-caption text-muted-foreground">{t(($) => $.create_dialog.description_label)}</Label>- <Input- type="text"- value={description}- onChange={(e) => setDescription(e.target.value)}- placeholder={t(($) => $.create_dialog.description_placeholder)}- maxLength={AGENT_DESCRIPTION_MAX_LENGTH}- className="mt-1"- />- <div className="mt-1">- <CharCounter- length={[...description].length}- max={AGENT_DESCRIPTION_MAX_LENGTH}- />- </div>- </div>- </div>- </div>-- {accessPickerEnabled ? (- <AccessSection- permissionMode={permissionMode}- onPermissionModeChange={setPermissionMode}- workspaceTargetOn={workspaceTargetOn}- onWorkspaceTargetChange={setWorkspaceTargetOn}- selectedMemberIds={selectedMemberIds}- onSelectedMemberIdsChange={setSelectedMemberIds}- members={members}- currentUserId={currentUserId}- />- ) : (- <div>- <Label className="text-caption text-muted-foreground">{t(($) => $.create_dialog.visibility_label)}</Label>- <div className="mt-1.5 flex gap-2">- <button- type="button"- onClick={() => setVisibility("workspace")}- className={`flex flex-1 items-center gap-2 rounded-lg border px-3 py-2.5 text-body transition-colors ${- visibility === "workspace"- ? "border-primary bg-primary/5"- : "border-border hover:bg-muted"- }`}- >- <Globe className="h-4 w-4 shrink-0 text-muted-foreground" />- <div className="text-left">- <div className="font-medium">{VISIBILITY_LABEL.workspace}</div>- <div className="text-caption text-muted-foreground">- {VISIBILITY_DESCRIPTION.workspace}- </div>- </div>- </button>- <button- type="button"- onClick={() => setVisibility("private")}- className={`flex flex-1 items-center gap-2 rounded-lg border px-3 py-2.5 text-body transition-colors ${- visibility === "private"- ? "border-primary bg-primary/5"- : "border-border hover:bg-muted"- }`}- >- <Lock className="h-4 w-4 shrink-0 text-muted-foreground" />- <div className="text-left">- <div className="font-medium">{VISIBILITY_LABEL.private}</div>- <div className="text-caption text-muted-foreground">- {VISIBILITY_DESCRIPTION.private}- </div>- </div>- </button>- </div>- </div>- )}-- <RuntimePicker- runtimes={runtimes}- runtimesLoading={runtimesLoading}- members={members}- currentUserId={currentUserId}- selectedRuntimeId={selectedRuntimeId}- onSelect={(id) => {- // Models are per-runtime; a value picked for the old runtime- // may not exist on the new one, so drop it on runtime change.- if (id !== selectedRuntimeId) setModel("");- setSelectedRuntimeId(id);- }}- />-- <ModelDropdown- runtimeId={selectedRuntime?.id ?? null}- runtimeOnline={selectedRuntime?.status === "online"}- value={model}- onChange={setModel}- disabled={!selectedRuntime}- />-- {/* --- Optional sections (instructions / skills) ---- Collapsed by default so quick-create stays fast.- Duplicate pre-fills everything from the source agent. */}- <InstructionsEditor- value={instructions}- onChange={setInstructions}- placeholder={- isDuplicate- ? t(($) => $.create_dialog.instructions.placeholder_duplicate)- : t(($) => $.create_dialog.instructions.placeholder_blank)- }- />-- <SkillMultiSelect- selectedIds={selectedSkillIds}- onChange={setSelectedSkillIds}- />- </div>- </div>-- {/* Inline footer instead of <DialogFooter>: the shipped- DialogFooter applies `-mx-4 -mb-4` assuming a padded- DialogContent (default `p-4`). Our DialogContent uses- `p-0`, so those negative margins push the footer outside- the dialog. A plain flex row anchored by `border-t` keeps- the visual rhythm without the overflow bug. */}- <div className="flex items-center justify-end gap-2 border-t bg-background px-5 py-3">- <Button variant="ghost" onClick={onClose}>- {t(($) => $.create_dialog.cancel)}- </Button>- <TooltipHint- label={- selectedRuntimeLocked- ? t(($) => $.create_dialog.runtime_private_locked_tooltip)- : undefined- }- >- <Button- onClick={handleSubmit}- disabled={- creating || !name.trim() || !selectedRuntime || selectedRuntimeLocked- }- // Keeps the button hoverable so its tooltip can say why it is blocked.- focusableWhenDisabled={selectedRuntimeLocked}- className="aria-disabled:cursor-not-allowed aria-disabled:opacity-50"- >- {creating ? t(($) => $.create_dialog.creating) : t(($) => $.create_dialog.create)}- </Button>- </TooltipHint>- </div>- </DialogContent>- </Dialog>- );-}---/**- * AccessSection — inline access editor for the create/duplicate flow, gated- * on `COMPOSIO_MCP_APPS_FLAG`. Mirrors the semantics of- * `AccessPicker` on the agent detail page: the underlying model is- * `permission_mode` + `invocation_targets` (MUL-3963), not the legacy- * `visibility`.- *- * The three mutually exclusive scopes mirror AccessPicker on the detail page.- * Specific people reveals a member allow-list; an entire-workspace grant never- * stacks redundant member targets underneath it.- *- * The current viewer is intentionally excluded from the member list: an- * owner is always allowed to invoke their own agent, so listing them again- * would be misleading.- */-function AccessSection({- permissionMode,- onPermissionModeChange,- workspaceTargetOn,- onWorkspaceTargetChange,- selectedMemberIds,- onSelectedMemberIdsChange,- members,- currentUserId,-}: {- permissionMode: AgentPermissionMode;- onPermissionModeChange: (next: AgentPermissionMode) => void;- workspaceTargetOn: boolean;- onWorkspaceTargetChange: (next: boolean) => void;- selectedMemberIds: Set<string>;- onSelectedMemberIdsChange: (next: Set<string>) => void;- members: MemberWithUser[];- currentUserId: string | null;-}) {- const { t } = useT("agents");- const isPrivate = permissionMode === "private";- const isWorkspace = !isPrivate && workspaceTargetOn;- const isMembers = !isPrivate && !workspaceTargetOn;-- const otherMembers = members.filter((m) => m.user_id !== currentUserId);-- const toggleMember = (userId: string, checked: boolean) => {- const next = new Set(selectedMemberIds);- if (checked) next.add(userId);- else next.delete(userId);- onSelectedMemberIdsChange(next);- };-- return (- <div>- <Label className="text-caption text-muted-foreground">- {t(($) => $.create_dialog.access.label)}- </Label>- <fieldset className="mt-1.5 grid gap-2 sm:grid-cols-3">- <legend className="sr-only">{t(($) => $.access.tooltip)}</legend>- <CompactAccessChoice- value="private"- icon={Lock}- title={t(($) => $.access.private_title)}- description={t(($) => $.access.private_desc)}- selected={isPrivate}- onSelect={() => onPermissionModeChange("private")}- />- <CompactAccessChoice- value="workspace"- icon={Globe}- title={t(($) => $.access.workspace_title)}- description={t(($) => $.access.workspace_desc)}- selected={isWorkspace}- onSelect={() => {- onPermissionModeChange("public_to");- onWorkspaceTargetChange(true);- }}- />- <CompactAccessChoice- value="members"- icon={Users}- title={t(($) => $.access.members_title)}- description={t(($) => $.access.members_desc)}- selected={isMembers}- onSelect={() => {- onPermissionModeChange("public_to");- onWorkspaceTargetChange(false);- }}- />- </fieldset>-- {isMembers && (- <div className="mt-2 rounded-lg border bg-muted/30 px-3 py-2">- <div>- {otherMembers.length === 0 ? (- <div className="py-1 text-caption text-muted-foreground">- {t(($) => $.create_dialog.access.public_members_empty)}- </div>- ) : (- <div className="max-h-40 overflow-y-auto">- {otherMembers.map((m) => {- const checked = selectedMemberIds.has(m.user_id);- return (- <label- key={m.user_id}- className="flex cursor-pointer items-center gap-2 rounded-md px-1 py-1 text-body hover:bg-background/60"- >- <Checkbox- checked={checked}- onCheckedChange={(v) =>- toggleMember(m.user_id, v === true)- }- aria-label={m.name}- />- <ActorAvatar- actorType="member"- actorId={m.user_id}- size="sm"- />- <span className="min-w-0 flex-1 truncate">{m.name}</span>- </label>- );- })}- </div>- )}- </div>-- {selectedMemberIds.size === 0 && (- <div className="mt-2 text-caption text-destructive" role="alert">- {t(($) => $.access.shared_target_required)}- </div>- )}- </div>- )}- </div>- );-}--function CompactAccessChoice({- value,- icon: Icon,- title,- description,- selected,- onSelect,-}: {- value: string;- icon: typeof Lock;- title: string;- description: string;- selected: boolean;- onSelect: () => void;-}) {- return (- <label- className={`flex min-w-0 cursor-pointer items-start gap-2 rounded-lg border px-3 py-2.5 text-body transition-colors hover:bg-muted ${- selected ? "border-primary bg-primary/5" : "border-border"- }`}- >- <input- type="radio"- name="create-agent-access-scope"- value={value}- checked={selected}- onChange={onSelect}- className="mt-0.5 size-4 shrink-0 accent-foreground"- />- <Icon- className="mt-0.5 size-4 shrink-0 text-muted-foreground"- aria-hidden="true"- />- <span className="min-w-0">- <span className="block font-medium">{title}</span>- <span className="mt-0.5 block text-caption leading-4 text-muted-foreground">- {description}- </span>- </span>- </label>- );-}diff --git a/packages/views/agents/components/inspector/concurrency-picker.tsx b/packages/views/agents/components/inspector/concurrency-picker.tsxdeleted file mode 100644index 09ac5ccab7..0000000000--- a/packages/views/agents/components/inspector/concurrency-picker.tsx+++ /dev/null@@ -1,94 +0,0 @@-"use client";--import { useEffect, useState } from "react";-import { Button } from "@multica/ui/components/ui/button";-import { Input } from "@multica/ui/components/ui/input";-import { PropertyPicker } from "../../../issues/components/pickers";-import { CHIP_CLASS } from "./chip";-import { useT } from "../../../i18n";--const MIN = 1;-const MAX = 50;--export function ConcurrencyPicker({- value,- canEdit = true,- onChange,-}: {- value: number;- /** When false, render a static read-only display and skip the popover. */- canEdit?: boolean;- onChange: (next: number) => Promise<void> | void;-}) {- const { t } = useT("agents");- const [open, setOpen] = useState(false);- const [draft, setDraft] = useState(String(value));-- // Reset draft from authoritative value whenever the popover (re-)opens or- // the prop changes from elsewhere — protects against stale draft state if- // the user closes mid-edit and reopens later. Hook MUST run unconditionally- // (before the !canEdit early return) to keep call order stable across- // renders where canEdit may flip.- useEffect(() => {- if (open) setDraft(String(value));- }, [open, value]);-- if (!canEdit) {- return (- <span className="font-mono text-caption tabular-nums text-muted-foreground">- {value}- </span>- );- }-- const commit = async () => {- const n = Number(draft);- if (!Number.isFinite(n) || n < MIN || n > MAX) return;- setOpen(false);- if (n !== value) await onChange(n);- };-- const tooltip = t(($) => $.pickers.concurrency_tooltip, { value });-- return (- <PropertyPicker- open={open}- onOpenChange={setOpen}- width="w-auto"- align="start"- tooltip={tooltip}- triggerRender={- <button type="button" className={CHIP_CLASS} aria-label={tooltip} />- }- trigger={- <span className="font-mono tabular-nums">{value}</span>- }- >- <div className="space-y-2 p-2">- <p className="text-caption text-muted-foreground">- {t(($) => $.pickers.concurrency_range, { min: MIN, max: MAX })}- </p>- <div className="flex items-center gap-2">- <Input- type="number"- min={MIN}- max={MAX}- value={draft}- onChange={(e) => setDraft(e.target.value)}- onKeyDown={(e) => {- if (e.key === "Enter") {- e.preventDefault();- void commit();- }- }}- autoFocus- className="h-8 w-20 font-mono text-caption"- />- <Button size="sm" onClick={() => void commit()}>- {t(($) => $.inspector.save)}- </Button>- </div>- </div>- </PropertyPicker>- );-}diff --git a/packages/views/agents/components/inspector/skill-attach.tsx b/packages/views/agents/components/inspector/skill-attach.tsxdeleted file mode 100644index f01ca24d0b..0000000000--- a/packages/views/agents/components/inspector/skill-attach.tsx+++ /dev/null@@ -1,58 +0,0 @@-"use client";--import { useState } from "react";-import { Plus } from "@multica/ui/icons";-import { useQuery } from "@tanstack/react-query";-import type { Agent } from "@multica/core/types";-import { useWorkspaceId } from "@multica/core/hooks";-import { skillListOptions } from "@multica/core/workspace/queries";-import { SkillAddDialog } from "../skill-add-dialog";-import { useT } from "../../../i18n";-import { TooltipHint } from "@multica/ui/components/common/tooltip-hint";--/**- * Inline "+ Attach" trigger for the inspector's Skills row. The trigger is- * the dashed-border chip; clicking it opens the shared `SkillAddDialog` —- * same surface the SkillsTab uses for its own "Add skill" button. Single- * source of truth for the attach flow, single visual for the picker.- *- * Hidden when there's nothing left to attach so we don't dangle a chip- * that opens an empty dialog.- */-export function SkillAttach({- agent,- canEdit = true,-}: {- agent: Agent;- /** When false, hide the attach trigger entirely. */- canEdit?: boolean;-}) {- const { t } = useT("agents");- const wsId = useWorkspaceId();- const { data: workspaceSkills = [] } = useQuery(skillListOptions(wsId));- const [open, setOpen] = useState(false);-- const agentSkillIds = new Set(agent.skills.map((s) => s.id));- const availableCount = workspaceSkills.filter(- (s) => !agentSkillIds.has(s.id),- ).length;-- if (!canEdit || availableCount === 0) return null;-- return (- <>- <TooltipHint label={t(($) => $.skill_attach.trigger_aria)}>- <button- type="button"- onClick={() => setOpen(true)}- aria-label={t(($) => $.skill_attach.trigger_aria)}- className="inline-flex cursor-pointer items-center gap-0.5 rounded-md border border-dashed border-muted-foreground/30 px-1.5 py-0.5 text-micro font-medium text-muted-foreground transition-colors hover:border-muted-foreground/60 hover:bg-accent/50 hover:text-muted-foreground"- >- <Plus className="h-2.5 w-2.5" />- {t(($) => $.skill_attach.trigger_label)}- </button>- </TooltipHint>- <SkillAddDialog agent={agent} open={open} onOpenChange={setOpen} />- </>- );-}diff --git a/packages/views/agents/components/inspector/visibility-picker.tsx b/packages/views/agents/components/inspector/visibility-picker.tsxdeleted file mode 100644index e7e2c6e2ee..0000000000--- a/packages/views/agents/components/inspector/visibility-picker.tsx+++ /dev/null@@ -1,86 +0,0 @@-"use client";--import { useState } from "react";-import { Globe, Lock } from "@multica/ui/icons";-import {- VISIBILITY_DESCRIPTION,- VISIBILITY_LABEL,- VISIBILITY_TOOLTIP,-} from "@multica/core/agents";-import type { AgentVisibility } from "@multica/core/types";-import {- PickerItem,- PropertyPicker,-} from "../../../issues/components/pickers";-import { VisibilityBadge } from "../visibility-badge";-import { CHIP_CLASS } from "./chip";--export function VisibilityPicker({- value,- canEdit = true,- onChange,-}: {- value: AgentVisibility;- /** When false, render a read-only `<VisibilityBadge>` and skip the popover. */- canEdit?: boolean;- onChange: (next: AgentVisibility) => Promise<void> | void;-}) {- const [open, setOpen] = useState(false);-- if (!canEdit) {- return <VisibilityBadge value={value} />;- }-- const Icon = value === "private" ? Lock : Globe;- const label = VISIBILITY_LABEL[value];- const tooltip = `Visibility · ${VISIBILITY_TOOLTIP[value]}`;-- const select = async (next: AgentVisibility) => {- setOpen(false);- if (next !== value) await onChange(next);- };-- return (- <PropertyPicker- open={open}- onOpenChange={setOpen}- width="w-auto min-w-[12rem]"- align="start"- tooltip={tooltip}- triggerRender={- <button type="button" className={CHIP_CLASS} aria-label={tooltip} />- }- trigger={- <>- <Icon className="h-3 w-3 shrink-0 text-muted-foreground" />- <span className="truncate">{label}</span>- </>- }- >- <PickerItem- selected={value === "workspace"}- onClick={() => select("workspace")}- >- <Globe className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />- <div className="text-left">- <div className="font-medium">{VISIBILITY_LABEL.workspace}</div>- <div className="text-caption text-muted-foreground">- {VISIBILITY_DESCRIPTION.workspace}- </div>- </div>- </PickerItem>- <PickerItem- selected={value === "private"}- onClick={() => select("private")}- >- <Lock className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />- <div className="text-left">- <div className="font-medium">{VISIBILITY_LABEL.private}</div>- <div className="text-caption text-muted-foreground">- {VISIBILITY_DESCRIPTION.private}- </div>- </div>- </PickerItem>- </PropertyPicker>- );-}diff --git a/packages/views/agents/components/instructions-editor.tsx b/packages/views/agents/components/instructions-editor.tsxdeleted file mode 100644index b167a94e56..0000000000--- a/packages/views/agents/components/instructions-editor.tsx+++ /dev/null@@ -1,116 +0,0 @@-"use client";--import { useRef, useState } from "react";-import { ChevronDown, FileText, X } from "@multica/ui/icons";-import { ContentEditor, type ContentEditorRef } from "../../editor";-import { Button } from "@multica/ui/components/ui/button";-import { cn } from "@multica/ui/lib/utils";-import { useT } from "../../i18n";--interface InstructionsEditorProps {- /** Markdown source. Used both as default value when expanded and as- * preview text when collapsed. */- value: string;- /** Fires on every keystroke (debounced inside ContentEditor). */- onChange: (value: string) => void;- /** Optional placeholder override. Defaults to the i18n "click to write"- * copy; the create dialog passes the duplicate-specific string for- * agents being cloned. */- placeholder?: string;-}--/**- * Collapsible Instructions field for the create-agent dialog. Stays compact- * until the user wants to write — most agents only need instructions when- * they're being authored carefully, not on every quick-create.- *- * Two states:- * collapsed → small clickable card, shows a preview of `value` (or the- * placeholder when empty). One click expands.- * expanded → full ContentEditor (markdown, bubble menu, mention support,- * attachment upload). "Collapse" button on the right of the- * header tucks it back; value is preserved.- */-export function InstructionsEditor({- value,- onChange,- placeholder,-}: InstructionsEditorProps) {- const { t } = useT("agents");- const [expanded, setExpanded] = useState(false);- const editorRef = useRef<ContentEditorRef>(null);-- const label = t(($) => $.create_dialog.instructions.label);- const resolvedPlaceholder =- placeholder ?? t(($) => $.create_dialog.instructions.placeholder_blank);-- const expand = () => {- setExpanded(true);- // Focus on next tick so the editor mounts first.- setTimeout(() => editorRef.current?.focus(), 0);- };-- if (!expanded) {- return (- <div>- <div className="text-caption font-medium uppercase tracking-wider text-muted-foreground">- {label}- </div>- <button- type="button"- onClick={expand}- className="mt-1.5 flex w-full items-start gap-2.5 rounded-lg border bg-card px-3 py-3 text-left transition-colors hover:border-primary/40 hover:bg-accent/40"- >- <FileText className="mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" />- <div className="min-w-0 flex-1">- {value.trim() ? (- // Preview: first 2 lines of markdown, ellipsised.- <div className="line-clamp-2 whitespace-pre-wrap text-body text-foreground">- {value}- </div>- ) : (- <div className="text-body text-muted-foreground">{resolvedPlaceholder}</div>- )}- </div>- <ChevronDown className="h-3.5 w-3.5 shrink-0 text-faint-foreground" />- </button>- </div>- );- }-- return (- <div>- <div className="flex items-center justify-between">- <div className="text-caption font-medium uppercase tracking-wider text-muted-foreground">- {label}- </div>- <Button- type="button"- variant="ghost"- size="sm"- onClick={() => setExpanded(false)}- className="h-6 gap-1 px-2 text-caption"- >- <X className="h-3 w-3" />- {t(($) => $.create_dialog.instructions.collapse)}- </Button>- </div>- <div- className={cn(- "mt-1.5 rounded-lg border bg-card",- "focus-within:border-primary/40",- )}- >- <ContentEditor- ref={editorRef}- defaultValue={value}- onUpdate={onChange}- placeholder={t(($) => $.create_dialog.instructions.editor_placeholder)}- className="min-h-[160px] max-h-[320px] overflow-y-auto px-3 py-2.5 text-body"- showBubbleMenu={true}- disableMentions={true}- />- </div>- </div>- );-}diff --git a/packages/views/agents/components/runtime-machine-filter-dropdown.test.tsx b/packages/views/agents/components/runtime-machine-filter-dropdown.test.tsxdeleted file mode 100644index 7cf0377ecd..0000000000--- a/packages/views/agents/components/runtime-machine-filter-dropdown.test.tsx+++ /dev/null@@ -1,254 +0,0 @@-// @vitest-environment jsdom--import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";-import { QueryClient, QueryClientProvider } from "@tanstack/react-query";-import { render, screen, fireEvent, cleanup } from "@testing-library/react";-import { I18nProvider } from "@multica/core/i18n/react";-import enCommon from "../../locales/en/common.json";-import enAgents from "../../locales/en/agents.json";-import type { RuntimeMachine } from "../../runtimes/components/runtime-machines";-import { RuntimeMachineFilterDropdown } from "./runtime-machine-filter-dropdown";--const TEST_RESOURCES = { en: { common: enCommon, agents: enAgents } };--function makeMachine(- overrides: Partial<RuntimeMachine> = {},-): RuntimeMachine {- return {- id: "machine-1",- daemonId: "daemon-1",- title: "dev.local",- subtitle: "x86_64 macOS",- deviceSummary: "x86_64 macOS",- deviceInfo: "dev.local · x86_64 macOS",- cliVersion: "1.0.0",- launchedBy: null,- mode: "local",- section: "local",- isCurrent: true,- health: "online",- runtimes: [],- onlineCount: 1,- issueCount: 0,- runningCount: 0,- queuedCount: 0,- providerNames: ["claude"],- lastSeenAt: "2026-05-17T11:59:50Z",- ...overrides,- };-}--function renderDropdown(- machines: RuntimeMachine[],- value: string | null,- onChange: (id: string | null) => void,- agentCountByMachine: Map<string, number>,- totalAgentCount?: number,-) {- const queryClient = new QueryClient({- defaultOptions: { queries: { retry: false } },- });- return render(- <I18nProvider locale="en" resources={TEST_RESOURCES}>- <QueryClientProvider client={queryClient}>- <RuntimeMachineFilterDropdown- machines={machines}- value={value}- onChange={onChange}- agentCountByMachine={agentCountByMachine}- // Default to the sum of per-machine counts so existing tests- // keep their original assertion semantics; new tests can- // override to verify the "All runtimes" badge matches an- // external in-scope total even when agents are missing from- // the machine map.- totalAgentCount={- totalAgentCount ??- Array.from(agentCountByMachine.values()).reduce(- (sum, n) => sum + n,- 0,- )- }- />- </QueryClientProvider>- </I18nProvider>,- );-}--describe("RuntimeMachineFilterDropdown", () => {- beforeEach(() => vi.clearAllMocks());- // Base UI DropdownMenu renders the menu content into a portal on- // document.body, so leftover portals from a prior test would surface- // duplicate "All runtimes" / "LOCAL" labels. Wipe body between tests.- afterEach(() => {- cleanup();- document.body.innerHTML = "";- });-- it("shows the All-runtimes label and total scope count when nothing is selected", () => {- const machines = [- makeMachine({ id: "m-local", title: "dev.local" }),- makeMachine({- id: "m-remote",- title: "build-server",- section: "remote",- isCurrent: false,- }),- ];- const counts = new Map([- ["m-local", 2],- ["m-remote", 5],- ]);-- renderDropdown(machines, null, vi.fn(), counts);-- // Trigger button uses the "All runtimes" label.- const trigger = screen.getByTestId("agents-runtime-filter");- expect(trigger.textContent).toContain("All runtimes");- // Sum across machines surfaces as the trigger count.- expect(trigger.textContent).toContain("7");- });-- it("shows the selected machine's title and per-machine count in the trigger", () => {- const machines = [makeMachine({ id: "m-local", title: "dev.local" })];- const counts = new Map([["m-local", 4]]);-- renderDropdown(machines, "m-local", vi.fn(), counts);-- const trigger = screen.getByTestId("agents-runtime-filter");- expect(trigger.textContent).toContain("dev.local");- expect(trigger.textContent).toContain("4");- });-- it("groups machines under their section headers in the menu", () => {- const machines = [- makeMachine({ id: "m-local", title: "dev.local", section: "local" }),- makeMachine({- id: "m-remote",- title: "build-server",- section: "remote",- isCurrent: false,- }),- makeMachine({- id: "m-cloud",- title: "Multica cloud",- section: "cloud",- isCurrent: false,- mode: "cloud",- }),- ];- const counts = new Map([- ["m-local", 1],- ["m-remote", 2],- ["m-cloud", 3],- ]);-- renderDropdown(machines, null, vi.fn(), counts);-- fireEvent.click(screen.getByTestId("agents-runtime-filter"));-- // Section labels render as plain text (uppercase is CSS-only).- expect(screen.getByText("Local")).toBeTruthy();- expect(screen.getByText("Remote")).toBeTruthy();- expect(screen.getByText("Cloud")).toBeTruthy();- // The menu items themselves also render.- expect(screen.getByText("dev.local")).toBeTruthy();- expect(screen.getByText("build-server")).toBeTruthy();- expect(screen.getByText("Multica cloud")).toBeTruthy();- });-- it("fires onChange(null) when the All-runtimes row is clicked", () => {- const machines = [makeMachine({ id: "m-local", title: "dev.local" })];- const counts = new Map([["m-local", 1]]);- const onChange = vi.fn();-- // Pre-select a machine so the "All runtimes" row is the one that- // gets the data-testid="agents-runtime-filter-active" marker.- renderDropdown(machines, "m-local", onChange, counts);- fireEvent.click(screen.getByTestId("agents-runtime-filter"));- // DropdownMenuItem renders a Base UI Menu.Item (role="menuitem") —- // verify the active row registered as a proper menu item, not a- // raw <button>.- const activeRow = screen.getByTestId("agents-runtime-filter-active");- expect(activeRow.getAttribute("role")).toBe("menuitem");- // Click the explicit "All runtimes" menu item by its accessible name.- fireEvent.click(screen.getByRole("menuitem", { name: /All runtimes/ }));- expect(onChange).toHaveBeenCalledWith(null);- });-- it("fires onChange(machineId) when a specific machine row is clicked", () => {- const machines = [- makeMachine({ id: "m-local", title: "dev.local", section: "local" }),- makeMachine({- id: "m-remote",- title: "build-server",- section: "remote",- isCurrent: false,- }),- ];- const counts = new Map([- ["m-local", 1],- ["m-remote", 2],- ]);- const onChange = vi.fn();-- renderDropdown(machines, null, onChange, counts);- fireEvent.click(screen.getByTestId("agents-runtime-filter"));- // The machine label is the menu item's accessible name.- fireEvent.click(screen.getByRole("menuitem", { name: /build-server/ }));- expect(onChange).toHaveBeenCalledWith("m-remote");- });-- it("registers machine rows as menu items so they participate in keyboard nav / ARIA", () => {- // Regression: rows used to be raw <button> elements, which bypassed- // the menu's role/typeahead/focus model. With DropdownMenuItem they- // should be role="menuitem" and live inside a role="menu" popup.- const machines = [makeMachine({ id: "m-local", title: "dev.local" })];- const counts = new Map([["m-local", 1]]);-- renderDropdown(machines, null, vi.fn(), counts);- fireEvent.click(screen.getByTestId("agents-runtime-filter"));-- const menu = screen.getByRole("menu");- expect(menu).toBeTruthy();- // Both the "All runtimes" row and the per-machine row are items.- const items = screen.getAllByRole("menuitem");- expect(items.length).toBeGreaterThanOrEqual(2);- expect(items.every((item) => item.getAttribute("role") === "menuitem")).toBe(true);- });-- it("shows the per-machine count next to each item", () => {- const machines = [makeMachine({ id: "m-local", title: "dev.local" })];- const counts = new Map([["m-local", 7]]);-- renderDropdown(machines, null, vi.fn(), counts);- fireEvent.click(screen.getByTestId("agents-runtime-filter"));-- // The menu item renders the count via the i18n plural key.- const item = screen.getByRole("menuitem", { name: /dev.local/ });- expect(item.textContent).toMatch(/7/);- });-- it("renders an empty-state hint when no machines exist", () => {- renderDropdown([], null, vi.fn(), new Map());-- fireEvent.click(screen.getByTestId("agents-runtime-filter"));-- expect(screen.getByText("No machines yet")).toBeTruthy();- });-- it("uses the explicit totalAgentCount for the All-runtimes badge even when it diverges from the per-machine sum", () => {- // Regression: the All-runtimes count used to be derived from- // agentCountByMachine, which silently dropped agents whose runtime- // was GC'd (not present in any current machine). The badge should- // track the in-scope total instead so it never undercounts what- // the user actually sees when the filter is cleared.- const machines = [makeMachine({ id: "m-local", title: "dev.local" })];- const counts = new Map([["m-local", 3]]);-- renderDropdown(machines, null, vi.fn(), counts, /* totalAgentCount */ 5);-- const trigger = screen.getByTestId("agents-runtime-filter");- // Trigger surfaces the All-runtimes total, not the per-machine sum.- expect(trigger.textContent).toContain("5");- });-});diff --git a/packages/views/agents/components/runtime-machine-filter-dropdown.tsx b/packages/views/agents/components/runtime-machine-filter-dropdown.tsxdeleted file mode 100644index 92a6ded959..0000000000--- a/packages/views/agents/components/runtime-machine-filter-dropdown.tsx+++ /dev/null@@ -1,194 +0,0 @@-import { useMemo } from "react";-import { ChevronDown, Server } from "@multica/ui/icons";-import { Button } from "@multica/ui/components/ui/button";-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuItem,- DropdownMenuTrigger,-} from "@multica/ui/components/ui/dropdown-menu";-import type { RuntimeMachine, RuntimeMachineSection } from "../../runtimes/components/runtime-machines";-import { useT } from "../../i18n";--// Runtime machine filter — dropdown next to the search input. The trigger-// shows the active machine's title (or "All runtimes"); the menu groups-// machines by section (Local / Remote / Cloud) the same way the-// Runtimes page sidebar does, so a user moving between the two pages-// sees consistent labels and counts.--const RUNTIME_MACHINE_SECTIONS: RuntimeMachineSection[] = [- "local",- "remote",- "cloud",-];--export function RuntimeMachineFilterDropdown({- machines,- value,- onChange,- agentCountByMachine,- // Sourced separately from the in-scope agent list (not derived from- // `agentCountByMachine`) so the "All runtimes" badge stays accurate- // even when an in-scope agent is bound to a runtime that's been GC'd- // and no longer shows up under any current machine.- totalAgentCount,-}: {- machines: RuntimeMachine[];- value: string | null;- onChange: (id: string | null) => void;- agentCountByMachine: Map<string, number>;- totalAgentCount: number;-}) {- const { t } = useT("agents");- const selected =- value === null- ? null- : machines.find((machine) => machine.id === value) ?? null;-- const triggerLabel = selected ? selected.title : t(($) => $.runtime_filter.all);- // Always show a count, even when the trigger is "All runtimes" — keeps- // the affordance scannable next to the other toolbar controls.- const triggerCount = selected- ? (agentCountByMachine.get(selected.id) ?? 0)- : totalAgentCount;-- return (- <DropdownMenu>- <DropdownMenuTrigger- render={- <Button- variant="outline"- size="sm"- className="h-8 gap-1.5 px-2 text-caption"- data-testid="agents-runtime-filter"- />- }- >- <Server className="h-3 w-3 text-muted-foreground" />- <span className="max-w-[12rem] truncate">{triggerLabel}</span>- <span className="font-mono tabular-nums text-muted-foreground">- {triggerCount}- </span>- <ChevronDown className="h-3 w-3 text-faint-foreground" />- </DropdownMenuTrigger>- <DropdownMenuContent align="end" className="w-72 p-0">- <RuntimeMachineFilterMenu- machines={machines}- value={value}- onChange={onChange}- totalAgentCount={totalAgentCount}- agentCountByMachine={agentCountByMachine}- />- </DropdownMenuContent>- </DropdownMenu>- );-}--function RuntimeMachineFilterMenu({- machines,- value,- onChange,- totalAgentCount,- agentCountByMachine,-}: {- machines: RuntimeMachine[];- value: string | null;- onChange: (id: string | null) => void;- totalAgentCount: number;- agentCountByMachine: Map<string, number>;-}) {- const { t } = useT("agents");- // Group machines by section while preserving the order- // `buildRuntimeMachines` already sorts them by (section, online count,- // title). We iterate the section list and slice to keep that order.- const grouped = useMemo(() => {- const result: Array<{- section: RuntimeMachineSection;- machines: RuntimeMachine[];- }> = [];- for (const section of RUNTIME_MACHINE_SECTIONS) {- const inSection = machines.filter((machine) => machine.section === section);- if (inSection.length > 0) result.push({ section, machines: inSection });- }- return result;- }, [machines]);-- return (- <div className="max-h-80 overflow-y-auto py-1">- <RuntimeMachineFilterItem- active={value === null}- onClick={() => onChange(null)}- label={t(($) => $.runtime_filter.all)}- count={totalAgentCount}- />- {grouped.map((group) => (- <div key={group.section}>- <div className="flex items-center gap-2 px-3 pb-1 pt-3 text-micro font-medium uppercase tracking-wider text-muted-foreground">- <span>{t(($) => $.runtime_filter[`section_${group.section}`])}</span>- <span className="h-px flex-1 bg-border" />- </div>- {group.machines.map((machine) => (- <RuntimeMachineFilterItem- key={machine.id}- active={value === machine.id}- onClick={() => onChange(machine.id)}- label={machine.title}- subtitle={machine.subtitle}- count={agentCountByMachine.get(machine.id) ?? 0}- />- ))}- </div>- ))}- {machines.length === 0 && (- <div className="px-3 py-2 text-caption text-muted-foreground">- {t(($) => $.runtime_filter.empty)}- </div>- )}- </div>- );-}--function RuntimeMachineFilterItem({- active,- onClick,- label,- subtitle,- count,-}: {- active: boolean;- onClick: () => void;- label: string;- subtitle?: string | null;- count: number;-}) {- const { t } = useT("agents");- // DropdownMenuItem (Base UI Menu.Item) wires the row into the menu's- // keyboard navigation, typeahead, and ARIA role="menuitem" semantics,- // and auto-closes the menu on selection (closeOnClick: true). The- // visual treatment — selected vs. idle — is layered on top via- // `data-active` so it survives focus/hover styling from the base.- return (- <DropdownMenuItem- onClick={onClick}- data-active={active || undefined}- data-testid={active ? "agents-runtime-filter-active" : undefined}- className={`flex w-full items-center gap-2 px-3 py-1.5 text-left text-caption transition-colors ${- active- ? "bg-accent text-accent-foreground"- : "text-foreground hover:bg-muted/60 data-highlighted:bg-muted/60"- }`}- >- <span className="min-w-0 flex-1 truncate">- <span className="block truncate font-medium">{label}</span>- {subtitle && (- <span className="block truncate text-micro font-normal text-muted-foreground">- {subtitle}- </span>- )}- </span>- <span className="font-mono tabular-nums text-muted-foreground">- {t(($) => $.runtime_filter.agent_count, { count })}- </span>- </DropdownMenuItem>- );-}diff --git a/packages/views/agents/components/visibility-badge.tsx b/packages/views/agents/components/visibility-badge.tsxindex 8fcdddfd7d..6b6b373484 100644--- a/packages/views/agents/components/visibility-badge.tsx+++ b/packages/views/agents/components/visibility-badge.tsx@@ -7,9 +7,8 @@ import { useT } from "../../i18n";/*** Read-only visibility badge — used wherever a user should *see* an agent's- * visibility (Personal / Workspace) without being able to change it. Replaces- * the interactive `<VisibilityPicker>` for non-managers on the detail page,- * and is also the canonical badge for hover cards and list rows.+ * visibility (Personal / Workspace) without being able to change it: the+ * canonical badge for the detail page, hover cards, and list rows.** `compact` drops the text label and shows just the icon — for tight spaces* like the agent table where the column header already labels the field.diff --git a/packages/views/chat/components/quick-agent-bar.tsx b/packages/views/chat/components/quick-agent-bar.tsxdeleted file mode 100644index 2a5ff17935..0000000000--- a/packages/views/chat/components/quick-agent-bar.tsx+++ /dev/null@@ -1,118 +0,0 @@-"use client";--import { useMemo } from "react";-import { useQuery } from "@tanstack/react-query";-import { Plus } from "@multica/ui/icons";-import { useWorkspaceId } from "@multica/core/hooks";-import { chatPinnedAgentsOptions } from "@multica/core/chat/queries";-import { usePinChatAgent, useUnpinChatAgent } from "@multica/core/chat/mutations";-import type { Agent } from "@multica/core/types";-import {- ContextMenu,- ContextMenuTrigger,- ContextMenuContent,- ContextMenuItem,-} from "@multica/ui/components/ui/context-menu";-import { ActorAvatar } from "../../common/actor-avatar";-import { AgentPicker } from "./new-chat-button";-import { useT } from "../../i18n";--// Consistent thin ring so photo avatars and (fainter) fallback avatars read as-// the same-size circle in the chat list.-const AVATAR_RING = "ring-1 ring-inset ring-border";--// Keep the bar compact — capped at 5, matching the server limit.-const MAX_PINNED = 5;--/**- * Quick-agent bar — a compact, avatar-only strip of the user's pinned agents at- * the top of the Chat list (per user · workspace, server-side). Tapping an- * avatar starts a new chat; hovering shows the agent info card; right-clicking- * removes it; the "+" adds one (up to 5). No title, no names — space is tight.- */-export function QuickAgentBar({- agents,- userId,- onStartNewChat,-}: {- agents: Agent[];- userId: string | undefined;- onStartNewChat: (agent: Agent) => void;-}) {- const { t } = useT("chat");- const wsId = useWorkspaceId();- const { data: pinned = [] } = useQuery(chatPinnedAgentsOptions(wsId));- const pin = usePinChatAgent();- const unpin = useUnpinChatAgent();-- const agentById = useMemo(() => new Map(agents.map((a) => [a.id, a])), [agents]);- const pinnedAgents = useMemo(- () => pinned.map((p) => agentById.get(p.agent_id)).filter((a): a is Agent => !!a),- [pinned, agentById],- );- const pinnedIds = useMemo(() => new Set(pinned.map((p) => p.agent_id)), [pinned]);- const addable = useMemo(() => agents.filter((a) => !pinnedIds.has(a.id)), [agents, pinnedIds]);- const canAdd = addable.length > 0 && pinnedAgents.length < MAX_PINNED;-- // Nothing to pin and nothing pinned → hide the bar.- if (agents.length === 0) return null;- if (pinnedAgents.length === 0 && !canAdd) return null;-- return (- <div className="flex items-center gap-1.5 overflow-x-auto border-b px-2 py-1.5">- {pinnedAgents.map((agent) => (- <ContextMenu key={agent.id}>- <ContextMenuTrigger- render={- <button- type="button"- aria-label={agent.name}- onClick={() => onStartNewChat(agent)}- // eslint-disable-next-line no-restricted-syntax -- avatar row: the pinned agent's avatar is the button- className="flex size-[34px] shrink-0 items-center justify-center rounded-full outline-none focus-visible:ring-2 focus-visible:ring-ring"- />- }- >- <ActorAvatar- actorType="agent"- actorId={agent.id}- size="lg"- showStatusDot- enableHoverCard- profileLink={false}- className={AVATAR_RING}- />- </ContextMenuTrigger>- <ContextMenuContent>- <ContextMenuItem variant="destructive" onClick={() => unpin.mutate(agent.id)}>- {t(($) => $.list.unpin_agent)}- </ContextMenuItem>- </ContextMenuContent>- </ContextMenu>- ))}-- {canAdd && (- <AgentPicker- agents={addable}- userId={userId}- onSelect={(agent) => pin.mutate(agent.id)}- side="bottom"- align="start"- tooltip={t(($) => $.list.add_agent)}- triggerRender={- <button- type="button"- aria-label={t(($) => $.list.add_agent)}- // Filled circle (not a dashed outline) so it reads as the exact- // same size as the filled agent avatars — an empty outline looks- // larger at the same pixel diameter. Same ring as the avatars.- // eslint-disable-next-line no-restricted-syntax -- avatar row: this button sits in the row of round agent avatars- className="flex size-[34px] shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground ring-1 ring-inset ring-border outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring"- />- }- trigger={<Plus className="size-4" />}- />- )}- </div>- );-}diff --git a/packages/views/common/expandable-description.test.tsx b/packages/views/common/expandable-description.test.tsxdeleted file mode 100644index 56ae51ac7f..0000000000--- a/packages/views/common/expandable-description.test.tsx+++ /dev/null@@ -1,57 +0,0 @@-/**- * @vitest-environment jsdom- */-import { afterEach, describe, expect, it, vi } from "vitest";-import { cleanup, screen } from "@testing-library/react";-import userEvent from "@testing-library/user-event";-import { renderWithI18n } from "../test/i18n";-import { ExpandableDescription } from "./expandable-description";--// jsdom reports every element as zero-height, so overflow has to be staged.-// scrollHeight/clientHeight are the pair the component compares.-function stageOverflow(scrollHeight: number, clientHeight: number) {- Object.defineProperty(HTMLParagraphElement.prototype, "scrollHeight", {- configurable: true,- get: () => scrollHeight,- });- Object.defineProperty(HTMLParagraphElement.prototype, "clientHeight", {- configurable: true,- get: () => clientHeight,- });-}--afterEach(() => {- cleanup();- vi.restoreAllMocks();-});--describe("ExpandableDescription", () => {- it("offers no toggle when the text already fits", async () => {- stageOverflow(48, 48);- await renderWithI18n(- <ExpandableDescription>Short enough</ExpandableDescription>,- );-- // A toggle under a two-line description that is only one line long is a- // control that reveals nothing.- expect(screen.queryByRole("button")).toBeNull();- });-- it("clamps by default and reveals the rest on demand", async () => {- stageOverflow(120, 48);- await renderWithI18n(- <ExpandableDescription>A description that runs on</ExpandableDescription>,- );-- const text = screen.getByText("A description that runs on");- expect(text).toHaveClass("line-clamp-2");-- await userEvent.click(screen.getByRole("button"));- expect(text).not.toHaveClass("line-clamp-2");-- // Still offered while expanded — the measurement is skipped in that state,- // so nothing may clear the flag and strand the reader in the long form.- await userEvent.click(screen.getByRole("button"));- expect(text).toHaveClass("line-clamp-2");- });-});diff --git a/packages/views/common/expandable-description.tsx b/packages/views/common/expandable-description.tsxdeleted file mode 100644index 5bf0295b29..0000000000--- a/packages/views/common/expandable-description.tsx+++ /dev/null@@ -1,81 +0,0 @@-"use client";--import { useCallback, useLayoutEffect, useRef, useState } from "react";-import { cn } from "@multica/ui/lib/utils";-import { useT } from "../i18n";--/**- * The description line under a detail page's title. Clamped to two lines, with- * a toggle that appears only when there is something clamped to reveal.- *- * Left unclamped, a long description pushes the meta row and the tab strip- * down the page, so how far the content starts depends on how much prose- * someone wrote. Two lines is where the agent and skill headers already sit- * visually; the toggle is what makes clamping safe, since without it the rest- * of the text has nowhere to be — this IS the detail page, so expanding in- * place is the only move that does not send the reader somewhere else to read- * one paragraph.- *- * The toggle is deliberately quiet — muted until hovered, matching the- * "show more" control on the agent activity tab. Brand colour is reserved for- * primary actions and live state; this page's Save and Add-to-agent buttons- * are what should be drawing the eye, not a text expander.- */-export function ExpandableDescription({- children,- className,-}: {- children: React.ReactNode;- className?: string;-}) {- const { t } = useT("common");- const [expanded, setExpanded] = useState(false);- const [clamped, setClamped] = useState(false);- const textRef = useRef<HTMLParagraphElement | null>(null);-- // Measured rather than guessed from character count: whether two lines are- // enough depends on the container's width and the script being rendered.- const measure = useCallback(() => {- const element = textRef.current;- if (!element) return;- // Read while clamped, or an already-expanded element reports no overflow- // and the toggle would vanish mid-read.- if (expanded) return;- setClamped(element.scrollHeight > element.clientHeight + 1);- }, [expanded]);-- useLayoutEffect(() => {- measure();- const element = textRef.current;- if (!element || typeof ResizeObserver === "undefined") return;- const observer = new ResizeObserver(measure);- observer.observe(element);- return () => observer.disconnect();- }, [measure, children]);-- return (- <>- <p- ref={textRef}- className={cn(- "mt-1 max-w-2xl text-pretty text-body leading-6 text-muted-foreground",- !expanded && "line-clamp-2",- className,- )}- >- {children}- </p>- {(clamped || expanded) && (- <button- type="button"- onClick={() => setExpanded((value) => !value)}- className="mt-0.5 rounded-xs text-caption text-muted-foreground transition-colors hover:text-foreground focus-visible:text-foreground focus-visible:outline-none"- >- {expanded- ? t(($) => $.expandable_description.collapse)- : t(($) => $.expandable_description.expand)}- </button>- )}- </>- );-}diff --git a/packages/views/labels/index.ts b/packages/views/labels/index.tsdeleted file mode 100644index 86740c611b..0000000000--- a/packages/views/labels/index.ts+++ /dev/null@@ -1,3 +0,0 @@-export { LabelChip } from "./label-chip";-export { ResourceLabelPicker } from "./resource-label-picker";-export { LabelManager, type LabelScope } from "./label-manager";diff --git a/packages/views/locales/en/agents.json b/packages/views/locales/en/agents.jsonindex 758b14bdb0..bc662cf2c1 100644--- a/packages/views/locales/en/agents.json+++ b/packages/views/locales/en/agents.json@@ -65,15 +65,6 @@"search_runtime_filtered": "No agents on \"{{machine}}\" match \"{{query}}\".","runtime_filtered": "No agents on \"{{machine}}\"."},- "runtime_filter": {- "all": "All runtimes",- "section_local": "Local",- "section_remote": "Remote",- "section_cloud": "Cloud",- "agent_count_one": "{{count}} agent",- "agent_count_other": "{{count}} agents",- "empty": "No machines yet"- },"columns": {"agent": "Agent","status": "Status",@@ -208,7 +199,6 @@"rename_required": "Name is required","edit_description_title": "Edit description","description_placeholder": "What does this agent do?",- "save": "Save","cancel": "Cancel"},"overview": {@@ -234,12 +224,7 @@"edit_access_aria": "Access: {{value}}. Change access","all_settings": "All settings"},- "skill_attach": {- "trigger_aria": "Attach a workspace skill",- "trigger_label": "Attach"- },"pickers": {- "concurrency_tooltip": "Concurrency · {{value}} max concurrent runs","concurrency_range": "Max concurrent runs ({{min}}–{{max}})","runtime_none": "No runtime","runtime_tooltip": "Runtime · {{name}} · {{status}}",@@ -463,23 +448,17 @@}},"create_dialog": {- "title_create": "Create Agent",- "title_duplicate": "Duplicate Agent",- "description_duplicate": "Create a new agent based on \"{{name}}\". Instructions, env, and skills are copied for you.","name_label": "Name","name_placeholder": "e.g. Deep Research Agent","description_label": "Description","description_placeholder": "What does this agent do?",- "visibility_label": "Visibility","access": {- "label": "Access","private_title": "Private","private_desc": "Only you can run this agent","public_title": "Public","public_desc": "Choose who can run this agent","public_workspace_option": "Everyone in this workspace","public_members_group": "Specific people",- "public_members_empty": "No workspace members to choose from","public_targets_empty_hint": "Pick at least one option below — otherwise the agent stays private."},"runtime_label": "Runtime",@@ -494,17 +473,10 @@"runtime_no_results": "No matching machines","runtime_group_online": "{{online}}/{{total}} online","duplicate_copy_suffix": " (Copy)",- "create": "Create",- "creating": "Creating...",- "cancel": "Cancel",- "create_failed_toast": "Failed to create agent","skill_attach_failed_toast": "Agent created, but failed to attach skills: {{error}}","squad_join_failed_toast": "Agent \"{{name}}\" was created but couldn't join the squad: {{error}}. You can add it manually from Members.","instructions": {"label": "Instructions",- "placeholder_blank": "Click to write instructions…",- "placeholder_duplicate": "Click to view or edit the duplicated instructions",- "collapse": "Collapse","editor_placeholder": "Write what this agent should do, what to focus on, what to avoid…"},"skills_section": {diff --git a/packages/views/locales/en/chat.json b/packages/views/locales/en/chat.jsonindex 72a418c4fa..0496a6d4f4 100644--- a/packages/views/locales/en/chat.json+++ b/packages/views/locales/en/chat.json@@ -240,8 +240,6 @@"no_response_preview": "No text reply","quick_agents": "Frequent agents","add": "Add",- "add_agent": "Add a frequent agent",- "unpin_agent": "Remove from frequent","waiting": "Waiting for reply","pin": "Pin","unpin": "Unpin",diff --git a/packages/views/locales/es/agents.json b/packages/views/locales/es/agents.jsonindex cb8ab3548e..46a4175fce 100644--- a/packages/views/locales/es/agents.json+++ b/packages/views/locales/es/agents.json@@ -65,15 +65,6 @@"search_runtime_filtered": "Ningún agente en \"{{machine}}\" coincide con \"{{query}}\".","runtime_filtered": "No hay agentes en \"{{machine}}\"."},- "runtime_filter": {- "all": "Todos los runtimes",- "section_local": "Local",- "section_remote": "Remoto",- "section_cloud": "Nube",- "agent_count_one": "{{count}} agente",- "agent_count_other": "{{count}} agentes",- "empty": "Todavía no hay máquinas"- },"columns": {"agent": "Agente","status": "Estado",@@ -207,7 +198,6 @@"rename_required": "El nombre es obligatorio","edit_description_title": "Editar descripción","description_placeholder": "¿Qué hace este agente?",- "save": "Guardar","cancel": "Cancelar","qoder_execution_note": "El modelo, las herramientas y las skills se configuran en el agente desde Qoder Cloud Agents."},@@ -216,12 +206,7 @@"attention_queued_one": "{{count}} ejecución está en cola mientras el runtime no está disponible.","attention_queued_other": "{{count}} ejecuciones están en cola mientras el runtime no está disponible."},- "skill_attach": {- "trigger_aria": "Adjuntar una skill del espacio de trabajo",- "trigger_label": "Adjuntar"- },"pickers": {- "concurrency_tooltip": "Concurrencia · {{value}} ejecuciones simultáneas máx.","concurrency_range": "Ejecuciones simultáneas máx. ({{min}}-{{max}})","runtime_none": "Sin runtime","runtime_tooltip": "Runtime · {{name}} · {{status}}",@@ -445,23 +430,17 @@}},"create_dialog": {- "title_create": "Crear agente",- "title_duplicate": "Duplicar agente",- "description_duplicate": "Crea un agente nuevo basado en \"{{name}}\". Se copian las instrucciones, el entorno y las skills.","name_label": "Nombre","name_placeholder": "p. ej., Agente de investigación profunda","description_label": "Descripción","description_placeholder": "¿Qué hace este agente?",- "visibility_label": "Visibilidad","access": {- "label": "Acceso","private_title": "Privado","private_desc": "Solo tú puedes ejecutar este agente","public_title": "Público","public_desc": "Elige quién puede ejecutar este agente","public_workspace_option": "Todos en este espacio de trabajo","public_members_group": "Personas concretas",- "public_members_empty": "No hay miembros del espacio de trabajo para elegir","public_targets_empty_hint": "Elige al menos una opción abajo; si no, el agente seguirá siendo privado."},"runtime_label": "Runtime",@@ -476,17 +455,10 @@"runtime_no_results": "No hay máquinas coincidentes","runtime_group_online": "{{online}}/{{total}} en línea","duplicate_copy_suffix": " (Copia)",- "create": "Crear",- "creating": "Creando...",- "cancel": "Cancelar",- "create_failed_toast": "No se ha podido crear el agente","skill_attach_failed_toast": "Agente creado, pero falló al adjuntar las skills: {{error}}","squad_join_failed_toast": "El agente \"{{name}}\" se creó pero no pudo unirse al squad: {{error}}. Puedes añadirlo manualmente desde Miembros.","instructions": {"label": "Instrucciones",- "placeholder_blank": "Haz clic para escribir las instrucciones…",- "placeholder_duplicate": "Haz clic para ver o editar las instrucciones duplicadas",- "collapse": "Contraer","editor_placeholder": "Escribe qué debe hacer este agente, en qué centrarse, qué evitar…"},"skills_section": {diff --git a/packages/views/locales/es/chat.json b/packages/views/locales/es/chat.jsonindex 159d13177f..d2940748fa 100644--- a/packages/views/locales/es/chat.json+++ b/packages/views/locales/es/chat.json@@ -240,8 +240,6 @@"no_response_preview": "Sin respuesta de texto","quick_agents": "Agentes frecuentes","add": "Añadir",- "add_agent": "Añadir un agente frecuente",- "unpin_agent": "Quitar de frecuentes","waiting": "Esperando respuesta","pin": "Fijar","unpin": "Dejar de fijar",diff --git a/packages/views/locales/fr/agents.json b/packages/views/locales/fr/agents.jsonindex 5530080fa9..05c51d1c67 100644--- a/packages/views/locales/fr/agents.json+++ b/packages/views/locales/fr/agents.json@@ -65,15 +65,6 @@"search_runtime_filtered": "Aucun agent sur « {{machine}} » ne correspond à « {{query}} ».","runtime_filtered": "Aucun agent sur « {{machine}} »."},- "runtime_filter": {- "all": "Tous les runtimes",- "section_local": "Local",- "section_remote": "Distant",- "section_cloud": "Cloud",- "agent_count_one": "{{count}} agent",- "agent_count_other": "{{count}} agents",- "empty": "Aucune machine pour l'instant"- },"columns": {"agent": "Agent","status": "Statut",@@ -208,7 +199,6 @@"rename_required": "Le nom est obligatoire","edit_description_title": "Modifier la description","description_placeholder": "Que fait cet agent ?",- "save": "Enregistrer","cancel": "Annuler"},"overview": {@@ -234,12 +224,7 @@"edit_access_aria": "Accès : {{value}}. Modifier l'accès","all_settings": "Tous les paramètres"},- "skill_attach": {- "trigger_aria": "Rattacher un skill de l'espace de travail",- "trigger_label": "Rattacher"- },"pickers": {- "concurrency_tooltip": "Concurrence · {{value}} exécutions simultanées au maximum","concurrency_range": "Exécutions simultanées maximales ({{min}}–{{max}})","runtime_none": "Aucun runtime","runtime_tooltip": "Runtime · {{name}} · {{status}}",@@ -463,23 +448,17 @@}},"create_dialog": {- "title_create": "Créer un agent",- "title_duplicate": "Dupliquer l'agent",- "description_duplicate": "Créez un agent à partir de « {{name}} ». Les instructions, l'environnement et les skills sont copiés pour vous.","name_label": "Nom","name_placeholder": "ex. Agent de recherche approfondie","description_label": "Description","description_placeholder": "Que fait cet agent ?",- "visibility_label": "Visibilité","access": {- "label": "Accès","private_title": "Privé","private_desc": "Vous seul pouvez exécuter cet agent","public_title": "Public","public_desc": "Choisissez qui peut exécuter cet agent","public_workspace_option": "Tout le monde dans cet espace de travail","public_members_group": "Personnes précises",- "public_members_empty": "Aucun membre de l'espace de travail à choisir","public_targets_empty_hint": "Choisissez au moins une option ci-dessous — sinon l'agent reste privé."},"runtime_label": "Runtime",@@ -494,17 +473,10 @@"runtime_no_results": "Aucune machine correspondante","runtime_group_online": "{{online}}/{{total}} en ligne","duplicate_copy_suffix": " (copie)",- "create": "Créer",- "creating": "Création...",- "cancel": "Annuler",- "create_failed_toast": "Échec de la création de l'agent","skill_attach_failed_toast": "Agent créé, mais échec du rattachement des skills : {{error}}","squad_join_failed_toast": "L'agent « {{name}} » a été créé mais n'a pas pu rejoindre le squad : {{error}}. Vous pouvez l'ajouter manuellement depuis Membres.","instructions": {"label": "Instructions",- "placeholder_blank": "Cliquez pour rédiger les instructions…",- "placeholder_duplicate": "Cliquez pour consulter ou modifier les instructions dupliquées",- "collapse": "Replier","editor_placeholder": "Indiquez ce que cet agent doit faire, sur quoi se concentrer, ce qu'il faut éviter…"},"skills_section": {diff --git a/packages/views/locales/fr/chat.json b/packages/views/locales/fr/chat.jsonindex c533f1f044..43dc0fb7ca 100644--- a/packages/views/locales/fr/chat.json+++ b/packages/views/locales/fr/chat.json@@ -240,8 +240,6 @@"no_response_preview": "Aucune réponse textuelle","quick_agents": "Agents fréquents","add": "Ajouter",- "add_agent": "Ajouter un agent fréquent",- "unpin_agent": "Retirer des agents fréquents","waiting": "En attente de réponse","pin": "Épingler","unpin": "Détacher",diff --git a/packages/views/locales/ja/agents.json b/packages/views/locales/ja/agents.jsonindex 1ef8325060..6abef8d234 100644--- a/packages/views/locales/ja/agents.json+++ b/packages/views/locales/ja/agents.json@@ -191,7 +191,6 @@"rename_required": "名前は必須です","edit_description_title": "説明を編集","description_placeholder": "このエージェントは何をしますか?",- "save": "保存","cancel": "キャンセル"},"overview": {@@ -214,12 +213,7 @@"edit_access_aria": "アクセス: {{value}}。アクセスを変更","all_settings": "すべての設定"},- "skill_attach": {- "trigger_aria": "ワークスペースのスキルを追加",- "trigger_label": "追加"- },"pickers": {- "concurrency_tooltip": "同時実行数 · 最大 {{value}} 件","concurrency_range": "最大同時実行数({{min}}–{{max}})","runtime_none": "ランタイムなし","runtime_tooltip": "ランタイム · {{name}} · {{status}}",@@ -290,23 +284,17 @@"discard_confirm": "変更を破棄"},"create_dialog": {- "title_create": "エージェントを作成",- "title_duplicate": "エージェントを複製",- "description_duplicate": "\"{{name}}\" を基に新しいエージェントを作成します。指示、環境変数、スキルがコピーされます。","name_label": "名前","name_placeholder": "例: ディープリサーチエージェント","description_label": "説明","description_placeholder": "このエージェントは何をしますか?",- "visibility_label": "公開範囲","access": {- "label": "アクセス","private_title": "プライベート","private_desc": "このエージェントを実行できるのはあなただけです","public_title": "公開","public_desc": "このエージェントを実行できる人を選択します","public_workspace_option": "ワークスペース全員","public_members_group": "特定のメンバー",- "public_members_empty": "選択できるワークスペースメンバーがいません","public_targets_empty_hint": "以下から少なくとも1つを選択してください。そうでないとエージェントはプライベートのままになります。"},"runtime_label": "ランタイム",@@ -321,17 +309,10 @@"runtime_no_results": "一致するマシンがありません","runtime_group_online": "{{online}}/{{total}} オンライン","duplicate_copy_suffix": " (コピー)",- "create": "作成",- "creating": "作成中...",- "cancel": "キャンセル",- "create_failed_toast": "エージェントを作成できませんでした","skill_attach_failed_toast": "エージェントは作成されましたが、スキルを追加できませんでした: {{error}}","squad_join_failed_toast": "エージェント \"{{name}}\" は作成されましたが、スクワッドに参加できませんでした: {{error}}。メンバーから手動で追加できます。","instructions": {"label": "指示",- "placeholder_blank": "クリックして指示を作成...",- "placeholder_duplicate": "クリックして複製された指示を表示または編集",- "collapse": "折りたたむ","editor_placeholder": "このエージェントが何をすべきか、何に集中すべきか、何を避けるべきかを記述してください..."},"skills_section": {@@ -874,14 +855,6 @@"user_cancelled": "ユーザーがキャンセルしました"}},- "runtime_filter": {- "all": "すべてのランタイム",- "section_local": "ローカル",- "section_remote": "リモート",- "section_cloud": "クラウド",- "agent_count_other": "エージェント {{count}} 件",- "empty": "まだマシンがありません"- },"last_active": {"today": "今日","days_ago_other": "{{count}} 日前",diff --git a/packages/views/locales/ja/chat.json b/packages/views/locales/ja/chat.jsonindex c92dcbbd71..04ce93bf5e 100644--- a/packages/views/locales/ja/chat.json+++ b/packages/views/locales/ja/chat.json@@ -236,8 +236,6 @@"no_response_preview": "テキスト返信なし","quick_agents": "よく使う Agent","add": "追加",- "add_agent": "よく使う Agent を追加",- "unpin_agent": "よく使うから外す","waiting": "返信待ち","pin": "ピン留め","unpin": "ピン留めを解除",diff --git a/packages/views/locales/ko/agents.json b/packages/views/locales/ko/agents.jsonindex 36cb5c90a3..c378801ec7 100644--- a/packages/views/locales/ko/agents.json+++ b/packages/views/locales/ko/agents.json@@ -64,14 +64,6 @@"search_runtime_filtered": "\"{{machine}}\"에서 \"{{query}}\"와 일치하는 에이전트가 없습니다.","runtime_filtered": "\"{{machine}}\"에 에이전트가 없습니다."},- "runtime_filter": {- "all": "모든 런타임",- "section_local": "로컬",- "section_remote": "원격",- "section_cloud": "클라우드",- "agent_count_other": "에이전트 {{count}}개",- "empty": "아직 기기가 없습니다"- },"columns": {"agent": "에이전트","status": "상태",@@ -199,7 +191,6 @@"rename_required": "이름은 필수입니다","edit_description_title": "설명 수정","description_placeholder": "이 에이전트는 무엇을 하나요?",- "save": "저장","cancel": "취소"},"overview": {@@ -222,12 +213,7 @@"edit_access_aria": "접근 권한: {{value}}. 접근 권한 변경","all_settings": "모든 설정"},- "skill_attach": {- "trigger_aria": "워크스페이스 스킬 연결",- "trigger_label": "연결"- },"pickers": {- "concurrency_tooltip": "동시 실행 · 최대 {{value}}개","concurrency_range": "최대 동시 실행 수({{min}}-{{max}})","runtime_none": "런타임 없음","runtime_tooltip": "런타임 · {{name}} · {{status}}",@@ -298,23 +284,17 @@"discard_confirm": "변경사항 버리기"},"create_dialog": {- "title_create": "에이전트 만들기",- "title_duplicate": "에이전트 복제",- "description_duplicate": "\"{{name}}\"을(를) 바탕으로 새 에이전트를 만듭니다. 지침, 환경 변수, 스킬이 복사됩니다.","name_label": "이름","name_placeholder": "예: 심층 리서치 에이전트","description_label": "설명","description_placeholder": "이 에이전트는 무엇을 하나요?",- "visibility_label": "공개 범위","access": {- "label": "액세스","private_title": "비공개","private_desc": "본인만 이 에이전트를 실행할 수 있습니다","public_title": "공개","public_desc": "이 에이전트를 실행할 수 있는 사람을 선택하세요","public_workspace_option": "이 워크스페이스의 모든 사람","public_members_group": "특정 사용자",- "public_members_empty": "선택할 수 있는 워크스페이스 멤버가 없습니다","public_targets_empty_hint": "아래에서 최소 하나 이상을 선택하세요. 그렇지 않으면 에이전트는 비공개로 유지됩니다."},"runtime_label": "런타임",@@ -329,17 +309,10 @@"runtime_no_results": "일치하는 기기가 없습니다","runtime_group_online": "{{online}}/{{total}} 온라인","duplicate_copy_suffix": " (사본)",- "create": "만들기",- "creating": "만드는 중...",- "cancel": "취소",- "create_failed_toast": "에이전트를 만들지 못했습니다","skill_attach_failed_toast": "에이전트는 만들었지만 스킬을 연결하지 못했습니다: {{error}}","squad_join_failed_toast": "에이전트 \"{{name}}\"은(는) 만들었지만 스쿼드에 참가하지 못했습니다: {{error}}. 멤버에서 직접 추가할 수 있습니다.","instructions": {"label": "지침",- "placeholder_blank": "클릭해서 지침 작성...",- "placeholder_duplicate": "클릭해서 복제된 지침 보기 또는 수정",- "collapse": "접기","editor_placeholder": "이 에이전트가 무엇을 해야 하는지, 무엇에 집중해야 하는지, 무엇을 피해야 하는지 작성하세요..."},"skills_section": {diff --git a/packages/views/locales/ko/chat.json b/packages/views/locales/ko/chat.jsonindex 0135d666e2..b4827adb7d 100644--- a/packages/views/locales/ko/chat.json+++ b/packages/views/locales/ko/chat.json@@ -236,8 +236,6 @@"no_response_preview": "텍스트 답변 없음","quick_agents": "자주 쓰는 Agent","add": "추가",- "add_agent": "자주 쓰는 Agent 추가",- "unpin_agent": "자주 쓰기에서 제거","waiting": "답장 대기 중","pin": "고정","unpin": "고정 해제",diff --git a/packages/views/locales/ru/agents.json b/packages/views/locales/ru/agents.jsonindex adf99e6f25..1507d19da1 100644--- a/packages/views/locales/ru/agents.json+++ b/packages/views/locales/ru/agents.json@@ -67,17 +67,6 @@"search_runtime_filtered": "На «{{machine}}» нет агентов, соответствующих запросу «{{query}}».","runtime_filtered": "На «{{machine}}» нет агентов."},- "runtime_filter": {- "all": "Все среды выполнения",- "section_local": "Локальные",- "section_remote": "Удалённые",- "section_cloud": "Облачные",- "agent_count_one": "{{count}} агент",- "agent_count_other": "{{count}} агента",- "empty": "Пока нет машин",- "agent_count_few": "{{count}} агента",- "agent_count_many": "{{count}} агентов"- },"columns": {"agent": "Агент","status": "Статус",@@ -226,7 +215,6 @@"rename_required": "Имя обязательно","edit_description_title": "Изменить описание","description_placeholder": "Чем занимается этот агент?",- "save": "Сохранить","cancel": "Отмена"},"overview": {@@ -258,12 +246,7 @@"edit_access_aria": "Доступ: {{value}}. Изменить доступ","all_settings": "Все настройки"},- "skill_attach": {- "trigger_aria": "Прикрепить навык рабочего пространства",- "trigger_label": "Прикрепить"- },"pickers": {- "concurrency_tooltip": "Параллелизм · максимум одновременных запусков: {{value}}","concurrency_range": "Максимум одновременных запусков ({{min}}–{{max}})","runtime_none": "Нет среды выполнения","runtime_tooltip": "Среда выполнения · {{name}} · {{status}}",@@ -493,23 +476,17 @@}},"create_dialog": {- "title_create": "Создать агента",- "title_duplicate": "Дублировать агента",- "description_duplicate": "Создайте нового агента на основе «{{name}}». Инструкции, окружение и навыки будут скопированы автоматически.","name_label": "Имя","name_placeholder": "например, Deep Research Agent","description_label": "Описание","description_placeholder": "Чем занимается этот агент?",- "visibility_label": "Видимость","access": {- "label": "Доступ","private_title": "Приватный","private_desc": "Запускать этого агента можете только вы","public_title": "Публичный","public_desc": "Выберите, кто может запускать этого агента","public_workspace_option": "Все в этом рабочем пространстве","public_members_group": "Определённые участники",- "public_members_empty": "Нет участников рабочего пространства для выбора","public_targets_empty_hint": "Выберите хотя бы один вариант ниже — иначе агент останется приватным."},"runtime_label": "Среда выполнения",@@ -524,17 +501,10 @@"runtime_no_results": "Совпадающих машин не найдено","runtime_group_online": "{{online}}/{{total}} в сети","duplicate_copy_suffix": " (копия)",- "create": "Создать",- "creating": "Создание...",- "cancel": "Отмена",- "create_failed_toast": "Не удалось создать агента","skill_attach_failed_toast": "Агент создан, но не удалось прикрепить навыки: {{error}}","squad_join_failed_toast": "Агент «{{name}}» создан, но не удалось добавить его в команду: {{error}}. Вы можете добавить его вручную в разделе «Участники».","instructions": {"label": "Инструкции",- "placeholder_blank": "Нажмите, чтобы написать инструкции…",- "placeholder_duplicate": "Нажмите, чтобы просмотреть или изменить скопированные инструкции",- "collapse": "Свернуть","editor_placeholder": "Опишите, что должен делать этот агент, на чём фокусироваться и чего избегать…"},"skills_section": {diff --git a/packages/views/locales/ru/chat.json b/packages/views/locales/ru/chat.jsonindex caa732b9d3..800d47ad36 100644--- a/packages/views/locales/ru/chat.json+++ b/packages/views/locales/ru/chat.json@@ -248,8 +248,6 @@"no_response_preview": "Нет текстового ответа","quick_agents": "Частые агенты","add": "Добавить",- "add_agent": "Добавить частого агента",- "unpin_agent": "Убрать из частых","waiting": "Ожидание ответа","pin": "Закрепить","unpin": "Открепить",diff --git a/packages/views/locales/russian-plurals.test.ts b/packages/views/locales/russian-plurals.test.tsindex 19c664b80b..b99f9c3722 100644--- a/packages/views/locales/russian-plurals.test.ts+++ b/packages/views/locales/russian-plurals.test.ts@@ -21,7 +21,6 @@ const countedMessages = [const runMessages = [["agent run count", (count: number) => i18n.t(($) => $.row.task_count, { ns: "agents", count })],- ["agent concurrency limit", (count: number) => i18n.t(($) => $.pickers.concurrency_tooltip, { ns: "agents", value: count })],["cancelled runs", (count: number) => i18n.t(($) => $.row_actions.cancelled_tasks_toast, { ns: "agents", count })],["queued runs", (count: number) => i18n.t(($) => $.overview.attention_queued, { ns: "agents", count })],["active runs", (count: number) => i18n.t(($) => $.agent_activity.hover_header_tasks, { ns: "issues", count })],diff --git a/packages/views/locales/zh-Hans/agents.json b/packages/views/locales/zh-Hans/agents.jsonindex 5b9dfdaef0..1e4d846ff7 100644--- a/packages/views/locales/zh-Hans/agents.json+++ b/packages/views/locales/zh-Hans/agents.json@@ -64,14 +64,6 @@"search_runtime_filtered": "\"{{machine}}\"上没有匹配\"{{query}}\"的智能体。","runtime_filtered": "\"{{machine}}\"上还没有智能体。"},- "runtime_filter": {- "all": "全部运行时",- "section_local": "本地",- "section_remote": "远程",- "section_cloud": "云端",- "agent_count_other": "{{count}} 个智能体",- "empty": "还没有机器"- },"columns": {"agent": "智能体","status": "状态",@@ -199,7 +191,6 @@"rename_required": "名称必填","edit_description_title": "编辑描述","description_placeholder": "这个智能体做什么?",- "save": "保存","cancel": "取消"},"overview": {@@ -222,12 +213,7 @@"edit_access_aria": "访问权限:{{value}}。更改访问权限","all_settings": "全部设置"},- "skill_attach": {- "trigger_aria": "附加工作区 skill",- "trigger_label": "附加"- },"pickers": {- "concurrency_tooltip": "并发 · 最多 {{value}} 次并行运行","concurrency_range": "最大并行运行数({{min}}–{{max}})","runtime_none": "无运行时","runtime_tooltip": "运行时 · {{name}} · {{status}}",@@ -448,23 +434,17 @@}},"create_dialog": {- "title_create": "创建智能体",- "title_duplicate": "复制智能体",- "description_duplicate": "基于\"{{name}}\"创建一个新智能体。指令、环境变量和 skill 会一并复制。","name_label": "名称","name_placeholder": "例如:深度研究智能体","description_label": "描述","description_placeholder": "这个智能体做什么?",- "visibility_label": "可见性","access": {- "label": "访问权限","private_title": "私有","private_desc": "只有你可以运行该智能体","public_title": "公开","public_desc": "选择谁可以运行该智能体","public_workspace_option": "工作区内所有人","public_members_group": "指定成员",- "public_members_empty": "没有可选择的工作区成员","public_targets_empty_hint": "至少勾选下方一项——否则该智能体仍为私有。"},"runtime_label": "运行时",@@ -479,17 +459,10 @@"runtime_no_results": "没有匹配的机器","runtime_group_online": "{{online}}/{{total}} 在线","duplicate_copy_suffix": "(副本)",- "create": "创建",- "creating": "创建中...",- "cancel": "取消",- "create_failed_toast": "创建智能体失败","skill_attach_failed_toast": "智能体已创建,但 skill 关联失败:{{error}}","squad_join_failed_toast": "智能体\"{{name}}\"已创建,但加入小队失败:{{error}}。你可以在 Members 标签里手动添加。","instructions": {"label": "指令",- "placeholder_blank": "点击撰写指令…",- "placeholder_duplicate": "点击查看或编辑复制的指令",- "collapse": "收起","editor_placeholder": "写下这个智能体该做什么、关注什么、要避开什么…"},"skills_section": {diff --git a/packages/views/locales/zh-Hans/chat.json b/packages/views/locales/zh-Hans/chat.jsonindex 5db9814af4..e38f5f70c0 100644--- a/packages/views/locales/zh-Hans/chat.json+++ b/packages/views/locales/zh-Hans/chat.json@@ -236,8 +236,6 @@"no_response_preview": "无文字回复","quick_agents": "常用智能体","add": "添加",- "add_agent": "添加常用智能体",- "unpin_agent": "移出常用","waiting": "等待回复","pin": "置顶","unpin": "取消置顶",diff --git a/packages/views/locales/zh-Hant/agents.json b/packages/views/locales/zh-Hant/agents.jsonindex 51a95f9f0d..5641cae9c9 100644--- a/packages/views/locales/zh-Hant/agents.json+++ b/packages/views/locales/zh-Hant/agents.json@@ -64,14 +64,6 @@"search_runtime_filtered": "\"{{machine}}\"上沒有匹配\"{{query}}\"的 AI 代理。","runtime_filtered": "\"{{machine}}\"上還沒有 AI 代理。"},- "runtime_filter": {- "all": "全部執行時",- "section_local": "本地",- "section_remote": "遠端",- "section_cloud": "雲端",- "agent_count_other": "{{count}} 個 AI 代理",- "empty": "還沒有機器"- },"columns": {"agent": "AI 代理","status": "狀態",@@ -199,7 +191,6 @@"rename_required": "名稱必填","edit_description_title": "編輯描述","description_placeholder": "這個 AI 代理做什麼?",- "save": "儲存","cancel": "取消"},"overview": {@@ -222,12 +213,7 @@"edit_access_aria": "訪問權限:{{value}}。變更訪問權限","all_settings": "全部設定"},- "skill_attach": {- "trigger_aria": "附加工作區 skill",- "trigger_label": "附加"- },"pickers": {- "concurrency_tooltip": "併發 · 最多 {{value}} 次並行執行","concurrency_range": "最大並行執行數({{min}}–{{max}})","runtime_none": "無執行時","runtime_tooltip": "執行時 · {{name}} · {{status}}",@@ -448,23 +434,17 @@}},"create_dialog": {- "title_create": "建立 AI 代理",- "title_duplicate": "複製 AI 代理",- "description_duplicate": "基於\"{{name}}\"建立一個新 AI 代理。指令、環境變數和 skill 會一併複製。","name_label": "名稱","name_placeholder": "例如:深度研究 AI 代理","description_label": "描述","description_placeholder": "這個 AI 代理做什麼?",- "visibility_label": "可見性","access": {- "label": "訪問權限","private_title": "私有","private_desc": "只有你可以執行該 AI 代理","public_title": "公開","public_desc": "選擇誰可以執行該 AI 代理","public_workspace_option": "工作區內所有人","public_members_group": "指定成員",- "public_members_empty": "沒有可選擇的工作區成員","public_targets_empty_hint": "至少勾選下方一項——否則該 AI 代理仍為私有。"},"runtime_label": "執行時",@@ -479,17 +459,10 @@"runtime_no_results": "沒有匹配的機器","runtime_group_online": "{{online}}/{{total}} 線上","duplicate_copy_suffix": "(副本)",- "create": "建立",- "creating": "建立中...",- "cancel": "取消",- "create_failed_toast": "建立 AI 代理失敗","skill_attach_failed_toast": "AI 代理已建立,但 skill 關聯失敗:{{error}}","squad_join_failed_toast": "AI 代理\"{{name}}\"已建立,但加入小隊失敗:{{error}}。你可以在 Members 標籤裡手動新增。","instructions": {"label": "指令",- "placeholder_blank": "點選撰寫指令…",- "placeholder_duplicate": "點選檢視或編輯複製的指令",- "collapse": "收起","editor_placeholder": "寫下這個 AI 代理該做什麼、關注什麼、要避開什麼…"},"skills_section": {diff --git a/packages/views/locales/zh-Hant/chat.json b/packages/views/locales/zh-Hant/chat.jsonindex 5a2fadf0e5..7f0c5a759b 100644--- a/packages/views/locales/zh-Hant/chat.json+++ b/packages/views/locales/zh-Hant/chat.json@@ -236,8 +236,6 @@"no_response_preview": "無文字回覆","quick_agents": "常用 AI 代理","add": "新增",- "add_agent": "新增常用 AI 代理",- "unpin_agent": "移出常用","waiting": "等待回覆","pin": "置頂","unpin": "取消置頂",diff --git a/packages/views/modals/create-squad.tsx b/packages/views/modals/create-squad.tsxindex db5c360200..6dd633996a 100644--- a/packages/views/modals/create-squad.tsx+++ b/packages/views/modals/create-squad.tsx@@ -151,8 +151,7 @@ export function CreateSquadModal({ onClose }: { onClose: () => void }) {<div className="flex-1 overflow-y-auto p-5"><div className="space-y-4 min-w-0">- {/* Identity row mirrors CreateAgentDialog so the two creates read- as siblings — avatar (left) + name/description stack (right). */}+ {/* Identity row: avatar (left) + name/description stack (right). */}<div className="flex items-start gap-4"><AvatarUploadControlvariant="squad"@@ -221,7 +220,7 @@ export function CreateSquadModal({ onClose }: { onClose: () => void }) {</div></div>- {/* Inline footer — see CreateAgentDialog: shadcn DialogFooter applies+ {/* Inline footer: shadcn DialogFooter appliesnegative margins assuming a padded DialogContent. Our content isp-0, so a plain bordered row is the right call. */}<div className="flex items-center justify-end gap-2 border-t bg-background px-5 py-3">diff --git a/packages/views/settings/components/dingtalk-tab.tsx b/packages/views/settings/components/dingtalk-tab.tsxindex 5fb565b9d6..263c869915 100644--- a/packages/views/settings/components/dingtalk-tab.tsx+++ b/packages/views/settings/components/dingtalk-tab.tsx@@ -1011,7 +1011,7 @@ export function DingTalkAgentBindButton({{/* Inline footer instead of <DialogFooter>: its -mx-4/-mb-4 offsetsassume the default p-4 DialogContent; with p-0 they push the bar- outside the dialog (same workaround as CreateAgentDialog). */}+ outside the dialog. */}<div className="flex items-center justify-end gap-2 border-t bg-background px-5 py-3"><Button variant="ghost" onClick={closeDialog} disabled={submitting}>{t(($) => $.dingtalk.byo_cancel)}diff --git a/packages/views/squads/components/squad-detail-page.tsx b/packages/views/squads/components/squad-detail-page.tsxindex 7f8e1f612e..d26972aa7d 100644--- a/packages/views/squads/components/squad-detail-page.tsx+++ b/packages/views/squads/components/squad-detail-page.tsx@@ -1010,7 +1010,7 @@ function SquadProperties({);}-// Two-step add-member dialog (mirrors CreateAgentDialog's compact layout):+// Two-step add-member dialog:// 1) pick a target — Members + Agents in one searchable popover, each row// with an avatar so visual recognition matches the issue assignee picker;// 2) optionally describe the role they'll play in this squad. Descriptiondiff --git a/packages/views/test/shard-timings.json b/packages/views/test/shard-timings.jsonindex b621293025..3019d635f5 100644--- a/packages/views/test/shard-timings.json+++ b/packages/views/test/shard-timings.json@@ -21,7 +21,6 @@"agents/components/agents-page-filter-predicate.test.ts": 1144,"agents/components/agents-page.test.tsx": 1849,"agents/components/conversation-starters-editor.test.tsx": 1286,- "agents/components/create-agent-dialog.test.tsx": 2584,"agents/components/inspector/access-picker.test.tsx": 1049,"agents/components/inspector/model-capability.test.ts": 81,"agents/components/inspector/model-change-cleanup.test.ts": 65,@@ -32,7 +31,6 @@"agents/components/inspector/thinking-prop-row.test.tsx": 3100,"agents/components/model-dropdown.test.tsx": 1528,"agents/components/new-chat-preview.test.tsx": 853,- "agents/components/runtime-machine-filter-dropdown.test.tsx": 925,"agents/components/runtime-picker.test.tsx": 1000,"agents/components/sparkline.test.tsx": 731,"agents/components/tabs/activity-tab.render.test.tsx": 2142,@@ -128,7 +126,6 @@"common/date-only-picker.test.tsx": 2892,"common/deferred-popup.test.tsx": 811,"common/docs-locale.test.ts": 79,- "common/expandable-description.test.tsx": 801,"common/format-in-time-zone.test.ts": 88,"common/github-url.test.ts": 91,"common/mcp-server-row.test.tsx": 861,diff --git a/packages/views/workflows/index.ts b/packages/views/workflows/index.tsdeleted file mode 100644index 8159d73cd2..0000000000--- a/packages/views/workflows/index.ts+++ /dev/null@@ -1,5 +0,0 @@-export { WorkflowsTab } from "./workflows-tab";-export { WorkflowEditorPage } from "./workflow-editor-page";-export { WorkflowMappingDialog } from "./workflow-mapping-dialog";-export { ProjectWorkflowControl } from "./project-workflow-row";-export { stepHandlerActor, useStepHandlerLabel } from "./step-handler";diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 45cfae75d2..28a6251965 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -381,9 +381,6 @@ importers:fumadocs-ui:specifier: 'catalog:'version: 16.17.8(@types/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected](@mdx-js/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected](@types/[email protected])([email protected]))([email protected](@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]))([email protected](@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])([email protected])- mermaid:- specifier: 'catalog:'- version: 11.14.0next:specifier: 'catalog:'version: 16.4.5(@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])diff --git a/scripts/ci-scope.test.mjs b/scripts/ci-scope.test.mjsindex c3e331b832..623a8c1523 100644--- a/scripts/ci-scope.test.mjs+++ b/scripts/ci-scope.test.mjs@@ -194,7 +194,7 @@ test("quality checks have exactly one runner and reuse the product build install}const action = readFileSync(new URL("../.github/actions/frontend-quality/action.yml", import.meta.url), "utf8");assert.match(action, /run: pnpm knip/);- assert.match(action, /continue-on-error: true/);+ assert.doesNotMatch(action, /continue-on-error:/);assert.doesNotMatch(action, /pnpm install/);});