The open-source app everyone uses to manage agents at work
TypeScript acpxagent-orchestrationagent-skillsagentic-aiai-agentsai-engineeringai-governanceai-toolsautonomous-agentsclaudeclaude-codeclaude-skillscodexhermesllmmcpmulti-agentopenclawproject-managementworkflow-automation
Polish operator UI task controls (#5427)
Dotta6f300034214c
diff --git a/ui/src/components/ActivityRow.tsx b/ui/src/components/ActivityRow.tsxindex 83a502cb5f..13d335e854 100644--- a/ui/src/components/ActivityRow.tsx+++ b/ui/src/components/ActivityRow.tsx@@ -1,5 +1,6 @@import { Link } from "@/lib/router";-import { Identity } from "./Identity";+import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";+import { deriveInitials } from "./Identity";import { IssueReferenceActivitySummary } from "./IssueReferenceActivitySummary";import { timeAgo } from "../lib/timeAgo";import { cn } from "../lib/utils";@@ -52,19 +53,20 @@ export function ActivityRow({ event, agentMap, userProfileMap, entityNameMap, enconst inner = (<div className="space-y-2">- <div className="flex gap-3">- <p className="flex-1 min-w-0 truncate">- <Identity- name={actorName}- avatarUrl={actorAvatarUrl}- size="xs"- className="align-middle"- />- <span className="text-muted-foreground ml-1">{verb} </span>- {name && <span className="font-medium">{name}</span>}- {entityTitle && <span className="text-muted-foreground ml-1">— {entityTitle}</span>}- </p>- <span className="text-xs text-muted-foreground shrink-0 pt-0.5">{timeAgo(event.createdAt)}</span>+ <div className="flex items-center gap-3">+ <div className="flex min-w-0 flex-1 items-center gap-2">+ <Avatar size="xs">+ {actorAvatarUrl && <AvatarImage src={actorAvatarUrl} alt={actorName} />}+ <AvatarFallback>{deriveInitials(actorName)}</AvatarFallback>+ </Avatar>+ <p className="min-w-0 flex-1 truncate">+ <span>{actorName}</span>+ <span className="text-muted-foreground"> {verb} </span>+ {name && <span className="font-medium">{name}</span>}+ {entityTitle && <span className="text-muted-foreground"> — {entityTitle}</span>}+ </p>+ </div>+ <span className="text-xs text-muted-foreground shrink-0">{timeAgo(event.createdAt)}</span></div><IssueReferenceActivitySummary event={event} /></div>diff --git a/ui/src/components/Identity.tsx b/ui/src/components/Identity.tsxindex b57c59aeca..dd5e8fb4ca 100644--- a/ui/src/components/Identity.tsx+++ b/ui/src/components/Identity.tsx@@ -11,7 +11,7 @@ export interface IdentityProps {className?: string;}-function deriveInitials(name: string): string {+export function deriveInitials(name: string): string {const parts = name.trim().split(/\s+/);if (parts.length >= 2) return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();return name.slice(0, 2).toUpperCase();diff --git a/ui/src/components/IssueMonitorActivityCard.test.tsx b/ui/src/components/IssueMonitorActivityCard.test.tsxindex 3731a86e5b..dcd4da6c50 100644--- a/ui/src/components/IssueMonitorActivityCard.test.tsx+++ b/ui/src/components/IssueMonitorActivityCard.test.tsx@@ -158,6 +158,44 @@ describe("IssueMonitorActivityCard", () => {act(() => root.unmount());});+ it("renders without throwing when monitorNextCheckAt arrives as an ISO string", () => {+ const root = createRoot(container);++ act(() => {+ root.render(+ <IssueMonitorActivityCard+ issue={createIssue({+ monitorNextCheckAt: "2026-04-11T12:30:00.000Z" as unknown as Date,+ executionPolicy: {+ mode: "normal",+ commentRequired: true,+ stages: [],+ },+ executionState: {+ status: "idle",+ currentStageId: null,+ currentStageIndex: null,+ currentStageType: null,+ currentParticipant: null,+ returnAssignee: null,+ reviewRequest: null,+ completedStageIds: [],+ lastDecisionId: null,+ lastDecisionOutcome: null,+ monitor: null,+ },+ })}+ />,+ );+ });++ expect(container.textContent).toContain("Monitor scheduled");+ expect(container.textContent).toContain("Next check");+ expect(container.textContent).toContain("in 30m");++ act(() => root.unmount());+ });+it("renders nothing when the issue has no scheduled monitor", () => {const root = createRoot(container);diff --git a/ui/src/components/IssueMonitorActivityCard.tsx b/ui/src/components/IssueMonitorActivityCard.tsxindex bc1716fc0a..58764a93ee 100644--- a/ui/src/components/IssueMonitorActivityCard.tsx+++ b/ui/src/components/IssueMonitorActivityCard.tsx@@ -5,7 +5,7 @@ import { formatDateTime } from "@/lib/utils";function resolveScheduledMonitor(issue: Issue) {const nextCheckAt =- issue.monitorNextCheckAt?.toISOString() ??+ issue.monitorNextCheckAt ??issue.executionPolicy?.monitor?.nextCheckAt ??issue.executionState?.monitor?.nextCheckAt ??null;diff --git a/ui/src/components/IssuesList.test.tsx b/ui/src/components/IssuesList.test.tsxindex dce7a5df4c..9b09c2e570 100644--- a/ui/src/components/IssuesList.test.tsx+++ b/ui/src/components/IssuesList.test.tsx@@ -4,7 +4,7 @@ import { act } from "react";import { createRoot } from "react-dom/client";import type { AnchorHTMLAttributes, ReactNode } from "react";import { QueryClient, QueryClientProvider } from "@tanstack/react-query";-import type { Issue } from "@paperclipai/shared";+import type { Issue, Project } from "@paperclipai/shared";import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";import { IssuesList } from "./IssuesList";import { TooltipProvider } from "@/components/ui/tooltip";@@ -400,6 +400,70 @@ describe("IssuesList", () => {});});+ it("uses workspace group defaults when creating an issue from a grouped section", async () => {+ localStorage.setItem(+ "paperclip:test-issues:company-1",+ JSON.stringify({ groupBy: "workspace", sortField: "updated", sortDir: "desc" }),+ );+ mockInstanceSettingsApi.getExperimental.mockResolvedValue({ enableIsolatedWorkspaces: true });+ mockExecutionWorkspacesApi.listSummaries.mockResolvedValue([+ {+ id: "execution-workspace-1",+ name: "Feature Branch",+ mode: "isolated_workspace",+ projectWorkspaceId: "project-workspace-1",+ },+ ]);++ const issue = createIssue({+ id: "issue-workspace",+ projectId: "project-1",+ projectWorkspaceId: "project-workspace-1",+ executionWorkspaceId: "execution-workspace-1",+ });+ const project = {+ id: "project-1",+ name: "Paperclip App",+ color: null,+ workspaces: [{ id: "project-workspace-1", name: "Primary workspace" }],+ primaryWorkspace: { id: "project-workspace-1" },+ executionWorkspacePolicy: { defaultProjectWorkspaceId: "project-workspace-1" },+ } as Project;++ const { root } = renderWithQueryClient(+ <IssuesList+ issues={[issue]}+ agents={[]}+ projects={[project]}+ viewStateKey="paperclip:test-issues"+ onUpdateIssue={() => undefined}+ />,+ container,+ );++ await waitForAssertion(() => {+ const button = container.querySelector<HTMLButtonElement>('button[aria-label="New issue in Feature Branch"]');+ expect(button).not.toBeNull();+ });++ await act(async () => {+ const button = container.querySelector<HTMLButtonElement>('button[aria-label="New issue in Feature Branch"]');+ button?.dispatchEvent(new MouseEvent("click", { bubbles: true }));+ await Promise.resolve();+ });++ expect(dialogState.openNewIssue).toHaveBeenCalledWith({+ executionWorkspaceId: "execution-workspace-1",+ executionWorkspaceMode: "reuse_existing",+ projectId: "project-1",+ projectWorkspaceId: "project-workspace-1",+ });++ act(() => {+ root.unmount();+ });+ });+it("renders the opt-in sub-issue progress summary with workflow next-up linking", async () => {const doneIssue = createIssue({id: "issue-done",diff --git a/ui/src/components/IssuesList.tsx b/ui/src/components/IssuesList.tsxindex 4455853ea4..0d62b295d5 100644--- a/ui/src/components/IssuesList.tsx+++ b/ui/src/components/IssuesList.tsx@@ -740,10 +740,10 @@ export function IssuesList({}, [projects]);const projectWorkspaceById = useMemo(() => {- const map = new Map<string, { name: string }>();+ const map = new Map<string, { name: string; projectId: string }>();for (const project of projects ?? []) {for (const workspace of project.workspaces ?? []) {- map.set(workspace.id, { name: workspace.name || project.name });+ map.set(workspace.id, { name: workspace.name || project.name, projectId: project.id });}}return map;@@ -770,16 +770,21 @@ export function IssuesList({name: string;mode: "shared_workspace" | "isolated_workspace" | "operator_branch" | "adapter_managed" | "cloud_sandbox";projectWorkspaceId: string | null;+ projectId: string | null;}>();for (const workspace of executionWorkspaces) {+ const projectWorkspace = workspace.projectWorkspaceId+ ? projectWorkspaceById.get(workspace.projectWorkspaceId) ?? null+ : null;map.set(workspace.id, {name: workspace.name,mode: workspace.mode,projectWorkspaceId: workspace.projectWorkspaceId ?? null,+ projectId: projectWorkspace?.projectId ?? null,});}return map;- }, [executionWorkspaces]);+ }, [executionWorkspaces, projectWorkspaceById]);const issueFilterWorkspaceContext = useMemo(() => ({executionWorkspaceById,defaultProjectWorkspaceIdByProjectId,@@ -1179,7 +1184,8 @@ export function IssuesList({};}, [canLoadMoreIssues, hasMoreIssues, hasMoreRenderedRows, loadMoreIssueRows]);- const newIssueDefaults = useCallback((groupKey?: string) => {+ const newIssueDefaults = useCallback((group?: { key: string; items: Issue[] }) => {+ const groupKey = group?.key;const defaults: Record<string, unknown> = { ...(baseCreateIssueDefaults ?? {}) };if (projectId && defaults.projectId === undefined) defaults.projectId = projectId;if (groupKey) {@@ -1190,6 +1196,27 @@ export function IssuesList({else defaults.assigneeAgentId = groupKey;}else if (viewState.groupBy === "project" && groupKey !== "__no_project") defaults.projectId = groupKey;+ else if (viewState.groupBy === "workspace" && groupKey !== "__no_workspace") {+ const representativeIssue = group?.items.find((issue) => issue.executionWorkspaceId === groupKey) ?? null;+ const executionWorkspace = executionWorkspaceById.get(groupKey);+ if (executionWorkspace) {+ defaults.executionWorkspaceId = groupKey;+ defaults.executionWorkspaceMode = "reuse_existing";+ if (executionWorkspace.projectWorkspaceId) defaults.projectWorkspaceId = executionWorkspace.projectWorkspaceId;+ const groupedProjectId = executionWorkspace.projectId+ ?? (executionWorkspace.projectWorkspaceId+ ? projectWorkspaceById.get(executionWorkspace.projectWorkspaceId)?.projectId+ : null)+ ?? (representativeIssue?.executionWorkspaceId === groupKey ? representativeIssue.projectId : null);+ if (groupedProjectId) defaults.projectId = groupedProjectId;+ } else {+ const projectWorkspace = projectWorkspaceById.get(groupKey);+ if (projectWorkspace) {+ defaults.projectWorkspaceId = groupKey;+ defaults.projectId = projectWorkspace.projectId;+ }+ }+ }else if (viewState.groupBy === "parent" && groupKey !== "__no_parent") {const parentIssue = issueById.get(groupKey);if (parentIssue) Object.assign(defaults, buildSubIssueDefaultsForViewer(parentIssue, currentUserId));@@ -1197,12 +1224,20 @@ export function IssuesList({}}return defaults;- }, [baseCreateIssueDefaults, currentUserId, issueById, projectId, viewState.groupBy]);+ }, [+ baseCreateIssueDefaults,+ currentUserId,+ executionWorkspaceById,+ issueById,+ projectId,+ projectWorkspaceById,+ viewState.groupBy,+ ]);const createActionLabel = createIssueLabel ? `Create ${createIssueLabel}` : "Create Issue";const createButtonLabel = createIssueLabel ? `New ${createIssueLabel}` : "New Issue";- const openCreateIssueDialog = useCallback((groupKey?: string) => {- openNewIssue(newIssueDefaults(groupKey));+ const openCreateIssueDialog = useCallback((group?: { key: string; items: Issue[] }) => {+ openNewIssue(newIssueDefaults(group));}, [newIssueDefaults, openNewIssue]);const filterToWorkspace = useCallback((workspaceId: string) => {@@ -1453,8 +1488,10 @@ export function IssuesList({<Buttonvariant="ghost"size="icon-xs"- className="text-muted-foreground"- onClick={() => openCreateIssueDialog(group.key)}+ className="-mr-2 text-muted-foreground"+ title={`New issue in ${group.label}`}+ aria-label={`New issue in ${group.label}`}+ onClick={() => openCreateIssueDialog(group)}><Plus className="h-3 w-3" /></Button>diff --git a/ui/src/lib/inbox.test.ts b/ui/src/lib/inbox.test.tsindex b03cf119ff..97ba69bd0b 100644--- a/ui/src/lib/inbox.test.ts+++ b/ui/src/lib/inbox.test.ts@@ -13,6 +13,7 @@ import type {import {DEFAULT_INBOX_ISSUE_COLUMNS,buildGroupedInboxSections,+ buildInboxIssueGroupCreateDefaults,buildInboxKeyboardNavEntries,buildInboxDismissedAtByKey,computeInboxBadgeData,@@ -1379,6 +1380,61 @@ describe("inbox helpers", () => {]);});+ it("builds new issue defaults from inbox project, assignee, and workspace groups", () => {+ const projectIssue = makeIssue("project", true);+ projectIssue.projectId = "project-1";++ const executionIssue = makeIssue("exec", false);+ executionIssue.projectId = "project-1";+ executionIssue.projectWorkspaceId = "project-workspace-1";+ executionIssue.executionWorkspaceId = "execution-workspace-1";++ const agentIssue = makeIssue("agent", false);+ agentIssue.assigneeAgentId = "agent-1";++ const options = {+ executionWorkspaceById: new Map([+ [+ "execution-workspace-1",+ {+ name: "Feature Branch",+ mode: "isolated_workspace" as const,+ projectWorkspaceId: "project-workspace-1",+ },+ ],+ ]),+ projectWorkspaceById: new Map([+ ["project-workspace-1", { name: "Primary workspace", projectId: "project-1" }],+ ]),+ };++ expect(buildInboxIssueGroupCreateDefaults(+ "project:project-1",+ "project",+ [{ kind: "issue", timestamp: 1, issue: projectIssue }],+ options,+ )).toEqual({ projectId: "project-1" });++ expect(buildInboxIssueGroupCreateDefaults(+ "workspace:execution:execution-workspace-1",+ "workspace",+ [{ kind: "issue", timestamp: 1, issue: executionIssue }],+ options,+ )).toEqual({+ executionWorkspaceId: "execution-workspace-1",+ executionWorkspaceMode: "reuse_existing",+ projectId: "project-1",+ projectWorkspaceId: "project-workspace-1",+ });++ expect(buildInboxIssueGroupCreateDefaults(+ "assignee:agent:agent-1",+ "assignee",+ [{ kind: "issue", timestamp: 1, issue: agentIssue }],+ options,+ )).toEqual({ assigneeAgentId: "agent-1" });+ });+it("persists inbox grouping preferences", () => {saveInboxWorkItemGroupBy("workspace");expect(loadInboxWorkItemGroupBy()).toBe("workspace");diff --git a/ui/src/lib/inbox.ts b/ui/src/lib/inbox.tsindex 7eedb06693..6d6235132e 100644--- a/ui/src/lib/inbox.ts+++ b/ui/src/lib/inbox.ts@@ -126,12 +126,14 @@ export type InboxKeyboardNavEntry =export interface InboxProjectWorkspaceLookup {name: string;+ projectId?: string | null;}export interface InboxExecutionWorkspaceLookup {name: string;mode: "shared_workspace" | "isolated_workspace" | "operator_branch" | "adapter_managed" | "cloud_sandbox";projectWorkspaceId: string | null;+ projectId?: string | null;}export interface InboxWorkspaceGroupingOptions {@@ -144,6 +146,15 @@ export interface InboxWorkspaceGroupingOptions {currentUserId?: string | null;}+export interface InboxIssueGroupCreateDefaults {+ projectId?: string;+ projectWorkspaceId?: string;+ executionWorkspaceId?: string;+ executionWorkspaceMode?: string;+ assigneeAgentId?: string;+ assigneeUserId?: string;+}+const defaultInboxFilterPreferences: InboxFilterPreferences = {allCategoryFilter: "everything",allApprovalFilter: "all",@@ -931,6 +942,85 @@ export function groupInboxWorkItems(return orderedGroups;}+function stripInboxSearchGroupPrefix(groupKey: string) {+ return groupKey+ .replace(/^archived-search:/, "")+ .replace(/^other-search:/, "");+}++function firstIssueFromInboxWorkItems(items: InboxWorkItem[]): Issue | null {+ return items.find((item): item is InboxWorkItem & { kind: "issue" } => item.kind === "issue")?.issue ?? null;+}++function projectIdForProjectWorkspace(+ projectWorkspaceId: string | null | undefined,+ options: InboxWorkspaceGroupingOptions,+ fallbackIssue: Issue | null,+) {+ if (!projectWorkspaceId) return fallbackIssue?.projectId ?? null;+ return options.projectWorkspaceById?.get(projectWorkspaceId)?.projectId+ ?? (fallbackIssue?.projectWorkspaceId === projectWorkspaceId ? fallbackIssue.projectId : null);+}++export function buildInboxIssueGroupCreateDefaults(+ groupKey: string,+ groupBy: InboxWorkItemGroupBy,+ items: InboxWorkItem[],+ options: InboxWorkspaceGroupingOptions = {},+): InboxIssueGroupCreateDefaults | null {+ const fallbackIssue = firstIssueFromInboxWorkItems(items);+ if (!fallbackIssue) return null;++ const key = stripInboxSearchGroupPrefix(groupKey);+ if (groupBy === "project") {+ if (!key.startsWith("project:")) return {};+ const projectId = key.slice("project:".length);+ return projectId && projectId !== "none" ? { projectId } : {};+ }++ if (groupBy === "assignee") {+ if (key.startsWith("assignee:agent:")) {+ const assigneeAgentId = key.slice("assignee:agent:".length);+ return assigneeAgentId ? { assigneeAgentId } : {};+ }+ if (key.startsWith("assignee:user:")) {+ const assigneeUserId = key.slice("assignee:user:".length);+ return assigneeUserId ? { assigneeUserId } : {};+ }+ return {};+ }++ if (groupBy === "workspace") {+ if (key.startsWith("workspace:execution:")) {+ const executionWorkspaceId = key.slice("workspace:execution:".length);+ if (!executionWorkspaceId) return {};+ const executionWorkspace = options.executionWorkspaceById?.get(executionWorkspaceId) ?? null;+ const projectWorkspaceId = executionWorkspace?.projectWorkspaceId+ ?? (fallbackIssue.executionWorkspaceId === executionWorkspaceId ? fallbackIssue.projectWorkspaceId : null);+ const projectId = executionWorkspace?.projectId+ ?? projectIdForProjectWorkspace(projectWorkspaceId, options, fallbackIssue);+ return {+ executionWorkspaceId,+ executionWorkspaceMode: "reuse_existing",+ ...(projectId ? { projectId } : {}),+ ...(projectWorkspaceId ? { projectWorkspaceId } : {}),+ };+ }++ if (key.startsWith("workspace:project:")) {+ const projectWorkspaceId = key.slice("workspace:project:".length);+ if (!projectWorkspaceId) return {};+ const projectId = projectIdForProjectWorkspace(projectWorkspaceId, options, fallbackIssue);+ return {+ ...(projectId ? { projectId } : {}),+ projectWorkspaceId,+ };+ }+ }++ return {};+}+/*** Groups parent-child issues in a flat InboxWorkItem list.*diff --git a/ui/src/pages/CompanySkills.tsx b/ui/src/pages/CompanySkills.tsxindex 87f6e811aa..d0e189b47b 100644--- a/ui/src/pages/CompanySkills.tsx+++ b/ui/src/pages/CompanySkills.tsx@@ -20,6 +20,8 @@ import { EmptyState } from "../components/EmptyState";import { MarkdownBody } from "../components/MarkdownBody";import { MarkdownEditor } from "../components/MarkdownEditor";import { PageSkeleton } from "../components/PageSkeleton";+import { CopyText } from "../components/CopyText";+import { Identity } from "../components/Identity";import {Dialog,DialogContent,@@ -49,6 +51,7 @@ import {Paperclip,Pencil,Plus,+ Copy,RefreshCw,Save,Search,@@ -171,6 +174,12 @@ function shortRef(ref: string | null | undefined) {return ref.slice(0, 7);}+function middleTruncate(value: string, maxLength = 72) {+ if (value.length <= maxLength) return value;+ const edgeLength = Math.floor((maxLength - 3) / 2);+ return `${value.slice(0, edgeLength)}...${value.slice(value.length - edgeLength)}`;+}+function formatProjectScanSummary(result: CompanySkillProjectScanResult) {const parts = [`${result.discovered} found`,@@ -530,8 +539,6 @@ function SkillPane({onSave: () => void;savePending: boolean;}) {- const { pushToast } = useToastActions();-if (!detail) {if (loading) {return <PageSkeleton variant="detail" />;@@ -550,6 +557,7 @@ function SkillPane({const body = file?.markdown ? stripFrontmatter(file.content) : file?.content ?? "";const currentPin = shortRef(detail.sourceRef);const latestPin = shortRef(updateStatus?.latestRef);+ const displaySourcePath = detail.sourcePath ? middleTruncate(detail.sourcePath) : null;const removeBlocked = usedBy.length > 0;const removeDisabledReason = removeBlocked? "Detach this skill from all agents before removing it."@@ -595,20 +603,28 @@ function SkillPane({<div className="mt-4 space-y-3 border-t border-border pt-4 text-sm"><div className="flex flex-wrap items-center gap-x-6 gap-y-2">- <div className="flex items-center gap-2">+ <div className="flex min-w-0 items-center gap-2"><span className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground">Source</span>- <span className="flex items-center gap-2">+ <span className="flex min-w-0 items-center gap-2"><SourceIcon className="h-3.5 w-3.5 text-muted-foreground" />- {detail.sourcePath ? (- <button- className="truncate hover:text-foreground text-muted-foreground transition-colors cursor-pointer"- onClick={() => {- navigator.clipboard.writeText(detail.sourcePath!);- pushToast({ title: "Copied path to workspace" });- }}- >- {source.label}- </button>+ {detail.sourcePath && displaySourcePath ? (+ <>+ <span+ className="block min-w-0 max-w-[min(34rem,55vw)] truncate font-mono text-xs text-muted-foreground"+ title={detail.sourcePath}+ >+ {displaySourcePath}+ </span>+ <CopyText+ text={detail.sourcePath}+ copiedLabel="Copied path"+ ariaLabel="Copy source path"+ title="Copy source path"+ className="inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-sm border border-border text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"+ >+ <Copy className="h-3.5 w-3.5" />+ </CopyText>+ </>) : (<span className="truncate">{source.label}</span>)}@@ -662,14 +678,14 @@ function SkillPane({{usedBy.length === 0 ? (<span className="text-muted-foreground">No agents attached</span>) : (- <div className="flex flex-wrap gap-x-3 gap-y-1">+ <div className="grid w-full grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3">{usedBy.map((agent) => (<Linkkey={agent.id}to={`/agents/${agent.urlKey}/skills`}- className="text-foreground no-underline hover:underline"+ className="group rounded-md border border-transparent p-2 no-underline hover:border-border hover:bg-accent/40">- {agent.name}+ <Identity name={agent.name} size="sm" /></Link>))}</div>diff --git a/ui/src/pages/Inbox.tsx b/ui/src/pages/Inbox.tsxindex 854b83df03..0c8dbb3a45 100644--- a/ui/src/pages/Inbox.tsx+++ b/ui/src/pages/Inbox.tsx@@ -18,6 +18,7 @@ import { useBreadcrumbs } from "../context/BreadcrumbContext";import { useGeneralSettings } from "../context/GeneralSettingsContext";import { useSidebar } from "../context/SidebarContext";import { queryKeys } from "../lib/queryKeys";+import { useDialogActions } from "../context/DialogContext";import {applyIssueFilters,countActiveIssueFilters,@@ -85,6 +86,7 @@ import {Check,ChevronRight,Layers,+ Plus,XCircle,X,RotateCcw,@@ -102,6 +104,7 @@ import {ACTIONABLE_APPROVAL_STATUSES,DEFAULT_INBOX_ISSUE_COLUMNS,buildGroupedInboxSections,+ buildInboxIssueGroupCreateDefaults,buildInboxKeyboardNavEntries,getAvailableInboxIssueColumns,getInboxWorkItemKey,@@ -652,6 +655,7 @@ function JoinRequestInboxRow({export function Inbox() {const { selectedCompanyId } = useCompany();const { setBreadcrumbs } = useBreadcrumbs();+ const { openNewIssue } = useDialogActions();const { isMobile } = useSidebar();const navigate = useNavigate();const location = useLocation();@@ -946,10 +950,10 @@ export function Inbox() {return map;}, [projects]);const projectWorkspaceById = useMemo(() => {- const map = new Map<string, { name: string }>();+ const map = new Map<string, { name: string; projectId: string }>();for (const project of projects ?? []) {for (const workspace of project.workspaces ?? []) {- map.set(workspace.id, { name: workspace.name });+ map.set(workspace.id, { name: workspace.name, projectId: project.id });}}return map;@@ -970,16 +974,21 @@ export function Inbox() {name: string;mode: "shared_workspace" | "isolated_workspace" | "operator_branch" | "adapter_managed" | "cloud_sandbox";projectWorkspaceId: string | null;+ projectId: string | null;}>();for (const workspace of executionWorkspaces) {+ const projectWorkspace = workspace.projectWorkspaceId+ ? projectWorkspaceById.get(workspace.projectWorkspaceId) ?? null+ : null;map.set(workspace.id, {name: workspace.name,mode: workspace.mode,projectWorkspaceId: workspace.projectWorkspaceId ?? null,+ projectId: projectWorkspace?.projectId ?? null,});}return map;- }, [executionWorkspaces]);+ }, [executionWorkspaces, projectWorkspaceById]);const inboxWorkspaceGrouping = useMemo<InboxWorkspaceGroupingOptions>(() => ({agentById,@@ -1243,6 +1252,17 @@ export function Inbox() {issueSearchSupplementResults,nestingEnabled,]);++ const openCreateIssueForGroup = useCallback((group: InboxGroupedSection) => {+ const defaults = buildInboxIssueGroupCreateDefaults(+ group.key,+ groupBy,+ group.displayItems,+ inboxWorkspaceGrouping,+ );+ if (!defaults) return;+ openNewIssue(defaults);+ }, [groupBy, inboxWorkspaceGrouping, openNewIssue]);const totalVisibleWorkItems = useMemo(() => groupedSections.reduce((count, group) => count + group.displayItems.length, 0),[groupedSections],@@ -2280,6 +2300,7 @@ export function Inbox() {if (group.label) {const groupNavIdx = groupFlatIndex.get(group.key) ?? -1;const isGroupSelected = groupNavIdx >= 0 && selectedIndex === groupNavIdx;+ const canCreateIssueInGroup = group.displayItems.some((item) => item.kind === "issue");elements.push(<divkey={`group-${group.key}`}@@ -2298,6 +2319,21 @@ export function Inbox() {collapsiblecollapsed={isGroupCollapsed}onToggle={() => toggleGroupCollapse(group.key)}+ trailing={canCreateIssueInGroup ? (+ <Button+ variant="ghost"+ size="icon-xs"+ className="-mr-2 text-muted-foreground"+ title={`New issue in ${group.label}`}+ aria-label={`New issue in ${group.label}`}+ onClick={(event) => {+ event.stopPropagation();+ openCreateIssueForGroup(group);+ }}+ >+ <Plus className="h-3 w-3" />+ </Button>+ ) : null}/></div>,);diff --git a/ui/src/pages/Routines.test.tsx b/ui/src/pages/Routines.test.tsxindex ee72a87816..3d9e3f1f7d 100644--- a/ui/src/pages/Routines.test.tsx+++ b/ui/src/pages/Routines.test.tsx@@ -1,6 +1,6 @@// @vitest-environment jsdom-import { act } from "react";+import { act, type AnchorHTMLAttributes, type ReactNode } from "react";import { createRoot } from "react-dom/client";import { QueryClient, QueryClientProvider } from "@tanstack/react-query";import type { Issue, RoutineListItem } from "@paperclipai/shared";@@ -18,6 +18,11 @@ const issuesListRenderMock = vi.fn(({ issues }: { issues: Issue[] }) => ());vi.mock("@/lib/router", () => ({+ Link: ({ to, children, ...props }: AnchorHTMLAttributes<HTMLAnchorElement> & { to: string; children: ReactNode }) => (+ <a href={to} {...props}>+ {children}+ </a>+ ),useNavigate: () => navigateMock,useLocation: () => ({ pathname: "/routines", search: currentSearch ? `?${currentSearch}` : "", hash: "" }),useSearchParams: () => [new URLSearchParams(currentSearch), vi.fn()],@@ -451,6 +456,45 @@ describe("Routines page", () => {});});+ it("shows a row-level run now button on the routines table", async () => {+ routinesListMock.mockResolvedValue([createRoutine({ id: "routine-1", title: "Morning sync" })]);+ issuesListMock.mockResolvedValue([]);++ const root = createRoot(container);+ const queryClient = new QueryClient({+ defaultOptions: {+ queries: { retry: false },+ },+ });++ await act(async () => {+ root.render(+ <QueryClientProvider client={queryClient}>+ <Routines />+ </QueryClientProvider>,+ );+ await flush();+ });++ let runNowButton = Array.from(container.querySelectorAll("button")).find((button) =>+ button.textContent?.includes("Run now"),+ );+ for (let attempts = 0; attempts < 5 && !runNowButton; attempts += 1) {+ await act(async () => {+ await flush();+ });+ runNowButton = Array.from(container.querySelectorAll("button")).find((button) =>+ button.textContent?.includes("Run now"),+ );+ }++ expect(runNowButton).toBeTruthy();++ await act(async () => {+ root.unmount();+ });+ });+it("passes company mention options to the routine description editor", async () => {routinesListMock.mockResolvedValue([]);issuesListMock.mockResolvedValue([]);diff --git a/ui/src/pages/Routines.tsx b/ui/src/pages/Routines.tsxindex a947658fc2..6840c19a26 100644--- a/ui/src/pages/Routines.tsx+++ b/ui/src/pages/Routines.tsx@@ -917,6 +917,7 @@ export function Routines() {runningRoutineId={runningRoutineId}statusMutationRoutineId={statusMutationRoutineId}href={`/routines/${routine.id}`}+ runNowButtononRunNow={handleRunNow}onToggleEnabled={handleToggleEnabled}onToggleArchived={handleToggleArchived}