Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
feat(inbox): remove redundant mark-as-done hover button, add archive button for done tasks (#1970)
Jiayuan Zhang374f62be1385
diff --git a/packages/views/inbox/components/inbox-list-item.tsx b/packages/views/inbox/components/inbox-list-item.tsxindex 0bc7e4c800..06e9b41543 100644--- a/packages/views/inbox/components/inbox-list-item.tsx+++ b/packages/views/inbox/components/inbox-list-item.tsx@@ -2,7 +2,7 @@import { StatusIcon } from "../../issues/components";import { ActorAvatar } from "../../common/actor-avatar";-import { Archive, CircleCheck } from "lucide-react";+import { Archive } from "lucide-react";import type { InboxItem } from "@multica/core/types";import { InboxDetailLabel } from "./inbox-detail-label";import { getInboxDisplayTitle } from "./inbox-display";@@ -25,13 +25,11 @@ export function InboxListItem({isSelected,onClick,onArchive,- onDone,}: {item: InboxItem;isSelected: boolean;onClick: () => void;onArchive: () => void;- onDone?: () => void;}) {const displayTitle = getInboxDisplayTitle(item);@@ -61,26 +59,6 @@ export function InboxListItem({</span></div><div className="flex shrink-0 items-center gap-1">- {onDone && (- <span- role="button"- tabIndex={-1}- title="Mark as done"- onClick={(e) => {- e.stopPropagation();- onDone();- }}- onKeyDown={(e) => {- if (e.key === "Enter" || e.key === " ") {- e.stopPropagation();- onDone();- }- }}- className="hidden rounded p-0.5 text-muted-foreground hover:bg-accent hover:text-info group-hover:inline-flex"- >- <CircleCheck className="h-3.5 w-3.5" />- </span>- )}<spanrole="button"tabIndex={-1}diff --git a/packages/views/inbox/components/inbox-page.tsx b/packages/views/inbox/components/inbox-page.tsxindex 3abc42a3e1..2d61f36dea 100644--- a/packages/views/inbox/components/inbox-page.tsx+++ b/packages/views/inbox/components/inbox-page.tsx@@ -20,7 +20,7 @@ import {useArchiveAllReadInbox,useArchiveCompletedInbox,} from "@multica/core/inbox/mutations";-import { useUpdateIssue } from "@multica/core/issues/mutations";+import { IssueDetail } from "../../issues/components";import { useNavigation } from "../../navigation";import { toast } from "sonner";@@ -118,8 +118,6 @@ export function InboxPage() {const archiveAllMutation = useArchiveAllInbox();const archiveAllReadMutation = useArchiveAllReadInbox();const archiveCompletedMutation = useArchiveCompletedInbox();- const updateIssueMutation = useUpdateIssue();-// Auto-mark-read whenever a selected item is unread — covers both click-// to-select and URL-param-select (e.g. OS notification click on desktop).// The mutation flips `read: true` optimistically, so this effect settles@@ -147,18 +145,6 @@ export function InboxPage() {});};- const handleDone = (item: InboxItem) => {- if (!item.issue_id) return;- setSelectedKey("");- updateIssueMutation.mutate(- { id: item.issue_id, status: "done" },- { onError: () => toast.error("Failed to mark as done") },- );- archiveMutation.mutate(item.id, {- onError: () => toast.error("Failed to archive"),- });- };-// Batch operationsconst handleMarkAllRead = () => {markAllReadMutation.mutate(undefined, {@@ -249,11 +235,6 @@ export function InboxPage() {isSelected={(item.issue_id ?? item.id) === selectedKey}onClick={() => handleSelect(item)}onArchive={() => handleArchive(item.id)}- onDone={- item.issue_id && item.issue_status !== "done" && item.issue_status !== "cancelled"- ? () => handleDone(item)- : undefined- }/>))}</div>diff --git a/packages/views/issues/components/issue-detail.tsx b/packages/views/issues/components/issue-detail.tsxindex 25526aaf7e..3ef4df4d76 100644--- a/packages/views/issues/components/issue-detail.tsx+++ b/packages/views/issues/components/issue-detail.tsx@@ -5,6 +5,7 @@ import { useDefaultLayout, usePanelRef } from "react-resizable-panels";import { AppLink } from "../../navigation";import { useNavigation } from "../../navigation";import {+ Archive,Calendar,ChevronDown,ChevronLeft,@@ -549,6 +550,23 @@ export function IssueDetail({ issueId, onDelete, onDone, defaultSidebarOpen = tr<TooltipContent side="bottom">Mark as done</TooltipContent></Tooltip>)}+ {onDone && issue.status === "done" && (+ <Tooltip>+ <TooltipTrigger+ render={+ <Button+ variant="ghost"+ size="icon-sm"+ className="text-muted-foreground"+ onClick={() => { onDone(); }}+ >+ <Archive />+ </Button>+ }+ />+ <TooltipContent side="bottom">Archive</TooltipContent>+ </Tooltip>+ )}<Tooltip><TooltipTriggerrender={