Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
feat(inbox): handle every notification on the Inbox page, with Inbox · Snoozed · Archived tabs (MUL-9906) (#11259)
Jiayuan Zhang8084ed2612e0
diff --git a/AGENTS.md b/AGENTS.mdindex 31f6366053..ace6878443 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -55,7 +55,7 @@ Docs-only changes can use link/reference checks and `git diff --check`; state th- TanStack Query owns API/server data. Zustand owns client state such as filters, drafts, modals, and tab layout; persist only durable preferences/drafts/layout, not server data or ephemeral UI state.- Web/desktop shared stores live in `packages/core/`. Desktop platform stores remain in desktop; mobile stores remain in mobile. Do not define stores in `packages/views/`.-- Desktop tabs in a window share one set of Zustand stores and mount one at a time; a web tab gets its own. State describing how the current page was reached (source list, selection, highlight) must not assume one page: a click that opens a new tab leaves the current page's record intact and still records the target tab's own (`sidebarTabIssuesByWorkspace` in `packages/core/inbox/selection-store.ts`).+- Desktop tabs in a window share one set of Zustand stores and mount one at a time; a web tab gets its own. State describing how the current page was reached (source list, selection, highlight) must not assume one page: a click that opens a new tab leaves the current page's record intact and still records the target tab's own.- On web/desktop, workspace identity is route-driven; platform mirrors exist only for request headers, storage namespaces, and reconnects. React Context is for platform plumbing, not a second server-state store.- Among stores, only auth/workspace stores may call `api.*` directly; other server interactions belong in queries/mutations.- Workspace-scoped query keys include `wsId`; account-level keys remain account-scoped. Hooks needing workspace context accept `wsId` unless guaranteed to run under its provider.diff --git a/apps/docs/components/demos/inbox-demo.tsx b/apps/docs/components/demos/inbox-demo.tsxindex 76ab9bfc05..cab999cedd 100644--- a/apps/docs/components/demos/inbox-demo.tsx+++ b/apps/docs/components/demos/inbox-demo.tsx@@ -12,7 +12,6 @@ import {CircleDashed,CircleDot,Filter,- MoreHorizontal,SlidersHorizontal,X,} from "@multica/ui/icons";@@ -54,15 +53,14 @@ type Copy = {archive: string;archivedToast: string;runFailed: string;- /** The section's ⋯ menu: View archived first, then the bulk actions. */- menu: [string, ...string[]];- menuLabel: string;+ /** The section header's tabs after the Inbox. */archivedTitle: string;- unarchive: string;+ snoozedTitle: string;+ restore: string;captions: Record<Phase, string>;};-type Phase = "idle" | "start" | "opened" | "archived" | "archivedAgain" | "menu" | "archivedView";+type Phase = "idle" | "start" | "opened" | "archived" | "archivedAgain" | "archivedView";const copy: { en: Copy } & Partial<Record<Lang, Copy>> = {en: {@@ -119,10 +117,9 @@ const copy: { en: Copy } & Partial<Record<Lang, Copy>> = {archive: "Archive",archivedToast: "Notification archived",runFailed: "Run failed",- menu: ["View archived", "Mark all as read", "Archive all read", "Archive completed", "Archive all"],- menuLabel: "Inbox actions",archivedTitle: "Archived",- unarchive: "Unarchive",+ snoozedTitle: "Snoozed",+ restore: "Move back to Inbox",captions: {idle: "Notifications that concern you sit at the top of the Work panel.",start: "Three unread notifications. Open the one where someone mentioned you.",@@ -131,10 +128,9 @@ const copy: { en: Copy } & Partial<Record<Lang, Copy>> = {archived:"The row left the Inbox and the next notification opened: the draft is in. Once you've read it, archive this one too (E). Archiving never changes the issue's status.",archivedAgain:- "That notification left too and the next one opened. The draft stays In Review until you change the issue's Status. Archived notifications are in the section's ⋯ menu. Click ⋯.",- menu: "The ⋯ menu holds View archived and the bulk actions. Click View archived.",+ "That notification left too and the next one opened. The draft stays In Review until you change the issue's Status. Archived notifications have a tab of their own in the section header. Click Archived.",archivedView:- "Archived notifications keep their read state, and you can unarchive any of them here. Use Replay to watch again.",+ "The section lists the archive now. Archived notifications keep their read state, and Move back to Inbox restores one. Use Replay to watch again.",},},zh: {@@ -191,18 +187,18 @@ const copy: { en: Copy } & Partial<Record<Lang, Copy>> = {archive: "归档",archivedToast: "已归档通知",runFailed: "运行失败",- menu: ["查看已归档", "全部标为已读", "归档全部已读", "归档已完成", "归档全部"],- menuLabel: "收件箱操作",archivedTitle: "已归档",- unarchive: "取消归档",+ snoozedTitle: "已延后",+ restore: "移回收件箱",captions: {idle: "和你有关的通知在工作面板的最上方。",start: "三条未读通知。打开有人 @你 的那一条。",opened: "任务打开并定位到那条评论。通知变为已读,但仍留在列表里。处理完点\"归档\"(E)。",archived: "这一行离开了收件箱,下一条通知自动打开:初稿到了。看完也点\"归档\"(E)。归档不会改变任务的状态。",- archivedAgain: "这条通知也归档了,下一条自动打开。初稿仍是审核中,直到你在任务的\"状态\"里修改。已归档的通知在分区的 ⋯ 菜单里。点 ⋯。",- menu: "⋯ 菜单里有\"查看已归档\"和批量操作。点\"查看已归档\"。",- archivedView: "已归档的通知保留已读状态,可以在这里取消归档。点右上角可以重新演示。",+ archivedAgain:+ "这条通知也归档了,下一条自动打开。初稿仍是审核中,直到你在任务的\"状态\"里修改。已归档的通知在分区标题的标签里。点\"已归档\"。",+ archivedView:+ "分区现在列出已归档的通知。它们保留已读状态,点\"移回收件箱\"即可恢复。点右上角可以重新演示。",},},"zh-Hant": {@@ -259,18 +255,18 @@ const copy: { en: Copy } & Partial<Record<Lang, Copy>> = {archive: "歸檔",archivedToast: "已歸檔通知",runFailed: "執行失敗",- menu: ["查看已歸檔", "全部標為已讀", "歸檔全部已讀", "歸檔已完成", "歸檔全部"],- menuLabel: "收件箱操作",archivedTitle: "已歸檔",- unarchive: "取消歸檔",+ snoozedTitle: "已延後",+ restore: "移回收件箱",captions: {idle: "和你有關的通知在工作面板的最上方。",start: "三條未讀通知。開啟有人 @你 的那一條。",opened: "任務開啟並定位到那條評論。通知變為已讀,但仍留在列表裡。處理完點\"歸檔\"(E)。",archived: "這一列離開了收件箱,下一條通知自動開啟:初稿到了。看完也點\"歸檔\"(E)。歸檔不會改變任務的狀態。",- archivedAgain: "這條通知也歸檔了,下一條自動開啟。初稿仍是審查中,直到你在任務的\"狀態\"裡修改。已歸檔的通知在分區的 ⋯ 選單裡。點 ⋯。",- menu: "⋯ 選單裡有\"查看已歸檔\"和批次操作。點\"查看已歸檔\"。",- archivedView: "已歸檔的通知保留已讀狀態,可以在這裡取消歸檔。點右上角可以重新播放。",+ archivedAgain:+ "這條通知也歸檔了,下一條自動開啟。初稿仍是審查中,直到你在任務的\"狀態\"裡修改。已歸檔的通知在分區標題的分頁裡。點\"已歸檔\"。",+ archivedView:+ "分區現在列出已歸檔的通知。它們保留已讀狀態,點\"移回收件箱\"即可復原。點右上角可以重新播放。",},},ja: {@@ -327,16 +323,9 @@ const copy: { en: Copy } & Partial<Record<Lang, Copy>> = {archive: "アーカイブ",archivedToast: "通知をアーカイブしました",runFailed: "実行失敗",- menu: [- "アーカイブ済みを表示",- "すべて既読にする",- "既読の項目をすべてアーカイブ",- "完了した項目をアーカイブ",- "すべてアーカイブ",- ],- menuLabel: "インボックスの操作",archivedTitle: "アーカイブ済み",- unarchive: "アーカイブ解除",+ snoozedTitle: "スヌーズ中",+ restore: "インボックスに戻す",captions: {idle: "あなたに関係する通知は作業パネルの一番上に並びます。",start: "未読の通知が 3 件あります。あなたがメンションされた通知を開きます。",@@ -345,9 +334,9 @@ const copy: { en: Copy } & Partial<Record<Lang, Copy>> = {archived:"行がインボックスから外れ、次の通知が開きました。初稿が届いています。読んだらこれも「アーカイブ」(E)します。アーカイブしてもタスクのステータスは変わりません。",archivedAgain:- "この通知もアーカイブされ、次の通知が開きました。タスクの「ステータス」を変えるまで、初稿はレビュー中のままです。アーカイブした通知はセクションの ⋯ メニューから見られます。⋯ をクリックします。",- menu: "⋯ メニューには「アーカイブ済みを表示」と一括操作があります。「アーカイブ済みを表示」をクリックします。",- archivedView: "アーカイブした通知は既読のまま残り、ここからアーカイブを解除できます。「もう一度」で最初から見られます。",+ "この通知もアーカイブされ、次の通知が開きました。タスクの「ステータス」を変えるまで、初稿はレビュー中のままです。アーカイブした通知はセクション見出しのタブにあります。「アーカイブ済み」をクリックします。",+ archivedView:+ "セクションにアーカイブした通知が並びます。既読の状態はそのまま残り、「インボックスに戻す」で元に戻せます。「もう一度」で最初から見られます。",},},ko: {@@ -404,10 +393,9 @@ const copy: { en: Copy } & Partial<Record<Lang, Copy>> = {archive: "보관",archivedToast: "알림을 보관했습니다",runFailed: "실행 실패함",- menu: ["보관된 알림 보기", "모두 읽음으로 표시", "읽은 항목 모두 보관", "완료된 항목 보관", "모두 보관"],- menuLabel: "인박스 작업",archivedTitle: "보관됨",- unarchive: "보관 해제",+ snoozedTitle: "미뤄둔 항목",+ restore: "인박스로 되돌리기",captions: {idle: "나와 관련된 알림은 작업 패널 맨 위에 모입니다.",start: "읽지 않은 알림이 3개 있습니다. 누군가 나를 멘션한 알림을 여세요.",@@ -416,9 +404,9 @@ const copy: { en: Copy } & Partial<Record<Lang, Copy>> = {archived:"행이 인박스에서 빠지고 다음 알림이 열렸습니다. 초안이 도착했습니다. 읽고 나면 이것도 '보관'(E)하세요. 보관해도 태스크의 상태는 바뀌지 않습니다.",archivedAgain:- "이 알림도 보관되고 다음 알림이 열렸습니다. 태스크의 '상태'를 바꾸기 전까지 초안은 리뷰 중으로 남습니다. 보관된 알림은 섹션의 ⋯ 메뉴에서 볼 수 있습니다. ⋯을 클릭하세요.",- menu: "⋯ 메뉴에는 '보관된 알림 보기'와 일괄 작업이 있습니다. '보관된 알림 보기'를 클릭하세요.",- archivedView: "보관된 알림은 읽음 상태를 유지하고, 여기서 보관을 해제할 수 있습니다. '다시 보기'로 다시 볼 수 있습니다.",+ "이 알림도 보관되고 다음 알림이 열렸습니다. 태스크의 '상태'를 바꾸기 전까지 초안은 리뷰 중으로 남습니다. 보관된 알림은 섹션 제목의 탭에 있습니다. '보관됨'을 클릭하세요.",+ archivedView:+ "이제 섹션에 보관된 알림이 나열됩니다. 보관된 알림은 읽음 상태를 유지하고, '인박스로 되돌리기'로 되돌릴 수 있습니다. '다시 보기'로 다시 볼 수 있습니다.",},},fr: {@@ -475,16 +463,9 @@ const copy: { en: Copy } & Partial<Record<Lang, Copy>> = {archive: "Archiver",archivedToast: "Notification archivée",runFailed: "Exécution en échec",- menu: [- "Voir les archivées",- "Tout marquer comme lu",- "Archiver tout ce qui est lu",- "Archiver les éléments terminés",- "Tout archiver",- ],- menuLabel: "Actions de la boîte de réception",archivedTitle: "Archivées",- unarchive: "Désarchiver",+ snoozedTitle: "Reportés",+ restore: "Remettre dans la boîte de réception",captions: {idle: "Les notifications qui vous concernent sont en haut du panneau Travail.",start: "Trois notifications non lues. Ouvrez celle où quelqu'un vous a mentionné.",@@ -493,10 +474,9 @@ const copy: { en: Copy } & Partial<Record<Lang, Copy>> = {archived:"La ligne a quitté la boîte de réception et la notification suivante s'est ouverte : le premier jet est arrivé. Une fois lu, archivez-le aussi (E). Archiver ne change jamais le statut de la tâche.",archivedAgain:- "Cette notification est partie à son tour et la suivante s'est ouverte. Le premier jet reste En relecture tant que vous ne changez pas le Statut de la tâche. Les notifications archivées sont dans le menu ⋯ de la section. Cliquez sur ⋯.",- menu: "Le menu ⋯ regroupe Voir les archivées et les actions groupées. Cliquez sur Voir les archivées.",+ "Cette notification est partie à son tour et la suivante s'est ouverte. Le premier jet reste En relecture tant que vous ne changez pas le Statut de la tâche. Les notifications archivées ont leur propre onglet dans l'en-tête de la section. Cliquez sur Archivées.",archivedView:- "Les notifications archivées gardent leur état de lecture et peuvent être désarchivées ici. Utilisez Rejouer pour revoir la démo.",+ "La section liste maintenant les archives. Les notifications archivées gardent leur état de lecture, et Remettre dans la boîte de réception en restaure une. Utilisez Rejouer pour revoir la démo.",},},};@@ -509,7 +489,6 @@ const ARCHIVED: Record<Step, NoticeId[]> = {opened: [],archived: ["mention"],archivedAgain: ["mention", "draft"],- menu: ["mention", "draft"],archivedView: ["mention", "draft"],};const READ: Record<Step, NoticeId[]> = {@@ -517,7 +496,6 @@ const READ: Record<Step, NoticeId[]> = {opened: ["assigned", "mention"],archived: ["assigned", "mention", "draft"],archivedAgain: ["assigned", "mention", "draft", "failed"],- menu: ["assigned", "mention", "draft", "failed"],archivedView: ["assigned", "mention", "draft", "failed"],};const OPEN: Record<Step, NoticeId | null> = {@@ -525,7 +503,6 @@ const OPEN: Record<Step, NoticeId | null> = {opened: "mention",archived: "draft",archivedAgain: "failed",- menu: "failed",archivedView: null,};@@ -637,6 +614,36 @@ function InboxBar({);}+/** A tab in the Inbox section's header, as the product's Inbox · Snoozed · Archived. */+function DemoTab({+ label,+ active,+ count = 0,+ onClick,+}: {+ label: string;+ active: boolean;+ count?: number;+ onClick?: () => void;+}) {+ return (+ <button+ type="button"+ role="tab"+ aria-selected={active}+ disabled={!onClick}+ onClick={onClick}+ className={cn(+ "flex h-5 shrink-0 items-center gap-1 rounded-md px-1.5",+ active ? "bg-accent text-foreground" : "text-muted-foreground enabled:hover:text-foreground",+ )}+ >+ {label}+ {count > 0 && <span className="text-brand tabular-nums">{count}</span>}+ </button>+ );+}+export function InboxDemo() {const t = useDemoCopy(copy);const [frameRef, visible] = useStartWhenVisible<HTMLElement>();@@ -648,78 +655,60 @@ export function InboxDemo() {const unread = rows.filter((n) => !isRead(n.id)).length;const selected = t.notices.find((n) => n.id === OPEN[phase]) ?? null;+ const archivedTab = phase === "archivedView";+ const archivedRows = t.notices.filter((n) => ARCHIVED[phase].includes(n.id));+const panel = (<div className="flex min-w-0 flex-col gap-0.5 bg-muted/30 p-1.5 sm:w-[46%] sm:shrink-0 sm:border-r"><div className="flex h-7 items-center gap-1 px-2">- <span className="min-w-0 flex-1 truncate text-caption font-medium text-muted-foreground">{t.inbox}</span>+ <span role="tablist" aria-label={t.inbox} className="-ml-1.5 flex min-w-0 flex-1 items-center gap-0.5 text-caption font-medium">+ <DemoTab label={t.inbox} active={!archivedTab} count={unread} />+ <DemoTab label={t.snoozedTitle} active={false} />+ <CoachMark active={visible && phase === "archivedAgain"} quiet ringClassName="rounded-md">+ <DemoTab+ label={t.archivedTitle}+ active={archivedTab}+ onClick={phase === "archivedAgain" ? () => setPhase("archivedView") : undefined}+ />+ </CoachMark>+ </span><span aria-hidden className="flex items-center gap-1.5 text-faint-foreground"><Filter className="size-3.5" /><SlidersHorizontal className="size-3.5" /></span>- <span className="relative">- <CoachMark active={visible && phase === "archivedAgain"} quiet ringClassName="rounded-md">- <button- type="button"- aria-label={t.menuLabel}- aria-expanded={phase === "menu"}- disabled={phase !== "archivedAgain"}- onClick={() => setPhase("menu")}- className={cn(- "flex size-5 items-center justify-center rounded-md text-faint-foreground",- phase === "menu" && "bg-accent text-foreground",- )}- >- <MoreHorizontal className="size-3.5" />- </button>- </CoachMark>- {phase === "menu" && (- <span className="absolute top-full right-0 z-30 sm:right-auto sm:left-0 mt-1 flex w-max min-w-44 flex-col rounded-lg border bg-popover p-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in">- {t.menu.map((label, index) =>- index === 0 ? (- <CoachMark key={label} active quiet ringClassName="rounded-md" className="flex w-full">+ </div>+ <ul className="m-0 flex list-none flex-col gap-0.5 p-0">+ {archivedTab+ ? archivedRows.map((notice) => (+ <li+ key={notice.id}+ className="m-0 flex h-8 items-center gap-2 rounded-md px-2 motion-safe:animate-in motion-safe:fade-in"+ >+ <DemoStatus status={statusOf(notice.id)} />+ <span className="min-w-0 flex-1 truncate text-body text-muted-foreground">{notice.title}</span>+ <span title={t.restore} className="flex shrink-0 text-muted-foreground">+ <ArchiveRestore aria-label={t.restore} className="size-3.5" />+ </span>+ </li>+ ))+ : rows.map((notice) => {+ const rowUnread = !isRead(notice.id);+ const active = notice.id === selected?.id;+ const clickable = visible && phase === "start" && notice.id === "mention";+ return (+ <li key={notice.id} className="m-0 p-0">+ <CoachMark active={clickable} side="right" ringClassName="rounded-md" className="flex w-full"><buttontype="button"- onClick={() => setPhase("archivedView")}- className="flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-caption hover:bg-accent"+ disabled={!clickable}+ aria-current={active ? "page" : undefined}+ onClick={() => setPhase("opened")}+ className={cn(+ "flex h-8 w-full items-center gap-2 rounded-md px-2 text-left motion-safe:animate-in motion-safe:fade-in",+ active ? "bg-accent" : "enabled:hover:bg-accent/50",+ )}>- <Archive aria-hidden className="size-3.5 text-muted-foreground" />- {label}- </button>- </CoachMark>- ) : (- <span key={label} className="px-2 py-1.5 text-caption text-muted-foreground">- {label}- </span>- ),- )}- </span>- )}- </span>- {unread > 0 && <span className="w-4 text-right text-caption font-medium text-brand tabular-nums">{unread}</span>}- </div>- <ul className="m-0 flex list-none flex-col gap-0.5 p-0">- {rows.map((notice) => {- const rowUnread = !isRead(notice.id);- const active = notice.id === selected?.id;- const clickable = visible && phase === "start" && notice.id === "mention";- return (- <li key={notice.id} className="m-0 p-0">- <CoachMark active={clickable} side="right" ringClassName="rounded-md" className="flex w-full">- <button- type="button"- disabled={!clickable}- aria-current={active ? "page" : undefined}- onClick={() => setPhase("opened")}- className={cn(- "flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left motion-safe:animate-in motion-safe:fade-in",- active ? "bg-accent" : "enabled:hover:bg-accent/50",- )}- >- <span className="mt-[3px] flex shrink-0">- <DemoStatus status={statusOf(notice.id)} />- </span>- <span className="flex min-w-0 flex-1 flex-col">- <span className="flex min-w-0 items-center gap-2 leading-5">+ <DemoStatus status={statusOf(notice.id)} /><spanclassName={cn("min-w-0 flex-1 truncate text-body",@@ -729,22 +718,15 @@ export function InboxDemo() {{notice.title}</span><span className="shrink-0 text-caption text-faint-foreground tabular-nums">{notice.time}</span>- </span>- <span className="mt-0.5 flex min-w-0 items-center gap-2 text-caption leading-4 text-muted-foreground">- <span className="flex min-w-0 flex-1 items-center gap-1.5">- <RowAvatar name={notice.actor} agent={notice.agent} />- <span className="min-w-0 flex-1 truncate">- <span className="font-medium">{notice.actor}</span> {notice.detail}- </span>- </span>- {rowUnread && <span aria-hidden className="size-1.5 shrink-0 rounded-full bg-brand" />}- </span>- </span>- </button>- </CoachMark>- </li>- );- })}+ <span+ aria-hidden+ className={cn("size-1.5 shrink-0 rounded-full", rowUnread ? "bg-brand" : "bg-transparent")}+ />+ </button>+ </CoachMark>+ </li>+ );+ })}</ul><div aria-hidden className="mt-1 flex flex-col gap-0.5">{t.sections.map((label) => (@@ -759,8 +741,10 @@ export function InboxDemo() {const detail = selected ? (<div key={selected.id} className="flex min-w-0 flex-1 flex-col motion-safe:animate-in motion-safe:fade-in">- <div className="flex h-10 items-center gap-2 border-b px-3">- <span className="shrink-0 text-caption text-muted-foreground">{selected.issue}</span>+ <div className="flex h-10 items-center gap-1.5 border-b px-3 text-caption">+ <span className="shrink-0 text-muted-foreground">{t.inbox}</span>+ <ChevronRight aria-hidden className="size-3 shrink-0 text-faint-foreground" />+ <span className="shrink-0 text-muted-foreground">{selected.issue}</span><span className="min-w-0 flex-1 truncate text-label font-medium">{selected.title}</span></div><InboxBar@@ -790,37 +774,6 @@ export function InboxDemo() {)}</div></div>- ) : phase === "archivedView" ? (- <div className="flex min-w-0 flex-1 flex-col motion-safe:animate-in motion-safe:fade-in">- <div className="flex h-10 items-center gap-2 border-b px-3">- <Archive aria-hidden className="size-3.5 text-muted-foreground" />- <span className="text-label font-medium">{t.archivedTitle}</span>- </div>- <ul className="m-0 flex list-none flex-col gap-0.5 p-1.5">- {t.notices- .filter((n) => ARCHIVED[phase].includes(n.id))- .map((notice) => (- <li key={notice.id} className="m-0 flex items-start gap-2 rounded-md px-2 py-1.5">- <span className="mt-[3px] flex shrink-0">- <DemoStatus status={statusOf(notice.id)} />- </span>- <span className="flex min-w-0 flex-1 flex-col">- <span className="truncate text-body leading-5 text-muted-foreground">{notice.title}</span>- <span className="mt-0.5 flex min-w-0 items-center gap-1.5 text-caption leading-4 text-muted-foreground">- <RowAvatar name={notice.actor} agent={notice.agent} />- <span className="min-w-0 flex-1 truncate">- <span className="font-medium">{notice.actor}</span> {notice.detail}- </span>- </span>- </span>- <span className="inline-flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 text-caption text-muted-foreground">- <ArchiveRestore aria-hidden className="size-3.5" />- {t.unarchive}- </span>- </li>- ))}- </ul>- </div>) : (<div className="flex min-h-32 flex-1 items-center justify-center p-4 text-caption text-muted-foreground">{t.selectPrompt}diff --git a/apps/docs/content/docs/inbox.fr.mdx b/apps/docs/content/docs/inbox.fr.mdxindex e771bcb198..f2c69e0c77 100644--- a/apps/docs/content/docs/inbox.fr.mdx+++ b/apps/docs/content/docs/inbox.fr.mdx@@ -10,11 +10,11 @@ La boîte de réception rassemble l'activité de travail qui vous concerne et si## Où la trouver-La boîte de réception est une section du panneau **Travail**, sous les épingles et au-dessus des vues et des projets ; sans épingle, c'est la première section. Le nombre de non-lus s'affiche à côté du titre de la section et en badge sur **Travail** dans la barre d'applications ; un clic droit sur **Travail** propose **Tout marquer comme lu**.+La boîte de réception est une section du panneau **Travail**, sous les épingles et au-dessus des vues et des projets ; sans épingle, c'est la première section. Son en-tête porte trois onglets : **Boîte de réception**, **Reportés** et **Archivées**. Le nombre de non-lus s'affiche à côté de **Boîte de réception** et en badge sur **Travail** dans la barre d'applications ; un clic droit sur **Travail** propose **Tout marquer comme lu**.-La section affiche une ligne par tâche, de la plus récente à la plus ancienne, lues et non lues confondues. Une ligne montre le statut de la tâche, son titre et l'heure, et qui a fait quoi ; un point signale une ligne non lue. Survolez une ligne pour ouvrir une carte avec le titre complet, le commentaire, et **Ouvrir**, **Marquer comme lu** et **Archiver**.+L'onglet **Boîte de réception** affiche une ligne par tâche, de la plus récente à la plus ancienne, lues et non lues confondues. Une ligne montre le statut de la tâche, son titre et l'heure ; un point signale une ligne non lue. Désactivez **Lignes compactes** dans les réglages d'affichage pour ajouter qui a fait quoi sur une deuxième ligne. Survolez une ligne pour ouvrir une carte avec le titre complet, le commentaire, et **Ouvrir**, **Marquer comme lu** et **Archiver**.-Sur téléphone, le panneau Travail se trouve dans le tiroir. Sa section Boîte de réception se termine par **Toutes les notifications**, qui ouvre la page Boîte de réception avec sa propre liste et ses filtres.+Sur téléphone, le panneau Travail se trouve dans le tiroir. Sa section Boîte de réception se termine par **Toutes les notifications**, qui ouvre la page Boîte de réception avec sa propre liste, les mêmes trois onglets et ses filtres.## Ce qui arrive dans la boîte de réception@@ -90,11 +90,11 @@ Une exécution d'agent autorisée utilise son identifiant d'exécution pour tout## Traiter les notifications-Cliquez sur une ligne pour ouvrir sa tâche au commentaire dont parle la notification. La ligne reste en surbrillance tant que la tâche est ouverte, et un nouveau clic vous ramène à cet endroit. Ouvrir la tâche marque la notification comme lue, et la ligne reste dans la liste. Les notifications sans tâche, comme les mises en pause d'automatisation et les résultats de création rapide, s'ouvrent sur la page Boîte de réception.+Cliquez sur une ligne pour ouvrir la notification sur la page Boîte de réception, au commentaire dont elle parle. Toutes les notifications s'ouvrent là, y compris celles sans tâche, comme les mises en pause d'automatisation et les résultats de création rapide. La ligne reste en surbrillance tant que la notification est ouverte, et un nouveau clic vous ramène à cet endroit. L'ouvrir la marque comme lue, et la ligne reste dans la liste. Au-dessus de la tâche, **Boîte de réception** ramène à la liste, et **Ouvrir la page de la tâche** (↗) ouvre la tâche sur sa propre page, sans la barre de la boîte de réception.<InboxDemo />-Une tâche ouverte depuis la boîte de réception affiche une barre sous son en-tête. Elle indique qui a fait quoi, et quand, puis propose ce qui règle d'habitude la notification :+La tâche affiche une barre sous son en-tête. Elle indique qui a fait quoi, et quand, puis propose ce qui règle d'habitude la notification :- **Statut**, **Assigné à** et **Actions rapides** modifient la tâche elle-même, comme ses propriétés. Les actions rapides apparaissent dès que l'espace de travail en a.- **Reporter** (`H`) retire la tâche de votre boîte de réception jusqu'à l'heure choisie et ouvre la suivante. Voir « Reporter une tâche » ci-dessous.@@ -105,14 +105,14 @@ La suivante est la ligne suivante que la section affiche avec ses filtres actuelLe bouton de filtre dans l'en-tête de la section restreint la liste par type de notification, date de réception et expéditeur, ou par statut et priorité de la tâche. Une section filtrée garde le bouton visible, et **Effacer les filtres** la réinitialise.-Le menu ⋯ de la section regroupe **Voir les archivées** et les actions groupées :+Dans l'onglet **Boîte de réception**, le menu ⋯ de la section regroupe les actions groupées :- **Tout marquer comme lu** ;- **Archiver tout ce qui est lu** ;- **Archiver les éléments terminés**, pour les tâches des catégories `done` ou `closed` ;- **Tout archiver**.-**Voir les archivées** ouvre les notifications archivées. D'autres éléments se chargent au fil du défilement, et les filtres s'appliquent à l'ensemble des archives, y compris aux éléments pas encore chargés. Les notifications archivées conservent leur état de lecture : **Désarchiver** (ou `E`) en rétablit une exactement comme vous l'aviez laissée.+L'onglet **Archivées** liste les notifications archivées. D'autres éléments se chargent au fil du défilement, et les filtres s'appliquent à l'ensemble des archives, y compris aux éléments pas encore chargés. Les notifications archivées conservent leur état de lecture : **Remettre dans la boîte de réception**, sur la ligne ou dans la barre d'une notification ouverte (ou `E`), en rétablit une exactement comme vous l'aviez laissée.## Reporter une tâche@@ -123,11 +123,11 @@ Tant qu'une tâche est reportée :- ses nouvelles notifications attendent avec elle et ne comptent pas dans le badge non lu. À son retour, la ligne indique **Report terminé** et le nombre de nouveautés arrivées entre-temps ;- elle revient plus tôt si quelqu'un vous mentionne nommément, si elle vous est assignée, si une exécution échoue ou si toutes ses sous-tâches sont terminées. Les mentions `@all` ne la réveillent pas ;- **Tout marquer comme lu** et les actions d'archivage groupé l'ignorent. L'archiver met fin au report, tout comme terminer vous-même la tâche quand **Archiver les tâches que vous traitez** compte la fin de la tâche (c'est le cas par défaut) ;-- ouvrir la tâche depuis ailleurs ne la marque pas comme lue et ne met pas fin au report. Sa barre de la boîte de réception indique quand elle revient ; **Changer l'heure** la fait revenir maintenant (`H`) ou choisit une autre heure.+- ouvrir directement la page de la tâche ne la marque pas comme lue et ne met pas fin au report. Ouverte depuis l'onglet **Reportés**, sa barre indique quand elle revient ; **Changer l'heure** la fait revenir maintenant (`H`) ou choisit une autre heure.-Le report est personnel : il ne change que votre boîte de réception. Tout ce que vous avez reporté se trouve dans la vue **Reportés** sous Vues, aussi accessible via **Voir les reportés** dans le menu de la boîte de réception.+Le report est personnel : il ne change que votre boîte de réception. Tout ce que vous avez reporté se trouve dans l'onglet **Reportés**, où le bouton de chaque ligne le fait revenir maintenant.-Si la vue Reportés ne se charge pas, sélectionnez **Réessayer**. Les éléments déjà chargés restent visibles si l'actualisation échoue.+Si l'onglet **Reportés** ne se charge pas, sélectionnez **Réessayer**. Les éléments déjà chargés restent visibles si l'actualisation échoue.## Quand une notification quitte la boîte de réception@@ -152,7 +152,7 @@ Une notification ultérieure sur la tâche revient dans la boîte de réception.Le bouton de réglages dans l'en-tête de la section Boîte de réception ouvre ses réglages d'affichage, enregistrés sur cet appareil :- **Lignes affichées** : 5, 10 ou 20 ; une ligne « Afficher N de plus » donne accès au reste.-- **Lignes compactes** : une seule ligne par notification au lieu de deux.+- **Lignes compactes** : une seule ligne par notification, activé par défaut ; désactivé, chaque ligne ajoute qui a fait quoi sur une deuxième ligne.- **Nombre de non lus** : le nombre à côté du titre de la section.- **Badge de non lus sur Travail** : le badge sur Travail dans la barre d'applications.diff --git a/apps/docs/content/docs/inbox.ja.mdx b/apps/docs/content/docs/inbox.ja.mdxindex 8c939e6c7e..77c7069f8c 100644--- a/apps/docs/content/docs/inbox.ja.mdx+++ b/apps/docs/content/docs/inbox.ja.mdx@@ -10,11 +10,11 @@ import { InboxDemo } from "@/components/demos/inbox-demo";## インボックスの場所-インボックスは **作業** パネルのセクションで、ピン留め済みの下、ビューとプロジェクトの上にあります。ピン留めがないときは最初のセクションになります。未読数はセクション名の横と、アプリレールの **作業** のバッジに表示されます。**作業** を右クリックすると **すべて既読にする** を使えます。+インボックスは **作業** パネルのセクションで、ピン留め済みの下、ビューとプロジェクトの上にあります。ピン留めがないときは最初のセクションになります。見出しには **インボックス**、**スヌーズ中**、**アーカイブ済み** の 3 つのタブがあります。未読数は **インボックス** の横と、アプリレールの **作業** のバッジに表示されます。**作業** を右クリックすると **すべて既読にする** を使えます。-セクションにはタスクごとに 1 行ずつ、新しい順に、既読・未読を問わず並びます。行にはタスクのステータス、タイトルと時刻、誰が何をしたかが表示され、未読の行にはドットが付きます。行にカーソルを合わせると、タイトル全文とコメントを表示するカードが開き、**開く**、**既読にする**、**アーカイブ** を使えます。+**インボックス** タブにはタスクごとに 1 行ずつ、新しい順に、既読・未読を問わず並びます。行にはタスクのステータス、タイトルと時刻が表示され、未読の行にはドットが付きます。表示設定で **コンパクト表示** をオフにすると、誰が何をしたかが 2 行目に加わります。行にカーソルを合わせると、タイトル全文とコメントを表示するカードが開き、**開く**、**既読にする**、**アーカイブ** を使えます。-スマートフォンでは、作業パネルはドロワーの中にあります。そのインボックスセクションの末尾にある **すべての通知** から、独自のリストとフィルターを持つインボックスページを開けます。+スマートフォンでは、作業パネルはドロワーの中にあります。そのインボックスセクションの末尾にある **すべての通知** から、独自のリスト、同じ 3 つのタブ、フィルターを持つインボックスページを開けます。## インボックスに届くもの@@ -90,11 +90,11 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w## 通知の処理-行をクリックすると、そのタスクが開き、通知の対象のコメントの位置に移動します。タスクを開いている間、その行はハイライトされたままで、もう一度クリックするとその位置に戻ります。タスクを開くと通知は既読になりますが、行はリストに残ります。オートパイロットの一時停止やエージェント経由の作成結果など、タスクのない通知はインボックスページで開きます。+行をクリックすると、インボックスページでその通知が開き、対象のコメントの位置に移動します。オートパイロットの一時停止やエージェント経由の作成結果など、タスクのない通知も含め、すべての通知がここで開きます。開いている間、その行はハイライトされたままで、もう一度クリックするとその位置に戻ります。開くと通知は既読になりますが、行はリストに残ります。タスクの上の **インボックス** からリストに戻れ、**タスクページで開く**(↗)でタスクを単独のページで開けます。そのページにはインボックスバーは表示されません。<InboxDemo />-インボックスから開いたタスクには、ヘッダーの下にインボックスバーが表示されます。誰がいつ何をしたかを示し、通知を片付けるための操作が並びます。+タスクのヘッダーの下にはインボックスバーが表示されます。誰がいつ何をしたかを示し、通知を片付けるための操作が並びます。- **ステータス**、**担当者**、**クイックアクション** はタスクそのものを変更します。プロパティと同じです。クイックアクションはワークスペースにあるときだけ表示されます。- **スヌーズ**(`H`)は、指定した時間までタスクをインボックスから外し、次の通知を開きます。詳しくは下の「タスクをスヌーズする」を参照してください。@@ -105,14 +105,14 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1wセクション見出しのフィルターボタンでは、通知の種類、受信日時、送信者で絞り込めるほか、タスクのステータスや優先度でも絞り込めます。絞り込み中はボタンが常に表示され、**フィルターをクリア** で元に戻せます。-セクションの ⋯ メニューには、**アーカイブ済みを表示** と次の一括操作があります。+**インボックス** タブでは、セクションの ⋯ メニューに次の一括操作があります。- **すべて既読にする**- **既読の項目をすべてアーカイブ**- **完了した項目をアーカイブ**(`done` または `closed` カテゴリのタスクの通知)- **すべてアーカイブ**-**アーカイブ済みを表示** を開くと、アーカイブした通知がスクロールに合わせて読み込まれます。フィルターは、まだ読み込まれていない通知も含め、アーカイブ全体に適用されます。アーカイブ済みの通知は既読状態を保持するため、**アーカイブ解除**(または `E`)すると元のまま戻ります。+**アーカイブ済み** タブには、アーカイブした通知がスクロールに合わせて読み込まれます。フィルターは、まだ読み込まれていない通知も含め、アーカイブ全体に適用されます。アーカイブ済みの通知は既読状態を保持するため、行または開いた通知のバーにある **インボックスに戻す**(または `E`)で元のまま戻ります。## タスクをスヌーズする@@ -123,11 +123,11 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w- 新しい通知も一緒に待機し、未読バッジには数えられません。戻ってきた行には **スヌーズ終了** と、その間に届いた更新の数が表示されます。- 名指しでメンションされたとき、自分に割り当てられたとき、実行が失敗したとき、すべてのサブタスクが完了したときは早めに戻ります。`@all` へのメンションでは戻りません。- **すべて既読にする** や一括アーカイブはスヌーズ中のタスクをスキップします。アーカイブするとスヌーズは終了します。**自分が対応したタスクをアーカイブ** が完了を含む(既定で含む)ときに自分でタスクを完了した場合も同じです。-- ほかの場所からタスクを開いても既読にはならず、スヌーズも終了しません。インボックスバーに戻る時間が表示され、**時間を変更** から今すぐ戻す(`H`)か別の時間を選べます。+- タスクページから直接開いても既読にはならず、スヌーズも終了しません。**スヌーズ中** タブから開くとバーに戻る時間が表示され、**時間を変更** から今すぐ戻す(`H`)か別の時間を選べます。-スヌーズは自分のインボックスだけに影響します。スヌーズ中のタスクは Views の **スヌーズ中** ビュー、またはインボックスメニューの **スヌーズ中を表示** から確認できます。+スヌーズは自分のインボックスだけに影響します。スヌーズ中のタスクは **スヌーズ中** タブにあり、各行のボタンで今すぐ戻せます。-スヌーズ中ビューを読み込めない場合は、 **再試行** を選びます。更新に失敗しても、読み込み済みの項目は表示されたままです。+**スヌーズ中** タブを読み込めない場合は、 **再試行** を選びます。更新に失敗しても、読み込み済みの項目は表示されたままです。## 通知がインボックスから外れるとき@@ -152,7 +152,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1wインボックスセクションの見出しにある設定ボタンで表示設定を開けます。この設定はこのデバイスにだけ保存されます。- **表示件数**:5、10、20 件。残りは「さらに N 件を表示」の行にまとまります。-- **コンパクト表示**:1 件を 2 行ではなく 1 行で表示します。+- **コンパクト表示**:1 件を 1 行で表示します。既定でオンで、オフにすると誰が何をしたかが 2 行目に加わります。- **未読数**:セクション名の横の数字です。- **「作業」に未読バッジを表示**:アプリレールの作業のバッジです。diff --git a/apps/docs/content/docs/inbox.ko.mdx b/apps/docs/content/docs/inbox.ko.mdxindex ba6a45d12e..0756509459 100644--- a/apps/docs/content/docs/inbox.ko.mdx+++ b/apps/docs/content/docs/inbox.ko.mdx@@ -10,11 +10,11 @@ import { InboxDemo } from "@/components/demos/inbox-demo";## 인박스 위치-인박스는 **작업** 패널의 섹션으로, 고정됨 아래, 뷰와 프로젝트 위에 있습니다. 고정한 항목이 없으면 첫 번째 섹션이 됩니다. 읽지 않은 수는 섹션 제목 옆과 앱 레일의 **작업** 배지에 표시됩니다. **작업**을 오른쪽 클릭하면 **모두 읽음으로 표시**를 쓸 수 있습니다.+인박스는 **작업** 패널의 섹션으로, 고정됨 아래, 뷰와 프로젝트 위에 있습니다. 고정한 항목이 없으면 첫 번째 섹션이 됩니다. 섹션 제목에는 **인박스**, **미뤄둔 항목**, **보관됨** 세 개의 탭이 있습니다. 읽지 않은 수는 **인박스** 옆과 앱 레일의 **작업** 배지에 표시됩니다. **작업**을 오른쪽 클릭하면 **모두 읽음으로 표시**를 쓸 수 있습니다.-섹션에는 태스크마다 한 행씩, 최신순으로, 읽음 여부와 관계없이 표시됩니다. 행에는 태스크 상태, 제목과 시간, 누가 무엇을 했는지가 보이고, 읽지 않은 행에는 점이 붙습니다. 행 위에 마우스를 올리면 전체 제목과 댓글이 담긴 카드가 열리고, **열기**, **읽음으로 표시**, **보관**을 쓸 수 있습니다.+**인박스** 탭에는 태스크마다 한 행씩, 최신순으로, 읽음 여부와 관계없이 표시됩니다. 행에는 태스크 상태, 제목과 시간이 보이고, 읽지 않은 행에는 점이 붙습니다. 표시 설정에서 **간결하게 표시**를 끄면 누가 무엇을 했는지가 두 번째 줄에 더해집니다. 행 위에 마우스를 올리면 전체 제목과 댓글이 담긴 카드가 열리고, **열기**, **읽음으로 표시**, **보관**을 쓸 수 있습니다.-휴대폰에서는 작업 패널이 서랍 안에 있습니다. 그 인박스 섹션 맨 아래의 **모든 알림**을 누르면 자체 목록과 필터가 있는 인박스 페이지가 열립니다.+휴대폰에서는 작업 패널이 서랍 안에 있습니다. 그 인박스 섹션 맨 아래의 **모든 알림**을 누르면 자체 목록, 같은 세 개의 탭, 필터가 있는 인박스 페이지가 열립니다.## 인박스에 들어오는 내용@@ -90,11 +90,11 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339, 30m, 3h, 1d, 1w; uns## 알림 처리-행을 클릭하면 해당 태스크가 열리고, 알림이 가리키는 댓글 위치로 이동합니다. 태스크가 열려 있는 동안 그 행은 강조된 채로 남고, 다시 클릭하면 그 위치로 돌아갑니다. 태스크를 열면 알림은 읽음으로 바뀌지만 행은 목록에 그대로 남습니다. 자동화 일시 중지나 빠른 생성 결과처럼 태스크가 없는 알림은 인박스 페이지에서 열립니다.+행을 클릭하면 인박스 페이지에서 그 알림이 열리고, 알림이 가리키는 댓글 위치로 이동합니다. 자동화 일시 중지나 빠른 생성 결과처럼 태스크가 없는 알림을 포함해 모든 알림이 여기서 열립니다. 열려 있는 동안 그 행은 강조된 채로 남고, 다시 클릭하면 그 위치로 돌아갑니다. 열면 알림은 읽음으로 바뀌지만 행은 목록에 그대로 남습니다. 태스크 위의 **인박스**로 목록에 돌아갈 수 있고, **태스크 페이지에서 열기**(↗)는 태스크를 별도 페이지에서 엽니다. 그 페이지에는 인박스 바가 표시되지 않습니다.<InboxDemo />-인박스에서 연 태스크에는 헤더 아래에 인박스 바가 표시됩니다. 누가 언제 무엇을 했는지 보여 주고, 알림을 처리하는 작업을 제공합니다.+태스크 헤더 아래에는 인박스 바가 표시됩니다. 누가 언제 무엇을 했는지 보여 주고, 알림을 처리하는 작업을 제공합니다.- **상태**, **담당자**, **퀵 액션**은 태스크 자체를 바꾸며, 속성에서 바꾸는 것과 같습니다. 퀵 액션은 워크스페이스에 있을 때만 나타납니다.- **다시 알림**(`H`)은 지정한 시간까지 태스크를 인박스에서 빼고 다음 알림을 엽니다. 자세한 내용은 아래 '태스크 미루기'를 참고하세요.@@ -105,14 +105,14 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339, 30m, 3h, 1d, 1w; uns섹션 제목 줄의 필터 버튼으로 알림 유형, 받은 시간, 보낸 사람으로 좁히거나 태스크의 상태와 우선순위로 좁힐 수 있습니다. 필터가 적용된 동안에는 버튼이 계속 보이며, **필터 지우기**로 되돌릴 수 있습니다.-섹션의 ⋯ 메뉴에는 **보관된 알림 보기**와 다음 일괄 작업이 있습니다.+**인박스** 탭에서 섹션의 ⋯ 메뉴에는 다음 일괄 작업이 있습니다.- **모두 읽음으로 표시**- **읽은 항목 모두 보관**- **완료된 항목 보관**: `done` 또는 `closed` 카테고리 태스크의 알림- **모두 보관**-**보관된 알림 보기**를 열고 아래로 스크롤하면 이전 기록이 계속 불러와집니다. 필터는 아직 불러오지 않은 기록을 포함한 전체 보관 기록에 적용됩니다. 보관된 알림은 읽음 상태를 유지하므로 **보관 해제**(또는 `E`)하면 그대로 돌아옵니다.+**보관됨** 탭에는 보관된 알림이 나열되고, 아래로 스크롤하면 이전 기록이 계속 불러와집니다. 필터는 아직 불러오지 않은 기록을 포함한 전체 보관 기록에 적용됩니다. 보관된 알림은 읽음 상태를 유지하므로 행이나 열린 알림의 바에 있는 **인박스로 되돌리기**(또는 `E`)를 쓰면 그대로 돌아옵니다.## 태스크 미루기@@ -123,11 +123,11 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339, 30m, 3h, 1d, 1w; uns- 새 알림도 함께 기다리며 읽지 않음 배지에 포함되지 않습니다. 돌아온 행에는 **다시 알림 종료**와 그동안 쌓인 업데이트 수가 표시됩니다.- 누군가 이름으로 멘션하거나, 나에게 할당되거나, 실행이 실패하거나, 모든 하위 태스크가 끝나면 일찍 돌아옵니다. `@all` 멘션으로는 돌아오지 않습니다.- **모두 읽음으로 표시**와 일괄 보관은 미뤄둔 태스크를 건너뜁니다. 보관하면 미루기가 끝나며, **내가 처리한 태스크 보관**에 완료가 포함된 상태(기본값)에서 직접 태스크를 완료한 경우도 마찬가지입니다.-- 다른 곳에서 태스크를 열어도 읽음으로 바뀌지 않고 미루기도 끝나지 않습니다. 인박스 바에 돌아올 시간이 표시되며, **시간 변경**에서 지금 되돌리거나(`H`) 다른 시간을 고를 수 있습니다.+- 태스크 페이지에서 직접 열어도 읽음으로 바뀌지 않고 미루기도 끝나지 않습니다. **미뤄둔 항목** 탭에서 열면 바에 돌아올 시간이 표시되며, **시간 변경**에서 지금 되돌리거나(`H`) 다른 시간을 고를 수 있습니다.-미루기는 내 인박스에만 영향을 줍니다. 미뤄둔 태스크는 Views의 **미뤄둔 항목** 뷰나 인박스 메뉴의 **미뤄둔 항목 보기**에서 볼 수 있습니다.+미루기는 내 인박스에만 영향을 줍니다. 미뤄둔 태스크는 **미뤄둔 항목** 탭에 있고, 각 행의 버튼으로 지금 되돌릴 수 있습니다.-미뤄둔 항목을 불러오지 못하면 **다시 시도** 를 선택하세요. 새로고침에 실패해도 이미 불러온 항목은 계속 표시됩니다.+**미뤄둔 항목** 탭을 불러오지 못하면 **다시 시도** 를 선택하세요. 새로고침에 실패해도 이미 불러온 항목은 계속 표시됩니다.## 알림이 인박스에서 빠지는 경우@@ -152,7 +152,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339, 30m, 3h, 1d, 1w; uns인박스 섹션 제목 줄의 설정 버튼을 누르면 표시 설정이 열립니다. 이 설정은 현재 기기에만 저장됩니다.- **표시 개수**: 5, 10, 20개. 나머지는 "N개 더 보기" 행에 모입니다.-- **간결하게 표시**: 한 항목을 두 줄 대신 한 줄로 표시합니다.+- **간결하게 표시**: 한 항목을 한 줄로 표시합니다. 기본으로 켜져 있으며, 끄면 누가 무엇을 했는지가 두 번째 줄에 더해집니다.- **읽지 않은 수**: 섹션 제목 옆의 숫자입니다.- **'작업'에 읽지 않음 배지 표시**: 앱 레일의 작업에 붙는 배지입니다.diff --git a/apps/docs/content/docs/inbox.mdx b/apps/docs/content/docs/inbox.mdxindex 8ac2a8f125..1778527726 100644--- a/apps/docs/content/docs/inbox.mdx+++ b/apps/docs/content/docs/inbox.mdx@@ -10,11 +10,11 @@ The inbox collects the work activity that concerns you and flags where something## Where to find it-The inbox is a section of the **Work** panel, below Pinned and above Views and Projects; with nothing pinned, it is the first section. The unread count shows next to the section title and as a badge on **Work** in the app rail; right-click **Work** for **Mark all as read**.+The inbox is a section of the **Work** panel, below Pinned and above Views and Projects; with nothing pinned, it is the first section. Its header holds three tabs: **Inbox**, **Snoozed** and **Archived**. The unread count shows next to **Inbox** and as a badge on **Work** in the app rail; right-click **Work** for **Mark all as read**.-The section lists one row per issue, newest first, read and unread alike. A row shows the issue's status, its title and time, and who did what; a dot marks it unread. Hover a row for a card with the full title, the comment, and **Open**, **Mark as read**, and **Archive**.+The **Inbox** tab lists one row per issue, newest first, read and unread alike. A row shows the issue's status, its title and time; a dot marks it unread. Turn off **Compact rows** in the display settings to add who did what on a second line. Hover a row for a card with the full title, the comment, and **Open**, **Mark as read**, and **Archive**.-On a phone, the Work panel sits in the drawer. Its Inbox section ends with **All notifications**, which opens the Inbox page with its own list and filters.+On a phone, the Work panel sits in the drawer. Its Inbox section ends with **All notifications**, which opens the Inbox page with its own list, the same three tabs, and filters.## What lands in the inbox@@ -90,11 +90,11 @@ An authorized agent run uses its task credential for all of this; it never falls## Handle notifications-Click a row to open its issue at the comment the notification is about. The row stays lit while the issue is open, and clicking it again takes you back to that spot. Opening the issue marks the notification read, and the row stays in the list. Notifications without an issue, such as autopilot pauses and quick-create results, open on the Inbox page instead.+Click a row to open the notification on the Inbox page, at the comment it is about. Every notification opens there, including those without an issue, such as autopilot pauses and quick-create results. The row stays lit while it is open, and clicking it again takes you back to that spot. Opening it marks the notification read, and the row stays in the list. Above the issue, **Inbox** leads back to the list, and **Open issue page** (↗) opens the issue on a page of its own, without the inbox bar.<InboxDemo />-An issue opened from the inbox shows a bar under its header. It says who did what, and when, then offers what usually settles the notification:+The issue shows a bar under its header. It says who did what, and when, then offers what usually settles the notification:- **Status**, **Assignee** and **Quick actions** change the issue itself, as its properties do. Quick actions appear once your workspace has some.- **Snooze** (`H`) takes the issue out of your inbox until a time you pick, and opens the next one. See [Snooze an issue](#snooze-an-issue) below.@@ -105,14 +105,14 @@ The next one is the next row the section lists under its current filters, so youThe filter button in the section header narrows the list by notification type, when it was received, and who it is from, or by the issue's status and priority. A filtered section keeps the button visible, and **Clear filters** resets it.-The section's ⋯ menu holds **View archived** and the bulk actions:+On the **Inbox** tab, the section's ⋯ menu holds the bulk actions:- **Mark all as read**;- **Archive all read**;- **Archive completed**, for issues in the `done` or `closed` category;- **Archive all**.-**View archived** opens the archived notifications. More records load as you scroll, and filters apply to the entire archive, including records that have not loaded yet. Archived notifications keep their read state, so **Unarchive** (or `E`) brings one back exactly as you left it.+The **Archived** tab lists the archived notifications. More records load as you scroll, and filters apply to the entire archive, including records that have not loaded yet. Archived notifications keep their read state, so **Move back to Inbox**, on the row or in the bar of an open one (or `E`), brings one back exactly as you left it.## Snooze an issue@@ -123,11 +123,11 @@ While an issue is snoozed:- new notifications on it wait with it and don't count toward the unread badge. When it comes back, the row says **Snooze ended** and how many updates arrived meanwhile;- it comes back early when someone mentions you by name, it is assigned to you, a run fails, or all its sub-issues finish. `@all` mentions don't wake it;- **Mark all as read** and the archive-all actions leave it alone. Archiving it ends the snooze, and so does completing the issue yourself while **Archive issues you handle** counts completing (it does by default);-- opening the issue from anywhere else doesn't read it or end the snooze. Its inbox bar shows when it comes back; **Change time** there brings it back now (`H`) or picks another time.+- opening the issue's own page doesn't read it or end the snooze. Open it from the **Snoozed** tab and its bar shows when it comes back; **Change time** there brings it back now (`H`) or picks another time.-Snooze is personal: it only changes your own inbox. Everything you've snoozed is in the **Snoozed** view under Views, also reachable from **View snoozed** in the inbox menu.+Snooze is personal: it only changes your own inbox. Everything you've snoozed is on the **Snoozed** tab, where the button on each row brings it back now.-If the Snoozed view can't load, choose **Retry**. Previously loaded items stay visible if a refresh fails.+If the **Snoozed** tab can't load, choose **Retry**. Previously loaded items stay visible if a refresh fails.## When a notification leaves the inbox@@ -152,7 +152,7 @@ A later notification on the issue lands in the inbox again.The sliders button in the Inbox section header opens its display settings, which are saved on this device:- **Rows shown**: 5, 10, or 20; a **Show more** row lists the rest.-- **Compact rows**: one line per row instead of two.+- **Compact rows**: one line per row, on by default; turned off, rows add who did what on a second line.- **Unread count**: the number next to the section title.- **Unread badge on Work**: the badge on Work in the app rail.diff --git a/apps/docs/content/docs/inbox.zh-Hant.mdx b/apps/docs/content/docs/inbox.zh-Hant.mdxindex 740f84bf2e..1f2a4306dd 100644--- a/apps/docs/content/docs/inbox.zh-Hant.mdx+++ b/apps/docs/content/docs/inbox.zh-Hant.mdx@@ -10,11 +10,11 @@ import { InboxDemo } from "@/components/demos/inbox-demo";## 在哪裡找到收件箱-收件箱是**工作**面板裡的一個分區,排在固定之後、檢視和專案之前;沒有固定項時,它就是第一個分區。未讀數顯示在分區標題旁,也會以角標顯示在應用側欄的**工作**上;右鍵點選**工作**可以**全部標為已讀**。+收件箱是**工作**面板裡的一個分區,排在固定之後、檢視和專案之前;沒有固定項時,它就是第一個分區。分區標題列有三個分頁:**收件箱**、**已延後**和**已歸檔**。未讀數顯示在**收件箱**旁,也會以角標顯示在應用側欄的**工作**上;右鍵點選**工作**可以**全部標為已讀**。-這個分區每個任務佔一列,最新的在前,已讀和未讀都在。每列顯示任務狀態、標題和時間,以及誰做了什麼;未讀的列帶一個圓點。滑鼠懸停在某列上會彈出卡片,顯示完整標題和評論內容,並提供**開啟**、**標為已讀**和**歸檔**。+**收件箱**分頁每個任務佔一列,最新的在前,已讀和未讀都在。每列顯示任務狀態、標題和時間;未讀的列帶一個圓點。在顯示設定裡關掉**緊湊顯示**,每列會多出第二行,顯示誰做了什麼。滑鼠懸停在某列上會彈出卡片,顯示完整標題和評論內容,並提供**開啟**、**標為已讀**和**歸檔**。-在手機上,工作面板收在抽屜裡。其中的收件箱分區末尾有**全部通知**,點開是收件箱頁面,帶自己的列表和篩選。+在手機上,工作面板收在抽屜裡。其中的收件箱分區末尾有**全部通知**,點開是收件箱頁面,帶自己的列表、同樣的三個分頁和篩選。## 收件箱的內容@@ -90,11 +90,11 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w## 處理通知-點選一列會開啟對應的任務,並定位到通知所指的評論。任務開著時這一列保持高亮,再點一次會重新定位到那裡。開啟任務會把通知標為已讀,但這一列仍留在列表裡。沒有對應任務的通知,例如自動化暫停和快速建立結果,會在收件箱頁面中開啟。+點選一列會在收件箱頁面開啟這則通知,並定位到它所指的評論。所有通知都在這裡開啟,包括沒有對應任務的通知,例如自動化暫停和快速建立結果。通知開著時這一列保持高亮,再點一次會重新定位到那裡。開啟通知會把它標為已讀,但這一列仍留在列表裡。任務上方的**收件箱**可以回到列表,**在任務頁開啟**(↗)會在單獨的任務頁開啟這個任務,那裡不顯示收件箱列。<InboxDemo />-從收件箱開啟的任務,頁首下方有一條收件箱列。它先說明誰在什麼時候做了什麼,再給出通常能處理掉這條通知的操作:+任務頁首下方有一條收件箱列。它先說明誰在什麼時候做了什麼,再給出通常能處理掉這條通知的操作:- **狀態**、**負責人**和**快捷操作**直接修改任務本身,和屬性裡一樣;工作區有快捷操作時才會出現。- **延後**(`H`)把任務移出收件箱,到你選的時間再回來,並開啟下一條。詳見下方的「延後任務」。@@ -105,14 +105,14 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w分區標題列的篩選按鈕可以按通知類型、收到時間和來自誰篩選,也可以按任務的狀態和優先順序篩選。分區處於篩選狀態時,這個按鈕會一直顯示,點**清除篩選**即可恢復。-分區的 ⋯ 選單裡有**查看已歸檔**和以下批次操作:+在**收件箱**分頁下,分區的 ⋯ 選單裡有以下批次操作:- **全部標為已讀**;- **歸檔全部已讀**;- **歸檔已完成**:歸檔 `done` 或 `closed` 分類下任務的通知;- **歸檔全部**。-**查看已歸檔**會開啟已歸檔的通知,向下捲動可繼續載入更早的記錄。篩選覆蓋全部歸檔記錄,包括尚未載入的記錄。已歸檔的通知會保留已讀狀態,因此**取消歸檔**(或按 `E`)時會原樣回來。+**已歸檔**分頁列出已歸檔的通知,向下捲動可繼續載入更早的記錄。篩選覆蓋全部歸檔記錄,包括尚未載入的記錄。已歸檔的通知會保留已讀狀態,因此點列上或已開啟通知的收件箱列裡的**移回收件箱**(或按 `E`)時會原樣回來。## 延後任務@@ -123,11 +123,11 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w- 它的新通知會跟著一起等,不計入未讀角標。回來時,這一列會顯示 **延後到期** 以及期間有多少則動態;- 有人點名 @ 你、它被指派給你、執行失敗,或全部子任務完成時,它會提前回來。`@all` 提及不會喚醒它;- **全部標為已讀** 和各種全部歸檔操作會跳過它。歸檔它會結束延後;**自動歸檔我處理過的任務**包含完成(預設包含)時,你自己完成這個任務也一樣;-- 從別處開啟這個任務不會把它標為已讀,也不會結束延後。收件箱列會顯示它何時回來,點**修改時間**可以讓它現在回來(`H`)或換個時間。+- 直接開啟這個任務的任務頁不會把它標為已讀,也不會結束延後。從**已延後**分頁開啟時,收件箱列會顯示它何時回來,點**修改時間**可以讓它現在回來(`H`)或換個時間。-延後只影響你自己的收件箱。所有延後的任務都在檢視裡的 **已延後** 中,也可以從收件箱選單的 **查看已延後** 進入。+延後只影響你自己的收件箱。所有延後的任務都在**已延後**分頁裡,點每列的按鈕可以讓它現在回來。-如果已延後檢視無法載入,可以點擊 **重試**。重新整理失敗時,已載入的任務會繼續顯示。+如果**已延後**分頁無法載入,可以點擊 **重試**。重新整理失敗時,已載入的任務會繼續顯示。## 通知何時離開收件箱@@ -152,7 +152,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w收件箱分區標題列的設定按鈕會開啟它的顯示設定,只儲存在目前裝置上:- **顯示筆數**:5、10 或 20 筆;其餘的收在"再顯示 N 項"裡。-- **緊湊顯示**:每列只佔一行高度,而不是兩行。+- **緊湊顯示**:每列只佔一行高度,預設開啟;關掉後每列多出第二行,顯示誰做了什麼。- **未讀數量**:分區標題旁的數字。- **在"工作"上顯示未讀數**:應用側欄裡工作上的角標。diff --git a/apps/docs/content/docs/inbox.zh.mdx b/apps/docs/content/docs/inbox.zh.mdxindex b26771947c..b404fc2af3 100644--- a/apps/docs/content/docs/inbox.zh.mdx+++ b/apps/docs/content/docs/inbox.zh.mdx@@ -10,11 +10,11 @@ import { InboxDemo } from "@/components/demos/inbox-demo";## 在哪里找到收件箱-收件箱是**工作**面板里的一个分区,排在固定之后、视图和项目之前;没有固定项时,它就是第一个分区。未读数显示在分区标题旁,也会以角标显示在应用侧栏的**工作**上;右键点击**工作**可以**全部标为已读**。+收件箱是**工作**面板里的一个分区,排在固定之后、视图和项目之前;没有固定项时,它就是第一个分区。分区标题栏有三个标签:**收件箱**、**已延后**和**已归档**。未读数显示在**收件箱**旁,也会以角标显示在应用侧栏的**工作**上;右键点击**工作**可以**全部标为已读**。-这个分区每个任务占一行,最新的在前,已读和未读都在。每行显示任务状态、标题和时间,以及谁做了什么;未读的行带一个圆点。鼠标悬停在某行上会弹出卡片,显示完整标题和评论内容,并提供**打开**、**标为已读**和**归档**。+**收件箱**标签每个任务占一行,最新的在前,已读和未读都在。每行显示任务状态、标题和时间;未读的行带一个圆点。在显示设置里关掉**紧凑显示**,每行会多出第二行,显示谁做了什么。鼠标悬停在某行上会弹出卡片,显示完整标题和评论内容,并提供**打开**、**标为已读**和**归档**。-在手机上,工作面板收在抽屉里。其中的收件箱分区末尾有**全部通知**,点开是收件箱页面,带自己的列表和筛选。+在手机上,工作面板收在抽屉里。其中的收件箱分区末尾有**全部通知**,点开是收件箱页面,带自己的列表、同样的三个标签和筛选。## 收件箱的内容@@ -90,11 +90,11 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w## 处理通知-点击一行会打开对应的任务,并定位到通知所指的评论。任务开着时这一行保持高亮,再点一次会重新定位到那里。打开任务会把通知标为已读,但这一行仍留在列表里。没有对应任务的通知,例如自动化暂停和快速创建结果,会在收件箱页面中打开。+点击一行会在收件箱页面打开这条通知,并定位到它所指的评论。所有通知都在这里打开,包括没有对应任务的通知,例如自动化暂停和快速创建结果。通知开着时这一行保持高亮,再点一次会重新定位到那里。打开通知会把它标为已读,但这一行仍留在列表里。任务上方的**收件箱**可以回到列表,**在任务页打开**(↗)会在单独的任务页打开这个任务,那里不显示收件箱栏。<InboxDemo />-从收件箱打开的任务,页头下方有一条收件箱栏。它先说明谁在什么时候做了什么,再给出通常能处理掉这条通知的操作:+任务页头下方有一条收件箱栏。它先说明谁在什么时候做了什么,再给出通常能处理掉这条通知的操作:- **状态**、**负责人**和**快捷操作**直接修改任务本身,和属性里一样;工作区有快捷操作时才会出现。- **延后**(`H`)把任务移出收件箱,到你选的时间再回来,并打开下一条。详见下方的「延后任务」。@@ -105,14 +105,14 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w分区标题栏的筛选按钮可以按通知类型、收到时间和来自谁筛选,也可以按任务的状态和优先级筛选。分区处于筛选状态时,这个按钮会一直显示,点**清除筛选**即可恢复。-分区的 ⋯ 菜单里有**查看已归档**和以下批量操作:+在**收件箱**标签下,分区的 ⋯ 菜单里有以下批量操作:- **全部标为已读**;- **归档全部已读**;- **归档已完成**:归档 `done` 或 `closed` 分类下任务的通知;- **归档全部**。-**查看已归档**会打开已归档的通知,向下滚动可继续加载更早的记录。筛选覆盖全部归档记录,包括尚未加载的记录。已归档的通知会保留已读状态,因此**取消归档**(或按 `E`)时会原样回来。+**已归档**标签列出已归档的通知,向下滚动可继续加载更早的记录。筛选覆盖全部归档记录,包括尚未加载的记录。已归档的通知会保留已读状态,因此点行上或已打开通知的收件箱栏里的**移回收件箱**(或按 `E`)时会原样回来。## 延后任务@@ -123,11 +123,11 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w- 它的新通知会跟着一起等,不计入未读角标。回来时,这一行会显示 **延后到期** 以及期间有多少条动态;- 有人点名 @ 你、它被指派给你、运行失败,或全部子任务完成时,它会提前回来。`@all` 提及不会唤醒它;- **全部标为已读** 和各种全部归档操作会跳过它。归档它会结束延后;**自动归档我处理过的任务**包含完成(默认包含)时,你自己完成这个任务也一样;-- 从别处打开这个任务不会把它标为已读,也不会结束延后。收件箱栏会显示它何时回来,点**修改时间**可以让它现在回来(`H`)或换个时间。+- 直接打开这个任务的任务页不会把它标为已读,也不会结束延后。从**已延后**标签打开时,收件箱栏会显示它何时回来,点**修改时间**可以让它现在回来(`H`)或换个时间。-延后只影响你自己的收件箱。所有延后的任务都在视图里的 **已延后** 中,也可以从收件箱菜单的 **查看已延后** 进入。+延后只影响你自己的收件箱。所有延后的任务都在**已延后**标签里,点每行的按钮可以让它现在回来。-如果已延后视图无法加载,可以点击 **重试**。刷新失败时,已加载的任务会继续显示。+如果**已延后**标签无法加载,可以点击 **重试**。刷新失败时,已加载的任务会继续显示。## 通知何时离开收件箱@@ -152,7 +152,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w收件箱分区标题栏的设置按钮会打开它的显示设置,只保存在当前设备上:- **显示条数**:5、10 或 20 条;其余的收在"再显示 N 项"里。-- **紧凑显示**:每行只占一行高度,而不是两行。+- **紧凑显示**:每行只占一行高度,默认开启;关掉后每行多出第二行,显示谁做了什么。- **未读数量**:分区标题旁的数字。- **在"工作"上显示未读数**:应用侧栏里工作上的角标。diff --git a/apps/docs/content/docs/issues.fr.mdx b/apps/docs/content/docs/issues.fr.mdxindex da667de0c6..a3a7214da4 100644--- a/apps/docs/content/docs/issues.fr.mdx+++ b/apps/docs/content/docs/issues.fr.mdx@@ -163,7 +163,7 @@ Les réglages d'affichage enregistrés dans une vue sont son **Affichage par déFaites glisser les vues dans la barre pour les réordonner ; l'ordre et la visibilité réglés dans **Gérer les vues** ne concernent que vous. Un clic droit sur une vue permet de la modifier, de la supprimer ou de l'**Ajouter à la barre latérale**, ce qui la place dans la section **Vues** du panneau Travail.-La section Vues propose aussi cinq vues intégrées : **Toutes les tâches** ; **Mon travail**, les tâches assignées à vous ou à vos agents ; **En cours d'exécution**, les tâches sur lesquelles un agent travaille ; et **Abonnements**, toutes les tâches que vous suivez. **Reportés** affiche les tâches que vous avez [reportées dans la boîte de réception](/inbox#reporter-une-tâche). Mon travail, En cours d'exécution et Abonnements sont Toutes les tâches sous une condition fixe : d'autres filtres peuvent les restreindre, mais cette condition ne peut être ni retirée ni élargie. Le bouton de réglages dans l'en-tête de la section Vues active ou désactive chaque vue intégrée.+La section Vues propose aussi quatre vues intégrées : **Toutes les tâches** ; **Mon travail**, les tâches assignées à vous ou à vos agents ; **En cours d'exécution**, les tâches sur lesquelles un agent travaille ; et **Abonnements**, toutes les tâches que vous suivez. Les tâches que vous avez [reportées dans la boîte de réception](/inbox#reporter-une-tâche) se trouvent dans son onglet **Reportés**. Mon travail, En cours d'exécution et Abonnements sont Toutes les tâches sous une condition fixe : d'autres filtres peuvent les restreindre, mais cette condition ne peut être ni retirée ni élargie. Le bouton de réglages dans l'en-tête de la section Vues active ou désactive chaque vue intégrée.### Aperçu latéraldiff --git a/apps/docs/content/docs/issues.ja.mdx b/apps/docs/content/docs/issues.ja.mdxindex 3d35a17328..53354c75bb 100644--- a/apps/docs/content/docs/issues.ja.mdx+++ b/apps/docs/content/docs/issues.ja.mdx@@ -163,7 +163,7 @@ import { DeliverablesDemo } from "@/components/demos/deliverables-demo";ビューバーのビューはドラッグで並べ替えられ、**ビューを管理** での並び順と表示・非表示は自分にだけ適用されます。ビューを右クリックすると、編集、削除、**サイドバーに追加** ができます。追加したビューは作業パネルの **ビュー** セクションに並びます。-ビューセクションには 5 つの組み込みビューもあります。**すべてのタスク**、あなたかあなたのエージェントが担当するタスクの **自分の作業**、エージェントが実行中のタスクの **実行中**、購読中のすべてのタスクの **購読中** です。**スヌーズ中**には[受信トレイでスヌーズしたタスク](/inbox#タスクをスヌーズする)が表示されます。自分の作業、実行中、購読中は、すべてのタスクに固定の条件をかけたものです。ほかのフィルターで絞り込むことはできますが、その条件を外したり広げたりはできません。ビューセクションの見出しにある設定ボタンで、組み込みビューをそれぞれオン・オフできます。+ビューセクションには 4 つの組み込みビューもあります。**すべてのタスク**、あなたかあなたのエージェントが担当するタスクの **自分の作業**、エージェントが実行中のタスクの **実行中**、購読中のすべてのタスクの **購読中** です。[受信トレイでスヌーズしたタスク](/inbox#タスクをスヌーズする)は、インボックスの **スヌーズ中** タブにあります。自分の作業、実行中、購読中は、すべてのタスクに固定の条件をかけたものです。ほかのフィルターで絞り込むことはできますが、その条件を外したり広げたりはできません。ビューセクションの見出しにある設定ボタンで、組み込みビューをそれぞれオン・オフできます。### サイドプレビューdiff --git a/apps/docs/content/docs/issues.ko.mdx b/apps/docs/content/docs/issues.ko.mdxindex b4174aacb5..f8b1420667 100644--- a/apps/docs/content/docs/issues.ko.mdx+++ b/apps/docs/content/docs/issues.ko.mdx@@ -163,7 +163,7 @@ import { DeliverablesDemo } from "@/components/demos/deliverables-demo";뷰 바의 뷰는 끌어서 순서를 바꿀 수 있고, **뷰 관리**에서 바꾼 순서와 표시 여부는 나에게만 적용됩니다. 뷰를 오른쪽 클릭하면 수정, 삭제, **사이드바에 추가**를 할 수 있습니다. 추가한 뷰는 작업 패널의 **뷰** 섹션에 표시됩니다.-뷰 섹션에는 기본 보기 다섯 개도 있습니다. **전체 태스크**, 나나 내 에이전트에게 할당된 태스크인 **내 작업**, 에이전트가 실행 중인 태스크인 **실행 중**, 내가 구독한 모든 태스크인 **구독 중**입니다. **미뤄둔 항목**에는 [받은 편지함에서 미룬 태스크](/inbox#태스크-미루기)가 표시됩니다. 내 작업, 실행 중, 구독 중은 전체 태스크에 고정 조건을 건 것입니다. 다른 필터로 더 좁힐 수는 있지만 그 조건을 없애거나 넓힐 수는 없습니다. 뷰 섹션 제목 줄의 설정 버튼으로 기본 보기를 각각 켜거나 끌 수 있습니다.+뷰 섹션에는 기본 보기 네 개도 있습니다. **전체 태스크**, 나나 내 에이전트에게 할당된 태스크인 **내 작업**, 에이전트가 실행 중인 태스크인 **실행 중**, 내가 구독한 모든 태스크인 **구독 중**입니다. [받은 편지함에서 미룬 태스크](/inbox#태스크-미루기)는 인박스의 **미뤄둔 항목** 탭에 있습니다. 내 작업, 실행 중, 구독 중은 전체 태스크에 고정 조건을 건 것입니다. 다른 필터로 더 좁힐 수는 있지만 그 조건을 없애거나 넓힐 수는 없습니다. 뷰 섹션 제목 줄의 설정 버튼으로 기본 보기를 각각 켜거나 끌 수 있습니다.### 사이드 미리보기diff --git a/apps/docs/content/docs/issues.mdx b/apps/docs/content/docs/issues.mdxindex 04bfc40480..b77a6bbd32 100644--- a/apps/docs/content/docs/issues.mdx+++ b/apps/docs/content/docs/issues.mdx@@ -165,7 +165,7 @@ The display settings saved in a view are its **Default display**: members see thDrag views in the view bar to reorder them; ordering and visibility in **Manage views** affect only you. Right-click a view to edit it, delete it, or **Add to sidebar**, which lists it in the **Views** section of the Work panel.-The Views section also offers five built-in views: **All issues**; **My work**, issues assigned to you or to your agents; **Working**, issues an agent is running on; and **Subscribed**, every issue you subscribe to. **Snoozed** lists issues you have [snoozed in your inbox](/inbox#snooze-an-issue). My work, Working, and Subscribed are All issues under a fixed condition: other filters can narrow them, but that condition can't be removed or widened. The sliders button in the Views section header turns each built-in view on or off.+The Views section also offers four built-in views: **All issues**; **My work**, issues assigned to you or to your agents; **Working**, issues an agent is running on; and **Subscribed**, every issue you subscribe to. Issues you have [snoozed in your inbox](/inbox#snooze-an-issue) are on its **Snoozed** tab. My work, Working, and Subscribed are All issues under a fixed condition: other filters can narrow them, but that condition can't be removed or widened. The sliders button in the Views section header turns each built-in view on or off.### Side previewdiff --git a/apps/docs/content/docs/issues.zh-Hant.mdx b/apps/docs/content/docs/issues.zh-Hant.mdxindex aa4803bc4e..a9bbecce56 100644--- a/apps/docs/content/docs/issues.zh-Hant.mdx+++ b/apps/docs/content/docs/issues.zh-Hant.mdx@@ -163,7 +163,7 @@ AI 代理會隨工作進展更新任務狀態:預設開始工作時改為 `in_檢視欄中的檢視可以拖動排序,**管理檢視**裡調整順序和是否顯示,只影響你自己。右鍵點選檢視可以編輯、刪除,或**新增到側欄**,新增後它會出現在工作面板的**檢視**分區。-檢視分區還提供五個內建檢視:**全部任務**;**我的工作**,分配給你或你的 AI 代理的任務;**執行中**,有 AI 代理正在執行的任務;**已訂閱**,你訂閱的所有任務。**已延後**列出你在[收件匣中延後處理的任務](/inbox#延後任務)。我的工作、執行中和已訂閱都是帶固定條件的全部任務:可以再加其他篩選縮小範圍,但這個固定條件不能移除或放寬。檢視分區標題列的設定按鈕可以分別開關每個內建檢視。+檢視分區還提供四個內建檢視:**全部任務**;**我的工作**,分配給你或你的 AI 代理的任務;**執行中**,有 AI 代理正在執行的任務;**已訂閱**,你訂閱的所有任務。你在[收件匣中延後處理的任務](/inbox#延後任務)在收件箱的**已延後**分頁裡。我的工作、執行中和已訂閱都是帶固定條件的全部任務:可以再加其他篩選縮小範圍,但這個固定條件不能移除或放寬。檢視分區標題列的設定按鈕可以分別開關每個內建檢視。### 懸浮預覽diff --git a/apps/docs/content/docs/issues.zh.mdx b/apps/docs/content/docs/issues.zh.mdxindex cf2de03cb9..c8110e93e9 100644--- a/apps/docs/content/docs/issues.zh.mdx+++ b/apps/docs/content/docs/issues.zh.mdx@@ -165,7 +165,7 @@ import { DeliverablesDemo } from "@/components/demos/deliverables-demo";视图栏中的视图可以拖动排序,**管理视图**里调整顺序和是否显示,只影响你自己。右键点击视图可以编辑、删除,或**添加到侧栏**,添加后它会出现在工作面板的**视图**分区。-视图分区还提供五个内置视图:**全部任务**;**我的工作**,分配给你或你的智能体的任务;**执行中**,有智能体正在运行的任务;**已订阅**,你订阅的所有任务。**已延后**列出你在[收件箱中延后处理的任务](/inbox#延后任务)。我的工作、执行中和已订阅都是带固定条件的全部任务:可以再加其他筛选缩小范围,但这个固定条件不能移除或放宽。视图分区标题栏的设置按钮可以分别开关每个内置视图。+视图分区还提供四个内置视图:**全部任务**;**我的工作**,分配给你或你的智能体的任务;**执行中**,有智能体正在运行的任务;**已订阅**,你订阅的所有任务。你在[收件箱中延后处理的任务](/inbox#延后任务)在收件箱的**已延后**标签里。我的工作、执行中和已订阅都是带固定条件的全部任务:可以再加其他筛选缩小范围,但这个固定条件不能移除或放宽。视图分区标题栏的设置按钮可以分别开关每个内置视图。### 悬浮预览diff --git a/apps/docs/content/docs/shortcuts.fr.mdx b/apps/docs/content/docs/shortcuts.fr.mdxindex b54b9f4e15..6c233d3e9a 100644--- a/apps/docs/content/docs/shortcuts.fr.mdx+++ b/apps/docs/content/docs/shortcuts.fr.mdx@@ -36,8 +36,8 @@ Choisir un résultat l'ouvre. Maintenez `⌘` (`Ctrl` sous Windows et Linux) en| Afficher ou masquer la fenêtre de discussion | `⌘J` | `Ctrl+J` | À l'ouverture, le curseur se place dans la zone de saisie. Voir [Discuter depuis n'importe quelle page](/chat#discuter-depuis-nimporte-quelle-page). || Demander à Multica | `⇧⌘J` | `Ctrl+Maj+J` | Démarre une nouvelle discussion dans la fenêtre flottante. || Rechercher dans la tâche | `⌘F` | `Ctrl+F` | Voir plus bas. |-| Archiver la notification | `E` | `E` | Sur une tâche ouverte depuis la boîte de réception, archive sa notification et ouvre la suivante. Dans les notifications archivées, restaure celle qui est ouverte. Voir [Boîte de réception](/inbox#traiter-les-notifications). |-| Reporter la notification | `H` | `H` | Sur une tâche ouverte depuis la boîte de réception, la reporte et ouvre la suivante. Sur une tâche reportée, la fait revenir maintenant. |+| Archiver la notification | `E` | `E` | Sur la page Boîte de réception, archive la notification ouverte et ouvre la suivante. Dans l'onglet Archivées, remet celle qui est ouverte dans la boîte de réception. Voir [Boîte de réception](/inbox#traiter-les-notifications). |+| Reporter la notification | `H` | `H` | Sur la page Boîte de réception, reporte la tâche ouverte et ouvre la suivante. Sur une tâche reportée, la fait revenir maintenant. || Annuler l'action de la boîte de réception | `Z` | `Z` | Tant qu'une confirmation d'archivage, de report ou de désabonnement est affichée, annule cette action. Sinon, remet dans la boîte de réception la notification ouverte une fois archivée, ou annule ce qu'indique **Boîte de réception vide**. || Envoyer | `⌘↵` | `Ctrl+Enter` | Envoie commentaires et messages de discussion, et sert aussi à créer des tâches. || Saisie vocale | Non défini | Non défini | Desktop uniquement ; activez-la d’abord dans Paramètres → Saisie vocale. Voir [Saisie vocale](/desktop-app#saisie-vocale). |diff --git a/apps/docs/content/docs/shortcuts.ja.mdx b/apps/docs/content/docs/shortcuts.ja.mdxindex 920a5f0eb9..41b4e81319 100644--- a/apps/docs/content/docs/shortcuts.ja.mdx+++ b/apps/docs/content/docs/shortcuts.ja.mdx@@ -36,8 +36,8 @@ import { Step, Steps } from "fumadocs-ui/components/steps";| チャットウィンドウを切り替え | `⌘J` | `Ctrl+J` | 開くとカーソルが入力欄に入ります。[どのページからでもチャットする](/chat#どのページからでもチャットする)を参照。 || Multica に質問 | `⇧⌘J` | `Ctrl+Shift+J` | フローティングチャットで新しいチャットを始めます。 || タスク内を検索 | `⌘F` | `Ctrl+F` | 後述。 |-| 通知をアーカイブ | `E` | `E` | インボックスから開いたタスクで、その通知をアーカイブして次の通知を開きます。アーカイブ済みの通知を表示中は、開いている通知のアーカイブを解除します。[インボックス](/inbox#通知の処理)を参照してください。 |-| 通知をスヌーズ | `H` | `H` | インボックスから開いたタスクをスヌーズして、次の通知を開きます。スヌーズ中のタスクでは今すぐ戻します。 |+| 通知をアーカイブ | `E` | `E` | インボックスページで、開いている通知をアーカイブして次の通知を開きます。アーカイブ済みタブでは、開いている通知をインボックスに戻します。[インボックス](/inbox#通知の処理)を参照してください。 |+| 通知をスヌーズ | `H` | `H` | インボックスページで、開いているタスクをスヌーズして次の通知を開きます。スヌーズ中のタスクでは今すぐ戻します。 || インボックスの操作を取り消す | `Z` | `Z` | アーカイブ・スヌーズ・購読解除の確認メッセージが表示されている間は、その操作を取り消します。表示がなければ、アーカイブ済みの開いている通知をインボックスに戻すか、**インボックスは空です** 画面に表示された操作を取り消します。 || 送信 | `⌘↵` | `Ctrl+Enter` | コメントやチャットのメッセージを送信します。新しいタスクの作成にも使います。 || 音声入力 | 未設定 | 未設定 | Desktop のみ。先に設定 → 音声入力でオンにしてください。[音声入力](/desktop-app#音声入力)を参照。 |diff --git a/apps/docs/content/docs/shortcuts.ko.mdx b/apps/docs/content/docs/shortcuts.ko.mdxindex 7480037065..551f0a66ce 100644--- a/apps/docs/content/docs/shortcuts.ko.mdx+++ b/apps/docs/content/docs/shortcuts.ko.mdx@@ -36,8 +36,8 @@ import { Step, Steps } from "fumadocs-ui/components/steps";| 채팅 창 전환 | `⌘J` | `Ctrl+J` | 열면 커서가 메시지 입력란에 놓입니다. [어느 페이지에서나 채팅하기](/chat#어느-페이지에서나-채팅하기)를 참고하세요. || Multica에 묻기 | `⇧⌘J` | `Ctrl+Shift+J` | 플로팅 채팅 창에서 새 채팅을 시작합니다. || 태스크에서 찾기 | `⌘F` | `Ctrl+F` | 아래 설명 참고. |-| 알림 보관 | `E` | `E` | 인박스에서 연 태스크에서 그 알림을 보관하고 다음 알림을 엽니다. 보관된 알림을 보는 중에는 열어 둔 알림의 보관을 해제합니다. [인박스](/inbox#알림-처리)를 참고하세요. |-| 알림 미루기 | `H` | `H` | 인박스에서 연 태스크를 미루고 다음 알림을 엽니다. 미뤄둔 태스크에서는 지금 되돌립니다. |+| 알림 보관 | `E` | `E` | 인박스 페이지에서 열어 둔 알림을 보관하고 다음 알림을 엽니다. 보관됨 탭에서는 열어 둔 알림을 인박스로 되돌립니다. [인박스](/inbox#알림-처리)를 참고하세요. |+| 알림 미루기 | `H` | `H` | 인박스 페이지에서 열어 둔 태스크를 미루고 다음 알림을 엽니다. 미뤄둔 태스크에서는 지금 되돌립니다. || 인박스 작업 실행 취소 | `Z` | `Z` | 보관, 미루기, 구독 해제 확인 알림이 보이는 동안 그 동작을 취소합니다. 확인 알림이 없으면 보관된 현재 알림을 인박스로 되돌리거나, **인박스가 비었습니다** 화면에 표시된 작업을 취소합니다. || 보내기 | `⌘↵` | `Ctrl+Enter` | 댓글과 채팅 메시지를 보내고, 새 태스크를 만들 때도 씁니다. || 음성 입력 | 지정 안 됨 | 지정 안 됨 | Desktop 전용. 먼저 설정 → 음성 입력에서 켜세요. [음성 입력](/desktop-app#음성-입력)을 참고하세요. |diff --git a/apps/docs/content/docs/shortcuts.mdx b/apps/docs/content/docs/shortcuts.mdxindex 62f51dfae1..26f67ed8b7 100644--- a/apps/docs/content/docs/shortcuts.mdx+++ b/apps/docs/content/docs/shortcuts.mdx@@ -36,8 +36,8 @@ Selecting a result opens it. Hold `⌘` (`Ctrl` on Windows and Linux) while clic| Toggle chat window | `⌘J` | `Ctrl+J` | Opening it puts the cursor in the message input. See [Chat from any page](/chat#chat-from-any-page). || Ask Multica | `⇧⌘J` | `Ctrl+Shift+J` | Starts a new chat in the floating window. || Find in issue | `⌘F` | `Ctrl+F` | See below. |-| Archive notification | `E` | `E` | On an issue opened from the inbox, archives its notification and opens the next one. In archived notifications, restores the open one. See [Inbox](/inbox#handle-notifications). |-| Snooze notification | `H` | `H` | On an issue opened from the inbox, snoozes it and opens the next one. On a snoozed issue, brings it back now. See [Inbox](/inbox#snooze-an-issue). |+| Archive notification | `E` | `E` | On the Inbox page, archives the open notification and opens the next one. On the Archived tab, moves the open one back to the inbox. See [Inbox](/inbox#handle-notifications). |+| Snooze notification | `H` | `H` | On the Inbox page, snoozes the open issue and opens the next one. On a snoozed issue, brings it back now. See [Inbox](/inbox#snooze-an-issue). || Undo inbox action | `Z` | `Z` | While an archive, snooze or unsubscribe confirmation shows, undoes that action. Without one, puts back the open notification once it is archived, or undoes what **Inbox cleared** names. See [Inbox](/inbox#when-a-notification-leaves-the-inbox). || Send | `⌘↵` | `Ctrl+Enter` | Sends comments and chat messages, and also submits new issues. || Voice input | Unassigned | Unassigned | Desktop only; turn it on first under Settings → Voice input. See [Voice input](/desktop-app#voice-input). |diff --git a/apps/docs/content/docs/shortcuts.zh-Hant.mdx b/apps/docs/content/docs/shortcuts.zh-Hant.mdxindex 0df4091c05..05df188059 100644--- a/apps/docs/content/docs/shortcuts.zh-Hant.mdx+++ b/apps/docs/content/docs/shortcuts.zh-Hant.mdx@@ -36,8 +36,8 @@ import { Step, Steps } from "fumadocs-ui/components/steps";| 顯示或隱藏聊天窗 | `⌘J` | `Ctrl+J` | 開啟時游標落在輸入框裡。見[懸浮聊天窗](/chat#在任意頁面開啟懸浮聊天窗)。 || 問 Multica | `⇧⌘J` | `Ctrl+Shift+J` | 在懸浮聊天窗裡開始新對話。 || 在任務中查詢 | `⌘F` | `Ctrl+F` | 見下文。 |-| 歸檔通知 | `E` | `E` | 在從收件箱開啟的任務上,歸檔它的通知並開啟下一條;檢視已歸檔時則取消歸檔當前開啟的通知。見[收件箱](/inbox#處理通知)。 |-| 延後通知 | `H` | `H` | 在從收件箱開啟的任務上,延後它並開啟下一條;已延後的任務則讓它現在回來。 |+| 歸檔通知 | `E` | `E` | 在收件箱頁面上,歸檔當前開啟的通知並開啟下一條;在已歸檔分頁下則把它移回收件箱。見[收件箱](/inbox#處理通知)。 |+| 延後通知 | `H` | `H` | 在收件箱頁面上,延後當前開啟的任務並開啟下一條;已延後的任務則讓它現在回來。 || 復原收件箱操作 | `Z` | `Z` | 歸檔、延後或取消訂閱的提示還在時,復原這次操作;沒有提示時,把已歸檔的目前通知放回收件箱,或復原**收件箱已清空**頁面上寫明的操作。 || 傳送 | `⌘↵` | `Ctrl+Enter` | 傳送評論和聊天訊息,也用於提交新任務。 || 語音輸入 | 未設定 | 未設定 | 僅 Desktop;先在設定 → 語音輸入中啟用。見[語音輸入](/desktop-app#語音輸入)。 |diff --git a/apps/docs/content/docs/shortcuts.zh.mdx b/apps/docs/content/docs/shortcuts.zh.mdxindex 73dbf97695..b4e4e66e9d 100644--- a/apps/docs/content/docs/shortcuts.zh.mdx+++ b/apps/docs/content/docs/shortcuts.zh.mdx@@ -36,8 +36,8 @@ import { Step, Steps } from "fumadocs-ui/components/steps";| 显示或隐藏聊天窗 | `⌘J` | `Ctrl+J` | 打开时光标落在输入框里。见[悬浮聊天窗](/chat#在任意页面打开悬浮聊天窗)。 || 问 Multica | `⇧⌘J` | `Ctrl+Shift+J` | 在悬浮聊天窗里开始新对话。 || 在任务中查找 | `⌘F` | `Ctrl+F` | 见下文。 |-| 归档通知 | `E` | `E` | 在从收件箱打开的任务上,归档它的通知并打开下一条;查看已归档时则取消归档当前打开的通知。见[收件箱](/inbox#处理通知)。 |-| 延后通知 | `H` | `H` | 在从收件箱打开的任务上,延后它并打开下一条;已延后的任务则让它现在回来。 |+| 归档通知 | `E` | `E` | 在收件箱页面上,归档当前打开的通知并打开下一条;在已归档标签下则把它移回收件箱。见[收件箱](/inbox#处理通知)。 |+| 延后通知 | `H` | `H` | 在收件箱页面上,延后当前打开的任务并打开下一条;已延后的任务则让它现在回来。 || 撤销收件箱操作 | `Z` | `Z` | 归档、延后或取消订阅的提示还在时,撤销这次操作;没有提示时,把已归档的当前通知放回收件箱,或撤销**收件箱已清空**页面上写明的操作。 || 发送 | `⌘↵` | `Ctrl+Enter` | 发送评论和聊天消息,也用于提交新任务。 || 语音输入 | 未设置 | 未设置 | 仅 Desktop;先在设置 → 语音输入中开启。见[语音输入](/desktop-app#语音输入)。 |diff --git a/e2e/guest.spec.ts b/e2e/guest.spec.tsindex 89800299e5..036b89aff8 100644--- a/e2e/guest.spec.ts+++ b/e2e/guest.spec.ts@@ -209,6 +209,8 @@ test.describe("as a guest", () => {await expectNoMemberActions(page);await inbox.getByText(fixture.issues.review.title, { exact: true }).click();+ await expect(page).toHaveURL(new RegExp(`/${slug}/inbox\\?issue=${fixture.issues.review.id}`));+ await page.getByRole("button", { name: "Toggle right sidebar" }).click();await expect(page.getByText("Guests can view and comment, but cannot change issue properties.")).toBeVisible();await expectClean(seen);await expectNoMemberActions(page);diff --git a/e2e/inbox-delete.spec.ts b/e2e/inbox-delete.spec.tsindex 762aa585b3..bcccee2af2 100644--- a/e2e/inbox-delete.spec.ts+++ b/e2e/inbox-delete.spec.ts@@ -123,8 +123,7 @@ test("deleting active issue notifications restores archived history with expliciexpect((await db.query("SELECT id FROM inbox_item WHERE id = $1", [active.rows[0].id])).rowCount).toBe(0);expect((await db.query("SELECT id FROM inbox_item WHERE id = $1", [history.rows[0].id])).rowCount).toBe(1);- await page.getByRole("button", { name: "Inbox", exact: true }).click();- await page.getByRole("menuitemradio", { name: "Archived", exact: true }).click();+ await page.getByRole("tab", { name: "Archived", exact: true }).click();await expect(row).toBeVisible();await page.screenshot({ path: testInfo.outputPath("inbox-delete-retained-archive.png") });await row.click({ button: "right" });diff --git a/packages/core/inbox/selection-store.ts b/packages/core/inbox/selection-store.tsindex 19ef786ca7..b0e69831a1 100644--- a/packages/core/inbox/selection-store.ts+++ b/packages/core/inbox/selection-store.ts@@ -47,6 +47,13 @@ export type LastInboxCleared =export type InboxTransitionDirection = "next" | "prev";+/**+ * The Inbox's three tabs, in the Work panel's Inbox section and on the+ * phone's Inbox page: the live Inbox, the issues snoozed out of it, and the+ * archive.+ */+export type InboxTab = "inbox" | "snoozed" | "archived";+/*** Directional hint recorded right before the Inbox advances to the next item* (`"next"`) or undoes back to a cleared one (`"prev"`), so the arriving@@ -63,9 +70,12 @@ const INBOX_TRANSITION_TTL_MS = 3_000;interface InboxSelectionState {lastResolvedKeyByWorkspace: Record<string, string>;rememberResolvedKey: (wsId: string, key: string) => void;- /** The issue last opened from the Work panel's Inbox section. */- sidebarIssueByWorkspace: Record<string, string | null>;- rememberSidebarIssue: (wsId: string, issueId: string | null) => void;+ /**+ * The tab the Work panel's Inbox section last showed, per workspace, for+ * pages other than the Inbox, whose own `?view=` sets the tab there.+ */+ sectionTabByWorkspace: Record<string, InboxTab>;+ setSectionTab: (wsId: string, tab: InboxTab) => void;/*** Pending directional transition into the next (or undone) Inbox item.* Consumed once when that destination mounts; stale entries expire.@@ -73,27 +83,21 @@ interface InboxSelectionState {transitionByWorkspace: Record<string, InboxTransition>;recordTransition: (wsId: string, targetKey: string, direction: InboxTransitionDirection) => void;consumeTransition: (wsId: string, key: string) => InboxTransitionDirection | null;- /**- * Issues the Inbox section opened in another tab of this window. Desktop- * tabs share this store, so each of these keeps counting as opened from- * the Inbox beside the issue the current tab last opened from it.- */- sidebarTabIssuesByWorkspace: Record<string, string[]>;- rememberSidebarTabIssue: (wsId: string, issueId: string) => void;- forgetSidebarTabIssue: (wsId: string, issueId: string) => void;/*** The issue a notification row was last clicked for, with a counter that- * moves on every click. The issue page replays its landing (the comment or- * app request the link names) when the counter moves, which a click on the- * row already open needs: the page neither remounts nor sees a new link.+ * moves on every click. The Inbox page replays its landing (the comment or+ * app request the notification is about) when the counter moves, which a+ * click on the row already open needs: the detail neither remounts nor sees+ * a new link.** Until the page reports it `landed`, the click outranks the page's record- * that it already landed on that comment. The record belongs to the issue's- * route, which a click on another page cannot reach before it navigates.+ * that it already landed on that comment. The record belongs to the Inbox+ * page's route, which a click on another page cannot reach before it+ * navigates.*/landing: { issueId: string; token: number; landed: boolean } | null;requestLanding: (issueId: string) => void;- /** The issue page landed the click with this token. */+ /** The Inbox page landed the click with this token. */completeLanding: (token: number) => void;/*** The open notification's row as each list last showed it, by@@ -132,10 +136,10 @@ export const useInboxSelectionStore = create<InboxSelectionState>()((set, get) =set((state) => state.lastResolvedKeyByWorkspace[wsId] === key ? state : {lastResolvedKeyByWorkspace: { ...state.lastResolvedKeyByWorkspace, [wsId]: key },}),- sidebarIssueByWorkspace: {},- rememberSidebarIssue: (wsId, issueId) =>- set((state) => (state.sidebarIssueByWorkspace[wsId] ?? null) === issueId ? state : {- sidebarIssueByWorkspace: { ...state.sidebarIssueByWorkspace, [wsId]: issueId },+ sectionTabByWorkspace: {},+ setSectionTab: (wsId, tab) =>+ set((state) => (state.sectionTabByWorkspace[wsId] ?? "inbox") === tab ? state : {+ sectionTabByWorkspace: { ...state.sectionTabByWorkspace, [wsId]: tab },}),transitionByWorkspace: {},recordTransition: (wsId, targetKey, direction) =>@@ -156,24 +160,6 @@ export const useInboxSelectionStore = create<InboxSelectionState>()((set, get) =});return fresh ? entry.direction : null;},- sidebarTabIssuesByWorkspace: {},- rememberSidebarTabIssue: (wsId, issueId) =>- set((state) => {- const issueIds = state.sidebarTabIssuesByWorkspace[wsId] ?? [];- return issueIds.includes(issueId) ? state : {- sidebarTabIssuesByWorkspace: { ...state.sidebarTabIssuesByWorkspace, [wsId]: [...issueIds, issueId] },- };- }),- forgetSidebarTabIssue: (wsId, issueId) =>- set((state) => {- const issueIds = state.sidebarTabIssuesByWorkspace[wsId] ?? [];- return issueIds.includes(issueId) ? {- sidebarTabIssuesByWorkspace: {- ...state.sidebarTabIssuesByWorkspace,- [wsId]: issueIds.filter((id) => id !== issueId),- },- } : state;- }),landing: null,requestLanding: (issueId) =>set((state) => ({ landing: { issueId, token: (state.landing?.token ?? 0) + 1, landed: false } })),diff --git a/packages/core/issue-views/sidebar-views.hook.test.tsx b/packages/core/issue-views/sidebar-views.hook.test.tsxindex dba3f530cc..2d80d44500 100644--- a/packages/core/issue-views/sidebar-views.hook.test.tsx+++ b/packages/core/issue-views/sidebar-views.hook.test.tsx@@ -58,25 +58,10 @@ describe("useSidebarViews writes", () => {expect(putIssueViewPreference.mock.calls[0]![0].prefs.order).toEqual(["builtin:my_work","view:a",- "builtin:snoozed","view:b",]);});- it("remembers a removed Snoozed so it is not added back", async () => {- const { result } = setup(preference(["builtin:subscribed", "view:a"]));- await waitFor(() => expect(result.current.isStarred("view:a")).toBe(true));- expect(result.current.isStarred("builtin:snoozed")).toBe(true);-- act(() => result.current.unstar("builtin:snoozed"));-- await waitFor(() => expect(putIssueViewPreference).toHaveBeenCalledTimes(1));- expect(putIssueViewPreference.mock.calls[0]![0].prefs).toEqual({- hidden: ["builtin:snoozed"],- order: ["builtin:subscribed", "view:a"],- });- });-it("does not write a default order before the views behind it have loaded", async () => {const { result } = setup(preference([], ""));await waitFor(() => expect(result.current.isStarred("builtin:all_issues")).toBe(true));diff --git a/packages/core/issue-views/sidebar-views.test.ts b/packages/core/issue-views/sidebar-views.test.tsindex 88365fa8cc..bf7baf6cdd 100644--- a/packages/core/issue-views/sidebar-views.test.ts+++ b/packages/core/issue-views/sidebar-views.test.ts@@ -5,7 +5,6 @@ import {migrateSidebarViewOrder,reorderSidebarViewOrder,resolveSidebarViewItems,- withLaterBuiltins,} from "./sidebar-views";const view = (id: string, owner_id: string): IssueView => ({@@ -33,7 +32,6 @@ describe("defaultSidebarViewOrder", () => {"builtin:my_work","builtin:working","builtin:subscribed",- "builtin:snoozed","view:a","view:c",]);@@ -84,31 +82,6 @@ describe("migrateSidebarViewOrder", () => {});});-describe("withLaterBuiltins", () => {- it("adds Snoozed after Subscribed to an order saved before it existed", () => {- expect(withLaterBuiltins(["builtin:subscribed", "view:a"], [])).toEqual([- "builtin:subscribed",- "builtin:snoozed",- "view:a",- ]);- });-- it("puts it after the last built-in when Subscribed was removed", () => {- expect(withLaterBuiltins(["view:a", "builtin:my_work", "view:b"], [])).toEqual([- "view:a",- "builtin:my_work",- "builtin:snoozed",- "view:b",- ]);- });-- it("leaves an order that holds it, or hid it, alone", () => {- const moved = ["builtin:snoozed", "builtin:subscribed"];- expect(withLaterBuiltins(moved, [])).toEqual(moved);- expect(withLaterBuiltins(["builtin:subscribed"], ["builtin:snoozed"])).toEqual(["builtin:subscribed"]);- });-});-describe("reorderSidebarViewOrder", () => {it("moves visible ids and keeps unresolved ones in their slots", () => {expect(diff --git a/packages/core/issue-views/sidebar-views.ts b/packages/core/issue-views/sidebar-views.tsindex d4230c5acf..de5133a038 100644--- a/packages/core/issue-views/sidebar-views.ts+++ b/packages/core/issue-views/sidebar-views.ts@@ -9,8 +9,8 @@ import { issueViewEverywhereOptions } from "./queries";import { issueViewPreferenceOptions, useUpdateIssueViewPreference } from "./preferences";/** The views every workspace has without saving anything. */-export type BuiltinViewKey = "all_issues" | "my_work" | "working" | "subscribed" | "snoozed";-export const BUILTIN_VIEW_KEYS: readonly BuiltinViewKey[] = ["all_issues", "my_work", "working", "subscribed", "snoozed"];+export type BuiltinViewKey = "all_issues" | "my_work" | "working" | "subscribed";+export const BUILTIN_VIEW_KEYS: readonly BuiltinViewKey[] = ["all_issues", "my_work", "working", "subscribed"];export const builtinViewItemId = (key: BuiltinViewKey) => `builtin:${key}`;export const savedViewItemId = (viewId: string) => `view:${viewId}`;@@ -40,35 +40,6 @@ export function migrateSidebarViewOrder(order: readonly string[]): string[] {return [...new Set(next)];}-/**- * Built-ins added after users began arranging the list. A saved order that- * has never held one gets it after the built-in it follows by default; once- * removed it is remembered as hidden and stays out.- */-const LATER_BUILTINS: readonly { id: string; after: string }[] = [- { id: builtinViewItemId("snoozed"), after: builtinViewItemId("subscribed") },-];--export function withLaterBuiltins(order: readonly string[], hidden: readonly string[]): string[] {- const next = [...order];- for (const { id, after } of LATER_BUILTINS) {- if (next.includes(id) || hidden.includes(id)) continue;- const at = next.indexOf(after);- if (at >= 0) {- next.splice(at + 1, 0, id);- continue;- }- const lastBuiltin = next.findLastIndex((other) => other.startsWith("builtin:"));- next.splice(lastBuiltin + 1, 0, id);- }- return next;-}--/** The later built-ins an order leaves out, so they are not added back. */-function hiddenLaterBuiltins(order: readonly string[]): string[] {- return LATER_BUILTINS.map(({ id }) => id).filter((id) => !order.includes(id));-}-export const SIDEBAR_VIEWS_SCOPE = { scope_type: "sidebar" } as const;export type SidebarViewItem =@@ -151,11 +122,7 @@ export function useSidebarViews(wsId: string, userId: string | undefined) {const preference = preferenceQuery.data;const storedOrder = preference && preference.updated_at !== "" ? preference.prefs.order : null;- const storedHidden = preference && preference.updated_at !== "" ? preference.prefs.hidden : null;- const savedOrder = useMemo(- () => (storedOrder ? withLaterBuiltins(migrateSidebarViewOrder(storedOrder), storedHidden ?? []) : null),- [storedOrder, storedHidden],- );+ const savedOrder = useMemo(() => (storedOrder ? migrateSidebarViewOrder(storedOrder) : null), [storedOrder]);const order = useMemo(() =>savedOrder ??@@ -175,7 +142,7 @@ export function useSidebarViews(wsId: string, userId: string | undefined) {(savedOrder !== null || (viewsQuery.isSuccess && (!userId || pinsQuery.isSuccess)));const write = useCallback((next: string[]) => {- if (ready) save({ hidden: hiddenLaterBuiltins(next), order: next });+ if (ready) save({ hidden: [], order: next });},[ready, save],);diff --git a/packages/core/issues/sidebar-list.ts b/packages/core/issues/sidebar-list.tsindex cea7adbbd0..ef6dc9e54b 100644--- a/packages/core/issues/sidebar-list.ts+++ b/packages/core/issues/sidebar-list.ts@@ -245,7 +245,7 @@ export function viewSidebarRequest(}/** What each built-in adds to All issues, as the issues page applies it. */-const BUILTIN_FILTERS: Record<Exclude<BuiltinViewKey, "working" | "snoozed">, IssueTableQuerySpec["filters"]> = {+const BUILTIN_FILTERS: Record<Exclude<BuiltinViewKey, "working">, IssueTableQuerySpec["filters"]> = {all_issues: {},my_work: { relations: ASSIGNEE_RELATIONS.me_and_my_agents },subscribed: { relations: ["subscribed"] },@@ -255,15 +255,14 @@ const BUILTIN_FILTERS: Record<Exclude<BuiltinViewKey, "working" | "snoozed">, Is* The request for an expanded built-in view: its filter, listed with the same* status, sub-issue and ordering settings as an expanded project. The* assignee setting is for projects only: a built-in already says whose- * issues it lists. Working and Snoozed list `issueIds`: the issues agents are- * running on, as the page does, and the issues the viewer snoozed. `null` when- * the settings leave nothing to list.+ * issues it lists. Working lists `workingIssueIds`, the issues agents are+ * running on, as the page does. `null` when the settings leave nothing to list.*/export function builtinSidebarRequest(builtin: BuiltinViewKey,settings: SidebarIssueSettings,statuses: readonly StatusRef[],- issueIds: readonly string[] = [],+ workingIssueIds: readonly string[] = [],): SidebarIssuesRequest | null {const shown = shownSidebarStatuses(settings, statuses);if (shown.length === 0) return null;@@ -271,8 +270,8 @@ export function builtinSidebarRequest(table: {scope: { kind: "workspace" },filters: {- ...(builtin === "working" || builtin === "snoozed"- ? { working_issue_ids: [...issueIds].sort() }+ ...(builtin === "working"+ ? { working_issue_ids: [...workingIssueIds].sort() }: BUILTIN_FILTERS[builtin]),...(shown.length < statuses.length ? { statuses: shown } : {}),include_sub_issues: settings.showSubIssues,diff --git a/packages/core/issues/stores/sidebar-tree-store.test.ts b/packages/core/issues/stores/sidebar-tree-store.test.tsindex ebccbd9685..45638389a9 100644--- a/packages/core/issues/stores/sidebar-tree-store.test.ts+++ b/packages/core/issues/stores/sidebar-tree-store.test.ts@@ -64,4 +64,27 @@ describe("useSidebarTreeStore", () => {expect(state.workingCollapsed).toBe(false);expect(state.needsAttentionCollapsed).toBe(false);});++ it("makes the Inbox section compact once for preferences stored before it was the default", async () => {+ localStorage.setItem("multica_sidebar_tree:before", JSON.stringify({+ state: { inboxSettings: { limit: 10, showCount: false, railBadge: true, compact: false } },+ version: 0,+ }));+ setCurrentWorkspace("before", "ws-before");+ await Promise.resolve();+ expect(useSidebarTreeStore.getState().inboxSettings).toEqual({+ limit: 10,+ showCount: false,+ railBadge: true,+ compact: true,+ });++ localStorage.setItem("multica_sidebar_tree:after", JSON.stringify({+ state: { inboxSettings: { limit: 5, showCount: true, railBadge: true, compact: false } },+ version: 1,+ }));+ setCurrentWorkspace("after", "ws-after");+ await Promise.resolve();+ expect(useSidebarTreeStore.getState().inboxSettings.compact).toBe(false);+ });});diff --git a/packages/core/issues/stores/sidebar-tree-store.ts b/packages/core/issues/stores/sidebar-tree-store.tsindex fff2b13e93..87de33da71 100644--- a/packages/core/issues/stores/sidebar-tree-store.ts+++ b/packages/core/issues/stores/sidebar-tree-store.ts@@ -68,7 +68,7 @@ export const DEFAULT_SIDEBAR_INBOX_SETTINGS: SidebarInboxSettings = {limit: 5,showCount: true,railBadge: true,- compact: false,+ compact: true,};export interface SidebarLocateRequest {@@ -177,6 +177,15 @@ export const useSidebarTreeStore = create<SidebarTreeState>()({name: "multica_sidebar_tree",storage: createJSONStorage(() => createWorkspaceAwareStorage(defaultStorage)),+ // 1: the Inbox section became compact by default. Every device had+ // stored the old default, which says nothing about a choice, so each+ // one starts compact once.+ version: 1,+ migrate: (persisted, version) => {+ const p = (persisted ?? {}) as Partial<PersistedSidebarTree>;+ if (version < 1 && p.inboxSettings) return { ...p, inboxSettings: { ...p.inboxSettings, compact: true } };+ return p;+ },partialize: (state): PersistedSidebarTree => ({expanded: state.expanded,issueSettings: state.issueSettings,diff --git a/packages/core/paths/tab-subject.test.ts b/packages/core/paths/tab-subject.test.tsindex 05f14f028b..64218fe8ea 100644--- a/packages/core/paths/tab-subject.test.ts+++ b/packages/core/paths/tab-subject.test.ts@@ -49,12 +49,13 @@ describe("parseTabSubject", () => {{ kind: "runtime", machineId: "machine-1", runtimeId: "rt-2" },],// Containers — selection (and archived sub-list) live in the query string- ["/acme/inbox", { kind: "inbox", selectedKey: null, archived: false }],- ["/acme/inbox?issue=MUL-9", { kind: "inbox", selectedKey: "MUL-9", archived: false }],- ["/acme/inbox?view=archived", { kind: "inbox", selectedKey: null, archived: true }],+ ["/acme/inbox", { kind: "inbox", selectedKey: null, view: "inbox" }],+ ["/acme/inbox?issue=MUL-9", { kind: "inbox", selectedKey: "MUL-9", view: "inbox" }],+ ["/acme/inbox?view=archived", { kind: "inbox", selectedKey: null, view: "archived" }],+ ["/acme/inbox?view=snoozed&issue=MUL-9", { kind: "inbox", selectedKey: "MUL-9", view: "snoozed" }],["/acme/inbox?view=archived&issue=MUL-9",- { kind: "inbox", selectedKey: "MUL-9", archived: true },+ { kind: "inbox", selectedKey: "MUL-9", view: "archived" },],["/acme/chat", { kind: "chat", sessionId: null }],["/acme/chat?session=sess-1", { kind: "chat", sessionId: "sess-1" }],@@ -105,10 +106,10 @@ describe("tabSubjectKey", () => {});it("distinguishes archived inbox and the attachment filename", () => {- expect(tabSubjectKey({ kind: "inbox", selectedKey: "k", archived: false })).toBe(+ expect(tabSubjectKey({ kind: "inbox", selectedKey: "k", view: "inbox" })).toBe("inbox:inbox:k",);- expect(tabSubjectKey({ kind: "inbox", selectedKey: "k", archived: true })).toBe(+ expect(tabSubjectKey({ kind: "inbox", selectedKey: "k", view: "archived" })).toBe("inbox:archived:k",);expect(diff --git a/packages/core/paths/tab-subject.ts b/packages/core/paths/tab-subject.tsindex ed0850fdc3..c596e3f1b4 100644--- a/packages/core/paths/tab-subject.ts+++ b/packages/core/paths/tab-subject.ts@@ -45,9 +45,10 @@ export type TabSubject =| { kind: "attachment"; id: string; filename: string | null }/*** The Inbox container; `selectedKey` is the `?issue=` selection or null,- * `archived` is the `?view=archived` sub-list (its own list/cache).+ * `view` the `?view=` tab: the live Inbox, Snoozed, or Archived (each its+ * own list/cache).*/- | { kind: "inbox"; selectedKey: string | null; archived: boolean }+ | { kind: "inbox"; selectedKey: string | null; view: "inbox" | "snoozed" | "archived" }/** The Chat container; `sessionId` is the `?session=` selection or null. */| { kind: "chat"; sessionId: string | null }/** A creation flow that has not produced a resource yet. */@@ -111,7 +112,7 @@ export function parseTabSubject(url: string): TabSubject {return {kind: "inbox",selectedKey: query.get("issue") || null,- archived: query.get("view") === "archived",+ view: query.get("view") === "archived" ? "archived" : query.get("view") === "snoozed" ? "snoozed" : "inbox",};case "chat":return { kind: "chat", sessionId: query.get("session") || null };@@ -182,7 +183,7 @@ export function tabSubjectKey(subject: TabSubject): string {case "attachment":return `attachment:${subject.id}:${subject.filename ?? ""}`;case "inbox":- return `inbox:${subject.archived ? "archived" : "inbox"}:${subject.selectedKey ?? ""}`;+ return `inbox:${subject.view}:${subject.selectedKey ?? ""}`;case "chat":return `chat:${subject.sessionId ?? ""}`;case "flow":diff --git a/packages/views/inbox/components/inbox-bar.tsx b/packages/views/inbox/components/inbox-bar.tsxindex a829851ea1..db45817886 100644--- a/packages/views/inbox/components/inbox-bar.tsx+++ b/packages/views/inbox/components/inbox-bar.tsx@@ -1,7 +1,7 @@"use client";import type { ComponentProps, ReactNode } from "react";-import { Archive } from "@multica/ui/icons";+import { Archive, ArchiveRestore } from "@multica/ui/icons";import { Button } from "@multica/ui/components/ui/button";import { Skeleton } from "@multica/ui/components/ui/skeleton";import { TooltipHint } from "@multica/ui/components/common/tooltip-hint";@@ -15,7 +15,7 @@ import { InboxActorAvatar, InboxActorLine } from "./inbox-actor";import { useTimeAgo } from "./inbox-list-item";/**- * The bar under the header of an issue opened from the Inbox: the one place+ * The bar under the header of an issue the Inbox page has open: the one place* its notification lives, whatever state that is in. Open, it says why the* issue is here and offers what resolves it, the issue's own actions first,* then the notification's. Settled (archived, snoozed), it says so, with the@@ -42,7 +42,7 @@ export function InboxBar({ settled = false, children }: { settled?: boolean; chi}/**- * Reserves the 40px InboxBar slot while a cold issue opened from the Inbox+ * Reserves the 40px InboxBar slot while a cold issue the Inbox page opened* loads, so the reading column below never shifts 40px when the issue lands.* When the Inbox list already holds the notification row, renders its real* actor and reason immediately.@@ -171,3 +171,19 @@ export function InboxArchiveButton({ onClick }: { onClick: () => void }) {/>);}++/** An archived notification's bar: why it was in the Inbox, and the way back into it. */+export function InboxArchivedBar({ item, onRestore }: { item: InboxItem; onRestore: () => void }) {+ const { t } = useT("inbox");+ return (+ <InboxBar settled>+ <InboxBarReason item={item} />+ <InboxBarButton+ icon={<ArchiveRestore />}+ label={t(($) => $.detail.restore)}+ shortcut="archiveInboxItem"+ onClick={onRestore}+ />+ </InboxBar>+ );+}diff --git a/packages/views/inbox/components/inbox-display.test.ts b/packages/views/inbox/components/inbox-display.test.tsindex bf4b9e7935..51aaa856b5 100644--- a/packages/views/inbox/components/inbox-display.test.ts+++ b/packages/views/inbox/components/inbox-display.test.ts@@ -158,12 +158,13 @@ describe("resolveDetailItem", () => {describe("inboxRowHref", () => {const p = paths.workspace("acme");- it("links to the issue identifier, keeping the comment anchor", () => {+ it("opens an issue's notification on the Inbox page, keyed by the issue", () => {expect(inboxRowHref(p, item({ issue_identifier: "MUL-7", details: { comment_id: "c-1" } })))- .toBe("/acme/issues/MUL-7#comment-c-1");+ .toBe("/acme/inbox?issue=issue-1");});- it("falls back to the issue id when the server sent no identifier", () => {- expect(inboxRowHref(p, item({ details: { comment_id: "c-1" } }))).toBe("/acme/issues/issue-1#comment-c-1");+ it("opens an issue-less notification by its own id, on the tab it is listed in", () => {+ expect(inboxRowHref(p, item({ id: "n-1", issue_id: null }))).toBe("/acme/inbox?issue=n-1");+ expect(inboxRowHref(p, item({}), "archived")).toBe("/acme/inbox?view=archived&issue=issue-1");});});diff --git a/packages/views/inbox/components/inbox-display.ts b/packages/views/inbox/components/inbox-display.tsindex 8d421ffdf7..d2bb9463f6 100644--- a/packages/views/inbox/components/inbox-display.ts+++ b/packages/views/inbox/components/inbox-display.ts@@ -1,5 +1,7 @@+import { inboxRowKey } from "@multica/core/inbox/open-row";import { issueRouteRef, type IssueRouteRef, type WorkspacePaths } from "@multica/core/paths";import type { InboxItem } from "@multica/core/types";+import { inboxTabHref, type InboxTab } from "./inbox-view";function singleLine(value: string | null | undefined): string {return (value ?? "").replace(/\s+/g, " ").trim();@@ -102,15 +104,10 @@ export function inboxIssueRef(item: Pick<InboxItem, "issue_identifier">, issueId}/**- * Where a notification row leads: its issue, at the comment or app request it- * is about when it names one. An issue-less notification opens on the Inbox- * page, which shows the detail of the row picked there.+ * Where a notification row leads: the Inbox page with it open, on `tab`. The+ * page lands on the comment or app request the notification is about, and+ * the issue's own page is one click away from there.*/-export function inboxRowHref(p: WorkspacePaths, item: InboxItem): string {- if (!item.issue_id) return `${p.inbox()}?${new URLSearchParams({ issue: item.id }).toString()}`;- const issueHref = p.issueDetail(inboxIssueRef(item, item.issue_id));- const requestId = item.type.startsWith("app_") ? item.details?.request_id : undefined;- if (requestId) return `${issueHref}#app-request-${requestId}`;- const commentId = item.details?.comment_id;- return commentId ? `${issueHref}#comment-${commentId}` : issueHref;+export function inboxRowHref(p: WorkspacePaths, item: InboxItem, tab: InboxTab = "inbox"): string {+ return inboxTabHref(p, tab, inboxRowKey(item));}diff --git a/packages/views/inbox/components/inbox-empty-state.test.tsx b/packages/views/inbox/components/inbox-empty-state.test.tsxindex 851300d0cb..7584766223 100644--- a/packages/views/inbox/components/inbox-empty-state.test.tsx+++ b/packages/views/inbox/components/inbox-empty-state.test.tsx@@ -2,7 +2,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";import { act, cleanup, fireEvent, screen } from "@testing-library/react";import { QueryClient, QueryClientProvider } from "@tanstack/react-query";import { inboxKeys, snoozedInboxOptions } from "@multica/core/inbox/queries";-import { useInboxSelectionStore } from "@multica/core/inbox/selection-store";+import { useInboxSelectionStore, type InboxTab } from "@multica/core/inbox/selection-store";import type { SnoozedInboxIssue } from "@multica/core/types";import { renderWithI18n } from "../../test/i18n";import { NavigationProvider, type NavigationAdapter } from "../../navigation";@@ -46,7 +46,7 @@ const archivedEntry = {const pressZ = (target: Element = document.body) => fireEvent.keyDown(target, { key: "z", code: "KeyZ" });function renderEmpty({- isArchivedView = false,+ tab = "inbox",visibleCount = 0,totalActiveCount = 0,hasActiveFilters = false,@@ -55,7 +55,7 @@ function renderEmpty({snoozed = [],onClearFiltersAndContinue = vi.fn(),}: {- isArchivedView?: boolean;+ tab?: InboxTab;visibleCount?: number;totalActiveCount?: number;hasActiveFilters?: boolean;@@ -80,7 +80,7 @@ function renderEmpty({<NavigationProvider value={nav}><InboxEmptyStatewsId="ws"- isArchivedView={isArchivedView}+ tab={tab}visibleCount={visibleCount}totalActiveCount={totalActiveCount}hasActiveFilters={hasActiveFilters}@@ -99,7 +99,6 @@ beforeEach(() => {useInboxSelectionStore.setState({lastClearedByWorkspace: {},leftRowKeyByWorkspace: {},- sidebarIssueByWorkspace: {},});});afterEach(() => {@@ -124,7 +123,7 @@ describe("InboxEmptyState", () => {expect(screen.queryByRole("button", { name: /New issue/ })).toBeNull();fireEvent.click(screen.getByRole("button", { name: /1 snoozed/ }));- expect(nav.push).toHaveBeenCalledWith(expect.stringContaining("/acme/issues?view=snoozed"));+ expect(nav.push).toHaveBeenCalledWith("/acme/inbox?view=snoozed");});it("offers inline undo for the just-archived notification and navigates back on click", async () => {@@ -151,7 +150,6 @@ describe("InboxEmptyState", () => {expect(spies.restoreInbox).toHaveBeenCalledWith("n-1", { quiet: true });expect(nav.push).toHaveBeenCalledWith("/acme/issues/MUL-9790");expect(useInboxSelectionStore.getState().lastClearedByWorkspace.ws).toBeUndefined();- expect(useInboxSelectionStore.getState().sidebarIssueByWorkspace.ws).toBe("issue-1");});it("opens a restored notification only once it is back in the Inbox list", async () => {@@ -280,7 +278,7 @@ describe("InboxEmptyState", () => {it("does not answer Z in the archived view", async () => {useInboxSelectionStore.setState({ lastClearedByWorkspace: { ws: archivedEntry } });- renderEmpty({ isArchivedView: true });+ renderEmpty({ tab: "archived" });await act(async () => pressZ());expect(spies.restoreInbox).not.toHaveBeenCalled();});@@ -303,8 +301,17 @@ describe("InboxEmptyState", () => {});it("keeps the archived empty state quiet and separate from Inbox Zero", () => {- renderEmpty({ isArchivedView: true });+ renderEmpty({ tab: "archived" });expect(screen.getByText("No archived notifications")).toBeInTheDocument();expect(screen.queryByRole("heading", { name: "Inbox cleared" })).toBeNull();});++ it("says nothing is snoozed on an empty Snoozed tab, without the Inbox Zero undo", async () => {+ useInboxSelectionStore.setState({ lastClearedByWorkspace: { ws: archivedEntry } });+ renderEmpty({ tab: "snoozed" });+ expect(screen.getByText("Nothing snoozed")).toBeInTheDocument();+ expect(screen.queryByRole("heading", { name: "Inbox cleared" })).toBeNull();+ await act(async () => pressZ());+ expect(spies.restoreInbox).not.toHaveBeenCalled();+ });});diff --git a/packages/views/inbox/components/inbox-empty-state.tsx b/packages/views/inbox/components/inbox-empty-state.tsxindex 24eabc742e..995b7e0b58 100644--- a/packages/views/inbox/components/inbox-empty-state.tsx+++ b/packages/views/inbox/components/inbox-empty-state.tsx@@ -1,7 +1,7 @@"use client";-import { useMemo, useState } from "react";-import { useQuery, useQueryClient } from "@tanstack/react-query";+import { useState } from "react";+import { useQueryClient } from "@tanstack/react-query";import { toast } from "sonner";import {AlarmClock,@@ -18,26 +18,26 @@ import {undoUnsubscribeArchiveInbox,useUnsnoozeInbox,} from "@multica/core/inbox/mutations";-import { inboxKeys, snoozedInboxOptions } from "@multica/core/inbox/queries";+import { inboxKeys } from "@multica/core/inbox/queries";import {useInboxSelectionStore,+ type InboxTab,type LastInboxCleared,} from "@multica/core/inbox/selection-store";-import type { SnoozedInboxIssue } from "@multica/core/types";import { ActionShortcutKeycaps } from "../../common/shortcut-keycaps";import { useLocale, useT } from "../../i18n";-import { useBuiltinViewNavigation } from "../../issue-views/builtin-views";+import { useWorkspacePaths } from "@multica/core/paths";import { useNavigation } from "../../navigation";+import { inboxTabHref } from "./inbox-view";import { formatSnoozeTime } from "./inbox-snooze-time";import { useInboxUndoShortcut } from "./use-inbox-shortcut";+import { useSnoozedInboxRows } from "./use-inbox-tab-rows";import { useRestoreInbox } from "./use-leave-inbox-row";-const NO_SNOOZED: SnoozedInboxIssue[] = [];-/*** The empty detail canvas of `/inbox`:- * - Prompt to pick a row when notifications still exist in the Work panel.- * - Quiet archived-empty state when browsing Archived.+ * - Prompt to pick a row when the Work panel's tab still lists any.+ * - Quiet empty states for the Snoozed and Archived tabs.* - Filtered-empty state when active filters hid remaining notifications* (never confused with true Inbox Zero).* - Calm Inbox Zero state with MulticaBleedMark, persistent inline undo for@@ -46,7 +46,7 @@ const NO_SNOOZED: SnoozedInboxIssue[] = [];*/export function InboxEmptyState({wsId,- isArchivedView,+ tab,visibleCount,totalActiveCount,hasActiveFilters,@@ -55,7 +55,8 @@ export function InboxEmptyState({onClearFiltersAndContinue,}: {wsId: string;- isArchivedView: boolean;+ tab: InboxTab;+ /** Rows the tab lists. */visibleCount: number;/** Total active (unfiltered, unarchived) notifications in the Inbox. */totalActiveCount: number;@@ -68,27 +69,18 @@ export function InboxEmptyState({const locale = useLocale();const qc = useQueryClient();const { push } = useNavigation();- const builtinNav = useBuiltinViewNavigation();+ const paths = useWorkspacePaths();const restoreInbox = useRestoreInbox();const { mutateAsync: unsnoozeAsync } = useUnsnoozeInbox();const lastCleared = useInboxSelectionStore((s) => s.lastClearedByWorkspace[wsId] ?? null);const clearLastCleared = useInboxSelectionStore((s) => s.clearLastCleared);- const isFilteredEmpty = !isArchivedView && hasActiveFilters && visibleCount === 0 && totalActiveCount > 0;- const isInboxZero = !isArchivedView && visibleCount === 0 && !isFilteredEmpty;-- const { data: snoozed = NO_SNOOZED } = useQuery({- ...snoozedInboxOptions(wsId),- enabled: isInboxZero && !!wsId,- });+ const isLive = tab === "inbox";+ const isFilteredEmpty = isLive && hasActiveFilters && visibleCount === 0 && totalActiveCount > 0;+ const isInboxZero = isLive && visibleCount === 0 && !isFilteredEmpty;- const activeSnoozed = useMemo(() => {- const now = Date.now();- return snoozed- .filter((entry) => new Date(entry.snoozed_until).getTime() > now)- .sort((a, b) => new Date(a.snoozed_until).getTime() - new Date(b.snoozed_until).getTime());- }, [snoozed]);+ const { rows: activeSnoozed } = useSnoozedInboxRows(wsId, isInboxZero);const [undoing, setUndoing] = useState(false);@@ -145,8 +137,6 @@ export function InboxEmptyState({}store.returnRow(wsId, entry.key);store.recordTransition(wsId, entry.key, "prev");- if (entry.kind === "unsubscribed") store.rememberSidebarIssue(wsId, entry.issueId);- else if (entry.href.includes("/issues/")) store.rememberSidebarIssue(wsId, entry.key);push?.(entry.href);};@@ -165,7 +155,7 @@ export function InboxEmptyState({const canUndoCleared = (entry: LastInboxCleared) => entry.kind !== "unsubscribed" || entry.undoable;// Z undoes what the inline undo shows, once its toast is gone.- const showsUndo = !isArchivedView && visibleCount === 0 && !!lastCleared && canUndoCleared(lastCleared);+ const showsUndo = isLive && visibleCount === 0 && !!lastCleared && canUndoCleared(lastCleared);useInboxUndoShortcut(showsUndo && lastCleared ? () => void handleUndoCleared(lastCleared) : null);const undoKeycaps = !isCompact && <ActionShortcutKeycaps action="undoInboxAction" />;@@ -179,8 +169,20 @@ export function InboxEmptyState({);}+ if (tab === "snoozed") {+ return (+ <div className="relative flex min-h-0 flex-1 flex-col items-center justify-center overflow-hidden px-6 text-center text-muted-foreground">+ <AlarmClock className="mb-3 h-10 w-10 text-faint-foreground" />+ <p className="relative text-body">{t(($) => $.snooze.view_empty)}</p>+ <p className="relative mt-1 max-w-sm text-label text-faint-foreground">+ {t(($) => $.snooze.view_empty_description)}+ </p>+ </div>+ );+ }+// Archived view empty state stays quiet and distinct from Inbox Zero.- if (isArchivedView) {+ if (tab === "archived") {return (<div className="relative flex min-h-0 flex-1 flex-col items-center justify-center overflow-hidden text-muted-foreground"><Archive className="mb-3 h-10 w-10 text-faint-foreground" />@@ -265,10 +267,7 @@ export function InboxEmptyState({{activeSnoozed.length > 0 && earliestSnooze && (<buttontype="button"- onClick={() => {- builtinNav.prepare("snoozed");- push?.(builtinNav.hrefFor("snoozed"));- }}+ onClick={() => push?.(inboxTabHref(paths, "snoozed"))}className="mt-2 inline-flex items-center gap-1.5 rounded-md px-1.5 py-0.5 text-caption text-faint-foreground transition-colors hover:text-muted-foreground focus-visible:outline-2 focus-visible:outline-ring"><AlarmClock className="size-3.5 shrink-0" />diff --git a/packages/views/inbox/components/inbox-page-query.test.tsx b/packages/views/inbox/components/inbox-page-query.test.tsxindex 2eeff530f6..6ca7117d7f 100644--- a/packages/views/inbox/components/inbox-page-query.test.tsx+++ b/packages/views/inbox/components/inbox-page-query.test.tsx@@ -1,5 +1,5 @@import { useEffect, type ReactNode } from "react";-import { act, cleanup, fireEvent, render, screen, waitFor, within } from "@testing-library/react";+import { act, cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";import { afterEach, beforeEach, expect, it, vi } from "vitest";import { QueryClient, QueryClientProvider } from "@tanstack/react-query";import { setApiInstance } from "@multica/core/api";@@ -7,7 +7,7 @@ import type { ApiClient } from "@multica/core/api/client";import { EMPTY_INBOX_FILTERS, filterInboxItems, useInboxFilterStore, type InboxFilters } from "@multica/core/inbox/filter-store";import { archivedInboxLookupOptions, inboxKeys } from "@multica/core/inbox/queries";import { useInboxSelectionStore } from "@multica/core/inbox/selection-store";-import { onInboxInvalidate, onInboxIssueDeleted, patchInboxIssueProjection } from "@multica/core/inbox/ws-updaters";+import { onInboxIssueDeleted, patchInboxIssueProjection } from "@multica/core/inbox/ws-updaters";import type { ArchivedInboxPage } from "@multica/core/types/inbox";import type { InboxItem } from "@multica/core/types";import { InboxPage } from "./inbox-page";@@ -28,9 +28,9 @@ vi.mock("../../modals/use-limit-recovery-prompt", () => ({const detailUnmounted = vi.hoisted(() => vi.fn());vi.mock("../../issues/components/issue-detail", () => ({- IssueDetail: ({ issueId, notice }: { issueId: string; notice?: (issueActions: ReactNode) => ReactNode }) => {+ IssueDetail: ({ issueId }: { issueId: string }) => {useEffect(() => () => detailUnmounted(issueId), [issueId]);- return <div data-testid="detail">{issueId}<div data-testid="notice">{notice?.(null)}</div></div>;+ return <div data-testid="detail">{issueId}</div>;},issueHighlightMementoKey: (issueId: string) => `highlight:${issueId}`,}));@@ -417,37 +417,3 @@ it("lets the open notification go once its issue is deleted, rather than keep itexpect(replace).toHaveBeenLastCalledWith("/acme/inbox");});-it("undoes a remote snooze from the phone kept-row notice by ending the snooze", async () => {- useInboxFilterStore.setState({ filtersByWorkspace: {} });- useInboxSelectionStore.setState({ heldRows: {}, leftRowKeyByWorkspace: {} });- searchParams = new URLSearchParams("issue=issue-a");- let rows = [item({ read: true })];- const until = new Date(Date.now() + 3600000).toISOString();- const snoozed = [{ issue_id: "issue-a", item_id: "inbox-a", snoozed_until: until, snoozed_at: new Date().toISOString(), updates: 0 }];- let isSnoozed = false;- const unarchiveInbox = vi.fn(async () => item({ read: true, snoozed_until: until }));- const unsnoozeInbox = vi.fn(async () => {- rows = [item({ read: true })];- isSnoozed = false;- return { issue_id: "issue-a" };- });- setApiInstance({- listInbox: async () => rows,- listSnoozedInbox: async () => isSnoozed ? snoozed : [],- getInboxUnreadSummary: async () => [],- unarchiveInbox,- unsnoozeInbox,- } as unknown as ApiClient);- renderPage();- expect(await screen.findByTestId("detail")).toHaveTextContent("issue-a");-- // ListInboxItems excludes snoozed notifications; the separate Snoozed query knows why.- rows = [];- isSnoozed = true;- qc.setQueryData(inboxKeys.snoozed("workspace-1"), snoozed);- await act(async () => { await onInboxInvalidate(qc, "workspace-1"); });- fireEvent.click(await within(screen.getByTestId("notice")).findByRole("button", { name: "Inbox" }));- await waitFor(() => expect(unsnoozeInbox.mock.calls.length + unarchiveInbox.mock.calls.length).toBe(1));- expect(unarchiveInbox).not.toHaveBeenCalled();- expect(unsnoozeInbox).toHaveBeenCalledWith("inbox-a", { read: undefined });-});diff --git a/packages/views/inbox/components/inbox-page.test.tsx b/packages/views/inbox/components/inbox-page.test.tsxindex cb5925b907..284348c57d 100644--- a/packages/views/inbox/components/inbox-page.test.tsx+++ b/packages/views/inbox/components/inbox-page.test.tsx@@ -1,4 +1,3 @@-import type { ReactNode } from "react";import { act, fireEvent, render, screen, within } from "@testing-library/react";import { describe, expect, it, vi } from "vitest";import { toast } from "sonner";@@ -97,6 +96,8 @@ vi.mock("@multica/core/inbox/queries", () => ({deduplicateInboxItems: (items: InboxItem[]) => items.filter((i) => !i.archived),deduplicateArchivedInboxItems: (items: InboxItem[]) => items.filter((i) => i.archived),useInboxUnreadCount: () => 2,+ findSnoozedInboxIssue: (rows: Array<{ issue_id: string }> | undefined, issueId: string | null) =>+ rows?.find((row) => row.issue_id === issueId),}));// Stable spies: the auto-mark-read effect keys on the mutate identity, so a@@ -357,10 +358,10 @@ describe("InboxPage", () => {expect(issueDetailProps.at(-1)?.highlightCommentId).toBe("c1");});- it("picks the landing again when the open row is clicked again", () => {+ it("picks the landing again when the Work panel's row is clicked again", () => {reset();layout.width = DESKTOP;- searchParams = new URLSearchParams("view=archived");+ searchParams = new URLSearchParams("view=archived&issue=issue-1");listData.archived = [item({ id: "n1", archived: true, read: false, created_at: "2026-11-15T08:00:00Z", details: { comment_id: "c1" } }),item({ id: "n2", archived: true, read: false, created_at: "2026-11-15T08:02:00Z", details: { comment_id: "c2" } }),@@ -369,13 +370,12 @@ describe("InboxPage", () => {listData.archived = listData.archived.map((current) => ({ ...current, read: true }));});const { rerender } = render(<InboxPage />);- fireEvent.click(screen.getByTestId("row"));expect(issueDetailProps.at(-1)?.highlightCommentId).toBe("c1");rerender(<InboxPage />);expect(issueDetailProps.at(-1)?.highlightCommentId).toBe("c1");// Everything is read by now, so a fresh click opens at the newest comment.- fireEvent.click(screen.getByTestId("row"));+ act(() => useInboxSelectionStore.getState().requestLanding("issue-1"));expect(issueDetailProps.at(-1)?.highlightCommentId).toBe("c2");});@@ -390,16 +390,19 @@ describe("InboxPage", () => {expect(screen.getByText("Review quick-create failure")).toBeInTheDocument();});- it("replays the comment landing when re-clicking an open archived row", () => {+ it("replays the comment landing, and holds the detail's memento off, until the issue lands", () => {reset();layout.width = DESKTOP;- searchParams = new URLSearchParams("view=archived");+ searchParams = new URLSearchParams("view=archived&issue=issue-1");listData.archived = [item({ archived: true, details: { comment_id: "comment-1" } })];render(<InboxPage />);- fireEvent.click(screen.getByTestId("row"));const firstToken = issueDetailProps.at(-1)?.highlightRequestToken;- fireEvent.click(screen.getByTestId("row"));+ act(() => useInboxSelectionStore.getState().requestLanding("issue-1"));expect(issueDetailProps.at(-1)?.highlightRequestToken).not.toBe(firstToken);+ expect(issueDetailProps.at(-1)?.highlightRequestPending).toBe(true);++ act(() => (issueDetailProps.at(-1)?.onHighlightLanded as () => void)());+ expect(issueDetailProps.at(-1)?.highlightRequestPending).toBe(false);});// Only the phone's page lists notifications; on desktop the Work panel does.@@ -502,8 +505,8 @@ describe("InboxPage", () => {expect(replace).not.toHaveBeenCalled();});- // The live Inbox lives in the Work panel; the archive has nowhere else to list.- it("lists the archive in its own column on desktop", () => {+ // Every tab lists in the Work panel's Inbox section.+ it("shows no list of its own on desktop for the archive either", () => {reset();layout.width = DESKTOP;searchParams = new URLSearchParams("view=archived");@@ -511,20 +514,28 @@ describe("InboxPage", () => {const { container } = render(<InboxPage />);- expect(container.querySelector("[data-slot='list-column']")).not.toBeNull();- expect(screen.getByTestId("list").dataset.view).toBe("archived");- expect(screen.getByTestId("row").textContent).toBe("archived-1");+ expect(screen.queryByTestId("list")).toBeNull();+ expect(container.querySelector("[data-slot='list-column']")).toBeNull();});- it("keeps the title unread count static", () => {+ it("leads the detail with the way back to the open tab on desktop, and leaves it to the back control on a phone", () => {reset();- const { container } = render(<InboxPage />);- const titleCount = container.querySelector("h1")?.parentElement?.querySelector(- "number-flow-react",- ) as (HTMLElement & { animated?: boolean }) | null;+ layout.width = DESKTOP;+ searchParams = new URLSearchParams("view=archived&issue=issue-9");+ listData.archived = [item({ id: "archived-1", issue_id: "issue-9", archived: true })];+ const host = () => issueDetailProps.at(-1)?.inbox as { crumb?: { href: string }; item?: InboxItem } | undefined;+ const { unmount } = render(<InboxPage />);+ expect(host()?.crumb?.href).toBe("/acme/inbox?view=archived");+ // Archived, so the issue's own notification actions stay out of it.+ expect(host()?.item).toBeUndefined();+ unmount();- expect(titleCount?.getAttribute("aria-label")).toBe("2");- expect(titleCount?.animated).toBe(false);+ reset();+ searchParams = new URLSearchParams("issue=issue-1");+ listData.active = [item()];+ render(<InboxPage />);+ expect(host()?.crumb).toBeUndefined();+ expect(host()?.item?.id).toBe("inbox-1");});it("shows the active list by default", () => {@@ -776,39 +787,22 @@ describe("InboxPage", () => {expect(screen.getByTestId("row").textContent).toBe("archived-1");});- it("switches between the inbox and the archive from the title menu", async () => {+ it("switches between the tabs from a phone's header", () => {reset();listData.active = [item({ id: "active-1", issue_id: "issue-1" })];- const { container } = render(<InboxPage />);-- const titleMenu = container.querySelector("h1 [aria-haspopup='menu']") as HTMLElement;- fireEvent.click(titleMenu);- // The test's `useT` labels every option "Inbox", so they are located by order.- const [inboxOption, archivedOption] = await screen.findAllByRole("menuitemradio");- expect(inboxOption).toHaveAttribute("aria-checked", "true");- fireEvent.click(archivedOption!);+ listData.archived = [item({ id: "archived-1", archived: true })];+ render(<InboxPage />);+ // The test's `useT` labels every tab "Inbox", so they are located by order.+ const [inboxTab, snoozedTab, archivedTab] = screen.getAllByRole("tab");+ expect(inboxTab).toHaveAttribute("aria-selected", "true");+ fireEvent.click(archivedTab!);expect(replace).toHaveBeenLastCalledWith("/acme/inbox?view=archived");expect(screen.getByTestId("list").dataset.view).toBe("archived");- });-- it("switches to the archive from the page header title menu on desktop", async () => {- reset();- layout.width = DESKTOP;- listData.active = [];- listData.archived = [item({ id: "archived-1", archived: true })];- const { container } = render(<InboxPage />);+ fireEvent.click(snoozedTab!);+ expect(replace).toHaveBeenLastCalledWith("/acme/inbox?view=snoozed");expect(screen.queryByTestId("list")).toBeNull();- const titleMenu = container.querySelector("h1 [aria-haspopup='menu']") as HTMLElement;- expect(titleMenu).not.toBeNull();- fireEvent.click(titleMenu);- const [inboxOption, archivedOption] = await screen.findAllByRole("menuitemradio");- expect(inboxOption).toHaveAttribute("aria-checked", "true");- fireEvent.click(archivedOption!);-- expect(replace).toHaveBeenLastCalledWith("/acme/inbox?view=archived");- expect(screen.getByTestId("list").dataset.view).toBe("archived");});it("hides the batch-actions menu in the archived view", () => {@@ -816,7 +810,7 @@ describe("InboxPage", () => {// archived list would read as "archive all of these" and do the opposite.reset();listData.archived = [item({ id: "archived-1", archived: true })];- const batchMenu = ':not(h1) > [aria-haspopup="menu"]';+ const batchMenu = '[aria-haspopup="menu"]';const { container: mainView } = render(<InboxPage />);expect(mainView.querySelector(batchMenu)).not.toBeNull();@@ -1022,15 +1016,12 @@ describe("InboxPage", () => {item({ id: "inbox-a", issue_id: "issue-a" }),item({ id: "inbox-b", issue_id: "issue-b" }),];- const notice = () => (issueDetailProps.at(-1)?.notice as ((issueActions: ReactNode) => ReactNode) | undefined)?.(null);const { rerender } = render(<InboxPage />);- expect(notice()).toBeFalsy();listData.active = [item({ id: "inbox-b", issue_id: "issue-b" })];rerender(<InboxPage />);expect(screen.getByTestId("issue-detail")).toHaveTextContent("issue-a");- expect(notice()).toBeTruthy();expect(replace).not.toHaveBeenCalledWith("/acme/inbox");});@@ -1114,11 +1105,13 @@ describe("InboxPage", () => {return render(<InboxPage />);}+ // An issue's own bar takes E for its notification; the page keeps it for a+ // notification with no issue, and for the archive.function renderWithOpenItem() {reset();layout.width = DESKTOP;- searchParams = new URLSearchParams("issue=issue-a");- listData.active = [item({ id: "inbox-a", issue_id: "issue-a" })];+ searchParams = new URLSearchParams("issue=inbox-a");+ listData.active = [item({ id: "inbox-a", issue_id: null, type: "quick_create_failed" })];return render(<InboxPage />);}@@ -1158,9 +1151,9 @@ describe("InboxPage", () => {it("leaves the selection on the next notification", () => {reset();layout.width = DESKTOP;- searchParams = new URLSearchParams("issue=issue-a");+ searchParams = new URLSearchParams("issue=inbox-a");listData.active = [- item({ id: "inbox-a", issue_id: "issue-a" }),+ item({ id: "inbox-a", issue_id: null, type: "quick_create_failed" }),item({ id: "inbox-b", issue_id: "issue-b" }),];@@ -1241,6 +1234,17 @@ describe("InboxPage", () => {expect(archiveMutate).not.toHaveBeenCalled();});+ it("leaves an issue's notification to the issue's own bar", () => {+ reset();+ layout.width = DESKTOP;+ searchParams = new URLSearchParams("issue=issue-a");+ listData.active = [item({ id: "inbox-a", issue_id: "issue-a" })];+ render(<InboxPage />);+ pressArchiveKey();++ expect(archiveMutate).not.toHaveBeenCalled();+ });+it("does nothing when no notification is open", () => {renderWithActiveItem();pressArchiveKey();diff --git a/packages/views/inbox/components/inbox-page.tsx b/packages/views/inbox/components/inbox-page.tsxindex 7105305a0f..09169ad0b7 100644--- a/packages/views/inbox/components/inbox-page.tsx+++ b/packages/views/inbox/components/inbox-page.tsx@@ -9,7 +9,7 @@ import {useRef,type ReactNode,} from "react";-import { useInfiniteQuery, useQuery, useQueryClient } from "@tanstack/react-query";+import { useQuery, useQueryClient } from "@tanstack/react-query";import { useWorkspaceId } from "@multica/core/hooks";import { ApiError, errorCode } from "@multica/core/api";import { useWorkspacePaths } from "@multica/core/paths";@@ -21,16 +21,15 @@ import { inboxRowKey, nextInboxRow } from "@multica/core/inbox/open-row";import { useIssueStatuses } from "@multica/core/issue-statuses/hooks";import {inboxListOptions,- archivedInboxPagesOptions,archivedInboxLookupOptions,deduplicateInboxItems,deduplicateArchivedInboxItems,+ findSnoozedInboxIssue,useInboxUnreadCount,} from "@multica/core/inbox/queries";import {useMarkInboxRead,useMarkInboxUnread,- useUnarchiveInbox,useMarkAllInboxRead,useArchiveAllInbox,useArchiveAllReadInbox,@@ -47,10 +46,10 @@ import {useInboxFilters,useInboxFilterStore,type InboxAgentFilter,- type InboxFilterSupport,} from "@multica/core/inbox/filter-store";-import { IssueDetail, issueHighlightMementoKey } from "../../issues/components/issue-detail";+import { IssueDetail, issueHighlightMementoKey, type IssueDetailInboxHost } from "../../issues/components/issue-detail";+import { IssueInboxBar } from "../../issues/actions/issue-inbox-actions";import { ActionShortcutKeycaps } from "../../common/shortcut-keycaps";import { useRegisterCommandBarContext } from "../../search/register-context";import { IssuePeekHost } from "../../issues/components/issue-peek";@@ -66,7 +65,6 @@ import {Archive,ArchiveRestore,BookCheck,- ChevronDown,ListChecks,ArrowLeft,AlarmClock,@@ -80,22 +78,17 @@ import {TooltipTrigger,} from "@multica/ui/components/ui/tooltip";import { Skeleton } from "@multica/ui/components/ui/skeleton";-import { NumberFlow } from "@multica/ui/components/ui/number-flow";import {DropdownMenu,DropdownMenuTrigger,DropdownMenuContent,DropdownMenuItem,- DropdownMenuRadioGroup,- DropdownMenuRadioItem,DropdownMenuSeparator,} from "@multica/ui/components/ui/dropdown-menu";import { useIsCompact } from "@multica/ui/hooks/use-mobile";import { cn } from "@multica/ui/lib/utils";import { CollapsedNavTrigger, PAGE_GUTTER, PageHeader } from "../../layout/page-header";import { PanelHeader } from "../../layout/panel-nav";-import { useListColumnCollapsed } from "../../layout/app-shell-context";-import { ListColumn } from "../../layout/list-column";import { InboxDeleteDialog } from "./inbox-delete-dialog";import { useTimeAgo } from "./inbox-list-item";import { InboxList } from "./inbox-list";@@ -103,7 +96,11 @@ import { InboxFilterMenu } from "./inbox-filter-menu";import { InboxFilterChipsBar } from "./inbox-filter-options";import { InboxContextMenuProvider } from "./inbox-context-menu";import { useInboxUnsubscribable, useUnsubscribeArchive } from "./use-unsubscribe-archive";-import { ARCHIVED_VIEW_PARAM, type InboxView } from "./inbox-view";+import { inboxTabFromParam, inboxTabHref, type InboxTab, type InboxView } from "./inbox-view";+import { InboxTabs } from "./inbox-tabs";+import { InboxArchivedBar } from "./inbox-bar";+import { SnoozedInboxList } from "./snoozed-inbox-list";+import { useArchivedInboxRows, useSnoozedInboxRows } from "./use-inbox-tab-rows";import { useTypeLabels } from "./inbox-detail-label";import {getInboxDisplayTitle,@@ -125,7 +122,6 @@ import {useArchiveInboxWithUndo,useRestoreInbox,} from "./use-leave-inbox-row";-import { useInboxSnooze } from "./use-inbox-snooze";import { useInboxIssuePrefetch } from "./use-inbox-issue-prefetch";import { useInboxShortcut } from "./use-inbox-shortcut";import { InboxAppRequest } from "../../common/app-requests";@@ -145,12 +141,11 @@ export function InboxPage() {);const { searchParams, replace, push } = useNavigation();const urlIssue = searchParams.get("issue") ?? "";- const urlView: InboxView =- searchParams.get("view") === ARCHIVED_VIEW_PARAM ? "archived" : "inbox";+ const urlTab = inboxTabFromParam(searchParams.get("view"));const wsPaths = useWorkspacePaths();const [selectedKey, setSelectedKeyState] = useState(() => urlIssue);- const [view, setViewState] = useState<InboxView>(() => urlView);+ const [tab, setTabState] = useState<InboxTab>(() => urlTab);// The row the user opened under the unread filter. Opening it marks it read,// so the filter would otherwise drop the row before the detail finishes// mounting. Scoped to the selection: moving away releases it.@@ -162,16 +157,24 @@ export function InboxPage() {// it out; it only holds for the agent state it was pinned under.const pinnedAgentRef = useRef<{ key: string; agent: InboxAgentFilter } | null>(null);- // Sync from URL when searchParams change (e.g. navigation)- useEffect(() => {- setSelectedKeyState(urlIssue);- }, [urlIssue]);- useEffect(() => {- setViewState(urlView);- }, [urlView]);+ // Follow the URL when it changes (a navigation, or an issue's bar moving on+ // to the next notification) in the same render, so no effect acts on the+ // selection the URL just left.+ const [seenUrl, setSeenUrl] = useState({ issue: urlIssue, tab: urlTab });+ if (seenUrl.issue !== urlIssue || seenUrl.tab !== urlTab) {+ setSeenUrl({ issue: urlIssue, tab: urlTab });+ if (seenUrl.issue !== urlIssue) setSelectedKeyState(urlIssue);+ if (seenUrl.tab !== urlTab) setTabState(urlTab);+ }const wsId = useWorkspaceId();- const isArchivedView = view === "archived";+ const isCompact = useIsCompact();+ const isArchivedView = tab === "archived";+ // The Snoozed tab lists issues, not notifications: what it opens is the+ // issue, with the bar that says when it comes back.+ const isSnoozedView = tab === "snoozed";+ // Which list a notification row belongs to; the Snoozed tab has none.+ const view: InboxView = isArchivedView ? "archived" : "inbox";const filters = useInboxFilters(wsId);const clearFilters = useInboxFilterStore((state) => state.clearFilters);const inboxQuery = useQuery({@@ -184,28 +187,17 @@ export function InboxPage() {const items = useMemo(() => deduplicateInboxItems(rawItems), [rawItems]);// The filters read every notification of an issue, not just its newest.const activeRows = useMemo(() => rawItems.filter((item) => !item.archived), [rawItems]);- // The archive is filtered by the server, so its capability can only be- // proven by the rows those filters return. An empty answer proves nothing- // and must not flip what is sent, so only a confirmed older server — rows- // without the projection — makes its extra dimensions dormant.- const [archiveIssueFields, setArchiveIssueFields] = useState<InboxFilterSupport>("supported");- const archiveFilters = useMemo(- () => effectiveInboxFilters(filters, { priority: "supported", issueFields: archiveIssueFields, archived: true }),- [filters, archiveIssueFields],- );- const archiveQuery = useInfiniteQuery({- ...archivedInboxPagesOptions(wsId, archiveFilters), enabled: isArchivedView,- });+ const {+ query: archiveQuery,+ items: archivedItems,+ filters: archiveFilters,+ issueFieldsSupport: archiveIssueFields,+ } = useArchivedInboxRows(wsId, isArchivedView);const fetchNextArchivedPage = archiveQuery.fetchNextPage;const loadNextArchivedPage = useCallback(() => { void fetchNextArchivedPage(); }, [fetchNextArchivedPage]);const archivedLoading = archiveQuery.isLoading;const archivedError = archiveQuery.isError && !archiveQuery.data;- const archivedItems = useMemo(() => deduplicateArchivedInboxItems(- archiveQuery.data?.pages.flatMap((page) => page.items) ?? [],- ), [archiveQuery.data]);- if (archiveIssueFields !== "unsupported" && inboxIssueFieldsSupport(archivedItems) === "unsupported") {- setArchiveIssueFields("unsupported");- }+ const snoozed = useSnoozedInboxRows(wsId, isSnoozedView || isCompact);const viewItems = isArchivedView ? archivedItems : items;// The paginated endpoint guarantees the priority projection, including on// empty pages.@@ -269,12 +261,10 @@ export function InboxPage() {});const lookupItems = useMemo(() => deduplicateArchivedInboxItems(lookup.data?.items ?? []), [lookup.data]);const presenceItems = lookupMissed ? presence.data?.items ?? [] : [];- const isCompact = useIsCompact();// On desktop the live list is the Work panel's Inbox section, which applies// the filters itself. The page only opens the notification the URL names,- // as the issue page does for an issue notification, so a filter can never- // refuse to open a row the section offered.- const opensAnyLiveRow = !isCompact && !isArchivedView;+ // so a filter can never refuse to open a row the section offered.+ const opensAnyLiveRow = !isCompact && tab === "inbox";// The open notification stays in place when something other than an Inbox// action takes it out of the live list (`keepOpenInboxRow`). On desktop// that list is the Work panel section's; a phone keeps it in the page's own.@@ -286,14 +276,15 @@ export function InboxPage() {activeRows,selectedKey || null,effectiveFilters,- isCompact && !isArchivedView,+ isCompact && tab === "inbox",);// Leaving the page leaves its open row.useEffect(() => () => useInboxSelectionStore.getState().dropRow(wsId, INBOX_PAGE_LIST), [wsId]);- const keptRow = isArchivedView ? null : opensAnyLiveRow ? sectionList.kept : pageList.kept;+ const keptRow = tab !== "inbox" ? null : opensAnyLiveRow ? sectionList.kept : pageList.kept;// Left the Inbox rather than only the filters, so there is nothing left to act on.const settledRow = keptRow && keptRow.reason !== "filtered" ? keptRow : null;const selectionItems = useMemo(() => {+ if (isSnoozedView) return [];if (opensAnyLiveRow) return settledRow ? [...items, settledRow.item] : items;if (!isArchivedView) return pageList.rows;if (selectedOnPage) return filteredItems;@@ -301,14 +292,14 @@ export function InboxPage() {...filteredItems,...filterInboxItems(lookupItems, effectiveFilters, filterContext),]);- }, [opensAnyLiveRow, settledRow, items, isArchivedView, pageList.rows, selectedOnPage, filteredItems, lookupItems, effectiveFilters, filterContext]);+ }, [isSnoozedView, opensAnyLiveRow, settledRow, items, isArchivedView, pageList.rows, selectedOnPage, filteredItems, lookupItems, effectiveFilters, filterContext]);const visibleItems =isArchivedView && pinnedKey ? selectionItems : isArchivedView || opensAnyLiveRow ? filteredItems : pageList.rows;// Inbox zero: the bleeding m rises once, at the moment the last notification// leaves; opening an already-empty inbox shows it at rest. Archived and// filtered views are not inbox zero, so they never arm it.- const inboxZeroCount = isArchivedView || hasActiveFilters || liveFailed ? -1 : visibleItems.length;+ const inboxZeroCount = tab !== "inbox" || hasActiveFilters || liveFailed ? -1 : visibleItems.length;const [prevInboxZeroCount, setPrevInboxZeroCount] = useState(inboxZeroCount);const [inboxZeroRises, setInboxZeroRises] = useState(false);if (inboxZeroCount !== prevInboxZeroCount) {@@ -319,7 +310,7 @@ export function InboxPage() {const selectedInView = selectedOnPage ?? (isArchivedView? [...lookupItems, ...presenceItems].find((i) => (i.issue_id ?? i.id) === selectedKey): null);- const selectionFilteredOut = !!selectedKey && !!selectedInView && !selected;+ const selectionFilteredOut = !isSnoozedView && !!selectedKey && !!selectedInView && !selected;// What the DETAIL pane shows, one React transition behind the click.//@@ -346,34 +337,30 @@ export function InboxPage() {if (selected) useInboxSelectionStore.getState().rememberResolvedKey(wsId, selectedKey);}, [wsId, selected, selectedKey]);- // Both the view and the selection live in the URL, so every write has to- // carry the other one — a bare `?issue=` would silently drop the user out of- // the archived view on the next selection.- const buildInboxUrl = useCallback(- (nextView: InboxView, key: string) => {- const params = new URLSearchParams();- if (nextView === "archived") params.set("view", ARCHIVED_VIEW_PARAM);- if (key) params.set("issue", key);- const query = params.toString();- const inboxPath = wsPaths.inbox();- return query ? `${inboxPath}?${query}` : inboxPath;- },- [wsPaths],- );-+ // Both the tab and the selection live in the URL, so every write carries+ // the tab: a bare `?issue=` would silently drop the user out of it on the+ // next selection.const setSelectedKey = useCallback((key: string) => {setSelectedKeyState(key);- replace(buildInboxUrl(view, key));- }, [replace, buildInboxUrl, view]);+ replace(inboxTabHref(wsPaths, tab, key));+ }, [replace, wsPaths, tab]);- // Switching views always clears the selection: the two lists are mutually+ // Switching tabs always clears the selection: the lists are mutually// exclusive, so a key carried across would never resolve, and the fallback// effect below would bounce the user to the issue page.- const setView = useCallback((nextView: InboxView) => {- setViewState(nextView);+ const setTab = useCallback((nextTab: InboxTab) => {+ setTabState(nextTab);setSelectedKeyState("");- replace(buildInboxUrl(nextView, ""));- }, [replace, buildInboxUrl]);+ replace(inboxTabHref(wsPaths, nextTab));+ }, [replace, wsPaths]);++ // A snoozed issue that is back in the Inbox (brought back, or its time came)+ // opens there. Until the Inbox lists it, it stays open here.+ const snoozedOpen = isSnoozedView && !!findSnoozedInboxIssue(snoozed.rows, selectedKey);+ const backInInbox = isSnoozedView && !!selectedKey && !snoozedOpen && items.some((item) => inboxRowKey(item) === selectedKey);+ useEffect(() => {+ if (backInInbox) replace(inboxTabHref(wsPaths, "inbox", selectedKey));+ }, [backInInbox, replace, wsPaths, selectedKey]);// Applying a filter can remove the open row from the list. Clear that local// selection instead of treating it as a broken deep link and redirecting to@@ -385,8 +372,12 @@ export function InboxPage() {// A targeted lookup must not hide pages that have already loaded. Its// pending/error states only block resolution of the off-page selection.// A list that failed and is being tried again keeps its error, not a skeleton.- const viewLoading = isArchivedView ? archivedLoading : loading && !liveFailed;- const viewError = isArchivedView ? archivedError : liveFailed;+ const viewLoading = isArchivedView+ ? archivedLoading+ : isSnoozedView+ ? snoozed.load === "loading"+ : loading && !liveFailed;+ const viewError = isArchivedView ? archivedError : isSnoozedView ? snoozed.load === "failed" : liveFailed;const needsLookup = isArchivedView && !!selectedKey && !selectedOnPage;const lookupLoading = needsLookup && (lookup.isLoading || presence.isLoading);const lookupError = needsLookup && (lookup.isError || presence.isError) && !selected;@@ -398,16 +389,21 @@ export function InboxPage() {// and `onInboxIssueDeleted` pruned the cache), the issue detail would 404// too — clear the selection and stay on /inbox instead.useEffect(() => {+ if (isSnoozedView) return;if (viewLoading || viewError || lookupLoading || lookupError) return;if (!selectedKey) return;if (selected) return;if (selectionFilteredOut) return;- if (useInboxSelectionStore.getState().lastResolvedKeyByWorkspace[wsId] === selectedKey) {+ const store = useInboxSelectionStore.getState();+ // An Inbox action that took the open row opens what comes next itself.+ if (store.leftRowKeyByWorkspace[wsId] === selectedKey) return;+ if (store.lastResolvedKeyByWorkspace[wsId] === selectedKey) {setSelectedKey("");return;}replace(wsPaths.issueDetail(cachedIssueRouteRef(queryClient, wsId, selectedKey)));}, [+ isSnoozedView,viewLoading,viewError,lookupLoading,@@ -422,10 +418,6 @@ export function InboxPage() {setSelectedKey,]);- const listCollapsed = useListColumnCollapsed();- // Desktop shows the live Inbox in the Work panel; only the archive needs- // a list of its own on the page.- const archiveSplit = !isCompact && isArchivedView;const unreadCount = useInboxUnreadCount(wsId);const markReadMutation = useMarkInboxRead();@@ -434,10 +426,8 @@ export function InboxPage() {const archiveWithUndo = useArchiveInboxWithUndo();const archiveBatchWithUndo = useArchiveInboxBatchWithUndo();const restoreInbox = useRestoreInbox();- const { unsnooze } = useInboxSnooze();const keptText = useKeptInboxRowText(wsId);const { categoryOf } = useIssueStatuses(wsId);- const unarchiveMutation = useUnarchiveInbox();const markAllReadMutation = useMarkAllInboxRead();const archiveAllMutation = useArchiveAllInbox();const archiveAllReadMutation = useArchiveAllReadInbox();@@ -530,6 +520,17 @@ export function InboxPage() {// remount. Selection changes don't need it — they remount the detail (key// by issue) and a fresh mount with a cleared memento entry lands by itself.const [highlightRequestToken, setHighlightRequestToken] = useState(0);+ // A Work panel row clicked again for the notification already open asks+ // for the landing through the store; the page neither remounts the detail+ // nor sees a new URL.+ const landingRequest = useInboxSelectionStore((s) => s.landing);+ const completeLanding = useInboxSelectionStore((s) => s.completeLanding);+ const selectedIssueId = selected?.issue_id ?? null;+ const [answeredLanding, setAnsweredLanding] = useState(landingRequest?.token ?? 0);+ if (landingRequest && landingRequest.token !== answeredLanding && landingRequest.issueId === selectedIssueId) {+ setAnsweredLanding(landingRequest.token);+ setHighlightRequestToken((token) => token + 1);+ }const handleSelect = (item: InboxItem) => {const nextKey = item.issue_id ?? item.id;// Every click on a notification row is a fresh deep-link intent: clear@@ -667,28 +668,23 @@ export function InboxPage() {const handleUnarchive = (id: string) => {advanceSelectionPast(id, listedItems);- unarchiveMutation.mutate(id, {- onSuccess: () => toast.success(t(($) => $.toasts.unarchived)),- onError: (err) =>- toast.error(- err instanceof Error && err.message- ? err.message- : t(($) => $.errors.unarchive_failed),- ),- });+ void restoreInbox(id);};+ // An issue's bar (`IssueInboxBar`) says, and moves on, when its row left+ // the Inbox on its own; the page does for a notification without an issue.+ const settledNotice = settledRow && !settledRow.item.issue_id ? settledRow : null;const settledCause = useMoveOnAfterAutoArchive({- settled: settledRow,- next: settledRow ? nextInboxRow(listedItems, settledRow.key) : null,+ settled: settledNotice,+ next: settledNotice ? nextInboxRow(listedItems, settledNotice.key) : null,onNext: () => {- if (!settledRow) return;- advanceSelectionPast(settledRow.item.id, listedItems, {+ if (!settledNotice) return;+ advanceSelectionPast(settledNotice.item.id, listedItems, {kind: "archived",- itemId: settledRow.item.id,- key: settledRow.key,- label: clearedLabelForItem(settledRow.item),- href: inboxRowHref(wsPaths, settledRow.item),+ itemId: settledNotice.item.id,+ key: settledNotice.key,+ label: clearedLabelForItem(settledNotice.item),+ href: inboxRowHref(wsPaths, settledNotice.item),clearedAt: Date.now(),});},@@ -712,9 +708,12 @@ export function InboxPage() {unsubscribeArchive({ id, issueId: item.issue_id }, scope);};+ // An open issue's E belongs to its bar (`IssueInboxBar`).useInboxShortcut("archiveInboxItem",- selected ? () => (isArchivedView ? handleUnarchive(selected.id) : handleArchive(selected.id)) : null,+ selected && (isArchivedView || !selected.issue_id)+ ? () => (isArchivedView ? handleUnarchive(selected.id) : handleArchive(selected.id))+ : null,);// Batch operations@@ -782,70 +781,42 @@ export function InboxPage() {// -- Shared sub-components --------------------------------------------------- // The archive is a second list of the same page, so the title doubles as- // the switch between the two instead of costing a row of its own. Reused in- // the desktop empty-detail header so collapsed-list layouts keep the same- // switcher.- const viewSwitcher = (- <DropdownMenu>- <DropdownMenuTrigger className="-ml-1.5 mr-1.5 flex min-w-0 items-center gap-1 rounded-md px-1.5 py-0.5 outline-none transition-colors hover:bg-accent/60 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring aria-expanded:bg-accent/60">- <span className="min-w-0 truncate">- {isArchivedView ? t(($) => $.list.archived_title) : t(($) => $.page.title)}- </span>- <ChevronDown className="size-3.5 shrink-0 text-muted-foreground" />- </DropdownMenuTrigger>- <DropdownMenuContent align="start" className="w-auto min-w-44">- <DropdownMenuRadioGroup- value={view}- onValueChange={(value) => setView(value as InboxView)}- >- <DropdownMenuRadioItem value="inbox">- <Inbox className="h-4 w-4" />- <span className="flex-1">{t(($) => $.page.title)}</span>- {unreadCount > 0 && (- <span className="text-caption tabular-nums text-muted-foreground">- {unreadCount}- </span>- )}- </DropdownMenuRadioItem>- <DropdownMenuRadioItem value="archived">- <Archive className="h-4 w-4" />- {t(($) => $.list.archived_title)}- </DropdownMenuRadioItem>- </DropdownMenuRadioGroup>- </DropdownMenuContent>- </DropdownMenu>- );+ const tabLabel = {+ inbox: t(($) => $.page.title),+ snoozed: t(($) => $.list.snoozed_title),+ archived: t(($) => $.list.archived_title),+ }[tab];+ // A phone's list header: the Inbox's tabs, as the Work panel's section has them.const listHeader = (<PanelHeaderas="h1"- title={viewSwitcher}- leading={<CollapsedNavTrigger />}- meta={- !isArchivedView && unreadCount > 0 && (- <NumberFlow- value={unreadCount}- animated={false}- format={{ maximumFractionDigits: 0 }}- aria-label={String(unreadCount)}- className="text-caption text-muted-foreground"- />- )+ title={+ <InboxTabs+ tab={tab}+ onSelect={setTab}+ unread={unreadCount}+ snoozed={snoozed.rows.length}+ size="page"+ className="text-body font-medium"+ />}+ leading={<CollapsedNavTrigger />}>- <InboxFilterMenu- wsId={wsId}- items={filterRows}- priorityFilterSupport={priorityFilterSupport}- issueFieldsSupport={issueFieldsSupport}- activeIssueIds={activeIssueIds}- archived={isArchivedView}- />- {/* Batch actions are main-view only. Every entry archives from the MAIN- inbox, so offering them while the archived list is on screen reads as- "archive all of these" and does the opposite of what it looks like. */}- {!isArchivedView && (+ {!isSnoozedView && (+ <InboxFilterMenu+ wsId={wsId}+ items={filterRows}+ priorityFilterSupport={priorityFilterSupport}+ issueFieldsSupport={issueFieldsSupport}+ activeIssueIds={activeIssueIds}+ archived={isArchivedView}+ />+ )}+ {/* Batch actions are the live Inbox's only. Every entry archives from it,+ so offering them while another list is on screen reads as "archive+ all of these" and does the opposite of what it looks like. */}+ {tab === "inbox" && (<DropdownMenu><DropdownMenuTriggerrender={@@ -892,7 +863,21 @@ export function InboxPage() {/>);- const list = isArchivedView && archivedError ? (+ const list = isSnoozedView ? (+ snoozed.load === "failed" ? (+ <div className="flex-1 min-h-0 overflow-y-auto">+ <LoadFailed+ icon={<AlarmClock className="mb-3 h-8 w-8 text-faint-foreground" />}+ message={t(($) => $.errors.load_failed)}+ retryLabel={t(($) => $.list.retry)}+ retrying={snoozed.retrying}+ onRetry={snoozed.retry}+ />+ </div>+ ) : (+ <SnoozedInboxList wsId={wsId} rows={snoozed.rows} selectedKey={selectedKey} onSelect={setSelectedKey} />+ )+ ) : isArchivedView && archivedError ? (<div className="flex-1 min-h-0 overflow-y-auto"><LoadFailedicon={<Archive className="mb-3 h-8 w-8 text-faint-foreground" />}@@ -960,7 +945,7 @@ export function InboxPage() {const listPanel = (<>{listHeader}- <InboxFilterChipsBar wsId={wsId} filters={effectiveFilters} />+ {!isSnoozedView && <InboxFilterChipsBar wsId={wsId} filters={effectiveFilters} />}{lookupLoading && (<p role="status" className="shrink-0 border-b px-3 py-2 text-caption text-muted-foreground">{t(($) => $.list.loading_selection)}@@ -997,7 +982,7 @@ export function InboxPage() {<ArrowLeft className="h-4 w-4" />{/* Back goes to the list the user came FROM, so the label has toname it — "Inbox" here would be a lie about the destination. */}- {isArchivedView ? t(($) => $.list.archived_title) : t(($) => $.page.back)}+ {tab === "inbox" ? t(($) => $.page.back) : tabLabel}</Button>) : undefined;@@ -1007,31 +992,52 @@ export function InboxPage() {</div>) : null;- // The open notification left the Inbox on its own: say so above it, with- // the issue's actions once archived, the way back and the way on.- const keptNotice = (issueActions?: ReactNode) =>- settledRow && detailItem && inboxRowKey(detailItem) === settledRow.key ? (+ // A notification without an issue that left the Inbox on its own: say so+ // above it, with the way back and the way on. An issue's bar does this for+ // an issue's notification.+ const keptNotice =+ settledNotice && detailItem && inboxRowKey(detailItem) === settledNotice.key ? (<InboxKeptActions- label={keptText.notice(settledRow, settledCause)}- icon={settledRow.reason === "snoozed" ? <AlarmClock /> : undefined}- issueActions={settledRow.reason === "archived" ? issueActions : undefined}- onUndo={() =>- settledRow.reason === "snoozed"- ? unsnooze(settledRow.item.id, settledRow.key)- : void restoreInbox(settledRow.item.id, { quiet: true })- }- next={nextInboxRow(listedItems, settledRow.key)}- onNext={() => advanceSelectionPast(settledRow.item.id, listedItems)}+ label={keptText.notice(settledNotice, settledCause)}+ onUndo={() => void restoreInbox(settledNotice.item.id, { quiet: true })}+ next={nextInboxRow(listedItems, settledNotice.key)}+ onNext={() => advanceSelectionPast(settledNotice.item.id, listedItems)}/>) : null;- const detailContent = detailItem?.issue_id ? (+ // The issue the detail shows: the open notification's, or on the Snoozed+ // tab the snoozed issue itself.+ const detailIssueId = isSnoozedView ? detailKey || null : (detailItem?.issue_id ?? null);+ const inboxHost = (issueId: string): IssueDetailInboxHost => ({+ // A phone's back control already names the list.+ crumb: isCompact+ ? undefined+ : {+ href: inboxTabHref(wsPaths, tab),+ className: "flex min-w-0 items-center gap-1",+ label: (+ <>+ <Inbox className="size-3.5 shrink-0" />+ <span className="truncate">{t(($) => $.page.title)}</span>+ </>+ ),+ },+ item: tab === "inbox" ? (detailItem ?? undefined) : undefined,+ bar: (issueActions) =>+ isArchivedView && detailItem ? (+ <InboxArchivedBar item={detailItem} onRestore={() => handleUnarchive(detailItem.id)} />+ ) : (+ <IssueInboxBar issueId={issueId} issueActions={issueActions} movingOn={detailSwapping} />+ ),+ });++ const detailContent = detailIssueId ? (// Key by issue_id (not inbox-item id): a new comment/reaction generates a// new inbox notification for the same issue, and the dedup helper picks the// newest one — keying on its id would remount IssueDetail on every event,// wiping the comment composer draft and resetting scroll position.<ErrorBoundary- resetKeys={[detailItem.issue_id]}+ resetKeys={[detailIssueId]}// The default fallback is a bare message card. On a phone it would be the// only thing on screen, so it has to carry the way back too — the bar is// the point here, the message is whatever the boundary caught.@@ -1045,25 +1051,30 @@ export function InboxPage() {) : undefined}>{/* Shift+Click on an issue mention peeks it over the detail pane. */}- <IssuePeekHost key={detailItem.issue_id}>+ <IssuePeekHost key={detailIssueId}><IssueDetail- key={detailItem.issue_id}- issueId={detailItem.issue_id}+ key={detailIssueId}+ issueId={detailIssueId}defaultSidebarOpen={false}layoutId="multica_inbox_issue_detail_layout"highlightCommentId={landingCommentId}highlightRequestToken={highlightRequestToken}+ // A row clicked on another page could not clear this page's record+ // that it already landed there.+ highlightRequestPending={+ !!landingRequest && !landingRequest.landed && landingRequest.issueId === detailIssueId+ }+ onHighlightLanded={() => {+ if (landingRequest) completeLanding(landingRequest.token);+ }}highlightAppRequestId={- detailItem.type.startsWith("app_") ? (detailItem.details?.request_id ?? undefined) : undefined+ detailItem?.type.startsWith("app_") ? (detailItem.details?.request_id ?? undefined) : undefined}// The inbox reads the row it selected itself (see the auto-read// effect above), and must keep a row marked unread while it is open.readsInbox={false}- // The archive's list header already has a nav trigger. Explicit- // false suppresses the detail header's fallback trigger, which is- // the way back once the list column is collapsed.- leadingAction={compactBackAction ?? (archiveSplit && !listCollapsed ? false : undefined)}- notice={keptNotice}+ leadingAction={compactBackAction}+ inbox={inboxHost(detailIssueId)}onDelete={() => {// Issue deletion CASCADE-deletes the inbox item server-side, and the// issue:deleted WS event prunes it from the inbox cache. Just clear@@ -1071,20 +1082,12 @@ export function InboxPage() {// longer exists.setSelectedKey("");}}- onArchive={() => {- handleArchive(detailItem.id);- }}- onUnsubscribeArchive={- isArchivedView ? undefined : (scope) => handleUnsubscribeArchive(detailItem.id, scope)- }- // The archive lists notifications already dealt with: no bar.- inboxItem={isArchivedView ? undefined : detailItem}/></IssuePeekHost></ErrorBoundary>) : detailItem ? (<>- {keptNotice()}+ {keptNotice}<div className="p-6"><h2 className="text-title font-semibold">{isAutopilotQuotaNotice(detailItem.type)@@ -1262,7 +1265,7 @@ export function InboxPage() {// of selection get their chrome from different places, so they render// differently — `InboxItem.issue_id` is nullable and a null one is a plain// notification (a failed quick-create, say), not an issue.- if (detailItem?.issue_id) {+ if (detailIssueId) {// No scroll container and no back bar of our own: `IssueDetail` owns// both, and takes the way back through `leadingAction`. Wrapping it in// an `overflow-y-auto` used to collapse its inner scroller to content@@ -1290,32 +1293,27 @@ export function InboxPage() {}// -- Desktop layout ----------------------------------------------------------- // The live list is the Inbox section of the Work panel beside this page, so- // the page shows only the detail. The archive keeps its own list column.+ // Every list is the Inbox section of the Work panel beside this page, so the+ // page shows only the detail.const handleClearFiltersAndContinue = () => {clearFilters(wsId);const first = items[0];- if (!isCompact && first) {- if (first.issue_id) useInboxSelectionStore.getState().rememberSidebarIssue(wsId, first.issue_id);- push?.(inboxRowHref(wsPaths, first));- }+ if (!isCompact && first) push?.(inboxRowHref(wsPaths, first));};const emptyDetail = (<>- {(!archiveSplit || listCollapsed) && (- <PageHeader>- <h1 className="text-body font-semibold">{viewSwitcher}</h1>- </PageHeader>- )}+ <PageHeader>+ <h1 className="text-body font-semibold">{tabLabel}</h1>+ </PageHeader>{liveFailed ? (<div className="flex min-h-0 flex-1 flex-col justify-center">{liveLoadFailed}</div>) : (<InboxEmptyStatewsId={wsId}- isArchivedView={isArchivedView}- visibleCount={visibleItems.length}+ tab={tab}+ visibleCount={isSnoozedView ? snoozed.rows.length : visibleItems.length}totalActiveCount={items.length}hasActiveFilters={hasActiveFilters}inboxZeroRises={inboxZeroRises}@@ -1326,38 +1324,6 @@ export function InboxPage() {</>);- if (archiveSplit) {- return (- <div className="flex min-h-0 flex-1">- <ListColumn collapsed={listCollapsed} width="list">- {viewLoading ? (- <>- <div className="flex h-12 shrink-0 items-center pl-5 pr-2.5">- <Skeleton className="h-5 w-16" />- </div>- <div className="flex-1 min-h-0 overflow-y-auto space-y-1 p-2">- {Array.from({ length: 5 }).map((_, i) => (- <div key={i} className="flex items-center gap-3 px-2 py-2.5">- <Skeleton className="h-7 w-7 shrink-0 rounded-full" />- <div className="flex-1 space-y-2">- <Skeleton className="h-4 w-3/4" />- <Skeleton className="h-3 w-1/2" />- </div>- </div>- ))}- </div>- </>- ) : (- listPanel- )}- </ListColumn>- <div className="flex h-full min-h-0 min-w-0 flex-1 flex-col">- {viewLoading ? null : (detailContent ?? emptyDetail)}- </div>- </div>- );- }-if (viewLoading) {return (<div className="min-w-0 flex-1 p-6">diff --git a/packages/views/inbox/components/inbox-tabs.tsx b/packages/views/inbox/components/inbox-tabs.tsxnew file mode 100644index 0000000000..30f7e086f5--- /dev/null+++ b/packages/views/inbox/components/inbox-tabs.tsx@@ -0,0 +1,87 @@+"use client";++import type { KeyboardEvent } from "react";+import { cn } from "@multica/ui/lib/utils";+import { useT } from "../../i18n";+import type { InboxTab } from "./inbox-view";++const TABS: readonly InboxTab[] = ["inbox", "snoozed", "archived"];++/**+ * The Inbox's three lists as tabs: the live Inbox with its unread count, the+ * issues snoozed out of it with theirs, and the archive. The Work panel's+ * Inbox section shows them in its header; a phone's Inbox page, in its own.+ */+export function InboxTabs({+ tab,+ onSelect,+ unread,+ snoozed,+ size = "section",+ className,+}: {+ tab: InboxTab;+ onSelect: (tab: InboxTab) => void;+ /** Left out (or 0) to show no count. */+ unread?: number;+ snoozed?: number;+ /** `section` for the Work panel's header, `page` for a page header. */+ size?: "section" | "page";+ className?: string;+}) {+ const { t } = useT("inbox");+ const labels: Record<InboxTab, string> = {+ inbox: t(($) => $.page.title),+ snoozed: t(($) => $.list.snoozed_title),+ archived: t(($) => $.list.archived_title),+ };+ const counts: Partial<Record<InboxTab, number>> = { inbox: unread, snoozed };+ // Arrow keys move between the tabs, as a tab list's do.+ const onKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {+ if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") return;+ event.preventDefault();+ const at = TABS.indexOf(tab) + (event.key === "ArrowRight" ? 1 : -1);+ const next = TABS[(at + TABS.length) % TABS.length]!;+ onSelect(next);+ event.currentTarget.querySelector<HTMLElement>(`[data-inbox-tab="${next}"]`)?.focus();+ };++ return (+ <div+ role="tablist"+ aria-label={labels.inbox}+ onKeyDown={onKeyDown}+ className={cn("flex min-w-0 items-center gap-0.5", size === "section" ? "-ml-1.5" : "-ml-2", className)}+ >+ {TABS.map((id) => {+ const active = id === tab;+ const count = counts[id] ?? 0;+ return (+ <button+ key={id}+ type="button"+ role="tab"+ data-inbox-tab={id}+ aria-selected={active}+ tabIndex={active ? 0 : -1}+ onClick={() => onSelect(id)}+ className={cn(+ // Long labels (French, Russian) truncate rather than push the+ // section's actions out of the header.+ "flex min-w-0 items-center gap-1 rounded-md outline-none transition-colors focus-visible:outline-2 focus-visible:outline-ring",+ size === "section" ? "h-5 px-1.5" : "h-7 px-2",+ active ? "bg-surface-selected text-foreground" : "text-muted-foreground hover:text-foreground",+ )}+ >+ <span className="truncate">{labels[id]}</span>+ {count > 0 && (+ <span className={cn("shrink-0 tabular-nums", id === "inbox" ? "text-brand" : "text-faint-foreground")}>+ {count}+ </span>+ )}+ </button>+ );+ })}+ </div>+ );+}diff --git a/packages/views/inbox/components/inbox-view.ts b/packages/views/inbox/components/inbox-view.tsindex a8d729c666..6f79fef018 100644--- a/packages/views/inbox/components/inbox-view.ts+++ b/packages/views/inbox/components/inbox-view.ts@@ -1,15 +1,38 @@+import type { InboxTab } from "@multica/core/inbox/selection-store";+import type { WorkspacePaths } from "@multica/core/paths";++export type { InboxTab };+/**- * Which of the inbox's two lists is showing.- *- * "inbox" is the default list of active notifications; "archived" is the- * sub-view reached from the entry at the bottom of that list. The two are- * mutually exclusive per issue — the server decides which list an issue- * belongs to (see ListArchivedInboxItems) — so a view is a complete swap of- * the list's data source and row action, not a filter layered on one list.+ * Which list a notification row belongs to: the live Inbox or the archive.*- * Persisted in the URL as `?view=archived` so a refresh, a back/forward step,- * or a mobile detail-back returns to the list the user was actually in.+ * The two are mutually exclusive per issue — the server decides which list+ * an issue belongs to (see ListArchivedInboxItems) — so a view is a complete+ * swap of the list's data source and row action, not a filter layered on one+ * list.*/export type InboxView = "inbox" | "archived";export const ARCHIVED_VIEW_PARAM = "archived";+export const SNOOZED_VIEW_PARAM = "snoozed";++/**+ * The Inbox page's tab, from its `?view=`. The URL carries it so a refresh, a+ * back/forward step, or a phone's detail-back returns to the tab the user was+ * actually in.+ */+export function inboxTabFromParam(view: string | null): InboxTab {+ return view === ARCHIVED_VIEW_PARAM ? "archived" : view === SNOOZED_VIEW_PARAM ? "snoozed" : "inbox";+}++/**+ * The Inbox page on `tab`, with `key` open: a notification's row key+ * (`issue_id ?? id`), or nothing for the tab's list.+ */+export function inboxTabHref(p: WorkspacePaths, tab: InboxTab, key?: string | null): string {+ const params = new URLSearchParams();+ if (tab !== "inbox") params.set("view", tab);+ if (key) params.set("issue", key);+ const query = params.toString();+ return query ? `${p.inbox()}?${query}` : p.inbox();+}diff --git a/packages/views/inbox/components/snoozed-inbox-list.tsx b/packages/views/inbox/components/snoozed-inbox-list.tsxnew file mode 100644index 0000000000..8ac69c33ca--- /dev/null+++ b/packages/views/inbox/components/snoozed-inbox-list.tsx@@ -0,0 +1,113 @@+"use client";++import { useQuery } from "@tanstack/react-query";+import { AlarmClock } from "@multica/ui/icons";+import { Skeleton } from "@multica/ui/components/ui/skeleton";+import { cn } from "@multica/ui/lib/utils";+import { issueDetailOptions } from "@multica/core/issues/queries";+import { useIssueStatuses } from "@multica/core/issue-statuses/hooks";+import type { SnoozedInboxIssue } from "@multica/core/types";+import { StatusIcon } from "../../issues/components";+import { useLocale, useT } from "../../i18n";+import { formatSnoozeTime } from "./inbox-snooze-time";++/**+ * The Snoozed tab on a phone's Inbox page: each snoozed issue and when it+ * comes back, soonest first. Opening one leaves it snoozed and unread.+ */+export function SnoozedInboxList({+ wsId,+ rows,+ selectedKey,+ onSelect,+}: {+ wsId: string;+ rows: readonly SnoozedInboxIssue[];+ selectedKey: string;+ onSelect: (issueId: string) => void;+}) {+ const { t } = useT("inbox");+ if (rows.length === 0) {+ return (+ <div className="flex flex-1 flex-col items-center justify-center px-6 py-16 text-center text-muted-foreground">+ <AlarmClock className="mb-3 h-8 w-8 text-faint-foreground" />+ <p className="text-body">{t(($) => $.snooze.view_empty)}</p>+ <p className="mt-1 text-caption">{t(($) => $.snooze.view_empty_description)}</p>+ </div>+ );+ }+ return (+ <ul className="flex-1 min-h-0 overflow-y-auto space-y-px p-2">+ {rows.map((entry) => (+ <li key={entry.issue_id}>+ <SnoozedInboxRow+ wsId={wsId}+ entry={entry}+ selected={entry.issue_id === selectedKey}+ onSelect={() => onSelect(entry.issue_id)}+ />+ </li>+ ))}+ </ul>+ );+}++function SnoozedInboxRow({+ wsId,+ entry,+ selected,+ onSelect,+}: {+ wsId: string;+ entry: SnoozedInboxIssue;+ selected: boolean;+ onSelect: () => void;+}) {+ const { t } = useT("inbox");+ const locale = useLocale();+ const { data: issue } = useQuery(issueDetailOptions(wsId, entry.issue_id));+ const { categoryOf, colorOf, iconOf } = useIssueStatuses(wsId);+ const backAt = t(($) => $.snooze.back_at, { time: formatSnoozeTime(new Date(entry.snoozed_until), new Date(), locale) });+ return (+ <button+ type="button"+ aria-current={selected ? "true" : undefined}+ onClick={onSelect}+ className={cn(+ "flex w-full items-center gap-2.5 rounded-md px-2 py-2.5 text-left outline-none transition-colors focus-visible:ring-1 focus-visible:ring-ring",+ selected ? "bg-accent" : "hover:bg-accent/50",+ )}+ >+ <span className="flex size-7 shrink-0 items-center justify-center">+ {issue ? (+ <StatusIcon+ status={issue.status}+ category={categoryOf(issue.status)}+ color={colorOf(issue.status)}+ icon={iconOf(issue.status)}+ className="size-4"+ />+ ) : (+ <Skeleton className="size-4 rounded-full" />+ )}+ </span>+ <span className="min-w-0 flex-1">+ {issue ? (+ <span className="flex min-w-0 items-center gap-2">+ <span className="truncate text-body">{issue.title}</span>+ <span className="shrink-0 text-caption tabular-nums text-muted-foreground">{issue.identifier}</span>+ </span>+ ) : (+ <Skeleton className="h-4 w-3/4" />+ )}+ <span className="mt-0.5 flex min-w-0 items-center gap-1.5 text-caption text-muted-foreground">+ <AlarmClock aria-hidden className="size-3 shrink-0" />+ <span className="truncate">+ {backAt}+ {entry.updates > 0 && ` · ${t(($) => $.snooze.updates, { count: entry.updates })}`}+ </span>+ </span>+ </span>+ </button>+ );+}diff --git a/packages/views/inbox/components/snoozed-inbox-page.test.tsx b/packages/views/inbox/components/snoozed-inbox-page.test.tsxdeleted file mode 100644index 07ae68b2c1..0000000000--- a/packages/views/inbox/components/snoozed-inbox-page.test.tsx+++ /dev/null@@ -1,150 +0,0 @@-import { act, fireEvent, screen, waitFor } from "@testing-library/react";-import { QueryClient, QueryClientProvider } from "@tanstack/react-query";-import { beforeEach, describe, expect, it, vi } from "vitest";-import { ApiError } from "@multica/core/api/client";-import { snoozedInboxOptions } from "@multica/core/inbox/queries";-import { issueDetailOptions } from "@multica/core/issues/queries";-import type { Issue, SnoozedInboxIssue } from "@multica/core/types";-import { renderWithI18n } from "../../test/i18n";-import { NavigationProvider, type NavigationAdapter } from "../../navigation";-import { SnoozedInboxPage } from "./snoozed-inbox-page";--const state = vi.hoisted(() => ({- listSnoozed: vi.fn<() => Promise<SnoozedInboxIssue[]>>(),- snooze: vi.fn(() => Promise.resolve()),- unsnooze: vi.fn(() => Promise.resolve()),-}));--vi.mock("sonner", () => ({ toast: { success: vi.fn(), error: vi.fn() } }));-vi.mock("@multica/core/api", async (importOriginal) => {- const actual = await importOriginal<typeof import("@multica/core/api")>();- return { ...actual, api: { ...actual.api, listSnoozedInbox: state.listSnoozed } };-});-vi.mock("@multica/core/hooks", async (importOriginal) => ({- ...(await importOriginal<typeof import("@multica/core/hooks")>()),- useWorkspaceId: () => "ws-1",-}));-vi.mock("@multica/core/paths", async (importOriginal) => {- const actual = await importOriginal<typeof import("@multica/core/paths")>();- return { ...actual, useWorkspacePaths: () => actual.paths.workspace("acme") };-});-vi.mock("@multica/core/inbox/mutations", () => ({- useSnoozeInbox: () => ({ mutateAsync: state.snooze }),- useUnsnoozeInbox: () => ({ mutateAsync: state.unsnooze }),- cachedInboxSnoozedUntil: () => null,-}));--const HOUR = 60 * 60 * 1000;--function entry(issueId: string, until: Date, updates = 0): SnoozedInboxIssue {- return {- issue_id: issueId,- item_id: `item-${issueId}`,- snoozed_until: until.toISOString(),- snoozed_at: new Date(Date.now() - HOUR).toISOString(),- updates,- };-}--function renderPage(snoozed?: SnoozedInboxIssue[]) {- const client = new QueryClient({ defaultOptions: { queries: { retry: false, staleTime: Infinity } } });- if (snoozed !== undefined) client.setQueryData(snoozedInboxOptions("ws-1").queryKey, snoozed);- for (const { issue_id } of snoozed ?? []) {- client.setQueryData(issueDetailOptions("ws-1", issue_id).queryKey, {- id: issue_id,- identifier: `MUL-${issue_id.slice(-1)}`,- title: `Issue ${issue_id}`,- status: "todo",- } as Issue);- }- const nav: NavigationAdapter = {- push: vi.fn(),- replace: vi.fn(),- back: vi.fn(),- pathname: "/acme/issues",- searchParams: new URLSearchParams("view=snoozed"),- hash: "",- getShareableUrl: (path) => path,- };- renderWithI18n(- <QueryClientProvider client={client}>- <NavigationProvider value={nav}>- <SnoozedInboxPage />- </NavigationProvider>- </QueryClientProvider>,- );- return { client, nav };-}--beforeEach(() => {- state.listSnoozed.mockReset();- state.snooze.mockClear();- state.unsnooze.mockClear();-});--describe("SnoozedInboxPage", () => {- it("lists snoozed issues by the day they come back, with what arrived meanwhile", () => {- const now = Date.now();- renderPage([entry("issue-1", new Date(now + HOUR), 3), entry("issue-2", new Date(now + 3 * 24 * HOUR))]);-- expect(screen.getByRole("heading", { level: 1, name: "Snoozed" })).toBeInTheDocument();- expect(screen.getByText("Issue issue-1")).toBeInTheDocument();- expect(screen.getByText("Issue issue-2")).toBeInTheDocument();- expect(screen.getByText("3 updates while snoozed")).toBeInTheDocument();- });-- it("brings an issue back now", () => {- renderPage([entry("issue-1", new Date(Date.now() + HOUR))]);- fireEvent.click(screen.getByRole("button", { name: /Bring back now/ }));- expect(state.unsnooze).toHaveBeenCalledWith({ id: "item-issue-1" });- });-- // A UUID address is rewritten to the identifier once the issue loads, which- // mounts the issue page a second time on web.- it("opens an issue at its identifier", () => {- const { nav } = renderPage([{ ...entry("issue-1", new Date(Date.now() + HOUR)), issue_identifier: "MUL-41" }]);- fireEvent.click(screen.getByText("Issue issue-1"));- expect(nav.push).toHaveBeenCalledWith("/acme/issues/MUL-41");- });-- it("takes the identifier from the loaded issue when the server sent none", () => {- const { nav } = renderPage([entry("issue-2", new Date(Date.now() + HOUR))]);- fireEvent.click(screen.getByText("Issue issue-2"));- expect(nav.push).toHaveBeenCalledWith("/acme/issues/MUL-2");- });-- it("says when nothing is snoozed", () => {- renderPage([]);- expect(screen.getByText("Nothing snoozed")).toBeInTheDocument();- });-- it("lets the viewer retry a failed load before showing the empty state", async () => {- let completeRetry!: (issues: SnoozedInboxIssue[]) => void;- const pendingRetry = new Promise<SnoozedInboxIssue[]>((resolve) => {- completeRetry = resolve;- });- state.listSnoozed- .mockRejectedValueOnce(new ApiError("Temporarily unavailable", 503, "Service Unavailable"))- .mockReturnValueOnce(pendingRetry);- renderPage();-- expect(await screen.findByRole("alert")).toHaveTextContent("Failed to load notifications");- expect(screen.queryByText("Nothing snoozed")).toBeNull();- const retry = screen.getByRole("button", { name: "Retry" });- fireEvent.click(retry);- await waitFor(() => expect(retry).toBeDisabled());- expect(screen.getByRole("alert")).toBeInTheDocument();- completeRetry([]);- expect(await screen.findByText("Nothing snoozed")).toBeInTheDocument();- });-- it("keeps loaded items visible when a background refresh fails", async () => {- state.listSnoozed.mockRejectedValueOnce(new ApiError("Temporarily unavailable", 503, "Service Unavailable"));- const { client } = renderPage([entry("issue-1", new Date(Date.now() + HOUR))]);- await act(() => client.invalidateQueries({ queryKey: snoozedInboxOptions("ws-1").queryKey }));-- expect(state.listSnoozed).toHaveBeenCalledTimes(1);- expect(screen.getByText("Issue issue-1")).toBeInTheDocument();- expect(screen.queryByRole("alert")).toBeNull();- });-});diff --git a/packages/views/inbox/components/snoozed-inbox-page.tsx b/packages/views/inbox/components/snoozed-inbox-page.tsxdeleted file mode 100644index b9f8837f92..0000000000--- a/packages/views/inbox/components/snoozed-inbox-page.tsx+++ /dev/null@@ -1,229 +0,0 @@-"use client";--import { useMemo, useState } from "react";-import { useQuery, useQueryClient } from "@tanstack/react-query";-import { AlarmClock, Undo2 } from "@multica/ui/icons";-import { Button } from "@multica/ui/components/ui/button";-import { Skeleton } from "@multica/ui/components/ui/skeleton";-import { useWorkspaceId } from "@multica/core/hooks";-import { issueRouteRef, useWorkspacePaths } from "@multica/core/paths";-import { snoozedInboxOptions } from "@multica/core/inbox/queries";-import { issueDetailOptions } from "@multica/core/issues/queries";-import { cachedIssueRouteRef } from "@multica/core/issues/canonical-id";-import { useIssueStatuses } from "@multica/core/issue-statuses/hooks";-import type { SnoozedInboxIssue } from "@multica/core/types";-import { CollectionPageHeader, CollectionPageState } from "../../layout/collection-page";-import {- CollectionEmptyValue,- CollectionList,- CollectionNameCell,- type CollectionColumn,- type CollectionGroup,-} from "../../layout/collection-list";-import { StatusIcon } from "../../issues/components";-import { useBuiltinViewLabel } from "../../issue-views/builtin-views";-import { useLocale, useT } from "../../i18n";-import { InboxSnoozeMenu } from "./inbox-snooze-menu";-import { formatSnoozeTime } from "./inbox-snooze-time";-import { inboxListLoad } from "./use-filtered-inbox-rows";-import { useInboxSnooze } from "./use-inbox-snooze";--const DAY_MS = 24 * 60 * 60 * 1000;--function startOfDay(date: Date): number {- return new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime();-}--/** The day an issue comes back on: today, tomorrow, then the weekday and date. */-function returnDayLabel(day: Date, now: Date, locale: string): string {- const days = Math.round((startOfDay(day) - startOfDay(now)) / DAY_MS);- const label =- days <= 1- ? new Intl.RelativeTimeFormat(locale, { numeric: "auto" }).format(Math.max(days, 0), "day")- : new Intl.DateTimeFormat(locale, {- weekday: "long",- month: "short",- day: "numeric",- ...(day.getFullYear() === now.getFullYear() ? {} : { year: "numeric" as const }),- }).format(day);- return label.charAt(0).toLocaleUpperCase(locale) + label.slice(1);-}--/**- * The issues the viewer snoozed in the Inbox, soonest back first and grouped- * by the day they come back. Opening one leaves it snoozed and unread.- */-export function SnoozedInboxPage() {- const { t } = useT("inbox");- const wsId = useWorkspaceId();- const p = useWorkspacePaths();- const qc = useQueryClient();- const locale = useLocale();- const title = useBuiltinViewLabel()("snoozed");- const snoozedQuery = useQuery(snoozedInboxOptions(wsId));- const snoozed = snoozedQuery.data;- const load = inboxListLoad(snoozedQuery);- const { snooze, unsnooze } = useInboxSnooze();-- const groups = useMemo<CollectionGroup<SnoozedInboxIssue>[]>(() => {- const now = new Date();- const byDay = new Map<number, SnoozedInboxIssue[]>();- for (const entry of snoozed ?? []) {- const until = new Date(entry.snoozed_until);- if (until.getTime() <= now.getTime()) continue;- const day = startOfDay(until);- const rows = byDay.get(day);- if (rows) rows.push(entry);- else byDay.set(day, [entry]);- }- return [...byDay.entries()]- .sort(([a], [b]) => a - b)- .map(([day, rows]) => ({- key: String(day),- label: returnDayLabel(new Date(day), now, locale),- count: rows.length,- rows,- }));- }, [snoozed, locale]);-- const columns: CollectionColumn<SnoozedInboxIssue>[] = [- {- key: "issue",- cell: (row) => <SnoozedIssueName wsId={wsId} issueId={row.issue_id} />,- },- {- key: "updates",- header: t(($) => $.snooze.col_updates),- width: 160,- cell: (row) =>- row.updates > 0 ? (- <span className="truncate">{t(($) => $.snooze.updates, { count: row.updates })}</span>- ) : (- <CollectionEmptyValue />- ),- },- {- key: "back",- header: t(($) => $.snooze.col_back),- width: 136,- align: "end",- core: true,- className: "tabular-nums",- cell: (row) => formatSnoozeTime(new Date(row.snoozed_until), new Date(), locale),- },- {- key: "actions",- width: 128,- align: "end",- core: true,- interactive: true,- cell: (row) => (- <SnoozedRowActions- onUnsnooze={() => unsnooze(row.item_id, row.issue_id)}- onSnooze={(until) => snooze({ id: row.item_id }, until)}- />- ),- },- ];-- return (- <div className="flex flex-1 min-h-0 flex-col">- <CollectionPageHeader icon={AlarmClock} title={title} />- {load === "failed" ? (- <CollectionPageState- icon={AlarmClock}- tone="warning"- role="alert"- title={t(($) => $.errors.load_failed)}- actions={- <Button variant="outline" disabled={snoozedQuery.isFetching} onClick={() => void snoozedQuery.refetch()}>- {t(($) => $.list.retry)}- </Button>- }- />- ) : load === "loading" ? (- <div className="space-y-2 p-4">- {Array.from({ length: 4 }).map((_, i) => (- <Skeleton key={i} className="h-8 w-full" />- ))}- </div>- ) : (- <CollectionList- label={title}- columns={columns}- groups={groups}- getRowId={(row) => row.issue_id}- // Older servers send no identifier. The cache supplies it when the- // issue was loaded before this list last rendered; else the UUID.- getRowHref={(row) =>- p.issueDetail(- row.issue_identifier- ? issueRouteRef({ id: row.issue_id, identifier: row.issue_identifier })- : cachedIssueRouteRef(qc, wsId, row.issue_id),- )- }- empty={- <CollectionPageState- icon={AlarmClock}- title={t(($) => $.snooze.view_empty)}- description={t(($) => $.snooze.view_empty_description)}- />- }- />- )}- </div>- );-}--function SnoozedIssueName({ wsId, issueId }: { wsId: string; issueId: string }) {- const { data: issue } = useQuery(issueDetailOptions(wsId, issueId));- const { categoryOf, colorOf, iconOf } = useIssueStatuses(wsId);- if (!issue) return <Skeleton className="h-4 w-48" />;- return (- <CollectionNameCell- icon={- <StatusIcon- status={issue.status}- category={categoryOf(issue.status)}- color={colorOf(issue.status)}- icon={iconOf(issue.status)}- className="size-3.5 shrink-0"- />- }- title={issue.title}- badges={<span className="shrink-0 text-caption text-muted-foreground tabular-nums">{issue.identifier}</span>}- />- );-}--/** Bring back now, or snooze until another time; shown while the row is hovered. */-function SnoozedRowActions({- onUnsnooze,- onSnooze,-}: {- onUnsnooze: () => void;- onSnooze: (until: Date) => void;-}) {- const { t } = useT("inbox");- const [open, setOpen] = useState(false);- return (- <span- className="flex items-center gap-1 opacity-0 transition-opacity group-hover/row:opacity-100 group-focus-within/row:opacity-100 has-data-popup-open:opacity-100 [@media(pointer:coarse)]:opacity-100"- >- <Button size="xs" variant="ghost" className="text-muted-foreground" onClick={onUnsnooze}>- <Undo2 />- {t(($) => $.snooze.unsnooze)}- </Button>- <InboxSnoozeMenu- open={open}- onOpenChange={setOpen}- onSnooze={onSnooze}- trigger={- <Button size="icon-xs" variant="ghost" className="text-muted-foreground" aria-label={t(($) => $.snooze.change_time)}>- <AlarmClock />- </Button>- }- />- </span>- );-}diff --git a/packages/views/inbox/components/use-inbox-tab-rows.ts b/packages/views/inbox/components/use-inbox-tab-rows.tsnew file mode 100644index 0000000000..699af97cc7--- /dev/null+++ b/packages/views/inbox/components/use-inbox-tab-rows.ts@@ -0,0 +1,66 @@+"use client";++import { useMemo, useState } from "react";+import { useInfiniteQuery, useQuery } from "@tanstack/react-query";+import {+ archivedInboxPagesOptions,+ deduplicateArchivedInboxItems,+ snoozedInboxOptions,+} from "@multica/core/inbox/queries";+import {+ effectiveInboxFilters,+ inboxIssueFieldsSupport,+ useInboxFilters,+ type InboxFilterSupport,+} from "@multica/core/inbox/filter-store";+import type { SnoozedInboxIssue } from "@multica/core/types";+import { inboxListLoad } from "./use-filtered-inbox-rows";++const NO_SNOOZED: SnoozedInboxIssue[] = [];++/**+ * The Snoozed tab: the issues the viewer snoozed, soonest back first. An+ * entry whose time has passed is back in the Inbox already, and the wake+ * timer refreshes the list.+ */+export function useSnoozedInboxRows(wsId: string, enabled = true) {+ const query = useQuery({ ...snoozedInboxOptions(wsId), enabled: enabled && !!wsId });+ const entries = query.data ?? NO_SNOOZED;+ const rows = useMemo(() => {+ const now = Date.now();+ return entries+ .filter((entry) => new Date(entry.snoozed_until).getTime() > now)+ .sort((a, b) => new Date(a.snoozed_until).getTime() - new Date(b.snoozed_until).getTime());+ }, [entries]);+ return {+ rows,+ load: inboxListLoad(query),+ retry: () => void query.refetch(),+ retrying: query.isFetching,+ };+}++/**+ * The Archived tab, a page at a time, under the Inbox filters. The server+ * filters the archive, so whether it has the issue fields can only be proven+ * by the rows it returns: an empty answer proves nothing and must not change+ * what is sent, so only rows without them (an older server) make those+ * dimensions dormant.+ */+export function useArchivedInboxRows(wsId: string, enabled = true) {+ const stored = useInboxFilters(wsId);+ const [issueFields, setIssueFields] = useState<InboxFilterSupport>("supported");+ const filters = useMemo(+ () => effectiveInboxFilters(stored, { priority: "supported", issueFields, archived: true }),+ [stored, issueFields],+ );+ const query = useInfiniteQuery({ ...archivedInboxPagesOptions(wsId, filters), enabled: enabled && !!wsId });+ const items = useMemo(+ () => deduplicateArchivedInboxItems(query.data?.pages.flatMap((page) => page.items) ?? []),+ [query.data],+ );+ if (issueFields !== "unsupported" && inboxIssueFieldsSupport(items) === "unsupported") {+ setIssueFields("unsupported");+ }+ return { query, items, filters, issueFieldsSupport: issueFields };+}diff --git a/packages/views/inbox/components/use-leave-inbox-row.ts b/packages/views/inbox/components/use-leave-inbox-row.tsindex 2ad044771c..693b6713d9 100644--- a/packages/views/inbox/components/use-leave-inbox-row.ts+++ b/packages/views/inbox/components/use-leave-inbox-row.ts@@ -35,36 +35,32 @@ export function collectBatchArchiveIds(/*** Leave the open notification for `next`, as every Inbox action on it does:- * archiving, snoozing or unsubscribing it from the issue Inbox bar, its- * sidebar row or that row's card, or a batch archive that takes it. The row- * leaves its lists for good rather than staying in place (`keepOpenInboxRow`).- * When nothing is left to open, navigates to the Inbox page to show the- * Inbox Zero (or filtered-empty) state, carrying the cleared entry for inline- * undo.+ * archiving, snoozing or unsubscribing it from the Inbox bar, its sidebar row+ * or that row's card, or a batch archive that takes it. The row leaves its+ * lists for good rather than staying in place (`keepOpenInboxRow`). When+ * nothing is left to open, the Inbox page shows the Inbox Zero (or+ * filtered-empty) state, carrying the cleared entry for inline undo.*/export function useLeaveInboxRow() {const wsId = useWorkspaceId();const p = useWorkspacePaths();const { push } = useNavigation();const leaveRow = useInboxSelectionStore((s) => s.leaveRow);- const rememberSidebarIssue = useInboxSelectionStore((s) => s.rememberSidebarIssue);const recordLastCleared = useInboxSelectionStore((s) => s.recordLastCleared);const recordTransition = useInboxSelectionStore((s) => s.recordTransition);return useCallback((key: string, next: InboxItem | null, cleared?: LastInboxCleared) => {leaveRow(wsId, key);if (!next) {- rememberSidebarIssue(wsId, null);recordTransition(wsId, "", "next");if (cleared) recordLastCleared(wsId, cleared);push(p.inbox());return;}- rememberSidebarIssue(wsId, next.issue_id ?? null);recordTransition(wsId, inboxRowKey(next), "next");push(inboxRowHref(p, next));},- [wsId, p, push, leaveRow, rememberSidebarIssue, recordLastCleared, recordTransition],+ [wsId, p, push, leaveRow, recordLastCleared, recordTransition],);}diff --git a/packages/views/inbox/components/use-sidebar-inbox-issue.ts b/packages/views/inbox/components/use-sidebar-inbox-issue.tsdeleted file mode 100644index 42ab8ef5cd..0000000000--- a/packages/views/inbox/components/use-sidebar-inbox-issue.ts+++ /dev/null@@ -1,22 +0,0 @@-"use client";--import { useInboxSelectionStore } from "@multica/core/inbox/selection-store";-import { useHeldUntilArrival } from "../../navigation";--/**- * Whether the open issue was opened from the Work panel's Inbox section: the- * issue this page last opened from it, or one it opened in another tab.- *- * A row click or the issue header moving on to the next notification records- * that issue before its page arrives; until then the open issue keeps the- * record it had. `holding` keeps it for another click the caller knows has- * named the next issue.- */-export function useSidebarInboxIssue(wsId: string | undefined, openIssueId: string | null, holding = false) {- const live = useInboxSelectionStore((s) => (wsId ? (s.sidebarIssueByWorkspace[wsId] ?? null) : null));- const openedInTab = useInboxSelectionStore(- (s) => !!wsId && !!openIssueId && !!s.sidebarTabIssuesByWorkspace[wsId]?.includes(openIssueId),- );- const held = useHeldUntilArrival(openIssueId, live, holding || (!!live && live !== openIssueId));- return { fromInbox: !!openIssueId && (held.value === openIssueId || openedInTab), movingOn: held.movingOn };-}diff --git a/packages/views/issue-views/all-views-page.test.tsx b/packages/views/issue-views/all-views-page.test.tsxindex c3cce06e12..114fb38fc0 100644--- a/packages/views/issue-views/all-views-page.test.tsx+++ b/packages/views/issue-views/all-views-page.test.tsx@@ -128,8 +128,8 @@ describe("AllViewsPage", () => {expect(screen.getByRole("heading", { level: 1, name: "All views" })).toBeInTheDocument();await user.click(screen.getByRole("button", { name: "All views" }));- expect(await screen.findByRole("menuitemradio", { name: /^All views/ })).toHaveTextContent("7");- expect(screen.getByRole("menuitemradio", { name: /^Built-in/ })).toHaveTextContent("5");+ expect(await screen.findByRole("menuitemradio", { name: /^All views/ })).toHaveTextContent("6");+ expect(screen.getByRole("menuitemradio", { name: /^Built-in/ })).toHaveTextContent("4");expect(screen.getByRole("menuitemradio", { name: /^Created by me/ })).toHaveTextContent("1");await user.click(screen.getByRole("menuitemradio", { name: /^Shared/ }));diff --git a/packages/views/issue-views/builtin-views.tsx b/packages/views/issue-views/builtin-views.tsxindex 29687c4340..dff8fd5e17 100644--- a/packages/views/issue-views/builtin-views.tsx+++ b/packages/views/issue-views/builtin-views.tsx@@ -1,7 +1,7 @@"use client";import { useCallback } from "react";-import { AlarmClock, Bell, Bot, CircleUser, ListTodo } from "@multica/ui/icons";+import { Bell, Bot, CircleUser, ListTodo } from "@multica/ui/icons";import { useWorkspaceId } from "@multica/core/hooks";import { useWorkspacePaths } from "@multica/core/paths";import { issueViewContainerKey, useActiveIssueViewStore } from "@multica/core/issue-views/active-view-store";@@ -17,12 +17,8 @@ export const BUILTIN_VIEW_ICON: Record<BuiltinViewKey, React.ReactNode> = {my_work: <CircleUser className="size-4 shrink-0" />,working: <Bot className="size-4 shrink-0" />,subscribed: <Bell className="size-4 shrink-0" />,- snoozed: <AlarmClock className="size-4 shrink-0" />,};-/** The `?view=` id of the issues page's Snoozed list, which is not a filter of All issues. */-export const SNOOZED_VIEW_ID = "snoozed";-export function useBuiltinViewLabel() {const { t } = useT("issues");return useCallback((key: BuiltinViewKey) => t(($) => $.views.builtin[key]), [t]);@@ -31,8 +27,7 @@ export function useBuiltinViewLabel() {/*** Where a built-in view lives, and the store write that makes its page show* it rather than whichever saved view was left open. Every built-in is the- * workspace issues page; all but All issues open it under their filter, and- * Snoozed in place of the table.+ * workspace issues page; all but All issues open it under their filter.*/export function useBuiltinViewNavigation() {const wsId = useWorkspaceId();@@ -41,11 +36,7 @@ export function useBuiltinViewNavigation() {const hrefFor = useCallback((key: BuiltinViewKey) =>- key === "all_issues"- ? p.issues()- : key === "snoozed"- ? `${p.issues()}?view=${SNOOZED_VIEW_ID}`- : issueViewTarget(wsId, FILTERED_BUILTIN_VIEWS[key], p).href,+ key === "all_issues" ? p.issues() : issueViewTarget(wsId, FILTERED_BUILTIN_VIEWS[key], p).href,[p, wsId],);diff --git a/packages/views/issues/actions/__tests__/issue-inbox-actions.test.tsx b/packages/views/issues/actions/__tests__/issue-inbox-actions.test.tsxindex a161665bd9..056d72bd9f 100644--- a/packages/views/issues/actions/__tests__/issue-inbox-actions.test.tsx+++ b/packages/views/issues/actions/__tests__/issue-inbox-actions.test.tsx@@ -92,8 +92,8 @@ function setup({push: vi.fn(),replace: vi.fn(),back: vi.fn(),- pathname: `/acme/issues/${issueId}`,- searchParams: new URLSearchParams(),+ pathname: "/acme/inbox",+ searchParams: new URLSearchParams({ issue: issueId }),hash: "",getShareableUrl: (path) => path,};@@ -158,8 +158,6 @@ beforeEach(() => {vi.clearAllMocks();state.archiveInbox.mockImplementation(async (id: string) => item({ id, archived: true }));useInboxSelectionStore.setState({- sidebarIssueByWorkspace: { ws: "issue-1" },- sidebarTabIssuesByWorkspace: {},heldRows: {},leftRowKeyByWorkspace: {},lastClearedByWorkspace: {},@@ -182,10 +180,7 @@ describe("IssueInboxBar", () => {expect(nav.push).toHaveBeenCalledWith("/acme/inbox");expect(useInboxSelectionStore.getState().lastClearedByWorkspace.ws).toBeUndefined();- // If the user returns to the issue (now still in Inbox), a later side-effect archive keeps it.- act(() => {- useInboxSelectionStore.getState().rememberSidebarIssue("ws", "issue-1");- });+ // Still reading the issue (now still in Inbox), a later side-effect archive keeps it.act(() => nav.qc.setQueryData(inboxListOptions("ws").queryKey, []));expect(await screen.findByText("Notification archived")).toBeInTheDocument();expect(screen.getByRole("button", { name: "Undo" })).toBeInTheDocument();@@ -202,10 +197,7 @@ describe("IssueInboxBar", () => {await act(async () => options.action.onClick());expect(state.unsnooze).toHaveBeenCalledWith({ id: "n-1", read: true });expect(useInboxSelectionStore.getState().lastClearedByWorkspace.ws).toBeUndefined();- act(() => {- useInboxSelectionStore.getState().rememberSidebarIssue("ws", "issue-1");- nav.qc.setQueryData(inboxListOptions("ws").queryKey, [ROWS[0]!]);- });+ act(() => nav.qc.setQueryData(inboxListOptions("ws").queryKey, [ROWS[0]!]));expect(await screen.findByRole("button", { name: "Archive" })).toBeInTheDocument();act(() => nav.qc.setQueryData(inboxListOptions("ws").queryKey, []));@@ -213,17 +205,8 @@ describe("IssueInboxBar", () => {expect(screen.getByRole("button", { name: "Undo" })).toBeInTheDocument();});- it("stays out of an issue that was not opened from the Inbox", () => {- useInboxSelectionStore.setState({ sidebarIssueByWorkspace: { ws: "issue-2" } });- setup();- expect(screen.queryByRole("button", { name: "Archive" })).toBeNull();- });-it("stays on the open issue until the next notification's issue arrives", async () => {const nav = setup();- act(() => {- useInboxSelectionStore.getState().rememberSidebarIssue("ws", "issue-2");- });fireEvent.click(screen.getByRole("button", { name: "Archive" }));await waitFor(() => expect(state.archiveInbox).toHaveBeenLastCalledWith("n-1"));@@ -232,24 +215,6 @@ describe("IssueInboxBar", () => {await waitFor(() => expect(state.archiveInbox).toHaveBeenLastCalledWith("n-2"));});- it("shows on an issue the Inbox opened in another tab", async () => {- useInboxSelectionStore.setState({- sidebarIssueByWorkspace: { ws: "issue-1" },- sidebarTabIssuesByWorkspace: { ws: ["issue-2"] },- });- setup({ issueId: "issue-2" });- fireEvent.click(screen.getByRole("button", { name: "Archive" }));- await waitFor(() => expect(state.archiveInbox).toHaveBeenCalledWith("n-2"));- });-- it("leaves once the issue is opened from outside the Inbox", () => {- setup();- act(() => {- useInboxSelectionStore.getState().rememberSidebarIssue("ws", null);- });- expect(screen.queryByRole("button", { name: "Archive" })).toBeNull();- });-it("stays out once the issue has left the Inbox", () => {setup({ rows: [ROWS[1]!] });expect(screen.queryByRole("button", { name: "Archive" })).toBeNull();@@ -330,11 +295,10 @@ describe("IssueInboxBar", () => {fireEvent.keyDown(document, { key: "h", code: "KeyH" });fireEvent.click(await screen.findByRole("menuitem", { name: /^1 hour/ }));expect(state.snooze).toHaveBeenCalledWith({ id: "n-1", until: expect.any(Date) });- expect(nav.push).toHaveBeenCalledWith("/acme/issues/issue-2#comment-c-9");+ expect(nav.push).toHaveBeenCalledWith("/acme/inbox?issue=issue-2");});it("shows when a snoozed issue comes back, and brings it back with the shortcut", () => {- useInboxSelectionStore.setState({ sidebarIssueByWorkspace: {} });const until = new Date(Date.now() + 60 * 60 * 1000).toISOString();setup({rows: [ROWS[1]!],@@ -360,6 +324,22 @@ describe("IssueInboxBar", () => {expect(toast.success).not.toHaveBeenCalled();});+ it("says when an issue another window snoozed comes back, and brings it back with the shortcut", async () => {+ const nav = setup();+ const until = new Date(Date.now() + 60 * 60 * 1000).toISOString();+ act(() => {+ nav.qc.setQueryData(snoozedInboxOptions("ws").queryKey, [+ { issue_id: "issue-1", item_id: "n-1", snoozed_until: until, snoozed_at: SNOOZED_AT, updates: 0 },+ ]);+ nav.qc.setQueryData(inboxListOptions("ws").queryKey, [ROWS[1]!]);+ });++ expect(await screen.findByRole("status")).toHaveTextContent(/^Back /);+ fireEvent.keyDown(document, { key: "h", code: "KeyH" });+ expect(state.unsnooze).toHaveBeenCalledWith(expect.objectContaining({ id: "n-1" }));+ expect(state.unarchiveInbox).not.toHaveBeenCalled();+ });+it("undoes the settled archive with Z", async () => {const nav = setup();act(() => nav.qc.setQueryData(inboxListOptions("ws").queryKey, [ROWS[1]!]));@@ -375,8 +355,7 @@ describe("IssueInboxBar", () => {expect(await screen.findByText("Done · Notification archived")).toBeInTheDocument();fireEvent.click(screen.getByRole("button", { name: "Next" }));- expect(nav.push).toHaveBeenCalledWith("/acme/issues/issue-2#comment-c-9");- expect(useInboxSelectionStore.getState().sidebarIssueByWorkspace.ws).toBe("issue-2");+ expect(nav.push).toHaveBeenCalledWith("/acme/inbox?issue=issue-2");});it("moves on with E rather than archiving again", async () => {@@ -385,7 +364,7 @@ describe("IssueInboxBar", () => {await screen.findByText("Notification archived");fireEvent.keyDown(document, { key: "e", code: "KeyE" });- expect(nav.push).toHaveBeenCalledWith("/acme/issues/issue-2#comment-c-9");+ expect(nav.push).toHaveBeenCalledWith("/acme/inbox?issue=issue-2");expect(state.archiveInbox).not.toHaveBeenCalled();});@@ -404,8 +383,7 @@ describe("IssueInboxBar", () => {it("archives and moves on to the next notification", async () => {const nav = setup();fireEvent.click(screen.getByRole("button", { name: "Archive" }));- expect(nav.push).toHaveBeenCalledWith("/acme/issues/issue-2#comment-c-9");- expect(useInboxSelectionStore.getState().sidebarIssueByWorkspace.ws).toBe("issue-2");+ expect(nav.push).toHaveBeenCalledWith("/acme/inbox?issue=issue-2");await waitFor(() => expect(state.archiveInbox).toHaveBeenCalledWith("n-1"));});@@ -494,7 +472,7 @@ describe("IssueInboxBar", () => {],});fireEvent.click(screen.getByRole("button", { name: "Archive" }));- expect(nav.push).toHaveBeenCalledWith("/acme/issues/issue-3");+ expect(nav.push).toHaveBeenCalledWith("/acme/inbox?issue=issue-3");});it("leaves the issue's status to its own control", () => {@@ -523,7 +501,7 @@ describe("IssueInboxBar", () => {expect(state.unsubscribeArchive).toHaveBeenCalledWith({ id: "n-1", issueId: "issue-1", scope: "issue" });await act(async () => {});expect(state.archiveInbox).not.toHaveBeenCalled();- expect(nav.push).toHaveBeenCalledWith("/acme/issues/issue-2#comment-c-9");+ expect(nav.push).toHaveBeenCalledWith("/acme/inbox?issue=issue-2");});it("still only archives with E there", async () => {@@ -562,7 +540,6 @@ describe("IssueInboxBar once an action is undone", () => {expect(nav.push).toHaveBeenCalledWith("/acme/inbox");const undo = vi.mocked(toast.success).mock.calls.at(-1)?.[1] as unknown as { action: { onClick: () => void } };await act(async () => undo.action.onClick());- act(() => useInboxSelectionStore.getState().rememberSidebarIssue("ws", "issue-1"));await screen.findByRole("button", { name: "Archive" });// The user continues reading the same issue; a later status change archives it.act(() => nav.qc.setQueryData(inboxListOptions("ws").queryKey, []));@@ -572,7 +549,7 @@ describe("IssueInboxBar once an action is undone", () => {it("keeps the 40px InboxBar mounted while handing off to the next notification", async () => {const nav = setup();fireEvent.click(screen.getByRole("button", { name: "Archive" }));- expect(nav.push).toHaveBeenCalledWith("/acme/issues/issue-2#comment-c-9");+ expect(nav.push).toHaveBeenCalledWith("/acme/inbox?issue=issue-2");expect(useInboxSelectionStore.getState().transitionByWorkspace.ws).toMatchObject({targetKey: "issue-2",direction: "next",@@ -598,7 +575,7 @@ describe("IssueInboxBar once an action is undone", () => {noteInboxAutoArchive({ issue_id: "issue-1", reason: "actor_acted" });act(() => nav.qc.setQueryData(inboxListOptions("ws").queryKey, [ROWS[1]!]));- await waitFor(() => expect(nav.push).toHaveBeenCalledWith("/acme/issues/issue-2#comment-c-9"));+ await waitFor(() => expect(nav.push).toHaveBeenCalledWith("/acme/inbox?issue=issue-2"));expect(toast.success).toHaveBeenCalledWith("Notification archived", expect.anything());expect(document.querySelector("[data-inbox-auto-advance-bar]")).toBeNull();} finally {diff --git a/packages/views/issues/actions/issue-inbox-actions.tsx b/packages/views/issues/actions/issue-inbox-actions.tsxindex bf0be1bbb8..0958360312 100644--- a/packages/views/issues/actions/issue-inbox-actions.tsx+++ b/packages/views/issues/actions/issue-inbox-actions.tsx@@ -20,7 +20,7 @@ import { formatSnoozeTime } from "../../inbox/components/inbox-snooze-time";import { useInboxShortcut } from "../../inbox/components/use-inbox-shortcut";import { useInboxSnooze } from "../../inbox/components/use-inbox-snooze";import { useFilteredInboxRows } from "../../inbox/components/use-filtered-inbox-rows";-import { useSidebarInboxIssue } from "../../inbox/components/use-sidebar-inbox-issue";+import { inboxTabHref } from "../../inbox/components/inbox-view";import { UnsubscribeArchiveButton } from "../../inbox/components/unsubscribe-archive-button";import { useUnsubscribeArchive } from "../../inbox/components/use-unsubscribe-archive";import { useMoveOnAfterAutoArchive } from "../../inbox/components/use-move-on-after-auto-archive";@@ -35,36 +35,46 @@ import { useNavigation } from "../../navigation";import { useLocale, useT } from "../../i18n";/**- * The Inbox bar of an issue opened from the Work panel's Inbox section, while- * the section still lists it: why it is here, `issueActions` (its status,- * assignee and quick actions), then the notification's own. Snoozing,- * archiving or unsubscribing opens the next notification the section lists,- * so the Inbox can be worked through without leaving the page.+ * The Inbox page's bar over an open issue notification: why it is here,+ * `issueActions` (its status, assignee and quick actions), then the+ * notification's own. Snoozing, archiving or unsubscribing opens the next+ * notification the Work panel's Inbox section lists, so the Inbox can be+ * worked through without leaving the page.** Once the notification leaves the Inbox on its own (the issue reached Done,* another window archived it, an action from this bar archived it), the* section keeps the row in place and the bar says so instead, with the* issue's actions still there, an undo and the way on to the next one.*- * A snoozed issue's bar says when it comes back instead, wherever it is- * opened, with the way to bring it back now or change the time.+ * A snoozed issue's bar says when it comes back instead, with the way to+ * bring it back now or change the time.+ *+ * `movingOn`: the page is still handing off to another notification, so a+ * bar this issue showed holds its slot rather than shifting the issue up.*/-export function IssueInboxBar({ issueId, issueActions }: { issueId: string; issueActions?: ReactNode }) {+export function IssueInboxBar({+ issueId,+ issueActions,+ movingOn = false,+}: {+ issueId: string;+ issueActions?: ReactNode;+ movingOn?: boolean;+}) {const { t } = useT("inbox");const wsId = useWorkspaceId();const p = useWorkspacePaths();const { push } = useNavigation();const builtinNav = useBuiltinViewNavigation();const guest = useIsGuest(wsId);- const { fromInbox, movingOn } = useSidebarInboxIssue(wsId, issueId);- const { rows, kept, filtered } = useFilteredInboxRows(wsId, issueId, fromInbox);- const index = fromInbox ? rows.findIndex((row) => row.issue_id === issueId) : -1;+ const { rows, kept, filtered } = useFilteredInboxRows(wsId, issueId);+ const index = rows.findIndex((row) => row.issue_id === issueId);const row = index >= 0 ? rows[index]! : null;// A row kept after it left the Inbox on its own is no longer there to act on.const settled = kept && kept.reason !== "filtered" ? kept : null;const item = settled ? null : row;const next = row ? nextInboxRow(rows, issueId) : null;- // Remember that this issue mounted an InboxBar so while the router is still+ // Remember that this issue mounted an InboxBar so while the page is still// handing off to the next notification (`movingOn`), the 40px bar holds its// slot instead of unmounting and shifting the old issue up by 40px.const hadBarForIssueRef = useRef<string | null>(null);@@ -175,7 +185,7 @@ export function IssueInboxBar({ issueId, issueActions }: { issueId: string; issu);}if (!settled) {- if (fromInbox && movingOn && hadBarForIssueRef.current === issueId) {+ if (movingOn && hadBarForIssueRef.current === issueId) {return (<InboxBar settled><InboxBarStatus icon={<Archive />} label={t(($) => $.kept.notification_archived)} />@@ -194,14 +204,7 @@ export function IssueInboxBar({ issueId, issueActions }: { issueId: string; issuonNext={moveOn}inboxCleared={inboxCleared}snoozedCount={inboxCleared ? activeSnoozedCount : 0}- onSnoozedClick={- inboxCleared- ? () => {- builtinNav.prepare("snoozed");- push(builtinNav.hrefFor("snoozed"));- }- : undefined- }+ onSnoozedClick={inboxCleared ? () => push(inboxTabHref(p, "snoozed")) : undefined}onGoToMyWork={inboxCleared && !guest? () => {diff --git a/packages/views/issues/components/issue-detail-route.test.tsx b/packages/views/issues/components/issue-detail-route.test.tsxindex 9b384621a6..31eb3fe109 100644--- a/packages/views/issues/components/issue-detail-route.test.tsx+++ b/packages/views/issues/components/issue-detail-route.test.tsx@@ -6,7 +6,6 @@ import { setApiInstance } from "@multica/core/api";import { ApiError } from "@multica/core/api/client";import type { ApiClient } from "@multica/core/api/client";import { inboxKeys } from "@multica/core/inbox/queries";-import { useInboxSelectionStore } from "@multica/core/inbox/selection-store";import type { InboxItem } from "@multica/core/types";import { renderWithI18n } from "../../test/i18n";import { NavigationProvider } from "../../navigation";@@ -274,8 +273,7 @@ describe("IssueDetailSkeleton embedded layouts", () => {localStorage.removeItem(storageKey);});- it("reserves the 40px InboxBar slot with cached notification metadata while resolving from Inbox", () => {- useInboxSelectionStore.setState({ sidebarIssueByWorkspace: { "ws-1": "issue-42" } });+ it("reserves no Inbox bar on the issue page, even for an issue in the Inbox", () => {const getIssue = vi.fn(() => new Promise<never>(() => {}));setApiInstance({ getIssue, getBaseUrl: () => "" } as unknown as ApiClient);const qc = new QueryClient({ defaultOptions: { queries: { retry: false, gcTime: 0 } } });@@ -308,12 +306,9 @@ describe("IssueDetailSkeleton embedded layouts", () => {</QueryClientProvider>,);- expect(view.container.querySelector("[data-inbox-bar]")).not.toBeNull();- expect(view.getByText("MUL-42")).toBeInTheDocument();- expect(view.getByText("Keep Inbox chrome steady")).toHaveClass("text-display-sm", "font-semibold");+ expect(view.container.querySelector("[data-inbox-bar]")).toBeNull();view.unmount();qc.clear();- useInboxSelectionStore.setState({ sidebarIssueByWorkspace: {} });});});diff --git a/packages/views/issues/components/issue-detail-route.tsx b/packages/views/issues/components/issue-detail-route.tsxindex 846512a0f8..6f88a03ffb 100644--- a/packages/views/issues/components/issue-detail-route.tsx+++ b/packages/views/issues/components/issue-detail-route.tsx@@ -1,13 +1,9 @@"use client";import { useCallback, useEffect, useRef } from "react";-import { useQueryClient } from "@tanstack/react-query";import { useCanonicalIssue } from "@multica/core/issues/canonical-id";import { useWorkspaceId } from "@multica/core/hooks";-import { inboxKeys } from "@multica/core/inbox/queries";import { useWorkspacePaths, issueRouteRef } from "@multica/core/paths";-import { useInboxSelectionStore } from "@multica/core/inbox/selection-store";-import type { InboxItem } from "@multica/core/types";import { useNavigation } from "../../navigation";import { IssueDetail, IssueDetailSkeleton, IssueNotFound, IssueLoadError } from "./issue-detail";import { IssuePeekHost } from "./issue-peek";@@ -91,33 +87,10 @@ function useHighlightHash(): { hash: string; commentId?: string; appRequestId?:*/export function IssueDetailRoute({ routeId, onDelete, deliverable }: IssueDetailRouteProps) {const wsId = useWorkspaceId();- const qc = useQueryClient();const {canonicalId, issue, isResolving, notFound, loadFailed, isRetrying, retry, hasLoaded,} = useCanonicalIssue(wsId, routeId);- const sidebarInboxIssue = useInboxSelectionStore((s) =>- wsId ? (s.sidebarIssueByWorkspace[wsId] ?? null) : null,- );- const cachedInboxRow = wsId- ? (qc.getQueryData<InboxItem[]>(inboxKeys.list(wsId)) ?? []).find(- (item) =>- !item.archived &&- (item.issue_id === (canonicalId ?? routeId) ||- (item.issue_identifier != null && item.issue_identifier.toUpperCase() === routeId.toUpperCase())),- ) ?? null- : null;- const fromInboxSkeleton =- !!sidebarInboxIssue &&- (sidebarInboxIssue === routeId ||- sidebarInboxIssue === canonicalId ||- (cachedInboxRow?.issue_id != null && sidebarInboxIssue === cachedInboxRow.issue_id));const highlight = useHighlightHash();- const landing = useInboxSelectionStore((s) =>- s.landing && s.landing.issueId === canonicalId ? s.landing : null,- );- const completeLanding = useInboxSelectionStore((s) => s.completeLanding);- const landingToken = landing?.token ?? 0;- const onHighlightLanded = useCallback(() => completeLanding(landingToken), [completeLanding, landingToken]);const paths = useWorkspacePaths();const navigation = useNavigation();@@ -144,10 +117,7 @@ export function IssueDetailRoute({ routeId, onDelete, deliverable }: IssueDetailif (isResolving || (!issue && !notFound)) {return (- <IssueDetailSkeleton- showInboxBar={fromInboxSkeleton}- inboxItem={fromInboxSkeleton ? cachedInboxRow : undefined}- />+ <IssueDetailSkeleton />);}@@ -168,9 +138,6 @@ export function IssueDetailRoute({ routeId, onDelete, deliverable }: IssueDetailonDelete={onDelete}highlightCommentId={landsHere ? highlight.commentId : undefined}highlightAppRequestId={landsHere ? highlight.appRequestId : undefined}- highlightRequestToken={landingToken}- highlightRequestPending={!!landing && !landing.landed}- onHighlightLanded={onHighlightLanded}openDeliverable={deliverable}onDeliverableLinkDone={deliverable ? onDeliverableLinkDone : undefined}/>diff --git a/packages/views/issues/components/issue-detail.test.tsx b/packages/views/issues/components/issue-detail.test.tsxindex f005db6b0c..05597096a4 100644--- a/packages/views/issues/components/issue-detail.test.tsx+++ b/packages/views/issues/components/issue-detail.test.tsx@@ -721,6 +721,7 @@ const mockTimeline: TimelineEntry[] = [// ---------------------------------------------------------------------------import { IssueDetail, groupSubIssuesByStage } from "./issue-detail";+import { InboxArchiveButton, InboxOpenBar } from "../../inbox/components/inbox-bar";import { ScrollRestorationProvider, type ScrollRestorationAdapter } from "../../platform";import { READING_COLUMN } from "../../layout/reading-column";import {@@ -1569,12 +1570,40 @@ describe("IssueDetail (shared)", () => {return render(<I18nProvider locale="en" resources={TEST_RESOURCES}><QueryClientProvider client={queryClient}>- <IssueDetail issueId="issue-1" onArchive={onArchive} inboxItem={item ?? undefined} />+ <IssueDetail+ issueId="issue-1"+ inbox={{+ crumb: { href: "/test/inbox", label: "Inbox" },+ item: item ?? undefined,+ bar: (issueActions) =>+ item ? (+ <InboxOpenBar item={item} issueActions={issueActions}>+ <InboxArchiveButton onClick={onArchive} />+ </InboxOpenBar>+ ) : null,+ }}+ /></QueryClientProvider></I18nProvider>,);}+ it("leads with the way back to the Inbox and opens the issue page on its own", async () => {+ renderWithArchive();++ const open = await screen.findByRole("button", { name: enIssues.detail.open_issue_page });+ expect(open).toHaveAttribute("href", "/test/issues/TES-1");+ expect(screen.getByRole("link", { name: "Inbox" })).toHaveAttribute("href", "/test/inbox");+ });++ it("leaves the issue page without either", async () => {+ renderIssueDetail();++ await screen.findByRole("button", { name: enCommon.more_actions });+ expect(screen.queryByRole("button", { name: enIssues.detail.open_issue_page })).not.toBeInTheDocument();+ expect(screen.queryByRole("button", { name: enInbox.context_menu.archive })).not.toBeInTheDocument();+ });+it("puts the notification's actions under the header, after why it is here and the issue's own", async () => {const { container } = renderWithArchive();diff --git a/packages/views/issues/components/issue-detail.tsx b/packages/views/issues/components/issue-detail.tsxindex b88f35e184..5b49e64d42 100644--- a/packages/views/issues/components/issue-detail.tsx+++ b/packages/views/issues/components/issue-detail.tsx@@ -36,6 +36,7 @@ import {Unlink,Users,ArrowDown,+ ArrowUpRight,} from "@multica/ui/icons";import { BreadcrumbHeader, type BreadcrumbSegment } from "../../layout/breadcrumb-header";import { Skeleton } from "@multica/ui/components/ui/skeleton";@@ -76,10 +77,8 @@ import { ActorAvatar } from "../../common/actor-avatar";import { MemberProfileCard } from "../../members/member-profile-card";import { HoverCard, HoverCardTrigger, HoverCardContent } from "@multica/ui/components/ui/hover-card";import { ActionShortcutKeycaps } from "../../common/shortcut-keycaps";-import { UnsubscribeArchiveButton } from "../../inbox/components/unsubscribe-archive-button";-import { InboxArchiveButton, InboxBarSkeleton, InboxOpenBar } from "../../inbox/components/inbox-bar";+import { InboxBarSkeleton } from "../../inbox/components/inbox-bar";import { InboxIssueActions } from "./inbox-issue-actions";-import type { InboxUnsubscribeScope } from "@multica/core/inbox/mutations";import { useInboxSelectionStore, type InboxTransitionDirection } from "@multica/core/inbox/selection-store";import { useReducedMotion } from "@multica/core/appearance";import { PropRow } from "../../common/prop-row";@@ -104,7 +103,7 @@ import { AssigneePicker } from "./pickers/assignee-picker";import { LabelPicker } from "./pickers/label-picker";import { CustomPropertyValueEditor, CustomPropertyValueDisplay } from "./pickers/custom-property-picker";import { Switch } from "@multica/ui/components/ui/switch";-import { IssueActionsDropdown, useIssuePageMenu, useIssueActions, useArchivedInboxItemId, IssueActionsContextMenu, IssueContextMenuProvider, IssueInboxBar } from "../actions";+import { IssueActionsDropdown, useIssuePageMenu, useIssueActions, useArchivedInboxItemId, IssueActionsContextMenu, IssueContextMenuProvider } from "../actions";import { LabelChip } from "../../labels/label-chip";import { IssueAgentActivityIndicator } from "./issue-agent-activity-indicator";import { SubIssuesAgentWorkingChip } from "./sub-issues-agent-working-chip";@@ -1112,21 +1111,28 @@ function SubIssueDisplayPopover({// Props+/** The Inbox page, hosting this detail for the notification it has open. */+export interface IssueDetailInboxHost {+ /**+ * The breadcrumb's segment in place of the issue's container: back to the+ * Inbox's list. Left out where the host's own way back already says so.+ */+ crumb?: BreadcrumbSegment;+ /** The notification's bar under the header, given the issue's own actions to keep in it. */+ bar: (issueActions: ReactNode) => ReactNode;+ /** The open notification, so a cold load shows its bar and title at once. */+ item?: InboxItem;+}+interface IssueDetailProps {issueId: string;onDelete?: () => void;/**- * The Inbox page's Archive in its bar: archives the open notification. The- * Inbox page owns the bar then; without it, the Work panel's Inbox does.- */- onArchive?: () => void;- /**- * The Inbox's "unsubscribe & archive", shown next to Archive on issues that- * are not the viewer's own. Only read alongside `onArchive`.+ * Set on the Inbox page: the breadcrumb starts at the Inbox, the+ * notification's bar sits under the header, and the header offers the+ * issue's own page.*/- onUnsubscribeArchive?: (scope: InboxUnsubscribeScope) => void;- /** The Inbox page's open notification, whose bar says why it is here. Only read alongside `onArchive`. */- inboxItem?: InboxItem;+ inbox?: IssueDetailInboxHost;defaultSidebarOpen?: boolean;layoutId?: string;/** When set, the issue detail will auto-scroll to this comment and briefly highlight it. */@@ -1165,12 +1171,6 @@ interface IssueDetailProps {variant?: "page" | "peek";/** Peek only: host controls at the end of the header (open full page, close). */trailingActions?: ReactNode;- /**- * A bar the host shows under the header in place of the Inbox bar, above the- * scrolling body, given the issue's own actions to keep in it. Returning- * nothing shows the Inbox bar.- */- notice?: (issueActions: ReactNode) => ReactNode;/*** Read the viewer's inbox notifications on this issue while it is on screen* (MUL-8588). The inbox turns this off for the issue it has open: it reads@@ -1419,7 +1419,7 @@ export function IssueDetailSkeleton({// IssueDetail-export function IssueDetail({ issueId, onDelete, onArchive, onUnsubscribeArchive, inboxItem, defaultSidebarOpen = true, layoutId = ISSUE_DETAIL_LAYOUT_ID, highlightCommentId: linkedCommentId, highlightRequestToken: linkedRequestToken, highlightRequestPending = false, onHighlightLanded, highlightAppRequestId, leadingAction, variant = "page", trailingActions, notice, readsInbox = true, skipInitialRefetch = false, openDeliverable, onDeliverableLinkDone }: IssueDetailProps) {+export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = true, layoutId = ISSUE_DETAIL_LAYOUT_ID, highlightCommentId: linkedCommentId, highlightRequestToken: linkedRequestToken, highlightRequestPending = false, onHighlightLanded, highlightAppRequestId, leadingAction, variant = "page", trailingActions, readsInbox = true, skipInitialRefetch = false, openDeliverable, onDeliverableLinkDone }: IssueDetailProps) {const isPeek = variant === "peek";const { t } = useT("issues");const { t: tCommon } = useT("common");@@ -1583,8 +1583,7 @@ export function IssueDetail({ issueId, onDelete, onArchive, onUnsubscribeArchive// task. The hold is bounded in case the landing never runs (a target that// is gone). `null`: the full overscan.//- // An Inbox click marks its landing pending before the page mounts; the- // comment it names arrives a render later on web, with the URL's fragment.+ // An Inbox click marks its landing pending before the page mounts.const landingAtMount = highlightRequestPending || (!!highlightCommentId && !highlightConsumed);const [landingOverscanStep, setLandingOverscanStep] = useState<number | null>(() => (landingAtMount ? 0 : null),@@ -1598,9 +1597,6 @@ export function IssueDetail({ issueId, onDelete, onArchive, onUnsubscribeArchiveconst [landingChromeHeld, setLandingChromeHeld] = useState(() => landingAtMount);const releaseLandingChrome = useCallback(() => setLandingChromeHeld(false), []);const reduceMotion = useReducedMotion();- const fromSidebarInbox = useInboxSelectionStore(- (s) => !!wsId && s.sidebarIssueByWorkspace[wsId] === id,- );const pendingInboxTransition = useInboxSelectionStore((s) =>wsId ? s.transitionByWorkspace[wsId] : undefined,);@@ -3032,8 +3028,8 @@ export function IssueDetail({ issueId, onDelete, onArchive, onUnsubscribeArchive// Called before the `if (!issue)` early return so hook order stays stable.const actions = useIssueActions(issue);const handleUpdateField = actions.updateField;- // The inbox passes `onArchive` and owns archive and restore there.- const archivedInboxItemId = useArchivedInboxItemId(id, !onArchive);+ // The Inbox page owns archive and restore for the notification it has open.+ const archivedInboxItemId = useArchivedInboxItemId(id, !inbox);const pageMenu = useIssuePageMenu();// Labels live in their own query (not on the issue body) — fetch the count@@ -3208,8 +3204,8 @@ export function IssueDetail({ issueId, onDelete, onArchive, onUnsubscribeArchivetrailing={trailingActions}sidebar={!isPeek && desktopSidebarOpen}layoutId={layoutId}- showInboxBar={!isPeek && (!!inboxItem || fromSidebarInbox)}- inboxItem={isPeek ? undefined : inboxItem}+ showInboxBar={!!inbox}+ inboxItem={inbox?.item}/>);}@@ -3809,23 +3805,26 @@ export function IssueDetail({ issueId, onDelete, onArchive, onUnsubscribeArchive// different project than its parent), so we never render both: parent wins,// else project, else nothing. The project is still shown in the properties// panel. The workspace name is intentionally absent — "all issues" is a view,- // not a container.- const breadcrumbSegments: BreadcrumbSegment[] = parentIssue- ? [{ href: paths.issueDetail(issueRouteRef(parentIssue)), label: parentIssue.identifier }]- : breadcrumbProject- ? [- {- href: paths.projectDetail(breadcrumbProject.id),- className: "flex items-center gap-1 min-w-0 max-w-72",- label: (- <>- <ProjectIcon project={breadcrumbProject} size="sm" />- <span className="min-w-0 truncate">{breadcrumbProject.title}</span>- </>- ),- },- ]- : [];+ // not a container. On the Inbox page the issue is read as a notification, so+ // the trail leads back to the Inbox instead.+ const breadcrumbSegments: BreadcrumbSegment[] = inbox+ ? inbox.crumb ? [inbox.crumb] : []+ : parentIssue+ ? [{ href: paths.issueDetail(issueRouteRef(parentIssue)), label: parentIssue.identifier }]+ : breadcrumbProject+ ? [+ {+ href: paths.projectDetail(breadcrumbProject.id),+ className: "flex items-center gap-1 min-w-0 max-w-72",+ label: (+ <>+ <ProjectIcon project={breadcrumbProject} size="sm" />+ <span className="min-w-0 truncate">{breadcrumbProject.title}</span>+ </>+ ),+ },+ ]+ : [];const titleSizeClass = isPeek ? "text-title-lg font-semibold" : ISSUE_PAGE_TITLE_CLASS;@@ -3903,6 +3902,17 @@ export function IssueDetail({ issueId, onDelete, onArchive, onUnsubscribeArchive<IssueAgentHeaderChip issueId={id} onJumpToRun={jumpToRun} /></div>)}+ {inbox && (+ <IconButton+ label={t(($) => $.detail.open_issue_page)}+ tooltipSide="bottom"+ className="text-muted-foreground"+ nativeButton={false}+ render={<AppLink href={paths.issueDetail(issueRouteRef(issue))} />}+ >+ <ArrowUpRight />+ </IconButton>+ )}{!guest && <IssueDetailActionsDropdownissue={issue}locateInSidebar={!isPeek}@@ -3940,19 +3950,7 @@ export function IssueDetail({ issueId, onDelete, onArchive, onUnsubscribeArchive</>}/>- {notice?.(inboxIssueActions) ??- (onArchive ? (- inboxItem && (- <InboxOpenBar item={inboxItem} issueActions={inboxIssueActions}>- {onUnsubscribeArchive && (- <UnsubscribeArchiveButton issueId={id} userId={user?.id} onConfirm={onUnsubscribeArchive} />- )}- <InboxArchiveButton onClick={onArchive} />- </InboxOpenBar>- )- ) : (- !isPeek && <IssueInboxBar issueId={id} issueActions={inboxIssueActions} />- ))}+ {inbox?.bar(inboxIssueActions)}{/* scrollbar-gutter both-edges: with classic (space-taking) scrollbars —macOS with a mouse or "always show", Windows, Linux — the globaldiff --git a/packages/views/issues/components/issues-page.tsx b/packages/views/issues/components/issues-page.tsxindex e5722bfd2b..f19d48ec99 100644--- a/packages/views/issues/components/issues-page.tsx+++ b/packages/views/issues/components/issues-page.tsx@@ -2,29 +2,16 @@import { ListTodo, MessageSquare, Plus } from "@multica/ui/icons";import { Button } from "@multica/ui/components/ui/button";-import { useWorkspaceId } from "@multica/core/hooks";-import { issueViewContainerKey, useActiveIssueViewStore } from "@multica/core/issue-views/active-view-store";import { useIssuesScope } from "@multica/core/issues/stores/issues-scope-store";import { useStartChatWithDraft } from "../../chat/use-start-chat-with-draft";import { useT } from "../../i18n";import { CollectionPageState } from "../../layout/collection-page";import { IssueSurface } from "../surface/issue-surface";import { IssueViewHeader } from "../../issue-views/view-header";-import { SNOOZED_VIEW_ID } from "../../issue-views/builtin-views";-import { SnoozedInboxPage } from "../../inbox/components/snoozed-inbox-page";const WORKSPACE_BASE = { kind: "workspace" } as const;-const WORKSPACE_SCOPE = { scope_type: "workspace" } as const;export function IssuesPage() {- const wsId = useWorkspaceId();- const activeViewId = useActiveIssueViewStore((s) => s.active[issueViewContainerKey(wsId, WORKSPACE_SCOPE)] ?? null);- // Snoozed is the Inbox's, listed by when each issue comes back, not a filter of the table.- if (activeViewId === SNOOZED_VIEW_ID) return <SnoozedInboxPage />;- return <IssuesSurfacePage />;-}--function IssuesSurfacePage() {const { t } = useT("issues");const scope = useIssuesScope("issues");const startChat = useStartChatWithDraft();diff --git a/packages/views/layout/panel-nav.tsx b/packages/views/layout/panel-nav.tsxindex e0b54d09ed..5ed2702b57 100644--- a/packages/views/layout/panel-nav.tsx+++ b/packages/views/layout/panel-nav.tsx@@ -104,6 +104,7 @@ export function PanelBody({export function PanelSection({label,+ heading,action,collapsed,onCollapsedChange,@@ -111,6 +112,12 @@ export function PanelSection({...props}: Omit<React.ComponentProps<"section">, "children" | "className"> & {label: string;+ /**+ * Shown in place of the label (the Inbox's tabs), which then only names the+ * section for assistive tech. With `onCollapsedChange`, a chevron after it+ * toggles the section.+ */+ heading?: React.ReactNode;/** Rendered at the end of the label row (e.g. a create button). */action?: React.ReactNode;/** With `onCollapsedChange`, the label toggles the section's content. */@@ -121,33 +128,59 @@ export function PanelSection({const id = useId();const contentId = useId();const collapsible = !!onCollapsedChange;+ const chevron = (+ <ChevronDown+ aria-hidden+ className={cn(+ "size-3.5 shrink-0 transition-[transform,opacity] duration-150 ease-out motion-reduce:transition-none",+ collapsed+ ? "-rotate-90"+ : "opacity-0 group-hover/section:opacity-100 group-focus-within/section:opacity-100",+ )}+ />+ );return (<section {...props} data-mc="panel-section" aria-labelledby={id} className="mt-5"><div className="group/section flex h-7 items-center gap-1 pl-3 pr-1">- <h3 id={id} className="min-w-0 flex-1 truncate text-caption font-medium text-muted-foreground">- {collapsible ? (- <button- type="button"- aria-expanded={!collapsed}- aria-controls={collapsed ? undefined : contentId}- onClick={() => onCollapsedChange(!collapsed)}- className="-mx-1 flex max-w-full items-center gap-0.5 rounded-md px-1 outline-none hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring"- >- <span className="truncate">{label}</span>- <ChevronDown- aria-hidden- className={cn(- "size-3.5 shrink-0 transition-[transform,opacity] duration-150 ease-out motion-reduce:transition-none",- collapsed- ? "-rotate-90"- : "opacity-0 group-hover/section:opacity-100 group-focus-within/section:opacity-100",- )}- />- </button>- ) : (- label- )}- </h3>+ {heading ? (+ <>+ <h3 id={id} className="sr-only">+ {label}+ </h3>+ <div className="flex min-w-0 flex-1 items-center gap-0.5 text-caption font-medium text-muted-foreground">+ {heading}+ {collapsible && (+ <button+ type="button"+ aria-label={label}+ aria-expanded={!collapsed}+ aria-controls={collapsed ? undefined : contentId}+ onClick={() => onCollapsedChange(!collapsed)}+ className="flex size-5 shrink-0 items-center justify-center rounded-md outline-none hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring"+ >+ {chevron}+ </button>+ )}+ </div>+ </>+ ) : (+ <h3 id={id} className="min-w-0 flex-1 truncate text-caption font-medium text-muted-foreground">+ {collapsible ? (+ <button+ type="button"+ aria-expanded={!collapsed}+ aria-controls={collapsed ? undefined : contentId}+ onClick={() => onCollapsedChange(!collapsed)}+ className="-mx-1 flex max-w-full items-center gap-0.5 rounded-md px-1 outline-none hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring"+ >+ <span className="truncate">{label}</span>+ {chevron}+ </button>+ ) : (+ label+ )}+ </h3>+ )}{action}</div>{!collapsed && <div id={contentId}>{children}</div>}diff --git a/packages/views/layout/panels/guest-work-panel.test.tsx b/packages/views/layout/panels/guest-work-panel.test.tsxindex 8a5a4ed883..54e5a27d7e 100644--- a/packages/views/layout/panels/guest-work-panel.test.tsx+++ b/packages/views/layout/panels/guest-work-panel.test.tsx@@ -92,11 +92,11 @@ function renderPanel(initialPath: string, inbox: InboxItem[]) {function Harness() {const [pathname, setPathname] = useState(initialPath);const adapter: NavigationAdapter = {- push: (path) => setPathname(new URL(path, "http://x").pathname),+ push: setPathname,replace: setPathname,back: vi.fn(),- pathname,- searchParams: new URLSearchParams(),+ pathname: pathname.split("?")[0]!,+ searchParams: new URLSearchParams(pathname.split("?")[1]),hash: "",getShareableUrl: (path) => path,};@@ -120,8 +120,6 @@ const inInbox = () => document.querySelector('[data-sidebar-list="inbox"]') as HbeforeEach(() => {useSidebarTreeStore.setState({ inboxCollapsed: false });useInboxSelectionStore.setState({- sidebarIssueByWorkspace: {},- sidebarTabIssuesByWorkspace: {},heldRows: {},leftRowKeyByWorkspace: {},});@@ -137,11 +135,10 @@ describe("GuestWorkPanel", () => {expect(await within(inInbox()).findByRole("link", { name: INBOX_ROW_NAME })).toBeInTheDocument();});- it("opens a notification's issue and keeps its row lit", async () => {+ it("opens a notification on the Inbox page and keeps its row lit", async () => {renderPanel("/acme/inbox", [NOTIFICATION]);fireEvent.click(await within(inInbox()).findByRole("link", { name: INBOX_ROW_NAME }));- expect(screen.getByTestId("pathname")).toHaveTextContent(`/acme/issues/${ISSUE.id}`);- expect(useInboxSelectionStore.getState().sidebarIssueByWorkspace["ws-1"]).toBe(ISSUE.id);+ expect(screen.getByTestId("pathname")).toHaveTextContent(`/acme/inbox?issue=${ISSUE.id}`);await waitFor(() =>expect(within(inInbox()).getByRole("link", { name: INBOX_ROW_NAME })).toHaveAttribute("aria-current", "page"),);diff --git a/packages/views/layout/panels/guest-work-panel.tsx b/packages/views/layout/panels/guest-work-panel.tsxindex 6240f07a22..b2386df994 100644--- a/packages/views/layout/panels/guest-work-panel.tsx+++ b/packages/views/layout/panels/guest-work-panel.tsx@@ -4,21 +4,16 @@ import { useQuery } from "@tanstack/react-query";import { Eye } from "@multica/ui/icons";import { Badge } from "@multica/ui/components/ui/badge";import { TooltipHint } from "@multica/ui/components/common/tooltip-hint";-import { useInboxSelectionStore } from "@multica/core/inbox/selection-store";-import { isIssueUuid } from "@multica/core/issues/canonical-id";-import { issueDetailOptions } from "@multica/core/issues/queries";import { useCurrentWorkspace, useWorkspacePaths } from "@multica/core/paths";import { projectListOptions } from "@multica/core/projects/queries";import type { Project } from "@multica/core/types";-import { resolveClickIntent, useNavigation } from "../../navigation";+import { useNavigation } from "../../navigation";import { AutoArchivePromptDialog } from "../../inbox/components/auto-archive-prompt-dialog";-import { useSidebarInboxIssue } from "../../inbox/components/use-sidebar-inbox-issue";import { ProjectIcon } from "../../projects/components/project-icon";import { useT } from "../../i18n";import { PanelBody, PanelCount, PanelHeader, PanelLink, PanelList, PanelSection, isPathWithin } from "../panel-nav";import { routeIconForPath } from "../route-icon-components";-import { INBOX_LIST, InboxSection, useInboxSectionRows } from "./inbox-section";-import { routeSegment } from "./work-panel";+import { InboxSection, useInboxSectionRows } from "./inbox-section";const EMPTY_PROJECTS: Project[] = [];@@ -33,7 +28,7 @@ const EMPTY_PROJECTS: Project[] = [];export function GuestWorkPanel() {const { t } = useT("layout");const p = useWorkspacePaths();- const { pathname, searchParams, openInNewTab } = useNavigation();+ const { pathname, searchParams } = useNavigation();const workspace = useCurrentWorkspace();const wsId = workspace?.id;const { data: projects = EMPTY_PROJECTS } = useQuery({@@ -43,46 +38,9 @@ export function GuestWorkPanel() {const shared = projects.filter((project) => !project.archived_at);const InvolvedIcon = routeIconForPath(p.myIssues());- // Cache read only: the detail page owns resolving the route's issue.- const issueSegment = routeSegment(pathname, p.issues());- const { data: currentIssue } = useQuery({- ...issueDetailOptions(wsId ?? "", issueSegment ?? ""),- enabled: false,- });- const currentIssueId = issueSegment- ? (currentIssue?.id ?? (isIssueUuid(issueSegment) ? issueSegment : null))- : null;- const inbox = useSidebarInboxIssue(wsId, currentIssueId);- const inboxOpenKey =- pathname === p.inbox()- ? searchParams.get("issue")- : currentIssueId && inbox.fromInbox- ? currentIssueId- : null;+ // The notification open on the Inbox page beside the section.+ const inboxOpenKey = pathname === p.inbox() ? searchParams.get("issue") : null;const inboxRows = useInboxSectionRows(wsId, inboxOpenKey);- const inboxClaimsIssue = !!currentIssueId && inbox.fromInbox && !inboxRows.collapsed;- const rememberSidebarIssue = useInboxSelectionStore((s) => s.rememberSidebarIssue);- const rememberSidebarTabIssue = useInboxSelectionStore((s) => s.rememberSidebarTabIssue);- const forgetSidebarTabIssue = useInboxSelectionStore((s) => s.forgetSidebarTabIssue);- // An issue opened from an Inbox row belongs to the Inbox, as in the member- // panel: its row stays lit and the issue header moves on to the next one.- const rememberInboxIssue = (event: React.MouseEvent) => {- // A middle click opens a tab; other buttons open nothing.- if (event.type === "auxclick" && event.button !== 1) return;- const link = (event.target as HTMLElement).closest("a[href]");- const segment = link?.getAttribute("data-issue-id");- if (!link || !segment || !wsId) return;- // An Inbox row's hover card renders in a portal, outside the row's list.- const fromInbox =- !!link.closest("[data-inbox-card]") || link.closest("[data-sidebar-list]")?.getAttribute("data-sidebar-list") === INBOX_LIST;- if (!fromInbox) return;- if (resolveClickIntent(event) !== "push" || (event.shiftKey && !openInNewTab)) {- if (openInNewTab) rememberSidebarTabIssue(wsId, segment);- return;- }- rememberSidebarIssue(wsId, segment);- forgetSidebarTabIssue(wsId, segment);- };return (<>@@ -94,7 +52,7 @@ export function GuestWorkPanel() {</Badge></TooltipHint></PanelHeader>- <PanelBody onClickCapture={rememberInboxIssue} onAuxClickCapture={rememberInboxIssue}>+ <PanelBody><PanelList><PanelLinkhref={p.myIssues()}@@ -108,7 +66,6 @@ export function GuestWorkPanel() {wsId={wsId}rows={inboxRows}pathname={pathname}- activeIssueId={inboxClaimsIssue ? currentIssueId : null}/>)}{wsId && <AutoArchivePromptDialog wsId={wsId} active={!!inboxOpenKey} />}diff --git a/packages/views/layout/panels/inbox-section.test.tsx b/packages/views/layout/panels/inbox-section.test.tsxindex ba595fc9a8..1c2ab8be97 100644--- a/packages/views/layout/panels/inbox-section.test.tsx+++ b/packages/views/layout/panels/inbox-section.test.tsx@@ -35,7 +35,7 @@ const state = vi.hoisted(() => ({unsnooze: vi.fn(() => Promise.resolve()),}));-const apiMock = vi.hoisted(() => ({ listInbox: vi.fn() }));+const apiMock = vi.hoisted(() => ({ listInbox: vi.fn(), listArchivedInboxPage: vi.fn() }));vi.mock("@multica/core/api", async (importOriginal) => ({...(await importOriginal<typeof import("@multica/core/api")>()),api: apiMock,@@ -60,7 +60,7 @@ vi.mock("@multica/core/inbox/mutations", () => ({return Promise.resolve();},}),- useUnarchiveInbox: () => ({ mutateAsync: state.unarchive }),+ useUnarchiveInbox: () => ({ mutateAsync: state.unarchive, mutate: state.unarchive }),useMarkAllInboxRead: () => ({ mutate: state.markAllRead }),useArchiveAllInbox: () => ({ mutateAsync: async () => (await state.archiveAll()) ?? { count: 1 } }),useArchiveAllReadInbox: () => ({ mutateAsync: async () => (await state.archiveAllRead()) ?? { count: 1 } }),@@ -127,15 +127,16 @@ function adapter(url: string): NavigationAdapter {};}-function Harness({ activeIssueId, pathname, openKey }: { activeIssueId: string | null; pathname: string; openKey: string | null }) {+function Harness({ pathname, openKey }: { pathname: string; openKey: string | null }) {const rows = useInboxSectionRows("ws-1", openKey);- return <InboxSection wsId="ws-1" rows={rows} pathname={pathname} activeIssueId={activeIssueId} />;+ return <InboxSection wsId="ws-1" rows={rows} pathname={pathname} />;}+/** `openIssueId`: the notification the Inbox page has open, beside the section. */function renderSection(items: InboxItem[],- activeIssueId: string | null = null,- url = "/acme/issues",+ openIssueId: string | null = null,+ url = openIssueId ? `/acme/inbox?issue=${openIssueId}` : "/acme/issues",tasks: Partial<AgentTask>[] = [],snoozed: SnoozedInboxIssue[] = [],agents: Pick<Agent, "id" | "owner_id">[] = [],@@ -146,12 +147,12 @@ function renderSection(client.setQueryData(agentListOptions("ws-1").queryKey, agents as Agent[]);client.setQueryData(agentTaskSnapshotOptions("ws-1").queryKey, tasks as AgentTask[]);const nav = adapter(url);- // As the Work panel keys it: the issue opened from the section, or the Inbox page's notification.- const openKey = nav.pathname === "/acme/inbox" ? nav.searchParams.get("issue") : activeIssueId;+ // As the Work panel keys it: the Inbox page's notification.+ const openKey = nav.pathname === "/acme/inbox" ? nav.searchParams.get("issue") : null;const result = renderWithI18n(<QueryClientProvider client={client}><NavigationProvider value={nav}>- <Harness activeIssueId={activeIssueId} pathname={nav.pathname} openKey={openKey} />+ <Harness pathname={nav.pathname} openKey={openKey} /></NavigationProvider></QueryClientProvider>,);@@ -174,9 +175,10 @@ beforeEach(() => {]) {spy.mockReset();}- useSidebarTreeStore.setState({ inboxCollapsed: false, inboxSettings: DEFAULT_SIDEBAR_INBOX_SETTINGS });+ // Rows with the actor line; the compact default has tests of its own.+ useSidebarTreeStore.setState({ inboxCollapsed: false, inboxSettings: { ...DEFAULT_SIDEBAR_INBOX_SETTINGS, compact: false } });useInboxFilterStore.getState().clearFilters("ws-1");- useInboxSelectionStore.setState({ landing: null, heldRows: {}, leftRowKeyByWorkspace: {} });+ useInboxSelectionStore.setState({ landing: null, heldRows: {}, leftRowKeyByWorkspace: {}, sectionTabByWorkspace: {} });});describe("InboxSection", () => {@@ -197,30 +199,18 @@ describe("InboxSection", () => {expect(rows()[1]!.querySelector("[data-mc='unread-dot']")).toBeNull();});- it("opens the issue at the comment it is about, and an issue-less notice on the Inbox page", () => {+ it("opens every notification on the Inbox page, an issue's by the issue and an issue-less one by its own id", () => {renderSection([item({ id: "n1", issue_id: "issue-a", title: "Commented", details: { comment_id: "c-1" } }),item({ id: "n2", issue_id: "issue-b", title: "Assigned", type: "issue_assigned", created_at: "2026-11-09T08:00:00Z" }),item({ id: "n3", issue_id: null, title: "Autopilot paused", type: "autopilot_paused", created_at: "2026-11-08T08:00:00Z" }),]);- expect(screen.getByRole("link", { name: /^Commented/ })).toHaveAttribute("href", "/acme/issues/issue-a#comment-c-1");- expect(screen.getByRole("link", { name: /^Assigned/ })).toHaveAttribute("href", "/acme/issues/issue-b");+ expect(screen.getByRole("link", { name: /^Commented/ })).toHaveAttribute("href", "/acme/inbox?issue=issue-a");+ expect(screen.getByRole("link", { name: /^Assigned/ })).toHaveAttribute("href", "/acme/inbox?issue=issue-b");expect(screen.getByRole("link", { name: /^Autopilot paused/ })).toHaveAttribute("href", "/acme/inbox?issue=n3");});- it("opens the issue at its oldest unread comment, or its newest once read", () => {- renderSection([- item({ id: "n1", issue_id: "issue-a", title: "Unread thread", details: { comment_id: "c-2" }, created_at: "2026-11-10T09:00:00Z" }),- item({ id: "n2", issue_id: "issue-a", title: "Unread thread", details: { comment_id: "c-1" }, created_at: "2026-11-10T08:00:00Z" }),- item({ id: "n3", issue_id: "issue-b", title: "Read thread", read: true, details: { comment_id: "c-4" }, created_at: "2026-11-09T09:00:00Z" }),- item({ id: "n4", issue_id: "issue-b", title: "Read thread", read: true, details: { comment_id: "c-3" }, created_at: "2026-11-09T08:00:00Z" }),- ]);-- expect(screen.getByRole("link", { name: /^Unread thread/ })).toHaveAttribute("href", "/acme/issues/issue-a#comment-c-1");- expect(screen.getByRole("link", { name: /^Read thread/ })).toHaveAttribute("href", "/acme/issues/issue-b#comment-c-4");- });-it("marks issues an agent is working on or queued for", () => {renderSection([@@ -244,24 +234,7 @@ describe("InboxSection", () => {expect(idle!.querySelector("[data-testid=agents]")).toBeNull();});- it("opens an app's request on its issue at that request", () => {- renderSection([- item({ id: "n1", issue_id: "issue-a", title: "Confirm deploy", type: "app_action_requested", details: { request_id: "r-1" } }),- ]);-- expect(screen.getByRole("link", { name: /^Confirm deploy/ })).toHaveAttribute("href", "/acme/issues/issue-a#app-request-r-1");- });-- it("lands an app's request over an older comment notification on the same issue", () => {- renderSection([- item({ id: "app-n", issue_id: "issue-a", title: "Confirm deploy", type: "app_action_requested", details: { request_id: "r-1" }, created_at: "2026-11-10T09:00:00Z" }),- item({ id: "comment-n", issue_id: "issue-a", title: "Older comment", type: "new_comment", details: { comment_id: "c-1" }, created_at: "2026-11-10T08:00:00Z" }),- ]);-- expect(screen.getByRole("link", { name: /^Confirm deploy/ })).toHaveAttribute("href", "/acme/issues/issue-a#app-request-r-1");- });-- it("asks the issue page to land again on every click, even on the issue already open", () => {+ it("asks the Inbox page to land again on every click, even on the issue already open", () => {renderSection([item({ id: "n1", issue_id: "issue-a", title: "Commented", details: { comment_id: "c-1" } })], "issue-a");fireEvent.click(screen.getByRole("link", { name: /^Commented/ }));@@ -353,7 +326,7 @@ describe("InboxSection", () => {const card = await screen.findByText("Ship it on Friday", { selector: "[data-inbox-card] p" }, { timeout: 2000 });const actions = within(card.closest<HTMLElement>("[data-inbox-card]")!);- expect(actions.getByRole("link", { name: "Open" })).toHaveAttribute("href", "/acme/issues/issue-a");+ expect(actions.getByRole("link", { name: "Open" })).toHaveAttribute("href", "/acme/inbox?issue=issue-a");fireEvent.click(actions.getByRole("button", { name: "Mark as read" }));expect(state.markRead).toHaveBeenCalledWith("n1");fireEvent.click(actions.getByRole("button", { name: "Archive" }));@@ -431,7 +404,7 @@ describe("InboxSection", () => {fireEvent.click(within(rows()[0]!).getByRole("button", { name: "Archive" }));expect(state.archive).toHaveBeenCalledWith("n1");- expect(nav.push).toHaveBeenCalledWith("/acme/issues/issue-b");+ expect(nav.push).toHaveBeenCalledWith("/acme/inbox?issue=issue-b");expect(useInboxSelectionStore.getState().leftRowKeyByWorkspace["ws-1"]).toBe("issue-a");});@@ -466,7 +439,7 @@ describe("InboxSection", () => {expect(rows()).toHaveLength(7);});- it("lights only the row of the issue opened from it", () => {+ it("lights only the row of the issue the Inbox page has open", () => {renderSection([item({ id: "n1", issue_id: "issue-a", title: "Open one" }),@@ -500,7 +473,7 @@ describe("InboxSection", () => {it("is the whole list on a wide screen: no link out to another one, and a plain line when empty", () => {const { unmount } = renderSection([item({ id: "n1", issue_id: "issue-a", title: "Only one" })]);expect(screen.queryByRole("link", { name: "All notifications" })).toBeNull();- expect(screen.getAllByRole("link").map((link) => link.getAttribute("href"))).toEqual(["/acme/issues/issue-a"]);+ expect(screen.getAllByRole("link").map((link) => link.getAttribute("href"))).toEqual(["/acme/inbox?issue=issue-a"]);unmount();renderSection([]);@@ -561,7 +534,7 @@ describe("InboxSection", () => {fireEvent.click(screen.getByRole("button", { name: "Inbox actions" }));fireEvent.click(within(await screen.findByRole("menu")).getByRole("menuitem", { name: "Archive all read" }));expect(state.archiveAllRead).toHaveBeenCalledTimes(1);- expect(nav.push).toHaveBeenCalledWith("/acme/issues/issue-c");+ expect(nav.push).toHaveBeenCalledWith("/acme/inbox?issue=issue-c");});it("moves to Inbox Zero once a bulk archive takes every row", async () => {@@ -617,25 +590,70 @@ describe("InboxSection", () => {expect(state.snooze).toHaveBeenCalledWith({ id: "n1", until: expect.any(Date) });});- it("opens the snoozed list from the section header, with its count", async () => {+ it("puts the snoozed issues in a tab of their own, with their count, each opening on the Inbox page", async () => {const until = "2099-01-01T09:00:00Z";- const { nav } = renderSection([item({ id: "n1", issue_id: "issue-a" })], null, "/acme/issues", [], [- { issue_id: "issue-z", item_id: "z1", snoozed_until: until, snoozed_at: "2026-11-10T09:00:00Z", updates: 0 },+ renderSection([item({ id: "n1", issue_id: "issue-a" })], null, "/acme/issues", [], [+ { issue_id: "issue-z", issue_identifier: "MUL-26", item_id: "z1", snoozed_until: until, snoozed_at: "2026-11-10T09:00:00Z", updates: 0 },]);- fireEvent.click(screen.getByRole("button", { name: "Inbox actions" }));- const entry = within(await screen.findByRole("menu")).getByRole("menuitem", { name: /View snoozed/ });- expect(entry).toHaveTextContent("1");- fireEvent.click(entry);- expect(nav.push).toHaveBeenCalledWith("/acme/issues?view=snoozed");+ const tab = screen.getByRole("tab", { name: /^Snoozed/ });+ expect(tab).toHaveTextContent("1");+ fireEvent.click(tab);+ expect(tab).toHaveAttribute("aria-selected", "true");+ expect(rows()).toHaveLength(0);+ expect(screen.getByRole("link", { name: /^MUL-26/ })).toHaveAttribute("href", "/acme/inbox?view=snoozed&issue=issue-z");+ expect(screen.queryByRole("button", { name: "Inbox actions" })).toBeNull();++ fireEvent.click(screen.getByRole("button", { name: "Bring back now" }));+ expect(state.unsnooze).toHaveBeenCalledWith(expect.objectContaining({ id: "z1" }));});- it("opens the archive from the section header", async () => {- const { nav } = renderSection([item({ id: "n1", issue_id: "issue-a" })]);+ it("lists the archive in a tab, each row opening there and restoring from its button", async () => {+ apiMock.listArchivedInboxPage.mockResolvedValue({+ items: [item({ id: "a1", issue_id: "issue-x", title: "Done with this", archived: true })],+ nextCursor: null,+ hasMore: false,+ });+ renderSection([item({ id: "n1", issue_id: "issue-a" })]);++ fireEvent.click(screen.getByRole("tab", { name: /^Archived/ }));+ const link = await screen.findByRole("link", { name: /^Done with this/ });+ expect(link).toHaveAttribute("href", "/acme/inbox?view=archived&issue=issue-x");+ fireEvent.click(screen.getByRole("button", { name: "Move back to Inbox" }));+ expect(state.unarchive).toHaveBeenCalledWith("a1");+ });- fireEvent.click(screen.getByRole("button", { name: "Inbox actions" }));- fireEvent.click(within(await screen.findByRole("menu")).getByRole("menuitem", { name: "View archived" }));- expect(nav.push).toHaveBeenCalledWith("/acme/inbox?view=archived");+ it("lands again on every click of an archived row, and moves the page on when the open one is restored", async () => {+ apiMock.listArchivedInboxPage.mockResolvedValue({+ items: [+ item({ id: "a1", issue_id: "issue-x", title: "Done with this", archived: true }),+ item({ id: "a2", issue_id: "issue-y", title: "And this", archived: true }),+ ],+ nextCursor: null,+ hasMore: false,+ });+ const { nav } = renderSection([], null, "/acme/inbox?view=archived&issue=issue-x");++ const link = await screen.findByRole("link", { name: /^Done with this/ });+ fireEvent.click(link);+ const first = useInboxSelectionStore.getState().landing;+ fireEvent.click(link);+ expect(first?.issueId).toBe("issue-x");+ expect(useInboxSelectionStore.getState().landing).toEqual({ issueId: "issue-x", token: first!.token + 1, landed: false });++ const [restoreOpen] = screen.getAllByRole("button", { name: "Move back to Inbox" });+ fireEvent.click(restoreOpen!);+ expect(nav.replace).toHaveBeenCalledWith("/acme/inbox?view=archived&issue=issue-y");+ expect(state.unarchive).toHaveBeenCalledWith("a1");+ });++ it("follows the Inbox page's tab there, and switches the page's tab from the header", () => {+ const { nav } = renderSection([item({ id: "n1", issue_id: "issue-a" })], null, "/acme/inbox?view=archived");+ expect(screen.getByRole("tab", { name: /^Archived/ })).toHaveAttribute("aria-selected", "true");++ fireEvent.click(screen.getByRole("tab", { name: /^Inbox/ }));+ expect(nav.replace).toHaveBeenCalledWith("/acme/inbox");+ expect(useInboxSelectionStore.getState().sectionTabByWorkspace["ws-1"]).toBe("inbox");});});@@ -667,7 +685,7 @@ describe("InboxSection with every row shown", () => {};}- function renderInPanel(count: number, activeIssueId: string | null = null, above: ReactNode = null) {+ function renderInPanel(count: number, openIssueId: string | null = null, above: ReactNode = null) {const items = Array.from({ length: count }, (_, i) =>item({id: `n${i}`,@@ -683,10 +701,10 @@ describe("InboxSection with every row shown", () => {client.setQueryData(agentTaskSnapshotOptions("ws-1").queryKey, []);return renderWithI18n(<QueryClientProvider client={client}>- <NavigationProvider value={adapter("/acme/issues")}>+ <NavigationProvider value={adapter(openIssueId ? `/acme/inbox?issue=${openIssueId}` : "/acme/issues")}><PanelBody>{above}- <Harness activeIssueId={activeIssueId} pathname="/acme/issues" openKey={activeIssueId} />+ <Harness pathname={openIssueId ? "/acme/inbox" : "/acme/issues"} openKey={openIssueId} /></PanelBody></NavigationProvider></QueryClientProvider>,@@ -803,7 +821,7 @@ describe("InboxSection while the Inbox loads", () => {renderWithI18n(<QueryClientProvider client={client}><NavigationProvider value={nav}>- <Harness activeIssueId={null} pathname={nav.pathname} openKey={null} />+ <Harness pathname={nav.pathname} openKey={null} /></NavigationProvider></QueryClientProvider>,);diff --git a/packages/views/layout/panels/inbox-section.tsx b/packages/views/layout/panels/inbox-section.tsxindex 253835b610..fffe7f7f09 100644--- a/packages/views/layout/panels/inbox-section.tsx+++ b/packages/views/layout/panels/inbox-section.tsx@@ -1,12 +1,12 @@"use client";-import { memo, type ReactNode, type Ref, useLayoutEffect, useMemo, useRef, useState } from "react";+import { memo, type ReactNode, type Ref, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";import { AnimatePresence, motion, useIsPresent } from "motion/react";import { useVirtualizer } from "@tanstack/react-virtual";import { useQuery, useQueryClient } from "@tanstack/react-query";import { toast } from "sonner";import { useReducedMotion } from "@multica/core/appearance";-import { AlarmClock, Archive, BellOff, BookCheck, CheckCheck, History, ListChecks, MoreHorizontal } from "@multica/ui/icons";+import { AlarmClock, Archive, ArchiveRestore, BellOff, BookCheck, CheckCheck, ListChecks, MoreHorizontal } from "@multica/ui/icons";import { IconButton } from "@multica/ui/components/common/icon-button";import { UI_EASE_OUT, UI_MOTION_DURATION } from "@multica/ui/lib/motion";import { cn } from "@multica/ui/lib/utils";@@ -20,7 +20,6 @@ import {DropdownMenuContent,DropdownMenuItem,DropdownMenuSeparator,- DropdownMenuShortcut,DropdownMenuTrigger,} from "@multica/ui/components/ui/dropdown-menu";import { inboxTypeGroup, useInboxFilterStore } from "@multica/core/inbox/filter-store";@@ -31,7 +30,7 @@ import {useMarkAllInboxRead,useMarkInboxRead,} from "@multica/core/inbox/mutations";-import { snoozedInboxOptions, useInboxUnreadCount } from "@multica/core/inbox/queries";+import { useInboxUnreadCount } from "@multica/core/inbox/queries";import { inboxRowTime, inboxSnoozeReturnedAt } from "@multica/core/inbox/snooze";import { useIssueStatuses } from "@multica/core/issue-statuses/hooks";import { issueDetailOptions } from "@multica/core/issues/queries";@@ -39,18 +38,20 @@ import { useSidebarTreeStore } from "@multica/core/issues/stores/sidebar-tree-stimport { useInboxSelectionStore, type LastInboxCleared } from "@multica/core/inbox/selection-store";import { inboxRowKey, nextInboxRow } from "@multica/core/inbox/open-row";import { useWorkspacePaths } from "@multica/core/paths";-import type { InboxItem } from "@multica/core/types";+import type { InboxItem, SnoozedInboxIssue } from "@multica/core/types";import { AppLink, useNavigation } from "../../navigation";-import { useT } from "../../i18n";+import { useLocale, useT } from "../../i18n";import { INBOX_TYPE_ICONS } from "../../inbox/components/inbox-filter-options";import { getInboxDisplayTitle, inboxRowHref, isAutopilotQuotaNotice } from "../../inbox/components/inbox-display";-import { ARCHIVED_VIEW_PARAM } from "../../inbox/components/inbox-view";+import { inboxTabFromParam, inboxTabHref, type InboxTab } from "../../inbox/components/inbox-view";+import { InboxTabs } from "../../inbox/components/inbox-tabs";+import { formatSnoozeTime } from "../../inbox/components/inbox-snooze-time";+import { useArchivedInboxRows, useSnoozedInboxRows } from "../../inbox/components/use-inbox-tab-rows";import { useTypeLabels } from "../../inbox/components/inbox-detail-label";import { InboxActorAvatar, InboxActorLine } from "../../inbox/components/inbox-actor";import { InboxFilterMenu } from "../../inbox/components/inbox-filter-menu";import { InboxSnoozeMenu } from "../../inbox/components/inbox-snooze-menu";import { useInboxSnooze } from "../../inbox/components/use-inbox-snooze";-import { useBuiltinViewNavigation } from "../../issue-views/builtin-views";import { useFilteredInboxRows } from "../../inbox/components/use-filtered-inbox-rows";import { useInboxIssuePrefetch } from "../../inbox/components/use-inbox-issue-prefetch";import { useTimeAgo } from "../../inbox/components/inbox-list-item";@@ -61,13 +62,13 @@ import {useArchiveInboxBatchWithUndo,useArchiveInboxWithUndo,useLeaveInboxRow,+ useRestoreInbox,} from "../../inbox/components/use-leave-inbox-row";import { useKeptInboxRowText } from "../../inbox/components/inbox-kept-actions";import { StatusIcon } from "../../issues/components";import { useStatusLabel } from "../../issues/utils/status-label";import {PANEL_ROW_CLASS,- PanelCount,PanelLink,PanelList,PanelSection,@@ -84,18 +85,6 @@ import {useIssueAgentState,} from "./sidebar-tree";-/**- * The unread count sits in the panel's number column (the rows' trailing- * edge, 12px in from the label row's) and yields that spot to the section's- * buttons while they show. Where they always show (coarse pointers) it stays- * in line before them.- */-const HEADER_COUNT_CLASS = cn(- "pointer-events-none absolute top-1/2 right-2 -translate-y-1/2 font-medium text-brand transition-opacity duration-150",- "group-hover/section:opacity-0 group-focus-within/section:opacity-0",- "[@media(pointer:coarse)]:pointer-events-auto [@media(pointer:coarse)]:static [@media(pointer:coarse)]:translate-y-0 [@media(pointer:coarse)]:px-1 [@media(pointer:coarse)]:group-focus-within/section:opacity-100",-);-/** The Inbox rows' place in the clicked-issue record, apart from every sidebar source. */export const INBOX_LIST = "inbox";@@ -135,17 +124,19 @@ export function useInboxSectionRows(wsId: string | undefined, openKey: string |type InboxSectionRows = ReturnType<typeof useInboxSectionRows>;+/**+ * The Work panel's Inbox: its three lists as tabs in the header, the live+ * Inbox, the issues snoozed out of it, and the archive. Every row opens on+ * the Inbox page, on its tab.+ */export function InboxSection({wsId,rows,pathname,- activeIssueId,}: {wsId: string;rows: InboxSectionRows;pathname: string;- /** The open issue, when it was opened from this section. */- activeIssueId: string | null;}) {const { t } = useT("layout");const { t: tInbox } = useT("inbox");@@ -160,15 +151,31 @@ export function InboxSection({const unsubscribable = useInboxUnsubscribable(wsId);const unsubscribeArchive = useUnsubscribeArchive();const { snooze } = useInboxSnooze();- const { searchParams } = useNavigation();+ const { searchParams, replace } = useNavigation();const isCompact = useIsCompact();const { list, rows: all, displayed, expanded, limit, setExpanded } = rows;const keptText = useKeptInboxRowText(wsId);const clearFilters = useInboxFilterStore((state) => state.clearFilters);- // The notification the Inbox page has open, keyed as it groups rows.- const openKey = pathname === p.inbox() ? searchParams.get("issue") : null;- // The open notification, wherever it is open; acting on its row moves on.- const openRowKey = activeIssueId ?? openKey;+ // On the Inbox page its URL names the tab; elsewhere the section keeps the+ // one picked last.+ const onInboxPage = pathname === p.inbox();+ const pageTab = inboxTabFromParam(searchParams.get("view"));+ const storedTab = useInboxSelectionStore((s) => s.sectionTabByWorkspace[wsId] ?? "inbox");+ const setSectionTab = useInboxSelectionStore((s) => s.setSectionTab);+ const tab = onInboxPage ? pageTab : storedTab;+ useEffect(() => {+ if (onInboxPage) setSectionTab(wsId, pageTab);+ }, [onInboxPage, pageTab, setSectionTab, wsId]);+ const selectTab = (next: InboxTab) => {+ setSectionTab(wsId, next);+ if (collapsed) setCollapsed(false);+ if (onInboxPage && next !== pageTab) replace(inboxTabHref(p, next));+ };+ // What the Inbox page has open, keyed as its tab groups rows.+ const pageKey = onInboxPage ? searchParams.get("issue") : null;+ const openRowKey = pageTab === "inbox" ? pageKey : null;+ const snoozed = useSnoozedInboxRows(wsId);+ const archived = useArchivedInboxRows(wsId, tab === "archived" && !collapsed);const leaveIfOpen = (item: InboxItem, cleared: LastInboxCleared) => {const key = inboxRowKey(item);if (key === openRowKey) leave(key, nextInboxRow(all, key), cleared);@@ -251,10 +258,7 @@ export function InboxSection({measureIndex={measure?.index}measureRef={measure?.ref}href={inboxRowHref(p, item)}- active={- (!!item.issue_id && item.issue_id === activeIssueId) ||- (!!openKey && (item.issue_id ?? item.id) === openKey)- }+ active={!!openRowKey && inboxRowKey(item) === openRowKey}compact={compact}kept={list.kept?.item.id === item.id ? keptText.line(list.kept) : null}settled={list.kept?.item.id === item.id && list.kept.reason !== "filtered"}@@ -267,34 +271,59 @@ export function InboxSection({return (<PanelSectionlabel={t(($) => $.nav.inbox)}+ heading={+ <InboxTabs+ tab={tab}+ onSelect={selectTab}+ unread={showCount ? unread : undefined}+ snoozed={snoozed.rows.length}+ />+ }collapsed={collapsed}onCollapsedChange={setCollapsed}action={<div className="relative flex items-center gap-1">- {showCount && <PanelCount value={unread} className={HEADER_COUNT_CLASS} />}- <InboxFilterMenu- wsId={wsId}- items={list.notifications}- priorityFilterSupport={list.priorityFilterSupport}- issueFieldsSupport={list.issueFieldsSupport}- activeIssueIds={list.activeIssueIds}- sectionTrigger={{- className: cn(TREE_ROW_BUTTON_CLASS, "text-muted-foreground", SECTION_SETTINGS_REVEAL_CLASS),- // A filtered list says so even while the section is not hovered.- activeClassName: "w-auto gap-0.5 px-1 text-brand opacity-100 hover:text-brand",- }}- />+ {tab !== "snoozed" && (+ <InboxFilterMenu+ wsId={wsId}+ items={tab === "archived" ? archived.items : list.notifications}+ priorityFilterSupport={tab === "archived" ? "supported" : list.priorityFilterSupport}+ issueFieldsSupport={tab === "archived" ? archived.issueFieldsSupport : list.issueFieldsSupport}+ activeIssueIds={list.activeIssueIds}+ archived={tab === "archived"}+ sectionTrigger={{+ className: cn(TREE_ROW_BUTTON_CLASS, "text-muted-foreground", SECTION_SETTINGS_REVEAL_CLASS),+ // A filtered list says so even while the section is not hovered.+ activeClassName: "w-auto gap-0.5 px-1 text-brand opacity-100 hover:text-brand",+ }}+ />+ )}<InboxSectionSettings className={SECTION_SETTINGS_REVEAL_CLASS} />- <InboxSectionActions- wsId={wsId}- rows={all}- openRowKey={openRowKey}- className={SECTION_SETTINGS_REVEAL_CLASS}- />+ {tab === "inbox" && (+ <InboxSectionActions+ wsId={wsId}+ rows={all}+ openRowKey={openRowKey}+ className={SECTION_SETTINGS_REVEAL_CLASS}+ />+ )}</div>}>- {displayed.length > 0 ? (+ {tab === "snoozed" ? (+ <SnoozedSectionList+ wsId={wsId}+ list={snoozed}+ limit={limit}+ openKey={pageTab === "snoozed" ? pageKey : null}+ />+ ) : tab === "archived" ? (+ <ArchivedSectionList+ archived={archived}+ limit={limit}+ openKey={pageTab === "archived" ? pageKey : null}+ />+ ) : displayed.length > 0 ? (displayed.length > VIRTUALIZE_AFTER && scrollRef ? (<VirtualInboxList items={displayed} compact={compact} renderRow={renderRow} />) : (@@ -334,7 +363,7 @@ export function InboxSection({{t(($) => $.panels.work.inbox_empty)}</p>) : null}- {all.length > limit && (+ {tab === "inbox" && all.length > limit && (<buttontype="button"aria-expanded={expanded}@@ -350,12 +379,10 @@ export function InboxSection({{isCompact && (<PanelList><PanelLink- href={p.inbox()}+ href={inboxTabHref(p, tab)}icon={<span className="size-4" aria-hidden />}label={t(($) => $.panels.work.inbox_all)}- active={- pathname === p.inbox() && !openKey && searchParams.get("view") !== ARCHIVED_VIEW_PARAM- }+ active={onInboxPage && !pageKey && pageTab === tab}className="text-caption"/></PanelList>@@ -506,10 +533,6 @@ function InboxSectionActions({const archiveAll = useArchiveAllInbox();const archiveAllRead = useArchiveAllReadInbox();const archiveCompleted = useArchiveCompletedInbox();- const { push } = useNavigation();- const p = useWorkspacePaths();- const builtinNav = useBuiltinViewNavigation();- const { data: snoozed } = useQuery(snoozedInboxOptions(wsId));const label = t(($) => $.panels.work.inbox_actions);const onError = (fallback: string) => (err: unknown) =>toast.error(err instanceof Error && err.message ? err.message : fallback);@@ -534,23 +557,6 @@ function InboxSectionActions({<MoreHorizontal className="size-3.5" /></DropdownMenuTrigger><DropdownMenuContent side="right" align="start" className="w-auto min-w-48">- <DropdownMenuItem- onClick={() => {- builtinNav.prepare("snoozed");- push(builtinNav.hrefFor("snoozed"));- }}- >- <AlarmClock className="size-4" />- {t(($) => $.panels.work.inbox_view_snoozed)}- {!!snoozed?.length && (- <DropdownMenuShortcut className="tracking-normal tabular-nums">{snoozed.length}</DropdownMenuShortcut>- )}- </DropdownMenuItem>- <DropdownMenuItem onClick={() => push(`${p.inbox()}?${new URLSearchParams({ view: ARCHIVED_VIEW_PARAM })}`)}>- <History className="size-4" />- {t(($) => $.panels.work.inbox_view_archived)}- </DropdownMenuItem>- <DropdownMenuSeparator /><DropdownMenuItemonClick={() =>markAllRead.mutate(undefined, { onError: onError(tInbox(($) => $.errors.mark_all_read_failed)) })@@ -931,6 +937,296 @@ const InboxRow = memo(function InboxRow({);});+/** A tab's rows past the section's limit wait behind "Show N more". */+function useSectionLimit<T>(rows: readonly T[], limit: number) {+ const [expanded, setExpanded] = useState(false);+ return {+ shown: expanded ? rows : rows.slice(0, limit),+ more: rows.length > limit,+ expanded,+ toggle: () => setExpanded((value) => !value),+ };+}++function SectionMoreButton({ expanded, hidden, onToggle }: { expanded: boolean; hidden: number; onToggle: () => void }) {+ const { t } = useT("layout");+ return (+ <button+ type="button"+ aria-expanded={expanded}+ className={cn(PANEL_ROW_CLASS, panelRowStateClass(false), "pl-[2.375rem] text-caption")}+ onClick={onToggle}+ >+ {expanded ? t(($) => $.sidebar.show_fewer_pins) : t(($) => $.sidebar.show_more_pins, { count: hidden })}+ </button>+ );+}++/** A quiet line in place of a tab's rows: empty, or failed with another try. */+function SectionNote({ children, retry }: { children: ReactNode; retry?: { label: string; busy: boolean; run: () => void } }) {+ return (+ <div role={retry ? "alert" : undefined} className={cn(PANEL_ROW_CLASS, "pl-[2.375rem] text-caption text-faint-foreground")}>+ <span className="min-w-0 flex-1 truncate">{children}</span>+ {retry && (+ <button+ type="button"+ disabled={retry.busy}+ className="shrink-0 rounded-md px-1 font-medium text-muted-foreground outline-none hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50"+ onClick={retry.run}+ >+ {retry.label}+ </button>+ )}+ </div>+ );+}++/** The Snoozed tab: each snoozed issue and when it comes back, soonest first. */+function SnoozedSectionList({+ wsId,+ list,+ limit,+ openKey,+}: {+ wsId: string;+ list: ReturnType<typeof useSnoozedInboxRows>;+ limit: number;+ openKey: string | null;+}) {+ const { t } = useT("inbox");+ const { unsnooze } = useInboxSnooze();+ const { shown, more, expanded, toggle } = useSectionLimit(list.rows, limit);+ if (list.rows.length === 0) {+ if (list.load === "failed") {+ return (+ <SectionNote retry={{ label: t(($) => $.list.retry), busy: list.retrying, run: list.retry }}>+ {t(($) => $.errors.load_failed)}+ </SectionNote>+ );+ }+ return list.load === "loaded" ? <SectionNote>{t(($) => $.snooze.view_empty)}</SectionNote> : null;+ }+ return (+ <>+ <PanelList data-sidebar-list={INBOX_LIST}>+ {shown.map((entry) => (+ <SnoozedSectionRow+ key={entry.issue_id}+ wsId={wsId}+ entry={entry}+ active={entry.issue_id === openKey}+ onUnsnooze={() => unsnooze(entry.item_id, entry.issue_id)}+ />+ ))}+ </PanelList>+ {more && <SectionMoreButton expanded={expanded} hidden={list.rows.length - limit} onToggle={toggle} />}+ </>+ );+}++function SnoozedSectionRow({+ wsId,+ entry,+ active,+ onUnsnooze,+}: {+ wsId: string;+ entry: SnoozedInboxIssue;+ active: boolean;+ onUnsnooze: () => void;+}) {+ const { t } = useT("inbox");+ const locale = useLocale();+ const p = useWorkspacePaths();+ const { data: issue } = useQuery(issueDetailOptions(wsId, entry.issue_id));+ const { categoryOf, colorOf, iconOf } = useIssueStatuses(wsId);+ const backAt = formatSnoozeTime(new Date(entry.snoozed_until), new Date(), locale);+ const title = issue?.title ?? entry.issue_identifier ?? "";+ const unsnoozeLabel = t(($) => $.snooze.unsnooze);+ return (+ <li data-inbox-snoozed-row className="group/inbox relative">+ <div {...panelRowAnchor(active)} className={cn(PANEL_ROW_CLASS, panelRowStateClass(active), "relative")}>+ <span aria-hidden className="flex size-3.5 shrink-0">+ {issue && (+ <StatusIcon+ status={issue.status}+ category={categoryOf(issue.status)}+ color={colorOf(issue.status)}+ icon={iconOf(issue.status)}+ className="size-3.5"+ />+ )}+ </span>+ <AppLink+ href={inboxTabHref(p, "snoozed", entry.issue_id)}+ newTabTitle={title}+ data-issue-id={entry.issue_id}+ draggable={false}+ aria-current={active ? "page" : undefined}+ className={cn(ISSUE_ROW_LINK_CLASS, "gap-2.5 group-focus-within/inbox:pr-5 group-hover/inbox:pr-5")}+ >+ <span className="min-w-0 flex-1 truncate">{title}</span>+ <span+ title={t(($) => $.snooze.back_at, { time: backAt })}+ className="shrink-0 text-caption tabular-nums text-faint-foreground group-hover/inbox:invisible group-focus-within/inbox:invisible"+ >+ {backAt}+ </span>+ </AppLink>+ </div>+ <TooltipHint label={unsnoozeLabel}>+ <button+ type="button"+ aria-label={unsnoozeLabel}+ className={cn(rowButtonClass(true), "right-1.5")}+ onClick={(event) => {+ event.preventDefault();+ event.stopPropagation();+ onUnsnooze();+ }}+ >+ <AlarmClock className="size-3" />+ </button>+ </TooltipHint>+ </li>+ );+}++/** The Archived tab, a page at a time under the Inbox filters. */+function ArchivedSectionList({+ archived,+ limit,+ openKey,+}: {+ archived: ReturnType<typeof useArchivedInboxRows>;+ limit: number;+ openKey: string | null;+}) {+ const { t } = useT("inbox");+ const p = useWorkspacePaths();+ const { replace } = useNavigation();+ const { query, items } = archived;+ const restoreInbox = useRestoreInbox();+ const { shown, more, expanded, toggle } = useSectionLimit(items, limit);+ // Restoring the open row moves the page on to the next archived one, as+ // its own bar's restore does.+ const restore = (item: InboxItem) => {+ const key = inboxRowKey(item);+ if (key === openKey) {+ const next = nextInboxRow(items, key);+ replace(inboxTabHref(p, "archived", next ? inboxRowKey(next) : null));+ }+ void restoreInbox(item.id);+ };+ if (items.length === 0) {+ if (query.isError) {+ return (+ <SectionNote retry={{ label: t(($) => $.list.retry), busy: query.isFetching, run: () => void query.refetch() }}>+ {t(($) => $.errors.load_failed)}+ </SectionNote>+ );+ }+ return query.isSuccess ? <SectionNote>{t(($) => $.list.archived_empty)}</SectionNote> : null;+ }+ return (+ <>+ <PanelList data-sidebar-list={INBOX_LIST}>+ {shown.map((item) => (+ <ArchivedSectionRow+ key={item.id}+ item={item}+ active={inboxRowKey(item) === openKey}+ onRestore={() => restore(item)}+ />+ ))}+ </PanelList>+ {more && <SectionMoreButton expanded={expanded} hidden={items.length - limit} onToggle={toggle} />}+ {expanded && query.hasNextPage && (+ <button+ type="button"+ disabled={query.isFetchingNextPage}+ className={cn(PANEL_ROW_CLASS, panelRowStateClass(false), "pl-[2.375rem] text-caption disabled:opacity-50")}+ onClick={() => void query.fetchNextPage()}+ >+ {query.isFetchingNextPage ? t(($) => $.list.loading_more) : t(($) => $.list.load_more)}+ </button>+ )}+ </>+ );+}++function ArchivedSectionRow({+ item,+ active,+ onRestore,+}: {+ item: InboxItem;+ active: boolean;+ onRestore: () => void;+}) {+ const { t } = useT("inbox");+ const p = useWorkspacePaths();+ const typeLabels = useTypeLabels();+ const timeAgo = useTimeAgo();+ const { categoryOf, colorOf, iconOf } = useIssueStatuses(item.workspace_id);+ const Icon = INBOX_TYPE_ICONS[inboxTypeGroup(item.type)];+ const title = inboxRowTitle(item, typeLabels);+ const status = item.issue_status;+ const restoreLabel = t(($) => $.detail.restore);+ const requestLanding = useInboxSelectionStore((s) => s.requestLanding);+ return (+ <li data-inbox-archived-row className="group/inbox relative">+ <div {...panelRowAnchor(active)} className={cn(PANEL_ROW_CLASS, panelRowStateClass(active), "relative")}>+ {status ? (+ <span aria-hidden className="flex shrink-0">+ <StatusIcon+ status={status}+ category={categoryOf(status)}+ color={colorOf(status)}+ icon={iconOf(status)}+ className="size-3.5"+ />+ </span>+ ) : (+ <span title={typeLabels[item.type]} className="flex shrink-0 items-center">+ <Icon aria-hidden className="size-4" />+ </span>+ )}+ <AppLink+ href={inboxRowHref(p, item, "archived")}+ newTabTitle={title}+ data-issue-id={item.issue_id ?? undefined}+ draggable={false}+ onNavigateInPlace={() => {+ if (item.issue_id) requestLanding(item.issue_id);+ }}+ aria-current={active ? "page" : undefined}+ className={cn(ISSUE_ROW_LINK_CLASS, "gap-2.5 group-focus-within/inbox:pr-5 group-hover/inbox:pr-5")}+ >+ <span className="min-w-0 flex-1 truncate text-muted-foreground">{title}</span>+ <span className="shrink-0 text-caption tabular-nums text-faint-foreground group-hover/inbox:invisible group-focus-within/inbox:invisible">+ {timeAgo(new Date(inboxRowTime(item)).toISOString())}+ </span>+ </AppLink>+ </div>+ <TooltipHint label={restoreLabel}>+ <button+ type="button"+ aria-label={restoreLabel}+ className={cn(rowButtonClass(true), "right-1.5")}+ onClick={(event) => {+ event.preventDefault();+ event.stopPropagation();+ onRestore();+ }}+ >+ <ArchiveRestore className="size-3" />+ </button>+ </TooltipHint>+ </li>+ );+}+/** A row's hover button. */function rowButtonClass(compact: boolean) {return cn(diff --git a/packages/views/layout/panels/views-section.tsx b/packages/views/layout/panels/views-section.tsxindex f1555bf02a..0cecad65c2 100644--- a/packages/views/layout/panels/views-section.tsx+++ b/packages/views/layout/panels/views-section.tsx@@ -21,7 +21,6 @@ import type { IssueTableFacetsRequest } from "@multica/core/types";import { useWorkspacePaths } from "@multica/core/paths";import { issueTableFacetsOptions, sidebarIssuesOptions } from "@multica/core/issues/queries";import { workspaceWorkingAgentsOptions } from "@multica/core/agents";-import { snoozedInboxOptions } from "@multica/core/inbox/queries";import {SIDEBAR_FIRST_PAGE,builtinSidebarRequest,@@ -355,24 +354,16 @@ function BuiltinViewRow({enabled: builtin === "working",select: workingIssueIds,});- // Snoozed lists, and counts, the issues the viewer snoozed in the Inbox.- const snoozed = useQuery({- ...snoozedInboxOptions(wsId),- enabled: builtin === "snoozed",- select: snoozedIssueIds,- });- const ids = builtin === "working" ? working : builtin === "snoozed" ? snoozed : null;const dependency = filterDependencyState(true, [statusCatalogSource(statusCatalog),- ...(ids ? [ids] : []),+ ...(builtin === "working" ? [working] : []),]);const request = dependency.unresolved? undefined- : builtinSidebarRequest(builtin, issueSettings, statusCatalog.statuses, ids?.data);+ : builtinSidebarRequest(builtin, issueSettings, statusCatalog.statuses, working.data);const prefetch = usePrefetch(wsId, source, request);- // Working and Snoozed count their own id sets; the rest count what they list.- const listedCount = useListedCount(wsId, request, showCount && !ids);- const count = !showCount ? 0 : ids ? (ids.data?.length ?? 0) : listedCount;+ const listedCount = useListedCount(wsId, request, showCount && builtin !== "working");+ const count = !showCount ? 0 : builtin === "working" ? (working.data?.length ?? 0) : listedCount;return (<>@@ -434,10 +425,6 @@ function BuiltinViewRow({);}-function snoozedIssueIds(entries: readonly { issue_id: string }[]): string[] {- return entries.map((entry) => entry.issue_id).sort();-}-function workingIssueIds(agents: readonly { issue_ids: readonly string[] }[]): string[] {return [...new Set(agents.flatMap((agent) => agent.issue_ids))].sort();}diff --git a/packages/views/layout/panels/work-panel.test.tsx b/packages/views/layout/panels/work-panel.test.tsxindex 9cad58d23c..66986e05ae 100644--- a/packages/views/layout/panels/work-panel.test.tsx+++ b/packages/views/layout/panels/work-panel.test.tsx@@ -31,7 +31,6 @@ import type {} from "@multica/core/types";import { renderWithI18n } from "../../test/i18n";import { NavigationProvider, type NavigationAdapter } from "../../navigation";-import { IssueInboxBar } from "../../issues/actions/issue-inbox-actions";import { KeptRowsRelease, WorkPanel } from "./work-panel";const apiMock = vi.hoisted(() => ({ listIssueTableRows: vi.fn(), getIssue: vi.fn() }));@@ -157,7 +156,7 @@ function renderPanel(inbox: InboxItem[] = [],/** As on web, a push lands only once the next page has loaded ("Finish loading"). */deferPush = false,- /** As on desktop: links can open tabs, and an issue page shows its header. */+ /** As on desktop: links can open tabs. */desktop = false,) {const qc = new QueryClient({ defaultOptions: { queries: { staleTime: Infinity, retry: false } } });@@ -180,14 +179,19 @@ function renderPanel();function Harness() {- const [pathname, setPathname] = useState(initialPath);+ const [url, setUrl] = useState(initialPath);+ const [pathname, search = ""] = url.split("?");+ const setPathname = (path: string) => {+ const next = new URL(path, "http://x");+ setUrl(next.pathname + next.search);+ };// A collapsed sidebar mounts a second panel as its hover peek.const [peek, setPeek] = useState(false);// A compact sheet unmounts the panel whenever it closes.const [sheetOpen, setSheetOpen] = useState(true);const [loading, setLoading] = useState<string | null>(null);const [newTab, setNewTab] = useState<string | null>(null);- const openTab = (path: string) => setPathname(new URL(path, "http://x").pathname);+ const openTab = setPathname;const adapter: NavigationAdapter = {openInNewTab: desktop? (path, _title, opts) => {@@ -198,21 +202,15 @@ function renderPanel(push: deferPush ? setLoading : setPathname,replace: setPathname,back: vi.fn(),- pathname,- searchParams: new URLSearchParams(),+ pathname: pathname!,+ searchParams: new URLSearchParams(search),hash: "",getShareableUrl: (path) => path,};return (<NavigationProvider value={adapter}><KeptRowsRelease />- {/* Each desktop tab mounts its own page. */}- {desktop && pathname.startsWith("/acme/issues/") && (- <div data-testid="issue-header">- <IssueInboxBar key={pathname} issueId={pathname.split("/").at(-1)!} />- </div>- )}- {sheetOpen && spaceForPath(pathname) === "work" && <WorkPanel />}+ {sheetOpen && spaceForPath(pathname!) === "work" && <WorkPanel />}<button type="button" onClick={() => newTab && openTab(newTab)}>Switch to new tab</button>@@ -222,7 +220,7 @@ function renderPanel(<button type="button" onClick={() => setPathname(`/acme/issues/${ISSUE.id}`)}>Return to issue</button>- <button type="button" onClick={() => loading && setPathname(new URL(loading, "http://x").pathname)}>+ <button type="button" onClick={() => loading && setPathname(loading)}>Finish loading</button><button type="button" onClick={() => setSheetOpen((open) => !open)}>@@ -263,8 +261,6 @@ beforeEach(() => {useActiveIssueViewStore.setState({ active: {} });useSidebarKeptStore.setState({ held: {} });useInboxSelectionStore.setState({- sidebarIssueByWorkspace: {},- sidebarTabIssuesByWorkspace: {},heldRows: {},leftRowKeyByWorkspace: {},});@@ -324,7 +320,7 @@ describe("WorkPanel Inbox highlight", () => {const inInbox = () => document.querySelector('[data-sidebar-list="inbox"]') as HTMLElement;const inMyIssues = () => document.querySelector('[data-sidebar-list="builtin:my_work"]') as HTMLElement;- it("lights an issue opened from the Inbox there only", async () => {+ it("lights the notification the Inbox page has open there only", async () => {renderPanel("/acme/my-issues", [], [], [], [inboxItem(ISSUE)]);await within(await waitFor(inMyIssues)).findByRole("link", { name: ISSUE.title });fireEvent.click(within(inInbox()).getByRole("link", { name: INBOX_ROW_NAME }));@@ -334,21 +330,6 @@ describe("WorkPanel Inbox highlight", () => {expect(allIssues()).not.toHaveAttribute("aria-current");});- it("lights an issue opened from the Inbox at its identifier URL", async () => {- const qc = renderPanel("/acme/my-issues", [], [], [], [{ ...inboxItem(ISSUE), issue_identifier: ISSUE.identifier }]);- await within(await waitFor(inMyIssues)).findByRole("link", { name: ISSUE.title });- const row = within(inInbox()).getByRole("link", { name: INBOX_ROW_NAME });- expect(row).toHaveAttribute("href", `/acme/issues/${ISSUE.identifier}`);- fireEvent.click(row);- // The issue page loads it by its identifier.- act(() => qc.setQueryData(issueDetailOptions("ws-1", ISSUE.identifier).queryKey, ISSUE));-- await waitFor(() =>- expect(within(inInbox()).getByRole("link", { name: INBOX_ROW_NAME })).toHaveAttribute("aria-current", "page"),- );- expect(within(inMyIssues()).getByRole("link", { name: ISSUE.title })).not.toHaveAttribute("aria-current");- });-it("moves the light to the list the issue is clicked in next", async () => {renderPanel("/acme/my-issues", [], [], [], [inboxItem(ISSUE)]);await within(await waitFor(inMyIssues)).findByRole("link", { name: ISSUE.title });@@ -359,14 +340,12 @@ describe("WorkPanel Inbox highlight", () => {expect(within(inInbox()).getByRole("link", { name: INBOX_ROW_NAME })).not.toHaveAttribute("aria-current");});- it("lights the issue the issue header moved on to from the Inbox", async () => {- useInboxSelectionStore.setState({ sidebarIssueByWorkspace: { "ws-1": ISSUE.id } });+ it("lights no Inbox row on an issue's own page, even for an issue in the Inbox", async () => {renderPanel(`/acme/issues/${ISSUE.id}`, [], [], [], [inboxItem(ISSUE)]);- await waitFor(() =>- expect(within(inInbox()).getByRole("link", { name: INBOX_ROW_NAME })).toHaveAttribute("aria-current", "page"),- );- expect(allIssues()).not.toHaveAttribute("aria-current");+ const row = await within(await waitFor(inInbox)).findByRole("link", { name: INBOX_ROW_NAME });+ expect(row).toHaveAttribute("href", `/acme/inbox?issue=${ISSUE.id}`);+ expect(row).not.toHaveAttribute("aria-current");});it("keeps the open row lit in place once its notification is archived some other way", async () => {@@ -477,98 +456,33 @@ describe("WorkPanel Inbox highlight while the next page loads", () => {});it.each([{ metaKey: true }, { ctrlKey: true }, { metaKey: true, shiftKey: true }])(- "keeps the open issue's records when another notification opens in a new tab (%o)",+ "keeps the open notification lit when another opens in a new tab (%o)",async (modifiers) => {await openFromInbox([]);fireEvent.click(inboxRow(OTHER), modifiers);expect(inboxRow(ISSUE)).toHaveAttribute("aria-current", "page");- expect(useInboxSelectionStore.getState().sidebarIssueByWorkspace["ws-1"]).toBe(ISSUE.id);- // A browser tab has a store of its own.- expect(useInboxSelectionStore.getState().sidebarTabIssuesByWorkspace["ws-1"]).toBeUndefined();-// Nothing was left pending for a later page to settle.- fireEvent.click(screen.getByRole("button", { name: "Leave Work" }));- fireEvent.click(screen.getByRole("button", { name: "Return to issue" }));+ finishLoading();expect(inboxRow(ISSUE)).toHaveAttribute("aria-current", "page");},);- it("lights nothing else while the issue header moves on from an archived notification", async () => {- const qc = await openFromInbox([]);- act(() => {- qc.setQueryData(inboxListOptions("ws-1").queryKey, [{ ...inboxItem(ISSUE), archived: true }, inboxItem(OTHER)]);- useInboxSelectionStore.getState().leaveRow("ws-1", ISSUE.id);- useInboxSelectionStore.getState().rememberSidebarIssue("ws-1", OTHER.id);- });-- await waitFor(() => expect(within(inInbox()).queryByRole("link", { name: INBOX_ROW_NAME })).toBeNull());- expect(allIssues()).not.toHaveAttribute("aria-current");- });});describe("WorkPanel Inbox across desktop tabs", () => {const inInbox = () => document.querySelector('[data-sidebar-list="inbox"]') as HTMLElement;- const inMyIssues = () => document.querySelector('[data-sidebar-list="builtin:my_work"]') as HTMLElement;const inboxRow = (issue: Issue) => within(inInbox()).getByRole("link", { name: new RegExp(`^${issue.title}`) });- const offersInboxActions = () => !!within(screen.getByTestId("issue-header")).queryByRole("button", { name: "Archive" });- const switchToNewTab = () => fireEvent.click(screen.getByRole("button", { name: "Switch to new tab" }));- const switchBack = () => fireEvent.click(screen.getByRole("button", { name: "Return to issue" }));- async function openFromInbox() {- useSidebarTreeStore.setState({ expanded: ["builtin:my_work"], projectsCollapsed: true });- const qc = renderPanel("/acme/my-issues", [], [], [], [inboxItem(ISSUE), inboxItem(OTHER)], false, true);- act(() => {- qc.setQueryData(issueDetailOptions("ws-1", ISSUE.id).queryKey, ISSUE);- qc.setQueryData(issueDetailOptions("ws-1", OTHER.id).queryKey, OTHER);- });+ it("lights each tab's own notification after a Cmd-click opens another in a background tab", async () => {+ renderPanel("/acme/my-issues", [], [], [], [inboxItem(ISSUE), inboxItem(OTHER)], false, true);fireEvent.click(inboxRow(ISSUE));- expect(offersInboxActions()).toBe(true);- }-- it.each([- ["Cmd-click", (link: HTMLElement) => fireEvent.click(link, { metaKey: true })],- ["Ctrl-click", (link: HTMLElement) => fireEvent.click(link, { ctrlKey: true })],- [- "middle click",- (link: HTMLElement) => fireEvent(link, new MouseEvent("auxclick", { bubbles: true, cancelable: true, button: 1 })),- ],- ])("keeps both issues opened from the Inbox after a %s opens a background tab", async (_, open) => {- await openFromInbox();- open(inboxRow(OTHER));-- expect(offersInboxActions()).toBe(true);+ fireEvent.click(inboxRow(OTHER), { metaKey: true });expect(inboxRow(ISSUE)).toHaveAttribute("aria-current", "page");- switchToNewTab();- expect(offersInboxActions()).toBe(true);+ fireEvent.click(screen.getByRole("button", { name: "Switch to new tab" }));expect(inboxRow(OTHER)).toHaveAttribute("aria-current", "page");-- switchBack();- expect(offersInboxActions()).toBe(true);- expect(inboxRow(ISSUE)).toHaveAttribute("aria-current", "page");- });-- it("keeps both issues opened from the Inbox after a Cmd+Shift-click opens a foreground tab", async () => {- await openFromInbox();- fireEvent.click(inboxRow(OTHER), { metaKey: true, shiftKey: true });-- expect(offersInboxActions()).toBe(true);- expect(inboxRow(OTHER)).toHaveAttribute("aria-current", "page");-- switchBack();- expect(offersInboxActions()).toBe(true);- expect(inboxRow(ISSUE)).toHaveAttribute("aria-current", "page");- });-- it("stops counting a tab's issue as opened from the Inbox once it is opened from another list", async () => {- await openFromInbox();- fireEvent.click(inboxRow(OTHER), { metaKey: true });- switchToNewTab();- fireEvent.click(await within(inMyIssues()).findByRole("link", { name: OTHER.title }));-- expect(offersInboxActions()).toBe(false);- expect(within(inMyIssues()).getByRole("link", { name: OTHER.title })).toHaveAttribute("aria-current", "page");+ expect(inboxRow(ISSUE)).not.toHaveAttribute("aria-current");});});diff --git a/packages/views/layout/panels/work-panel.tsx b/packages/views/layout/panels/work-panel.tsxindex ef2dbccd22..da831e8ce9 100644--- a/packages/views/layout/panels/work-panel.tsx+++ b/packages/views/layout/panels/work-panel.tsx@@ -15,7 +15,6 @@ import { projectListOptions } from "@multica/core/projects/queries";import type { Project } from "@multica/core/types";import { resolveClickIntent, useHeldUntilArrival, useNavigation } from "../../navigation";import { AutoArchivePromptDialog } from "../../inbox/components/auto-archive-prompt-dialog";-import { useSidebarInboxIssue } from "../../inbox/components/use-sidebar-inbox-issue";import { IssueContextMenuProvider } from "../../issues/actions";import { useIssueViewActions } from "../../issue-views/use-view-actions";import { useT } from "../../i18n";@@ -126,28 +125,13 @@ export function WorkPanel() {liveClickedIssue,!!liveClickedIssue && !isOpenIssue(liveClickedIssue.segment),);- // An issue opened from the Inbox, by a row or by the issue header moving on- // to the next notification, belongs to the Inbox until another list is- // clicked. Its row stays in place while it is open (`keepOpenInboxRow`),- // and when an Inbox action took it with nothing left to open it lights- // nowhere: never in another list the user did not open it from.- const inbox = useSidebarInboxIssue(wsId, currentIssueId, clicked.movingOn);const clickedIssue = clicked.value;const clickedList = clickedIssue && isOpenIssue(clickedIssue.segment) ? clickedIssue.list : undefined;- // The notification open beside the section: an issue opened from it, or an- // issue-less one on the Inbox page.- const inboxOpenKey =- pathname === p.inbox()- ? searchParams.get("issue")- : currentIssueId && inbox.fromInbox- ? currentIssueId- : null;+ // The notification open on the Inbox page beside the section. Every Inbox+ // row opens there, so an issue page is never the Inbox's.+ const inboxOpenKey = pathname === p.inbox() ? searchParams.get("issue") : null;const inboxRows = useInboxSectionRows(wsId, inboxOpenKey);- const rememberSidebarIssue = useInboxSelectionStore((s) => s.rememberSidebarIssue);- const rememberSidebarTabIssue = useInboxSelectionStore((s) => s.rememberSidebarTabIssue);- const forgetSidebarTabIssue = useInboxSelectionStore((s) => s.forgetSidebarTabIssue);- const inboxClaimsIssue = !!currentIssueId && inbox.fromInbox && !inboxRows.collapsed;- const treeClaimsIssue = inboxClaimsIssue || (clickedList !== undefined && clickedList !== PINS_LIST);+ const treeClaimsIssue = clickedList !== undefined && clickedList !== PINS_LIST;const pins = usePanelPins(wsId, userId, pathname, treeClaimsIssue ? null : currentIssueId);const requestLocate = useSidebarTreeStore((s) => s.requestLocate);const rememberClickedIssue = (event: React.MouseEvent) => {@@ -166,18 +150,11 @@ export function WorkPanel() {// record, and the issue header compares, the issue's id.const segment = link.getAttribute("data-issue-id") || routeSegment(path, p.issues());// A click that opens a tab or window, as AppLink resolves it, leaves this- // page and its records where they are. A desktop tab shares this page's- // store, so an issue the Inbox opens there is recorded beside them.- if (resolveClickIntent(event) !== "push" || (event.shiftKey && !openInNewTab)) {- if (openInNewTab && segment && wsId && list === INBOX_LIST) rememberSidebarTabIssue(wsId, segment);- return;- }+ // page and its records where they are.+ if (resolveClickIntent(event) !== "push" || (event.shiftKey && !openInNewTab)) return;requestLocate(null);- setClickedIssue(segment ? { segment, list } : null);- if (segment && wsId) {- rememberSidebarIssue(wsId, list === INBOX_LIST ? segment : null);- forgetSidebarTabIssue(wsId, segment);- }+ // An Inbox row opens the Inbox page, not an issue page.+ setClickedIssue(segment && list !== INBOX_LIST ? { segment, list } : null);};const { projectSettings, projectOrder } = useSidebarProjectPrefs(wsId ?? "");@@ -214,19 +191,18 @@ export function WorkPanel() {...(showNoProject ? [NO_PROJECT_SIDEBAR_SOURCE] : []),];const litSource =- !plainRowsLit || !currentIssueId || inboxClaimsIssue+ !plainRowsLit || !currentIssueId? null: clickedList && listing.includes(clickedList)? clickedList: issueHomeExpanded? issueHomeSource: (listOrder.find((source) => listing.includes(source)) ?? null);- const locatedSource = plainRowsLit && !inboxClaimsIssue && !litSource ? issueHomeSource : null;+ const locatedSource = plainRowsLit && !litSource ? issueHomeSource : null;// An issue in a project the panel hides, or under the collapsed Projects// section, stays unmarked rather than lighting a list that may not show it.const issueInAllIssues =plainRowsLit &&- !inboxClaimsIssue &&!!currentIssue &&!currentIssue.project_id &&litSource === null &&@@ -256,7 +232,6 @@ export function WorkPanel() {wsId={wsId}rows={inboxRows}pathname={pathname}- activeIssueId={inboxClaimsIssue ? currentIssueId : null}/>)}{wsId && <AutoArchivePromptDialog wsId={wsId} active={!!inboxOpenKey} />}diff --git a/packages/views/layout/tab-presentation.tsx b/packages/views/layout/tab-presentation.tsxindex 2143f36d45..cd749cd69a 100644--- a/packages/views/layout/tab-presentation.tsx+++ b/packages/views/layout/tab-presentation.tsx@@ -88,7 +88,8 @@ function useTabEntityData(subject: TabSubject, wsId: string, fetch: boolean): Re// Read both inbox lists cache-only; the archived view keeps its own list, so// an archived selection has to resolve against the archived cache — the same- // list the InboxPage populates when `?view=archived` is active.+ // list the InboxPage populates when `?view=archived` is active. A Snoozed+ // selection is the snoozed issue itself.const inboxList = useQuery({ ...inboxListOptions(wsId), enabled: false }).data;const inboxFilters = useInboxFilters(wsId);const archivedPages = useInfiniteQuery({ ...archivedInboxPagesOptions(wsId, inboxFilters), enabled: false }).data;@@ -101,7 +102,7 @@ function useTabEntityData(subject: TabSubject, wsId: string, fetch: boolean): Re...(archivedLookup?.items ?? []),], [archivedPages, archivedLookup]);const activeInboxList =- subject.kind === "inbox" && subject.archived ? archivedInboxList : inboxList;+ subject.kind === "inbox" && subject.view === "archived" ? archivedInboxList : inboxList;const inboxItem =subject.kind === "inbox" && subject.selectedKey? (activeInboxList?.find(@@ -129,7 +130,8 @@ function useTabEntityData(subject: TabSubject, wsId: string, fetch: boolean): Re// The canonical query seeds/subscribes to the UUID entry even when the URL// uses an identifier, so background tabs receive realtime patches too.const { issue } = useCanonicalIssue(wsId, issueId, {- enabled: fetch && (subject.kind === "issue" || !!inboxItem?.issue_id),+ enabled:+ fetch && (subject.kind === "issue" || !!inboxItem?.issue_id || (subject.kind === "inbox" && subject.view === "snoozed")),});const project = useQuery({diff --git a/packages/views/locales/en/inbox.json b/packages/views/locales/en/inbox.jsonindex 0b69eaa59e..461d766064 100644--- a/packages/views/locales/en/inbox.json+++ b/packages/views/locales/en/inbox.json@@ -56,6 +56,7 @@"days": "{{count}}d"},"archived_title": "Archived",+ "snoozed_title": "Snoozed","archived_empty": "No archived notifications","unarchive_tooltip": "Unarchive","actions_aria": "Notification actions",@@ -65,6 +66,7 @@},"detail": {"select_prompt": "Select a notification to view details",+ "restore": "Move back to Inbox","original_input": "Original input","retry_with_context": "Retry with context","edit_advanced": "Open full form",@@ -217,9 +219,7 @@"failed": "Failed to snooze","unsnooze_failed": "Failed to bring back","view_empty": "Nothing snoozed",- "view_empty_description": "Snooze an issue from your inbox and it waits here until it's time to come back.",- "col_updates": "While snoozed",- "col_back": "Back"+ "view_empty_description": "Snooze an issue from your inbox and it waits here until it's time to come back."},"auto_archive_prompt": {"title": "Archive notifications once you've handled them",diff --git a/packages/views/locales/en/issues.json b/packages/views/locales/en/issues.jsonindex 6a73895c94..c8e0fc0577 100644--- a/packages/views/locales/en/issues.json+++ b/packages/views/locales/en/issues.json@@ -610,7 +610,8 @@"workdir_path_copy_failed": "Failed to copy working directory path","workdir_path_unavailable": "No local working directory yet — this issue hasn't been run by a local agent","pull_requests_empty_title": "No linked pull requests.",- "guest_readonly_note": "Guests can view and comment, but cannot change issue properties."+ "guest_readonly_note": "Guests can view and comment, but cannot change issue properties.",+ "open_issue_page": "Open issue page"},"timeline": {"loading": "Loading...",@@ -1923,8 +1924,7 @@"all_issues": "All issues","my_work": "My work","working": "Working",- "subscribed": "Subscribed",- "snoozed": "Snoozed"+ "subscribed": "Subscribed"},"untitled": "Untitled view","copy_name": "{{name}} (copy)",diff --git a/packages/views/locales/en/layout.json b/packages/views/locales/en/layout.jsonindex 385d3c1d2f..6f79f30159 100644--- a/packages/views/locales/en/layout.json+++ b/packages/views/locales/en/layout.json@@ -178,8 +178,6 @@"view_delete": "Delete view","new_issue_here": "New issue in this project","inbox_actions": "Inbox actions",- "inbox_view_snoozed": "View snoozed",- "inbox_view_archived": "View archived","inbox_empty": "No notifications","inbox_settings": "Inbox display","inbox_all": "All notifications",diff --git a/packages/views/locales/es/inbox.json b/packages/views/locales/es/inbox.jsonindex 8cf0bd824d..598e651e9b 100644--- a/packages/views/locales/es/inbox.json+++ b/packages/views/locales/es/inbox.json@@ -56,6 +56,7 @@"days": "{{count}} d"},"archived_title": "Archivado",+ "snoozed_title": "Pospuestos","archived_empty": "No hay notificaciones archivadas","unarchive_tooltip": "Desarchivar","actions_aria": "Acciones de la notificación",@@ -65,6 +66,7 @@},"detail": {"select_prompt": "Selecciona una notificación para ver los detalles",+ "restore": "Devolver a la bandeja de entrada","original_input": "Entrada original","retry_with_context": "Reintentar con contexto","edit_advanced": "Abrir formulario completo",@@ -217,9 +219,7 @@"failed": "No se pudo posponer","unsnooze_failed": "No se pudo recuperar","view_empty": "Nada pospuesto",- "view_empty_description": "Pospón un issue desde tu bandeja de entrada y esperará aquí hasta que sea hora de volver.",- "col_updates": "Mientras estaba pospuesto",- "col_back": "Vuelve"+ "view_empty_description": "Pospón un issue desde tu bandeja de entrada y esperará aquí hasta que sea hora de volver."},"auto_archive_prompt": {"title": "Archiva las notificaciones cuando ya las has gestionado",diff --git a/packages/views/locales/es/issues.json b/packages/views/locales/es/issues.jsonindex f50c54a3a3..cfd79d46c3 100644--- a/packages/views/locales/es/issues.json+++ b/packages/views/locales/es/issues.json@@ -593,7 +593,8 @@"load_failed": "No se pudo cargar la tarea.","load_retry": "Reintentar","not_found_title": "Tarea no encontrada",- "guest_readonly_note": "Los invitados pueden ver y comentar, pero no cambiar las propiedades de la tarea."+ "guest_readonly_note": "Los invitados pueden ver y comentar, pero no cambiar las propiedades de la tarea.",+ "open_issue_page": "Abrir la página de la tarea"},"timeline": {"loading": "Cargando...",@@ -1923,8 +1924,7 @@"all_issues": "Todas las tareas","my_work": "Mi trabajo","working": "En ejecución",- "subscribed": "Suscritas",- "snoozed": "Pospuestos"+ "subscribed": "Suscritas"},"untitled": "Vista sin título","copy_name": "{{name}} (copia)",diff --git a/packages/views/locales/es/layout.json b/packages/views/locales/es/layout.jsonindex 72edf8840d..aafeffcb6d 100644--- a/packages/views/locales/es/layout.json+++ b/packages/views/locales/es/layout.json@@ -178,8 +178,6 @@"view_delete": "Eliminar vista","new_issue_here": "Nueva tarea en este proyecto","inbox_actions": "Acciones de la bandeja",- "inbox_view_snoozed": "Ver pospuestos",- "inbox_view_archived": "Ver archivadas","inbox_empty": "Sin notificaciones","inbox_settings": "Visualización de la bandeja","inbox_all": "Todas las notificaciones",diff --git a/packages/views/locales/fr/inbox.json b/packages/views/locales/fr/inbox.jsonindex 4c12b1bba1..ea371bfad0 100644--- a/packages/views/locales/fr/inbox.json+++ b/packages/views/locales/fr/inbox.json@@ -56,6 +56,7 @@"days": "{{count}} j"},"archived_title": "Archivées",+ "snoozed_title": "Reportés","archived_empty": "Aucune notification archivée","unarchive_tooltip": "Désarchiver","actions_aria": "Actions de notification",@@ -65,6 +66,7 @@},"detail": {"select_prompt": "Sélectionnez une notification pour afficher les détails",+ "restore": "Remettre dans la boîte de réception","original_input": "Saisie d'origine","retry_with_context": "Réessayer avec le contexte","edit_advanced": "Ouvrir le formulaire complet",@@ -217,9 +219,7 @@"failed": "Impossible de reporter","unsnooze_failed": "Impossible de faire revenir","view_empty": "Rien de reporté",- "view_empty_description": "Reportez une tâche depuis votre boîte de réception : elle attend ici jusqu'à son retour.",- "col_updates": "Pendant le report",- "col_back": "Retour"+ "view_empty_description": "Reportez une tâche depuis votre boîte de réception : elle attend ici jusqu'à son retour."},"auto_archive_prompt": {"title": "Archiver les notifications une fois traitées",diff --git a/packages/views/locales/fr/issues.json b/packages/views/locales/fr/issues.jsonindex d9009ce73f..55ce56ab8b 100644--- a/packages/views/locales/fr/issues.json+++ b/packages/views/locales/fr/issues.json@@ -610,7 +610,8 @@"workdir_path_copy_failed": "Échec de la copie du chemin du répertoire de travail","workdir_path_unavailable": "Aucun répertoire de travail local pour l'instant — cette tâche n'a pas encore été exécutée par un agent local","pull_requests_empty_title": "Aucune pull request associée.",- "guest_readonly_note": "Les invités peuvent consulter et commenter, mais pas modifier les propriétés de la tâche."+ "guest_readonly_note": "Les invités peuvent consulter et commenter, mais pas modifier les propriétés de la tâche.",+ "open_issue_page": "Ouvrir la page de la tâche"},"timeline": {"loading": "Chargement...",@@ -1923,8 +1924,7 @@"all_issues": "Toutes les tâches","my_work": "Mon travail","working": "En cours d'exécution",- "subscribed": "Abonnements",- "snoozed": "Reportés"+ "subscribed": "Abonnements"},"untitled": "Vue sans titre","copy_name": "{{name}} (copie)",diff --git a/packages/views/locales/fr/layout.json b/packages/views/locales/fr/layout.jsonindex 214b371e6c..bd88dd7930 100644--- a/packages/views/locales/fr/layout.json+++ b/packages/views/locales/fr/layout.json@@ -178,8 +178,6 @@"view_delete": "Supprimer la vue","new_issue_here": "Nouvelle tâche dans ce projet","inbox_actions": "Actions de la boîte de réception",- "inbox_view_snoozed": "Voir les reportés",- "inbox_view_archived": "Voir les archivées","inbox_empty": "Aucune notification","inbox_settings": "Affichage de la boîte de réception","inbox_all": "Toutes les notifications",diff --git a/packages/views/locales/ja/inbox.json b/packages/views/locales/ja/inbox.jsonindex 78adf4c491..856395b04f 100644--- a/packages/views/locales/ja/inbox.json+++ b/packages/views/locales/ja/inbox.json@@ -54,6 +54,7 @@"days": "{{count}}日"},"archived_title": "アーカイブ済み",+ "snoozed_title": "スヌーズ中","archived_empty": "アーカイブされた通知はありません","unarchive_tooltip": "アーカイブ解除","actions_aria": "通知の操作",@@ -63,6 +64,7 @@},"detail": {"select_prompt": "詳細を表示する通知を選択してください",+ "restore": "インボックスに戻す","original_input": "元の入力","retry_with_context": "コンテキストを保持して再試行","edit_advanced": "詳細フォームを開く",@@ -212,9 +214,7 @@"failed": "スヌーズできませんでした","unsnooze_failed": "戻せませんでした","view_empty": "スヌーズ中の項目はありません",- "view_empty_description": "インボックスでタスクをスヌーズすると、戻る時間までここで待機します。",- "col_updates": "スヌーズ中",- "col_back": "戻る時間"+ "view_empty_description": "インボックスでタスクをスヌーズすると、戻る時間までここで待機します。"},"auto_archive_prompt": {"title": "対応済みの通知を自動でアーカイブ",diff --git a/packages/views/locales/ja/issues.json b/packages/views/locales/ja/issues.jsonindex 1cb1f140bc..3b967bd669 100644--- a/packages/views/locales/ja/issues.json+++ b/packages/views/locales/ja/issues.json@@ -598,7 +598,8 @@"workdir_path_copy_failed": "作業ディレクトリのパスをコピーできませんでした","workdir_path_unavailable": "ローカル作業ディレクトリはまだありません — このタスクはローカルエージェントで実行されていません","pull_requests_empty_title": "関連する PR はありません。",- "guest_readonly_note": "ゲストは閲覧とコメントのみ可能で、タスクのプロパティは変更できません。"+ "guest_readonly_note": "ゲストは閲覧とコメントのみ可能で、タスクのプロパティは変更できません。",+ "open_issue_page": "タスクページで開く"},"timeline": {"loading": "読み込み中...",@@ -1839,8 +1840,7 @@"all_issues": "すべてのタスク","my_work": "自分の作業","working": "実行中",- "subscribed": "購読中",- "snoozed": "スヌーズ中"+ "subscribed": "購読中"},"untitled": "無題のビュー","copy_name": "{{name}}(コピー)",diff --git a/packages/views/locales/ja/layout.json b/packages/views/locales/ja/layout.jsonindex 90d25fc0e2..e263de8489 100644--- a/packages/views/locales/ja/layout.json+++ b/packages/views/locales/ja/layout.json@@ -174,8 +174,6 @@"view_delete": "ビューを削除","new_issue_here": "このプロジェクトに新規タスク","inbox_actions": "インボックスの操作",- "inbox_view_snoozed": "スヌーズ中を表示",- "inbox_view_archived": "アーカイブ済みを表示","inbox_empty": "通知はありません","inbox_settings": "インボックスの表示","inbox_all": "すべての通知",diff --git a/packages/views/locales/ko/inbox.json b/packages/views/locales/ko/inbox.jsonindex 4b005a04b9..3fb869e4a5 100644--- a/packages/views/locales/ko/inbox.json+++ b/packages/views/locales/ko/inbox.json@@ -54,6 +54,7 @@"days": "{{count}}일"},"archived_title": "보관됨",+ "snoozed_title": "미뤄둔 항목","archived_empty": "보관된 알림이 없습니다","unarchive_tooltip": "보관 해제","actions_aria": "알림 작업",@@ -63,6 +64,7 @@},"detail": {"select_prompt": "자세히 볼 알림을 선택하세요",+ "restore": "인박스로 되돌리기","original_input": "원본 입력","retry_with_context": "컨텍스트를 유지하여 재시도","edit_advanced": "전체 양식 열기",@@ -212,9 +214,7 @@"failed": "미루지 못했습니다","unsnooze_failed": "되돌리지 못했습니다","view_empty": "미뤄둔 항목이 없습니다",- "view_empty_description": "인박스에서 태스크를 미루면 돌아올 시간까지 여기에서 기다립니다.",- "col_updates": "미뤄둔 동안",- "col_back": "돌아오는 시간"+ "view_empty_description": "인박스에서 태스크를 미루면 돌아올 시간까지 여기에서 기다립니다."},"auto_archive_prompt": {"title": "처리한 알림을 자동으로 보관하세요",diff --git a/packages/views/locales/ko/issues.json b/packages/views/locales/ko/issues.jsonindex cc487d5ad0..27e1b23828 100644--- a/packages/views/locales/ko/issues.json+++ b/packages/views/locales/ko/issues.json@@ -598,7 +598,8 @@"workdir_path_copy_failed": "작업 디렉터리 경로를 복사하지 못했습니다","workdir_path_unavailable": "아직 로컬 작업 디렉터리가 없습니다 — 이 태스크는 아직 로컬 에이전트에서 실행되지 않았습니다","pull_requests_empty_title": "연결된 PR이 없습니다.",- "guest_readonly_note": "게스트는 보고 댓글을 남길 수 있지만 작업 속성은 바꿀 수 없습니다."+ "guest_readonly_note": "게스트는 보고 댓글을 남길 수 있지만 작업 속성은 바꿀 수 없습니다.",+ "open_issue_page": "태스크 페이지에서 열기"},"timeline": {"loading": "불러오는 중...",@@ -1839,8 +1840,7 @@"all_issues": "전체 태스크","my_work": "내 작업","working": "실행 중",- "subscribed": "구독 중",- "snoozed": "미뤄둔 항목"+ "subscribed": "구독 중"},"untitled": "제목 없는 뷰","copy_name": "{{name}} (사본)",diff --git a/packages/views/locales/ko/layout.json b/packages/views/locales/ko/layout.jsonindex 0dfbf79232..5a67266811 100644--- a/packages/views/locales/ko/layout.json+++ b/packages/views/locales/ko/layout.json@@ -174,8 +174,6 @@"view_delete": "뷰 삭제","new_issue_here": "이 프로젝트에 새 태스크","inbox_actions": "인박스 작업",- "inbox_view_snoozed": "미뤄둔 항목 보기",- "inbox_view_archived": "보관된 알림 보기","inbox_empty": "알림 없음","inbox_settings": "인박스 표시","inbox_all": "모든 알림",diff --git a/packages/views/locales/ru/inbox.json b/packages/views/locales/ru/inbox.jsonindex 68e3104729..153c5c0ba7 100644--- a/packages/views/locales/ru/inbox.json+++ b/packages/views/locales/ru/inbox.json@@ -60,6 +60,7 @@"days": "{{count}} дн"},"archived_title": "Архив",+ "snoozed_title": "Отложенные","archived_empty": "Нет архивных уведомлений","unarchive_tooltip": "Восстановить из архива","actions_aria": "Действия с уведомлением",@@ -69,6 +70,7 @@},"detail": {"select_prompt": "Выберите уведомление, чтобы посмотреть детали",+ "restore": "Вернуть во входящие","original_input": "Исходный ввод","retry_with_context": "Повторить с контекстом","edit_advanced": "Открыть полную форму",@@ -227,9 +229,7 @@"failed": "Не удалось отложить","unsnooze_failed": "Не удалось вернуть","view_empty": "Ничего не отложено",- "view_empty_description": "Отложите issue во входящих — оно подождёт здесь, пока не придёт время вернуться.",- "col_updates": "За время отсрочки",- "col_back": "Вернётся"+ "view_empty_description": "Отложите issue во входящих — оно подождёт здесь, пока не придёт время вернуться."},"auto_archive_prompt": {"title": "Архивируйте уведомления, когда задача обработана",diff --git a/packages/views/locales/ru/issues.json b/packages/views/locales/ru/issues.jsonindex 39bb85ac18..820fad05fe 100644--- a/packages/views/locales/ru/issues.json+++ b/packages/views/locales/ru/issues.json@@ -633,7 +633,8 @@"not_found_title": "Задача не найдена","load_failed": "Не удалось загрузить задачу.","load_retry": "Повторить",- "guest_readonly_note": "Гости могут просматривать и комментировать, но не могут менять свойства задачи."+ "guest_readonly_note": "Гости могут просматривать и комментировать, но не могут менять свойства задачи.",+ "open_issue_page": "Открыть страницу задачи"},"timeline": {"loading": "Загрузка...",@@ -2090,8 +2091,7 @@"all_issues": "Все задачи","my_work": "Моя работа","working": "Выполняются",- "subscribed": "Подписки",- "snoozed": "Отложенные"+ "subscribed": "Подписки"},"untitled": "Представление без названия","copy_name": "{{name}} (копия)",diff --git a/packages/views/locales/ru/layout.json b/packages/views/locales/ru/layout.jsonindex c161769bab..776199b6a1 100644--- a/packages/views/locales/ru/layout.json+++ b/packages/views/locales/ru/layout.json@@ -154,8 +154,6 @@"project_issues_retry": "Повторить","new_issue_here": "Новая задача в этом проекте","inbox_actions": "Действия со входящими",- "inbox_view_snoozed": "Показать отложенные",- "inbox_view_archived": "Открыть архив","inbox_empty": "Нет уведомлений","inbox_settings": "Отображение входящих","inbox_all": "Все уведомления",diff --git a/packages/views/locales/zh-Hans/inbox.json b/packages/views/locales/zh-Hans/inbox.jsonindex ad6c5559f8..eb3e87fc2b 100644--- a/packages/views/locales/zh-Hans/inbox.json+++ b/packages/views/locales/zh-Hans/inbox.json@@ -54,6 +54,7 @@"days": "{{count}} 天"},"archived_title": "已归档",+ "snoozed_title": "已延后","archived_empty": "暂无已归档通知","unarchive_tooltip": "取消归档","actions_aria": "通知操作",@@ -63,6 +64,7 @@},"detail": {"select_prompt": "选择一条通知查看详情",+ "restore": "移回收件箱","original_input": "原始输入","retry_with_context": "保留上下文重试","edit_advanced": "在完整表单中编辑",@@ -212,9 +214,7 @@"failed": "延后失败","unsnooze_failed": "恢复失败","view_empty": "没有延后的事项",- "view_empty_description": "在收件箱里延后一个任务,它会在这里等到时间再回来。",- "col_updates": "延后期间",- "col_back": "恢复时间"+ "view_empty_description": "在收件箱里延后一个任务,它会在这里等到时间再回来。"},"auto_archive_prompt": {"title": "处理完的通知,可以自动归档",diff --git a/packages/views/locales/zh-Hans/issues.json b/packages/views/locales/zh-Hans/issues.jsonindex c2e48582c7..2a2e8ec07b 100644--- a/packages/views/locales/zh-Hans/issues.json+++ b/packages/views/locales/zh-Hans/issues.json@@ -598,7 +598,8 @@"unsubscribe_subtree_succeeded": "已取消订阅此任务及其子任务。","subscription_update_failed": "无法更新订阅状态,请重试。","pull_requests_empty_title": "暂无关联 PR。",- "guest_readonly_note": "访客可以查看和评论,不能修改任务属性。"+ "guest_readonly_note": "访客可以查看和评论,不能修改任务属性。",+ "open_issue_page": "在任务页打开"},"timeline": {"loading": "加载中...",@@ -1839,8 +1840,7 @@"all_issues": "全部任务","my_work": "我的工作","working": "运行中",- "subscribed": "已订阅",- "snoozed": "已延后"+ "subscribed": "已订阅"},"untitled": "未命名视图","copy_name": "{{name}}(副本)",diff --git a/packages/views/locales/zh-Hans/layout.json b/packages/views/locales/zh-Hans/layout.jsonindex 757ddf1d31..8a77758bb4 100644--- a/packages/views/locales/zh-Hans/layout.json+++ b/packages/views/locales/zh-Hans/layout.json@@ -174,8 +174,6 @@"view_delete": "删除视图","new_issue_here": "在此项目中新建任务","inbox_actions": "收件箱操作",- "inbox_view_snoozed": "查看已延后",- "inbox_view_archived": "查看已归档","inbox_empty": "暂无通知","inbox_settings": "收件箱显示","inbox_all": "全部通知",diff --git a/packages/views/locales/zh-Hant/inbox.json b/packages/views/locales/zh-Hant/inbox.jsonindex 94bd5bfbe0..6f12668c65 100644--- a/packages/views/locales/zh-Hant/inbox.json+++ b/packages/views/locales/zh-Hant/inbox.json@@ -54,6 +54,7 @@"days": "{{count}} 天"},"archived_title": "已歸檔",+ "snoozed_title": "已延後","archived_empty": "暫無已歸檔通知","unarchive_tooltip": "取消歸檔","actions_aria": "通知操作",@@ -63,6 +64,7 @@},"detail": {"select_prompt": "選擇一條通知檢視詳情",+ "restore": "移回收件箱","original_input": "原始輸入","retry_with_context": "保留上下文重試","edit_advanced": "開啟完整表單",@@ -212,9 +214,7 @@"failed": "延後失敗","unsnooze_failed": "恢復失敗","view_empty": "沒有延後的項目",- "view_empty_description": "在收件箱裡延後一個任務,它會在這裡等到時間再回來。",- "col_updates": "延後期間",- "col_back": "回來時間"+ "view_empty_description": "在收件箱裡延後一個任務,它會在這裡等到時間再回來。"},"auto_archive_prompt": {"title": "處理完的通知,可以自動歸檔",diff --git a/packages/views/locales/zh-Hant/issues.json b/packages/views/locales/zh-Hant/issues.jsonindex 297abf6be7..2a8525f7e9 100644--- a/packages/views/locales/zh-Hant/issues.json+++ b/packages/views/locales/zh-Hant/issues.json@@ -598,7 +598,8 @@"unsubscribe_subtree_succeeded": "已取消訂閱此任務及其子任務。","subscription_update_failed": "無法更新訂閱狀態,請重試。","pull_requests_empty_title": "暫無關聯 PR。",- "guest_readonly_note": "訪客可以查看和評論,不能修改任務屬性。"+ "guest_readonly_note": "訪客可以查看和評論,不能修改任務屬性。",+ "open_issue_page": "在任務頁開啟"},"timeline": {"loading": "載入中…",@@ -1839,8 +1840,7 @@"all_issues": "全部任務","my_work": "我的工作","working": "執行中",- "subscribed": "已訂閱",- "snoozed": "已延後"+ "subscribed": "已訂閱"},"untitled": "未命名檢視","copy_name": "{{name}}(副本)",diff --git a/packages/views/locales/zh-Hant/layout.json b/packages/views/locales/zh-Hant/layout.jsonindex 92a813f8af..4798fb74e4 100644--- a/packages/views/locales/zh-Hant/layout.json+++ b/packages/views/locales/zh-Hant/layout.json@@ -174,8 +174,6 @@"view_delete": "刪除檢視","new_issue_here": "在此專案中新建任務","inbox_actions": "收件箱操作",- "inbox_view_snoozed": "查看已延後",- "inbox_view_archived": "查看已歸檔","inbox_empty": "暫無通知","inbox_settings": "收件箱顯示","inbox_all": "全部通知",diff --git a/packages/views/search/search-command.test.tsx b/packages/views/search/search-command.test.tsxindex 2852234891..672c4b2367 100644--- a/packages/views/search/search-command.test.tsx+++ b/packages/views/search/search-command.test.tsx@@ -1024,7 +1024,7 @@ describe("SearchCommand", () => {renderSearch();await user.type(input(), "views");- await waitFor(() => expect(viewRows()).toHaveLength(7));+ await waitFor(() => expect(viewRows()).toHaveLength(6));expect(renderedValues().indexOf("page:views")).toBeLessThan(renderedValues().indexOf("view:view-bugs"));});