diff --git a/doc/PRODUCT.md b/doc/PRODUCT.md index ff6a11815ff..f1c7c3ff82f 100644 --- a/doc/PRODUCT.md +++ b/doc/PRODUCT.md @@ -114,13 +114,16 @@ marker. Tasks archived from the viewer’s inbox leave Recents. Canceled and completed tasks remain eligible. Opening a recent task moves its row to the top of Recents. -Standard Recents also shows recent chats and projects as individual links. +Standard Recents also shows recent chats and projects. Coordinator Recents lets you pin tasks, agent chats, and projects above More. The pin button appears on the current row or when a row is hovered or focused with the keyboard. Shortcuts share the saved order with pinned pages and stay available as Recents changes. -Project links in Recents and pinned navigation open the project's Tasks tab. -Both locations have a chevron that shows up to 12 recently updated project tasks. +In **More → Projects**, each project row also lets you pin or unpin its sidebar +shortcut without opening the project. Project star and join/leave controls appear +only in the Classic workspace. +In Recents and pinned navigation, clicking a project row opens or closes its +folder to show up to 12 recently updated tasks. Each task links to its detail page. The task list loads when expanded and keeps the task status and unread markers. Agent-owned tasks show **In Progress** only while a task-linked run is queued diff --git a/tests/e2e/project-pinning.spec.ts b/tests/e2e/project-pinning.spec.ts new file mode 100644 index 00000000000..6d6b0c1e307 --- /dev/null +++ b/tests/e2e/project-pinning.spec.ts @@ -0,0 +1,45 @@ +import { expect, test } from "@playwright/test"; + +test("pin a project from the Projects list and open a task from its sidebar row", async ({ page, request }) => { + const createdCompany = await request.post("/api/companies", { data: { name: "Project pinning" } }); + expect(createdCompany.ok()).toBe(true); + const company = await createdCompany.json(); + const projectName = "Customer onboarding"; + const taskTitle = "Review the welcome email"; + const createdProject = await request.post(`/api/companies/${company.id}/projects`, { + data: { name: projectName }, + }); + expect(createdProject.ok()).toBe(true); + const project = await createdProject.json(); + const createdTask = await request.post(`/api/companies/${company.id}/issues`, { + data: { title: taskTitle, projectId: project.id, status: "todo" }, + }); + expect(createdTask.ok()).toBe(true); + const task = await createdTask.json(); + + const projectsPath = `/${company.issuePrefix}/projects`; + await page.goto(projectsPath); + const main = page.getByRole("main"); + const nav = page.getByRole("navigation", { name: "Workspace navigation" }); + const folder = nav.getByRole("button", { name: projectName, exact: true }); + await main.getByRole("button", { name: `Pin ${projectName}`, exact: true }).click(); + await expect(page).toHaveURL((url) => url.pathname === projectsPath); + await expect(folder).toHaveAttribute("aria-expanded", "false"); + + await page.reload(); + await expect(folder).toHaveAttribute("aria-expanded", "false"); + const label = folder.locator("[data-cell-marquee]"); + const idleWidth = await label.evaluate((element) => element.getBoundingClientRect().width); + await folder.hover(); + await expect.poll(() => label.evaluate((element) => element.getBoundingClientRect().width)).toBeLessThan(idleWidth); + + await folder.press("Space"); + await expect(folder).toHaveAttribute("aria-expanded", "true"); + await expect(page).toHaveURL((url) => url.pathname === projectsPath); + await nav.getByRole("link", { name: taskTitle }).click(); + await expect(page).toHaveURL((url) => url.pathname.includes(`/issues/${task.identifier}`)); + + await page.goto(projectsPath); + await main.getByRole("button", { name: `Unpin ${projectName}`, exact: true }).click(); + await expect(folder).toHaveCount(0); +}); diff --git a/ui/src/components/AgentChatPin.tsx b/ui/src/components/AgentChatPin.tsx index 6b725cc479b..590d5150422 100644 --- a/ui/src/components/AgentChatPin.tsx +++ b/ui/src/components/AgentChatPin.tsx @@ -1,6 +1,5 @@ import { Pin, PinOff } from "lucide-react"; import { useQuery } from "@tanstack/react-query"; -import { useMemo } from "react"; import { authApi } from "@/api/auth"; import { usePinnedNavigation } from "@/hooks/usePinnedNavigation"; import { queryKeys } from "@/lib/queryKeys"; @@ -12,8 +11,7 @@ export function useAgentChatPins() { const session = useQuery({ queryKey: queryKeys.auth.session, queryFn: () => authApi.getSession() }); const userId = session.data?.user?.id ?? session.data?.session?.userId; const navigation = usePinnedNavigation(userId); - const keys = useMemo(() => new Set(navigation.pins), [navigation.pins]); - return { keys, orderedKeys: navigation.pins, toggle: navigation.toggle, reorder: navigation.reorder, canPin: navigation.canPin, error: navigation.error }; + return { ...navigation, orderedKeys: navigation.pins }; } export function AgentChatPin({ agent, pins, className }: { diff --git a/ui/src/components/CoordinatorSidebar.tsx b/ui/src/components/CoordinatorSidebar.tsx index 25670687a50..981293061e7 100644 --- a/ui/src/components/CoordinatorSidebar.tsx +++ b/ui/src/components/CoordinatorSidebar.tsx @@ -1,6 +1,6 @@ import { useEffect, useLayoutEffect, useMemo, useRef, useState, type ReactNode } from "react"; import { useQuery } from "@tanstack/react-query"; -import { Inbox, Boxes, CircleCheck, Compass, FolderOpen, History, LayoutDashboard, MessageCircle, MoreHorizontal, Network, Pin, PinOff, Plus, Repeat, Search, Settings, SquarePen, Unplug, type LucideIcon } from "lucide-react"; +import { Inbox, Boxes, CircleCheck, Compass, Folder, History, LayoutDashboard, MessageCircle, MoreHorizontal, Network, Plus, Repeat, Search, Settings, SquarePen, Unplug, type LucideIcon } from "lucide-react"; import type { Agent, IssueSummary, Project } from "@paperclipai/shared"; import { useCoordinatorAttentionCount } from "@/hooks/useCoordinatorAttentionCount"; import { instanceSettingsApi } from "@/api/instanceSettings"; @@ -8,13 +8,13 @@ import { useAgentChatNavigation } from "@/hooks/useAgentChatNavigation"; import { useResponsibilitiesEnabled } from "@/hooks/useResponsibilitiesEnabled"; import { useRecentTasks } from "@/hooks/useRecentTasks"; import { useRecentTaskOpenWarmup } from "@/hooks/useRecentTaskOpenWarmup"; -import { usePinnedNavigation } from "@/hooks/usePinnedNavigation"; +import { projectPinKey, usePinnedNavigation } from "@/hooks/usePinnedNavigation"; import { useDialogActions } from "@/context/DialogContext"; import { useSidebar } from "@/context/SidebarContext"; import { queryKeys } from "@/lib/queryKeys"; import type { RecentTaskEntry } from "@/lib/recent-tasks"; import { Link, useLocation } from "@/lib/router"; -import { agentRouteRef, cn, projectRouteRef } from "@/lib/utils"; +import { agentRouteRef, projectRouteRef } from "@/lib/utils"; import { SidebarCompanyMenu } from "./SidebarCompanyMenu"; import { SidebarNavItem } from "./SidebarNavItem"; import { RecentTaskNavItem, recentTaskPathRef } from "./RecentTaskNavItem"; @@ -30,17 +30,17 @@ import { AgentAvatar } from "./AgentAvatar"; import { agentChatPinKey } from "./AgentChatPin"; import { PinnedNavigationList, type PinnedNavigationItem } from "./PinnedNavigationList"; import { companyProjectsQuery } from "@/lib/company-projects-query"; +import { NavigationPinButton, type PinControls } from "./NavigationPinButton"; import { SidebarProjectTasks } from "./SidebarProjectTasks"; const NO_RECENT_TASKS: never[] = []; const TASK_PIN_ID_PATTERN = /^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i; const taskPinKey = (companyId: string, id: string) => `task:${companyId}:${id}`; -const projectPinKey = (project: Project) => `project:${project.companyId}:${project.id}`; const moreDestinations = [ { label: "Search", to: "/search", icon: Search }, { label: "Dashboard", to: "/dashboard", icon: LayoutDashboard }, - { label: "Projects", to: "/projects", icon: FolderOpen }, + { label: "Projects", to: "/projects", icon: Folder }, { label: "Routines", to: "/routines", icon: Repeat }, { label: "Artifacts", to: "/artifacts", icon: Boxes }, { label: "Agents", to: "/agents/all", icon: Network }, @@ -70,7 +70,7 @@ export function buildPinnedNavigationItems( } for (const project of projects) { const key = projectPinKey(project); - if (keys.has(key)) items.set(key, { key, to: `/projects/${projectRouteRef(project)}/issues`, label: project.name, icon: , project }); + if (keys.has(key)) items.set(key, { key, label: project.name, project }); } return pins.flatMap(key => { const item = items.get(key); @@ -78,24 +78,13 @@ export function buildPinnedNavigationItems( }); } -type PinControls = { keys: ReadonlySet; canPin: boolean; toggle: (key: string) => void }; type RecentTaskLink = Omit; -function NavigationPinButton({ pinKey, label, pins, className }: { pinKey: string; label: string; pins: PinControls; className: string }) { - const pinned = pins.keys.has(pinKey); - const Icon = pinned ? PinOff : Pin; - const actionLabel = `${pinned ? "Unpin" : "Pin"} ${label}`; - return ; -} - function RecentPinRow({ pinKey, label, pins, children }: { pinKey: string; label: string; pins: PinControls; children: ReactNode }) { if (!pins.canPin) return <>{children}; return
{children} - +
; } @@ -134,8 +123,6 @@ export function CoordinatorSidebar({ children }: { children?: ReactNode }) { const { companyId, userId, agents, chats, session } = useAgentChatNavigation(); const unreadChatCount = chats.data?.filter(chat => chat.isUnreadForMe).length ?? 0; const pinnedNavigation = usePinnedNavigation(userId); - const pinKeys = useMemo(() => new Set(pinnedNavigation.pins), [pinnedNavigation.pins]); - const pins = { keys: pinKeys, canPin: pinnedNavigation.canPin, toggle: pinnedNavigation.toggle }; const pinnedTaskIds = useMemo(() => { if (!companyId || !session.isSuccess) return []; const prefix = taskPinKey(companyId, ""); @@ -224,7 +211,7 @@ export function CoordinatorSidebar({ children }: { children?: ReactNode }) { { setMoreOpen(false); if (isMobile) setSidebarOpen(false); }} className="flex min-w-0 flex-1 items-center gap-2 rounded-sm px-2 py-1.5 pr-10 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring"> {label} - + )} @@ -234,17 +221,16 @@ export function CoordinatorSidebar({ children }: { children?: ReactNode }) { {session.isSuccess && recents.length > 0 &&
{recents.map(item => item.kind === "task" - ? + ? : item.kind === "chat" - ? + ? } /> : }> - - - - )} + renderTask={task => } + renderRow={toggle => + {toggle} + } />)}
} {children} diff --git a/ui/src/components/EntityRow.tsx b/ui/src/components/EntityRow.tsx index 3cc65e1a634..66cd451191e 100644 --- a/ui/src/components/EntityRow.tsx +++ b/ui/src/components/EntityRow.tsx @@ -23,7 +23,6 @@ interface EntityRowProps { titleClassName?: string; titleTextClassName?: string; subtitleClassName?: string; - reserveSubtitleSpace?: boolean; /** * Make the title (the row's primary identifier) win the flex fight: it keeps a * usable min-width floor and ellipsizes, while the `meta` cluster is the item @@ -59,7 +58,6 @@ export function EntityRow({ titleClassName, titleTextClassName, subtitleClassName, - reserveSubtitleSpace, titlePriority, secondaryRow, secondaryRowClassName, @@ -98,15 +96,13 @@ export function EntityRow({ {titleAccessory} - {(subtitle || reserveSubtitleSpace) && ( + {Boolean(subtitle) && (

{subtitle}

diff --git a/ui/src/components/NavigationPinButton.tsx b/ui/src/components/NavigationPinButton.tsx new file mode 100644 index 00000000000..d79f2dc7b33 --- /dev/null +++ b/ui/src/components/NavigationPinButton.tsx @@ -0,0 +1,40 @@ +import { Pin, PinOff } from "lucide-react"; +import { cn } from "@/lib/utils"; +import type { usePinnedNavigation } from "@/hooks/usePinnedNavigation"; + +export type PinControls = Pick, "keys" | "canPin" | "toggle">; + +interface NavigationPinButtonProps { + pinKey: string; + label: string; + pins: PinControls; + className: string; +} + +export function NavigationPinButton({ pinKey, label, pins, className }: NavigationPinButtonProps) { + const pinned = pins.keys.has(pinKey); + const Icon = pinned ? PinOff : Pin; + const action = `${pinned ? "Unpin" : "Pin"} ${label}`; + + return ( + + ); +} diff --git a/ui/src/components/PinnedNavigationList.tsx b/ui/src/components/PinnedNavigationList.tsx index 181f9cbfc9f..f1d634fcae4 100644 --- a/ui/src/components/PinnedNavigationList.tsx +++ b/ui/src/components/PinnedNavigationList.tsx @@ -9,14 +9,10 @@ import { cn } from "@/lib/utils"; import type { Project } from "@paperclipai/shared"; import { SidebarProjectTasks } from "./SidebarProjectTasks"; -export interface PinnedNavigationItem { - key: string; - to: string; - label: string; - icon: ReactNode; - task?: { id: string; identifier: string | null; isUnreadForMe?: boolean }; - project?: Pick; -} +export type PinnedNavigationItem = { key: string; label: string } & ( + | { project: Pick } + | { project?: never; to: string; icon: ReactNode; task?: { id: string; identifier: string | null; isUnreadForMe?: boolean } } +); /** Keep this row mounted when a pin is toggled so its controls retain focus. */ export function SortablePinnedRow({ id, label, disabled = false, className, handleClassName, handleIconClassName, children, ...props }: Omit, "id" | "children"> & { @@ -37,17 +33,24 @@ export function SortablePinnedRow({ id, label, disabled = false, className, hand } function PinnedItem({ item, userId, onUnpin }: { item: PinnedNavigationItem; userId?: string | null; onUnpin: (key: string) => void }) { - const link = { to: item.to, label: item.label, iconNode: item.icon, className: "design-sidebar-item design-sidebar-pinned-item group-hover/coordinator-pin:bg-sidebar-accent" }; - const row = (handle: ReactNode) => <> - {item.task ? : } + const rowClassName = "design-sidebar-item design-sidebar-pinned-item"; + const row = (primary: ReactNode, handle: ReactNode) =>
+ {primary} + className="absolute right-10 top-1/2 flex size-7 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground opacity-0 transition-opacity hover:bg-sidebar-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:opacity-100"> {handle} - ; - return - {handle => item.project ? {row(handle)} : row(handle)} +
; + return + {handle => { + if (item.project) { + return row(toggle, handle)} />; + } + const link = { to: item.to, label: item.label, iconNode: item.icon, className: rowClassName }; + return row(item.task ? : , handle); + }} ; } diff --git a/ui/src/components/SidebarProjectTasks.tsx b/ui/src/components/SidebarProjectTasks.tsx index 102fe1d6f71..5ce670917d1 100644 --- a/ui/src/components/SidebarProjectTasks.tsx +++ b/ui/src/components/SidebarProjectTasks.tsx @@ -1,18 +1,20 @@ import { useId, useState, type ReactNode } from "react"; import { useQuery } from "@tanstack/react-query"; -import { ChevronRight } from "lucide-react"; +import { Folder, FolderOpen } from "lucide-react"; import type { Issue, Project } from "@paperclipai/shared"; import { issuesApi } from "@/api/issues"; import { queryKeys } from "@/lib/queryKeys"; import { cn } from "@/lib/utils"; import { taskStatusIconProps } from "@/lib/task-status-presentation"; import { RecentTaskNavItem } from "./RecentTaskNavItem"; +import { TruncatedText } from "./TruncatedText"; import { StatusIcon } from "./StatusIcon"; -export function SidebarProjectTasks({ project, userId, children, renderTask }: { +export function SidebarProjectTasks({ project, userId, renderRow, className, renderTask }: { project: Pick; userId?: string | null; - children: ReactNode; + renderRow: (toggle: ReactNode) => ReactNode; + className?: string; renderTask?: (task: Issue) => ReactNode; }) { const [expanded, setExpanded] = useState(false); @@ -24,16 +26,21 @@ export function SidebarProjectTasks({ project, userId, children, renderTask }: { }, { signal }), enabled: expanded, }); - return
-
-
{children}
- -
- {expanded &&
+ )} + {expanded &&
{isPending ?

Loading tasks…

: error ?

Couldn’t load tasks.

: tasks?.length ? tasks.map(task =>
{renderTask ? renderTask(task) diff --git a/ui/src/hooks/usePinnedNavigation.ts b/ui/src/hooks/usePinnedNavigation.ts index 0457aa5fc8c..662c7dd6ba2 100644 --- a/ui/src/hooks/usePinnedNavigation.ts +++ b/ui/src/hooks/usePinnedNavigation.ts @@ -1,5 +1,9 @@ import { useCallback, useMemo, useState, useSyncExternalStore } from "react"; +export function projectPinKey(project: { companyId: string; id: string }) { + return `project:${project.companyId}:${project.id}`; +} + const UPDATED = "paperclip:pinned-navigation-updated"; const EMPTY = "[]"; @@ -29,6 +33,8 @@ export function usePinnedNavigation(userId: string | null | undefined) { const snapshot = useSyncExternalStore(subscribe, () => read(key), () => EMPTY); const pins = useMemo(() => parse(snapshot), [snapshot]); + const keys = useMemo(() => new Set(pins), [pins]); + function save(next: string[]) { if (!key) return; try { @@ -56,5 +62,5 @@ export function usePinnedNavigation(userId: string | null | undefined) { save(current.map(entry => visible.has(entry) ? ordered[index++] : entry)); } - return { pins, toggle, reorder, canPin: !!key, error: failure?.key === key ? failure.message : null }; + return { pins, keys, toggle, reorder, canPin: !!key, error: failure?.key === key ? failure.message : null }; } diff --git a/ui/src/index.css b/ui/src/index.css index 4f2e2e70824..c09115915dc 100644 --- a/ui/src/index.css +++ b/ui/src/index.css @@ -4832,13 +4832,21 @@ html:has(.design-proposal-theme) .design-navigation-group-label { color: color-mix(in oklab, var(--muted-foreground) 60%, transparent); } .design-sidebar .design-sidebar-item { min-height: var(--design-sidebar-item-height); margin-inline: var(--design-sidebar-item-inset); padding-inline: var(--design-sidebar-item-inset); color: var(--design-sidebar-item-foreground); font-size: var(--design-sidebar-label-size); line-height: var(--design-sidebar-label-leading); } -.design-sidebar-pin-target > .design-sidebar-item { padding-inline-end: calc(var(--spacing) * 10); } -.design-sidebar .design-sidebar-pinned-item { padding-inline-end: calc(var(--spacing) * 16); } +.design-sidebar-project-toggle { width: calc(100% - var(--design-sidebar-item-inset) * 2); } .design-sidebar .design-sidebar-item:is(:hover, [aria-current="page"]) { background: var(--design-sidebar-item-highlight); color: var(--design-sidebar-item-active-foreground); } -.design-sidebar-pin-target > button { opacity: 0; pointer-events: none; } +.design-sidebar-pin-target > [aria-pressed] { opacity: 0; pointer-events: none; } .design-sidebar-pin-target:is(:hover, :has(> [aria-current="page"], > :focus-visible)) { - > .design-sidebar-item { background: var(--design-sidebar-item-highlight); color: var(--design-sidebar-item-active-foreground); } - > button { opacity: 1; pointer-events: auto; } + > .design-sidebar-item { padding-inline-end: calc(var(--spacing) * 10); background: var(--design-sidebar-item-highlight); color: var(--design-sidebar-item-active-foreground); } + > [aria-pressed] { opacity: 1; pointer-events: auto; } +} +.design-sidebar-pinned-row > button:not(.design-sidebar-item) { pointer-events: none; } +.design-sidebar-pinned-row:is(:hover, :focus-within) { + > .design-sidebar-pinned-item { padding-inline-end: calc(var(--spacing) * 16); background: var(--design-sidebar-item-highlight); } + > button:not(.design-sidebar-item) { opacity: 1; pointer-events: auto; } +} +@media (pointer: coarse) { + .design-sidebar-pinned-row > .design-sidebar-pinned-item { padding-inline-end: calc(var(--spacing) * 16); } + .design-sidebar-pinned-row > button:not(.design-sidebar-item) { pointer-events: auto; } } .design-sidebar-new-task { display: flex; justify-content: flex-start; width: calc(100% - var(--design-sidebar-item-inset) * 2); height: var(--design-sidebar-item-height); margin-inline: var(--design-sidebar-item-inset); padding-inline: var(--design-sidebar-item-inset); gap: calc(var(--spacing) * 2.5); font-size: var(--design-sidebar-label-size); line-height: var(--design-sidebar-label-leading); font-weight: var(--font-weight-medium); color: var(--design-sidebar-item-foreground); } .design-sidebar-new-task svg { width: var(--design-page-icon-size); height: var(--design-page-icon-size); } diff --git a/ui/src/pages/ProjectDetail.tsx b/ui/src/pages/ProjectDetail.tsx index 246f9030eaa..7dd8782ded9 100644 --- a/ui/src/pages/ProjectDetail.tsx +++ b/ui/src/pages/ProjectDetail.tsx @@ -29,6 +29,7 @@ import { PageTabBar } from "../components/PageTabBar"; import { ProjectWorkspacesContent } from "../components/ProjectWorkspacesContent"; import { SummarySlotCard } from "../components/SummarySlotCard"; import { MembershipAction } from "../components/MembershipAction"; +import { useCoordinatorWorkspaceEnabled } from "../hooks/useCoordinatorWorkspaceEnabled"; import { StarToggle } from "../components/StarToggle"; import { buildProjectWorkspaceSummaries } from "../lib/project-workspaces-tab"; import { collectLiveIssueIds } from "../lib/liveIssueIds"; @@ -334,6 +335,8 @@ export function ProjectDetail() { filter?: string; }>(); const { companies, selectedCompanyId, setSelectedCompanyId } = useCompany(); + const workspace = useCoordinatorWorkspaceEnabled(); + const classicWorkspace = workspace.loaded && !workspace.enabled; const { closePanel } = usePanel(); const { setBreadcrumbs } = useBreadcrumbs(); const { pushToast } = useToastActions(); @@ -714,7 +717,7 @@ export function ProjectDetail() { } if (!project) return null; const showLeftProjectNotice = - projectMembershipState === "left" && !dismissedLeftProjectIds.has(project.id); + classicWorkspace && projectMembershipState === "left" && !dismissedLeftProjectIds.has(project.id); const projectMembershipPending = membershipMutation.isPending && membershipMutation.variables?.resourceType === "project" && @@ -810,20 +813,22 @@ export function ProjectDetail() {
) : null}
-
- membershipMutation.mutate({ - resourceType: "project", - resourceId: project.id, - resourceName: project.name, - starred: next, - })} - /> -
+ {classicWorkspace && ( +
+ membershipMutation.mutate({ + resourceType: "project", + resourceId: project.id, + resourceName: project.name, + starred: next, + })} + /> +
+ )}
{ setSortField(field); setSortDir(direction); }} onNewProject={openNewProject} /> + {pins.error &&

{pins.error}

} + {!isLoading && projects.length === 0 && ( } title={project.name} - subtitle={project.description ?? undefined} - reserveSubtitleSpace + subtitle={project.description?.trim() || undefined} to={projectUrl(project)} - className={state === "left" ? "group text-foreground/55" : "group"} + className={state === "left" ? "group min-h-14 text-foreground/55" : "group min-h-14"} trailing={
{project.visibility === "private" ? : null} @@ -210,36 +216,48 @@ export function Projects() { )} - membershipMutation.mutate({ - resourceType: "project", - resourceId: project.id, - resourceName: project.name, - state: "joined", - })} - onLeave={() => membershipMutation.mutate({ - resourceType: "project", - resourceId: project.id, - resourceName: project.name, - state: "left", - })} - /> - membershipMutation.mutate({ - resourceType: "project", - resourceId: project.id, - resourceName: project.name, - starred: next, - })} - /> + {pins.canPin && ( + + )} + {workspace.loaded && !workspace.enabled && ( + <> + membershipMutation.mutate({ + resourceType: "project", + resourceId: project.id, + resourceName: project.name, + state: "joined", + })} + onLeave={() => membershipMutation.mutate({ + resourceType: "project", + resourceId: project.id, + resourceName: project.name, + state: "left", + })} + /> + membershipMutation.mutate({ + resourceType: "project", + resourceId: project.id, + resourceName: project.name, + starred: next, + })} + /> + + )}
} />