Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

feat(inbox): desktop mark-unread/delete, J/K/U triage shortcuts, and archive-all confirmation (MUL-9981) (#11327)

Jiayuan Zhangf66e32235005
diff --git a/apps/docs/content/docs/inbox.fr.mdx b/apps/docs/content/docs/inbox.fr.mdx
index 031c40c6be..88edd63dbb 100644
--- a/apps/docs/content/docs/inbox.fr.mdx
+++ b/apps/docs/content/docs/inbox.fr.mdx
@@ -12,7 +12,7 @@ La boîte de réception rassemble l'activité de travail qui vous concerne et si
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**. Seul l'onglet ouvert affiche son nom ; les deux autres sont des icônes, nommées au survol. Sélectionner à nouveau l'onglet ouvert replie la section. 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**.
-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, et qui a fait quoi sur une deuxième ligne ; un point signale une ligne non lue. Activez **Lignes compactes** dans les réglages d'affichage pour garder chaque ligne sur une seule ligne. 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, et qui a fait quoi sur une deuxième ligne ; un point signale une ligne non lue. Activez **Lignes compactes** dans les réglages d'affichage pour garder chaque ligne sur une seule ligne. Survolez une ligne pour ouvrir une carte avec le titre complet, le commentaire, et **Ouvrir**, **Marquer comme lu** (ou **Marquer comme non lu** une fois lue), **Reporter** et **Archiver**. Un clic droit sur une ligne propose **Ouvrir dans un nouvel onglet**, **Marquer comme lu / non lu**, **Archiver** (ou **Désarchiver** dans l'onglet Archivées), **Se désabonner et archiver** et **Supprimer**.
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.
@@ -97,11 +97,12 @@ Cliquez sur une ligne pour ouvrir la notification sur la page Boîte de récepti
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.
+- **Marquer comme non lu / Marquer comme lu** (`U`) bascule l'état de lecture de la notification ouverte sans la fermer.
- **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.
- **Archiver** (`E`) archive la notification et ouvre la suivante. L'archivage ne modifie ni ne supprime la tâche. Pour clore la tâche, changez plutôt son statut ; par défaut, sa notification est archivée elle aussi (voir plus bas quand une notification quitte la boîte de réception).
- **Se désabonner et archiver** (`⇧E`) est proposé sur les tâches qui ne sont pas les vôtres : assignées ni à vous, ni à un agent qui vous appartient. L'action vous désabonne de la tâche, archive la notification et ouvre la suivante. Les mises à jour ordinaires n'arrivent plus dans votre boîte de réception, mais les @mentions, si. Sur une tâche avec des sous-tâches, vous choisissez entre cette tâche seulement et cette tâche avec toutes ses sous-tâches. Pour cette tâche seulement, la confirmation propose **Annuler**, qui rétablit l'abonnement tel qu'il était. Le désabonnement des sous-tâches ne s'annule pas ici ; réabonnez-vous depuis la page de la tâche. La même action se trouve dans la carte au survol et dans le menu contextuel d'une ligne.
-La suivante est la ligne suivante que la section affiche avec ses filtres actuels : vous parcourez ainsi la boîte de réception sans revenir à la liste.
+La suivante est la ligne suivante que la section affiche avec ses filtres actuels : vous parcourez ainsi la boîte de réception sans revenir à la liste. Appuyez sur `J` et `K` pour passer à la notification suivante ou précédente dans l'onglet actif sans archiver.
Sur les onglets **Boîte de réception** et **Archivées**, **Filtrer**, dans le menu ⋯ 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. Tant que des filtres sont actifs, un bouton de filtre avec leur nombre s'affiche dans l'en-tête de la section et permet de les rouvrir ; **Effacer les filtres** les réinitialise.
@@ -110,7 +111,7 @@ Dans l'onglet **Boîte de réception**, le menu ⋯ de la section regroupe les a
- **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**.
+- **Tout archiver** (demande confirmation avant d'archiver toutes les notifications actives ; les tâches reportées ne sont pas touchées).
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.
diff --git a/apps/docs/content/docs/inbox.ja.mdx b/apps/docs/content/docs/inbox.ja.mdx
index 3c696865c0..1b501f21b3 100644
--- a/apps/docs/content/docs/inbox.ja.mdx
+++ b/apps/docs/content/docs/inbox.ja.mdx
@@ -12,7 +12,7 @@ import { InboxDemo } from "@/components/demos/inbox-demo";
インボックスは **作業** パネルのセクションで、ピン留め済みの下、ビューとプロジェクトの上にあります。ピン留めがないときは最初のセクションになります。見出しには **インボックス**、**スヌーズ中**、**アーカイブ済み** の 3 つのタブがあります。名前が表示されるのは開いているタブだけで、ほかの 2 つはアイコンになり、ポインタを合わせると名前が出ます。開いているタブをもう一度選ぶとセクションを折りたためます。未読数は **インボックス** の横と、アプリレールの **作業** のバッジに表示されます。**作業** を右クリックすると **すべて既読にする** を使えます。
-**インボックス** タブにはタスクごとに 1 行ずつ、新しい順に、既読・未読を問わず並びます。行にはタスクのステータス、タイトルと時刻、2 行目に誰が何をしたかが表示され、未読の行にはドットが付きます。表示設定で **コンパクト表示** をオンにすると、各行が 1 行になります。行にカーソルを合わせると、タイトル全文とコメントを表示するカードが開き、**開く**、**既読にする**、**アーカイブ** を使えます。
+**インボックス** タブにはタスクごとに 1 行ずつ、新しい順に、既読・未読を問わず並びます。行にはタスクのステータス、タイトルと時刻、2 行目に誰が何をしたかが表示され、未読の行にはドットが付きます。表示設定で **コンパクト表示** をオンにすると、各行が 1 行になります。行にカーソルを合わせると、タイトル全文とコメントを表示するカードが開き、**開く**、**既読にする**(既読のときは **未読にする**)、**スヌーズ**、**アーカイブ** を使えます。行を右クリックすると、**新しいタブで開く**、**既読にする / 未読にする**、**アーカイブ**(アーカイブ済みタブでは **アーカイブ解除**)、**購読解除してアーカイブ**、**削除** を選べます。
スマートフォンでは、作業パネルはドロワーの中にあります。そのインボックスセクションの末尾にある **すべての通知** から、独自のリスト、同じ 3 つのタブ、フィルターを持つインボックスページを開けます。
@@ -97,11 +97,12 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w
タスクのヘッダーの下にはインボックスバーが表示されます。誰がいつ何をしたかを示し、通知を片付けるための操作が並びます。
- **ステータス**、**担当者**、**クイックアクション** はタスクそのものを変更します。プロパティと同じです。クイックアクションはワークスペースにあるときだけ表示されます。
+- **未読にする / 既読にする**(`U`)は、開いている通知を閉じずにその場で未読・既読を切り替えます。
- **スヌーズ**(`H`)は、指定した時間までタスクをインボックスから外し、次の通知を開きます。詳しくは下の「タスクをスヌーズする」を参照してください。
- **アーカイブ**(`E`)は、通知をアーカイブして次の通知を開きます。アーカイブしてもタスクは変更・削除されません。タスクを終えるときはステータスを変えます。既定ではそれで通知もアーカイブされます(下の「通知がインボックスから外れるとき」を参照)。
- **購読解除してアーカイブ**(`⇧E`)は、自分のタスクではないとき(担当者が自分でも自分のエージェントでもない)に表示されます。タスクの購読を解除し、通知をアーカイブして次の通知を開きます。以降の通常の更新はインボックスに届きませんが、@メンションは引き続き通知されます。サブタスクがある場合は、このタスクのみか、すべてのサブタスクを含めるかを選べます。このタスクのみの場合は確認メッセージの **元に戻す** で購読を元どおりに戻せます。サブタスクごと解除した場合はここでは戻せないので、タスクのページで購読し直してください。ホバーカードと行の右クリックメニューにも同じ操作があります。
-次の通知とは、セクションが現在のフィルターで表示している次の行のことです。リストに戻らずにインボックスを順に片付けられます。
+次の通知とは、セクションが現在のフィルターで表示している次の行のことです。リストに戻らずにインボックスを順に片付けられます。`J` / `K` を押すと、アーカイブせずに現在のタブの前後へ移動できます。
**インボックス** と **アーカイブ済み** タブでは、セクションの ⋯ メニューの **フィルター** で、通知の種類、受信日時、送信者で絞り込めるほか、タスクのステータスや優先度でも絞り込めます。絞り込み中はセクション見出しに条件数付きのフィルターボタンが表示され、そこから開き直せます。**フィルターをクリア** で元に戻せます。
@@ -110,7 +111,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w
- **すべて既読にする**
- **既読の項目をすべてアーカイブ**
- **完了した項目をアーカイブ**(`done` または `closed` カテゴリのタスクの通知)
-- **すべてアーカイブ**
+- **すべてアーカイブ**(実行前に確認ダイアログが表示され、アクティブな通知のみをアーカイブします。スヌーズ中のタスクはそのまま残ります)
**アーカイブ済み** タブには、アーカイブした通知がスクロールに合わせて読み込まれます。フィルターは、まだ読み込まれていない通知も含め、アーカイブ全体に適用されます。アーカイブ済みの通知は既読状態を保持するため、行または開いた通知のバーにある **インボックスに戻す**(または `E`)で元のまま戻ります。
diff --git a/apps/docs/content/docs/inbox.ko.mdx b/apps/docs/content/docs/inbox.ko.mdx
index 4a47e6d37b..239ae7f3cd 100644
--- a/apps/docs/content/docs/inbox.ko.mdx
+++ b/apps/docs/content/docs/inbox.ko.mdx
@@ -12,7 +12,7 @@ import { InboxDemo } from "@/components/demos/inbox-demo";
인박스는 **작업** 패널의 섹션으로, 고정됨 아래, 뷰와 프로젝트 위에 있습니다. 고정한 항목이 없으면 첫 번째 섹션이 됩니다. 섹션 제목에는 **인박스**, **미뤄둔 항목**, **보관됨** 세 개의 탭이 있습니다. 열린 탭만 이름이 보이고 나머지 두 탭은 아이콘으로 표시되며, 마우스를 올리면 이름이 나타납니다. 열린 탭을 다시 선택하면 섹션이 접힙니다. 읽지 않은 수는 **인박스** 옆과 앱 레일의 **작업** 배지에 표시됩니다. **작업**을 오른쪽 클릭하면 **모두 읽음으로 표시**를 쓸 수 있습니다.
-**인박스** 탭에는 태스크마다 한 행씩, 최신순으로, 읽음 여부와 관계없이 표시됩니다. 행에는 태스크 상태, 제목과 시간, 그리고 두 번째 줄에 누가 무엇을 했는지가 보이고, 읽지 않은 행에는 점이 붙습니다. 표시 설정에서 **간결하게 표시**를 켜면 각 행이 한 줄로 줄어듭니다. 행 위에 마우스를 올리면 전체 제목과 댓글이 담긴 카드가 열리고, **열기**, **읽음으로 표시**, **보관**을 쓸 수 있습니다.
+**인박스** 탭에는 태스크마다 한 행씩, 최신순으로, 읽음 여부와 관계없이 표시됩니다. 행에는 태스크 상태, 제목과 시간, 그리고 두 번째 줄에 누가 무엇을 했는지가 보이고, 읽지 않은 행에는 점이 붙습니다. 표시 설정에서 **간결하게 표시**를 켜면 각 행이 한 줄로 줄어듭니다. 행 위에 마우스를 올리면 전체 제목과 댓글이 담긴 카드가 열리고, **열기**, **읽음으로 표시**(이미 읽은 경우 **읽지 않음으로 표시**), **다시 알림**, **보관**을 쓸 수 있습니다. 행을 오른쪽 클릭하면 **새 탭에서 열기**, **읽음으로 표시 / 읽지 않음으로 표시**, **보관**(보관됨 탭에서는 **보관 해제**), **구독 해제 후 보관**, **삭제**를 선택할 수 있습니다.
휴대폰에서는 작업 패널이 서랍 안에 있습니다. 그 인박스 섹션 맨 아래의 **모든 알림**을 누르면 자체 목록, 같은 세 개의 탭, 필터가 있는 인박스 페이지가 열립니다.
@@ -97,11 +97,12 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339, 30m, 3h, 1d, 1w; uns
태스크 헤더 아래에는 인박스 바가 표시됩니다. 누가 언제 무엇을 했는지 보여 주고, 알림을 처리하는 작업을 제공합니다.
- **상태**, **담당자**, **퀵 액션**은 태스크 자체를 바꾸며, 속성에서 바꾸는 것과 같습니다. 퀵 액션은 워크스페이스에 있을 때만 나타납니다.
+- **읽지 않음으로 표시 / 읽음으로 표시**(`U`)는 열어 둔 알림을 닫지 않고 그 자리에서 읽음 상태를 전환합니다.
- **다시 알림**(`H`)은 지정한 시간까지 태스크를 인박스에서 빼고 다음 알림을 엽니다. 자세한 내용은 아래 '태스크 미루기'를 참고하세요.
- **보관**(`E`)은 알림을 보관하고 다음 알림을 엽니다. 보관해도 태스크는 변경되거나 삭제되지 않습니다. 태스크를 끝내려면 상태를 바꾸세요. 기본적으로 그 알림도 함께 보관됩니다(아래 '알림이 인박스에서 빠지는 경우' 참고).
- **구독 해제 후 보관**(`⇧E`)은 내 태스크가 아닐 때(담당자가 나도, 내 에이전트도 아닐 때) 표시됩니다. 태스크 구독을 해제하고 알림을 보관한 뒤 다음 알림을 엽니다. 이후 일반 업데이트는 인박스에 오지 않지만 @멘션은 계속 알림을 받습니다. 하위 태스크가 있으면 이 태스크만 또는 모든 하위 태스크까지 해제할지 고를 수 있습니다. 이 태스크만 해제했다면 확인 메시지의 **실행 취소**로 구독을 원래대로 되돌릴 수 있습니다. 하위 태스크까지 해제한 경우에는 여기서 되돌릴 수 없으니 태스크 페이지에서 다시 구독하세요. 호버 카드와 행의 우클릭 메뉴에도 같은 동작이 있습니다.
-다음 알림은 섹션이 현재 필터로 보여 주는 다음 행입니다. 목록으로 돌아가지 않고 인박스를 차례로 처리할 수 있습니다.
+다음 알림은 섹션이 현재 필터로 보여 주는 다음 행입니다. 목록으로 돌아가지 않고 인박스를 차례로 처리할 수 있습니다. `J`와 `K`를 누르면 보관하지 않고 현재 탭의 다음·이전 알림으로 이동합니다.
**인박스**와 **보관됨** 탭에서는 섹션 ⋯ 메뉴의 **필터**로 알림 유형, 받은 시간, 보낸 사람으로 좁히거나 태스크의 상태와 우선순위로 좁힐 수 있습니다. 필터가 적용된 동안에는 섹션 제목 줄에 조건 수가 표시된 필터 버튼이 나타나며, 이 버튼으로 다시 열 수 있습니다. **필터 지우기**로 되돌릴 수 있습니다.
@@ -110,7 +111,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339, 30m, 3h, 1d, 1w; uns
- **모두 읽음으로 표시**
- **읽은 항목 모두 보관**
- **완료된 항목 보관**: `done` 또는 `closed` 카테고리 태스크의 알림
-- **모두 보관**
+- **모두 보관**(실행 전에 확인 창이 나타나며, 모든 활성 알림을 보관하고 미뤄둔 태스크는 그대로 둡니다)
**보관됨** 탭에는 보관된 알림이 나열되고, 아래로 스크롤하면 이전 기록이 계속 불러와집니다. 필터는 아직 불러오지 않은 기록을 포함한 전체 보관 기록에 적용됩니다. 보관된 알림은 읽음 상태를 유지하므로 행이나 열린 알림의 바에 있는 **인박스로 되돌리기**(또는 `E`)를 쓰면 그대로 돌아옵니다.
diff --git a/apps/docs/content/docs/inbox.mdx b/apps/docs/content/docs/inbox.mdx
index f2a42500b8..2e05a07825 100644
--- a/apps/docs/content/docs/inbox.mdx
+++ b/apps/docs/content/docs/inbox.mdx
@@ -12,7 +12,7 @@ The inbox collects the work activity that concerns you and flags where something
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**. Only the open tab shows its name; the other two are icons, named when you hover them. Select the open tab again to collapse the section. 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 **Inbox** tab 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 on a second line; a dot marks it unread. Turn on **Compact rows** in the display settings to keep each row to one line. 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, and who did what on a second line; a dot marks it unread. Turn on **Compact rows** in the display settings to keep each row to one line. Hover a row for a card with the full title, the comment, and **Open**, **Mark as read** (or **Mark as unread** when read), **Snooze**, and **Archive**. Right-click a row for **Open in new tab**, **Mark as read** / **Mark as unread**, **Archive** (or **Unarchive** on the Archived tab), **Unsubscribe & archive**, and **Delete**.
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.
@@ -97,11 +97,12 @@ Click a row to open the notification on the Inbox page, at the comment it is abo
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.
+- **Mark as unread / Mark as read** (`U`) toggles the open notification's read state in place without closing it.
- **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.
- **Archive** (`E`) archives the notification and opens the next one. Archiving doesn't modify or delete the issue. To finish the issue, change its status instead; by default that archives its notification too (see [When a notification leaves the inbox](#when-a-notification-leaves-the-inbox)).
- **Unsubscribe & archive** (`⇧E`) is offered on issues that aren't yours: not assigned to you or to an agent you own. It unsubscribes you from the issue, archives the notification and opens the next one. Ordinary updates stop reaching your inbox, while @mentions still do. On an issue with sub-issues you choose between this issue only and this issue with all its sub-issues. For this issue only, the confirmation offers **Undo**, which restores the subscription as it was. Leaving the sub-issues as well can't be undone there; subscribe again on the issue page instead. The same action is on the hover card and in a row's right-click menu.
-The next one is the next row the section lists under its current filters, so you can work through the inbox without going back to the list.
+The next one is the next row the section lists under its current filters, so you can work through the inbox without going back to the list. Press `J` and `K` to step to the next or previous notification in the current tab without archiving.
**Filter**, in the section's ⋯ menu on the **Inbox** and **Archived** tabs, narrows the list by notification type, when it was received, and who it is from, or by the issue's status and priority. While filters are set, a filter button with their count shows in the section header and reopens them; **Clear filters** resets them.
@@ -110,7 +111,7 @@ 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**.
+- **Archive all** (asks for confirmation before archiving all active notifications; snoozed issues are left alone).
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.
diff --git a/apps/docs/content/docs/inbox.zh-Hant.mdx b/apps/docs/content/docs/inbox.zh-Hant.mdx
index 73304aa80b..1dd89d855f 100644
--- a/apps/docs/content/docs/inbox.zh-Hant.mdx
+++ b/apps/docs/content/docs/inbox.zh-Hant.mdx
@@ -12,7 +12,7 @@ import { InboxDemo } from "@/components/demos/inbox-demo";
收件箱是**工作**面板裡的一個分區,排在固定之後、檢視和專案之前;沒有固定項時,它就是第一個分區。分區標題列有三個分頁:**收件箱**、**已延後**和**已歸檔**。只有目前的分頁顯示名稱,另外兩個顯示為圖示,懸停可看到名稱。再次點選目前的分頁可以收合這個分區。未讀數顯示在**收件箱**旁,也會以角標顯示在應用側欄的**工作**上;右鍵點選**工作**可以**全部標為已讀**。
-**收件箱**分頁每個任務佔一列,最新的在前,已讀和未讀都在。每列顯示任務狀態、標題和時間,第二行顯示誰做了什麼;未讀的列帶一個圓點。在顯示設定裡打開**緊湊顯示**,每列只保留一行。滑鼠懸停在某列上會彈出卡片,顯示完整標題和評論內容,並提供**開啟**、**標為已讀**和**歸檔**。
+**收件箱**分頁每個任務佔一列,最新的在前,已讀和未讀都在。每列顯示任務狀態、標題和時間,第二行顯示誰做了什麼;未讀的列帶一個圓點。在顯示設定裡打開**緊湊顯示**,每列只保留一行。滑鼠懸停在某列上會彈出卡片,顯示完整標題和評論內容,並提供**開啟**、**標為已讀**(已讀時提供**標為未讀**)、**延後**和**歸檔**。右鍵點擊某列可**在新分頁開啟**、**標為已讀 / 未讀**、**歸檔**(已歸檔分頁下為**取消歸檔**)、**取消訂閱並歸檔**,或永久**刪除**通知。
在手機上,工作面板收在抽屜裡。其中的收件箱分區末尾有**全部通知**,點開是收件箱頁面,帶自己的列表、同樣的三個分頁和篩選。
@@ -97,11 +97,12 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w
任務頁首下方有一條收件箱列。它先說明誰在什麼時候做了什麼,再給出通常能處理掉這條通知的操作:
- **狀態**、**負責人**和**快捷操作**直接修改任務本身,和屬性裡一樣;工作區有快捷操作時才會出現。
+- **標為未讀 / 標為已讀**(`U`)原地切換目前開啟通知的未讀或已讀狀態,不會關閉目前通知。
- **延後**(`H`)把任務移出收件箱,到你選的時間再回來,並開啟下一條。詳見下方的「延後任務」。
- **歸檔**(`E`)會歸檔這條通知並開啟下一條。歸檔不會修改或刪除任務。要結束任務,請修改它的狀態;預設情況下這也會歸檔它的通知(見下文「通知何時離開收件箱」)。
- **取消訂閱並歸檔**(`⇧E`):任務不是你的(負責人不是你,也不是你擁有的 AI 代理)時出現。它取消你對這個任務的訂閱,歸檔這條通知並開啟下一條;之後一般動態不再進入收件箱,@你仍會通知。有子任務時可以選擇只退訂這個任務,或連同全部子任務一起退訂。只退訂這個任務時,提示裡可以**復原**,訂閱會按原來的方式恢復;連同子任務一起退訂無法在這裡復原,可以在任務頁面重新訂閱。懸停卡片和列的右鍵選單裡也有這個操作。
-"下一條"是分區在當前篩選下列出的下一列,因此不用回到列表,就能把收件箱一條條處理完。
+"下一條"是分區在當前篩選下列出的下一列,因此不用回到列表,就能把收件箱一條條處理完。按 `J` / `K` 可以在目前分頁的列表中上下切換通知而不歸檔。
在**收件箱**和**已歸檔**分頁下,分區 ⋯ 選單裡的**篩選**可以按通知類型、收到時間和來自誰篩選,也可以按任務的狀態和優先順序篩選。設定了篩選條件時,分區標題列會顯示帶條件數的篩選按鈕,點它可以再次開啟篩選;點**清除篩選**即可恢復。
@@ -110,7 +111,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w
- **全部標為已讀**;
- **歸檔全部已讀**;
- **歸檔已完成**:歸檔 `done` 或 `closed` 分類下任務的通知;
-- **歸檔全部**。
+- **歸檔全部**(執行前會彈窗確認,僅歸檔活躍通知,不影響已延後的任務)。
**已歸檔**分頁列出已歸檔的通知,向下捲動可繼續載入更早的記錄。篩選覆蓋全部歸檔記錄,包括尚未載入的記錄。已歸檔的通知會保留已讀狀態,因此點列上或已開啟通知的收件箱列裡的**移回收件箱**(或按 `E`)時會原樣回來。
diff --git a/apps/docs/content/docs/inbox.zh.mdx b/apps/docs/content/docs/inbox.zh.mdx
index 5fc798784d..291430a035 100644
--- a/apps/docs/content/docs/inbox.zh.mdx
+++ b/apps/docs/content/docs/inbox.zh.mdx
@@ -12,7 +12,7 @@ import { InboxDemo } from "@/components/demos/inbox-demo";
收件箱是**工作**面板里的一个分区,排在固定之后、视图和项目之前;没有固定项时,它就是第一个分区。分区标题栏有三个标签:**收件箱**、**已延后**和**已归档**。只有当前标签显示名称,另外两个显示为图标,悬停可看到名称。再次点击当前标签可以折叠这个分区。未读数显示在**收件箱**旁,也会以角标显示在应用侧栏的**工作**上;右键点击**工作**可以**全部标为已读**。
-**收件箱**标签每个任务占一行,最新的在前,已读和未读都在。每行显示任务状态、标题和时间,第二行显示谁做了什么;未读的行带一个圆点。在显示设置里打开**紧凑显示**,每行只保留一行。鼠标悬停在某行上会弹出卡片,显示完整标题和评论内容,并提供**打开**、**标为已读**和**归档**。
+**收件箱**标签每个任务占一行,最新的在前,已读和未读都在。每行显示任务状态、标题和时间,第二行显示谁做了什么;未读的行带一个圆点。在显示设置里打开**紧凑显示**,每行只保留一行。鼠标悬停在某行上会弹出卡片,显示完整标题和评论内容,并提供**打开**、**标为已读**(已读时提供**标为未读**)、**延后**和**归档**。右键点击某行可**在新标签页打开**、**标为已读 / 未读**、**归档**(已归档标签下为**取消归档**)、**取消订阅并归档**,或永久**删除**通知。
在手机上,工作面板收在抽屉里。其中的收件箱分区末尾有**全部通知**,点开是收件箱页面,带自己的列表、同样的三个标签和筛选。
@@ -97,11 +97,12 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w
任务页头下方有一条收件箱栏。它先说明谁在什么时候做了什么,再给出通常能处理掉这条通知的操作:
- **状态**、**负责人**和**快捷操作**直接修改任务本身,和属性里一样;工作区有快捷操作时才会出现。
+- **标为未读 / 标为已读**(`U`)原地切换当前打开通知的未读或已读状态,不会关闭当前通知。
- **延后**(`H`)把任务移出收件箱,到你选的时间再回来,并打开下一条。详见下方的「延后任务」。
- **归档**(`E`)会归档这条通知并打开下一条。归档不会修改或删除任务。要结束任务,请修改它的状态;默认情况下这也会归档它的通知(见下文「通知何时离开收件箱」)。
- **取消订阅并归档**(`⇧E`):任务不是你的(负责人不是你,也不是你拥有的智能体)时出现。它取消你对这个任务的订阅,归档这条通知并打开下一条;之后普通动态不再进入收件箱,@你仍会通知。有子任务时可以选择只退订这个任务,或连同全部子任务一起退订。只退订这个任务时,提示里可以**撤销**,订阅会按原来的方式恢复;连同子任务一起退订无法在这里撤销,可以在任务页面重新订阅。悬停卡片和行的右键菜单里也有这个操作。
-"下一条"是分区在当前筛选下列出的下一行,因此不用回到列表,就能把收件箱一条条处理完。
+"下一条"是分区在当前筛选下列出的下一行,因此不用回到列表,就能把收件箱一条条处理完。按 `J` / `K` 可以在当前标签的列表中上下切换通知而不归档。
在**收件箱**和**已归档**标签下,分区 ⋯ 菜单里的**筛选**可以按通知类型、收到时间和来自谁筛选,也可以按任务的状态和优先级筛选。设置了筛选条件时,分区标题栏会显示带条件数的筛选按钮,点它可以再次打开筛选;点**清除筛选**即可恢复。
@@ -110,7 +111,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w
- **全部标为已读**;
- **归档全部已读**;
- **归档已完成**:归档 `done` 或 `closed` 分类下任务的通知;
-- **归档全部**。
+- **归档全部**(执行前会弹窗确认,仅归档活跃通知,不影响已延后的任务)。
**已归档**标签列出已归档的通知,向下滚动可继续加载更早的记录。筛选覆盖全部归档记录,包括尚未加载的记录。已归档的通知会保留已读状态,因此点行上或已打开通知的收件箱栏里的**移回收件箱**(或按 `E`)时会原样回来。
diff --git a/apps/docs/content/docs/shortcuts.fr.mdx b/apps/docs/content/docs/shortcuts.fr.mdx
index 6c233d3e9a..2b4dacb1ce 100644
--- a/apps/docs/content/docs/shortcuts.fr.mdx
+++ b/apps/docs/content/docs/shortcuts.fr.mdx
@@ -38,13 +38,16 @@ Choisir un résultat l'ouvre. Maintenez `⌘` (`Ctrl` sous Windows et Linux) en
| Rechercher dans la tâche | `⌘F` | `Ctrl+F` | Voir plus bas. |
| 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. |
+| Marquer comme non lue / lue | `U` | `U` | Sur la page Boîte de réception, bascule l'état lu/non lu de la notification active ouverte sans la quitter. |
+| Notification suivante | `J` | `J` | Sur la page Boîte de réception, passe à la notification suivante dans l'onglet actif sans archiver. |
+| Notification précédente | `K` | `K` | Sur la page Boîte de réception, revient à la notification précédente dans l'onglet actif sans archiver. |
| 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). |
| Revenir en arrière | `⌘[` | `Ctrl+[` | |
| Avancer | `⌘]` | `Ctrl+]` | |
-Les raccourcis à une seule touche (`C`, `E`, `H`, `Z`) et Revenir en arrière / Avancer ne réagissent pas pendant que vous tapez dans un champ.
+Les raccourcis à une seule touche (`C`, `E`, `H`, `U`, `J`, `K`, `Z`) et Revenir en arrière / Avancer ne réagissent pas pendant que vous tapez dans un champ.
Le groupe **Navigation** propose aussi d'aller à la boîte de réception, aux discussions, à Mes tâches, aux tâches, aux projets, aux automatisations, aux agents, aux squads, aux statistiques, aux runtimes, aux skills et aux paramètres. Aucune de ces actions n'a de touche par défaut : attribuez-en à celles que vous utilisez. Aller à la boîte de réception ouvre la page Boîte de réception ; la liste des notifications elle-même est une section du panneau Travail, juste sous les épingles. Aller à Mes tâches ouvre la page Mes tâches, qui n'est pas la vue **Mon travail** du panneau Travail.
diff --git a/apps/docs/content/docs/shortcuts.ja.mdx b/apps/docs/content/docs/shortcuts.ja.mdx
index 41b4e81319..340170cd40 100644
--- a/apps/docs/content/docs/shortcuts.ja.mdx
+++ b/apps/docs/content/docs/shortcuts.ja.mdx
@@ -38,13 +38,16 @@ import { Step, Steps } from "fumadocs-ui/components/steps";
| タスク内を検索 | `⌘F` | `Ctrl+F` | 後述。 |
| 通知をアーカイブ | `E` | `E` | インボックスページで、開いている通知をアーカイブして次の通知を開きます。アーカイブ済みタブでは、開いている通知をインボックスに戻します。[インボックス](/inbox#通知の処理)を参照してください。 |
| 通知をスヌーズ | `H` | `H` | インボックスページで、開いているタスクをスヌーズして次の通知を開きます。スヌーズ中のタスクでは今すぐ戻します。 |
+| 通知の未読 / 既読を切り替え | `U` | `U` | インボックスページで、開いているアクティブな通知を閉じずに未読・既読を切り替えます。 |
+| 次の通知 | `J` | `J` | インボックスページで、アーカイブせずに現在のタブの次の通知へ移動します。 |
+| 前の通知 | `K` | `K` | インボックスページで、アーカイブせずに現在のタブの前の通知へ移動します。 |
| インボックスの操作を取り消す | `Z` | `Z` | アーカイブ・スヌーズ・購読解除の確認メッセージが表示されている間は、その操作を取り消します。表示がなければ、アーカイブ済みの開いている通知をインボックスに戻すか、**インボックスは空です** 画面に表示された操作を取り消します。 |
| 送信 | `⌘↵` | `Ctrl+Enter` | コメントやチャットのメッセージを送信します。新しいタスクの作成にも使います。 |
| 音声入力 | 未設定 | 未設定 | Desktop のみ。先に設定 → 音声入力でオンにしてください。[音声入力](/desktop-app#音声入力)を参照。 |
| 戻る | `⌘[` | `Ctrl+[` | |
| 進む | `⌘]` | `Ctrl+]` | |
-1 キーだけのショートカット(`C`、`E`、`H`、`Z`)と「戻る」「進む」は、入力欄で文字を打っている間は反応しません。
+1 キーだけのショートカット(`C`、`E`、`H`、`U`、`J`、`K`、`Z`)と「戻る」「進む」は、入力欄で文字を打っている間は反応しません。
**ナビゲーション**には、インボックス、チャット、自分のタスク、タスク、プロジェクト、自動化、エージェント、Squads、使用量、ランタイム、Skills、設定へ移動する操作もあります。どれも既定ではキーが割り当てられていないので、よく使うものに設定してください。インボックスへの移動で開くのはインボックスページで、通知のリスト自体は作業パネルの、ピン留め済みのすぐ下のセクションにあります。自分のタスクへの移動で開くのはマイタスクのページで、作業パネルの **自分の作業** ビューとは別のものです。
diff --git a/apps/docs/content/docs/shortcuts.ko.mdx b/apps/docs/content/docs/shortcuts.ko.mdx
index 551f0a66ce..6a1479db1b 100644
--- a/apps/docs/content/docs/shortcuts.ko.mdx
+++ b/apps/docs/content/docs/shortcuts.ko.mdx
@@ -38,13 +38,16 @@ import { Step, Steps } from "fumadocs-ui/components/steps";
| 태스크에서 찾기 | `⌘F` | `Ctrl+F` | 아래 설명 참고. |
| 알림 보관 | `E` | `E` | 인박스 페이지에서 열어 둔 알림을 보관하고 다음 알림을 엽니다. 보관됨 탭에서는 열어 둔 알림을 인박스로 되돌립니다. [인박스](/inbox#알림-처리)를 참고하세요. |
| 알림 미루기 | `H` | `H` | 인박스 페이지에서 열어 둔 태스크를 미루고 다음 알림을 엽니다. 미뤄둔 태스크에서는 지금 되돌립니다. |
+| 알림 읽지 않음 / 읽음 전환 | `U` | `U` | 인박스 페이지에서 열어 둔 활성 알림을 닫지 않고 읽지 않음/읽음 상태를 전환합니다. |
+| 다음 알림 | `J` | `J` | 인박스 페이지에서 보관하지 않고 현재 탭의 다음 알림으로 이동합니다. |
+| 이전 알림 | `K` | `K` | 인박스 페이지에서 보관하지 않고 현재 탭의 이전 알림으로 이동합니다. |
| 인박스 작업 실행 취소 | `Z` | `Z` | 보관, 미루기, 구독 해제 확인 알림이 보이는 동안 그 동작을 취소합니다. 확인 알림이 없으면 보관된 현재 알림을 인박스로 되돌리거나, **인박스가 비었습니다** 화면에 표시된 작업을 취소합니다. |
| 보내기 | `⌘↵` | `Ctrl+Enter` | 댓글과 채팅 메시지를 보내고, 새 태스크를 만들 때도 씁니다. |
| 음성 입력 | 지정 안 됨 | 지정 안 됨 | Desktop 전용. 먼저 설정 → 음성 입력에서 켜세요. [음성 입력](/desktop-app#음성-입력)을 참고하세요. |
| 뒤로 가기 | `⌘[` | `Ctrl+[` | |
| 앞으로 가기 | `⌘]` | `Ctrl+]` | |
-키 하나짜리 단축키(`C`, `E`, `H`, `Z`)와 뒤로 가기·앞으로 가기는 입력란에서 글을 쓰는 동안에는 동작하지 않습니다.
+키 하나짜리 단축키(`C`, `E`, `H`, `U`, `J`, `K`, `Z`)와 뒤로 가기·앞으로 가기는 입력란에서 글을 쓰는 동안에는 동작하지 않습니다.
**탐색** 그룹에는 인박스, 채팅, 내 태스크, 태스크, 프로젝트, 자동화, 에이전트, 스쿼드, 사용량, 런타임, Skills, 설정으로 이동하는 동작도 있습니다. 모두 기본 키가 없으니 자주 쓰는 것에 직접 지정하세요. 인박스로 이동하면 인박스 페이지가 열리며, 알림 목록 자체는 작업 패널에서 고정됨 바로 아래 섹션에 있습니다. 내 태스크로 이동하면 내 태스크 페이지가 열리며, 작업 패널의 **내 작업** 뷰와는 다릅니다.
diff --git a/apps/docs/content/docs/shortcuts.mdx b/apps/docs/content/docs/shortcuts.mdx
index 26f67ed8b7..233eaced9f 100644
--- a/apps/docs/content/docs/shortcuts.mdx
+++ b/apps/docs/content/docs/shortcuts.mdx
@@ -38,13 +38,16 @@ Selecting a result opens it. Hold `⌘` (`Ctrl` on Windows and Linux) while clic
| Find in issue | `⌘F` | `Ctrl+F` | See below. |
| 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). |
+| Mark notification unread / read | `U` | `U` | On the Inbox page, toggles unread/read on the open active notification without leaving it. |
+| Next notification | `J` | `J` | On the Inbox page, moves to the next notification in the current tab without archiving. |
+| Previous notification | `K` | `K` | On the Inbox page, moves to the previous notification in the current tab without archiving. |
| 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). |
| Go back | `⌘[` | `Ctrl+[` | |
| Go forward | `⌘]` | `Ctrl+]` | |
-Single-key shortcuts (`C`, `E`, `H`, `Z`) and Go back / Go forward don't fire while you're typing in an input.
+Single-key shortcuts (`C`, `E`, `H`, `U`, `J`, `K`, `Z`) and Go back / Go forward don't fire while you're typing in an input.
The **Navigation** group also has Go to Inbox, Chat, My Issues, Issues, Projects, Autopilot, Agents, Squads, Usage, Runtimes, Skills, and Settings. None of them has a key by default; bind the ones you use. Go to Inbox opens the Inbox page; the notification list itself is a section of the Work panel, right below Pinned. Go to My Issues opens the My Issues page, which is not the same as the **My work** view in the Work panel.
diff --git a/apps/docs/content/docs/shortcuts.zh-Hant.mdx b/apps/docs/content/docs/shortcuts.zh-Hant.mdx
index 05df188059..5693c8a83f 100644
--- a/apps/docs/content/docs/shortcuts.zh-Hant.mdx
+++ b/apps/docs/content/docs/shortcuts.zh-Hant.mdx
@@ -38,13 +38,16 @@ import { Step, Steps } from "fumadocs-ui/components/steps";
| 在任務中查詢 | `⌘F` | `Ctrl+F` | 見下文。 |
| 歸檔通知 | `E` | `E` | 在收件箱頁面上,歸檔當前開啟的通知並開啟下一條;在已歸檔分頁下則把它移回收件箱。見[收件箱](/inbox#處理通知)。 |
| 延後通知 | `H` | `H` | 在收件箱頁面上,延後當前開啟的任務並開啟下一條;已延後的任務則讓它現在回來。 |
+| 切換通知未讀狀態 | `U` | `U` | 在收件箱頁面上,原地切換目前開啟的活躍通知的未讀/已讀狀態,不離開目前通知。 |
+| 下一條通知 | `J` | `J` | 在收件箱頁面上,切換到目前分頁的下一條通知,不歸檔目前通知。 |
+| 上一條通知 | `K` | `K` | 在收件箱頁面上,切換到目前分頁的上一條通知,不歸檔目前通知。 |
| 復原收件箱操作 | `Z` | `Z` | 歸檔、延後或取消訂閱的提示還在時,復原這次操作;沒有提示時,把已歸檔的目前通知放回收件箱,或復原**收件箱已清空**頁面上寫明的操作。 |
| 傳送 | `⌘↵` | `Ctrl+Enter` | 傳送評論和聊天訊息,也用於提交新任務。 |
| 語音輸入 | 未設定 | 未設定 | 僅 Desktop;先在設定 → 語音輸入中啟用。見[語音輸入](/desktop-app#語音輸入)。 |
| 後退 | `⌘[` | `Ctrl+[` | |
| 前進 | `⌘]` | `Ctrl+]` | |
-單鍵快捷鍵(`C`、`E`、`H`、`Z`)和後退、前進在輸入框裡不起作用,避免打字時誤觸。
+單鍵快捷鍵(`C`、`E`、`H`、`U`、`J`、`K`、`Z`)和後退、前進在輸入框裡不起作用,避免打字時誤觸。
**導航**類操作還有前往收件箱、聊天、我的任務、任務、專案、自動化、AI 代理、小隊、統計、執行時、Skills 和設定,預設都沒有設定按鍵,需要時自己繫結。前往收件箱開啟的是收件箱頁面,通知列表本身是工作面板裡的一個分區,就在固定下面。前往我的任務開啟的是"我的任務"頁面,和工作面板裡的**我的工作**檢視不是一回事。
diff --git a/apps/docs/content/docs/shortcuts.zh.mdx b/apps/docs/content/docs/shortcuts.zh.mdx
index b4e4e66e9d..502fa2529b 100644
--- a/apps/docs/content/docs/shortcuts.zh.mdx
+++ b/apps/docs/content/docs/shortcuts.zh.mdx
@@ -38,13 +38,16 @@ import { Step, Steps } from "fumadocs-ui/components/steps";
| 在任务中查找 | `⌘F` | `Ctrl+F` | 见下文。 |
| 归档通知 | `E` | `E` | 在收件箱页面上,归档当前打开的通知并打开下一条;在已归档标签下则把它移回收件箱。见[收件箱](/inbox#处理通知)。 |
| 延后通知 | `H` | `H` | 在收件箱页面上,延后当前打开的任务并打开下一条;已延后的任务则让它现在回来。 |
+| 切换通知未读状态 | `U` | `U` | 在收件箱页面上,原地切换当前打开的活跃通知的未读/已读状态,不离开当前通知。 |
+| 下一条通知 | `J` | `J` | 在收件箱页面上,切换到当前标签的下一条通知,不归档当前通知。 |
+| 上一条通知 | `K` | `K` | 在收件箱页面上,切换到当前标签的上一条通知,不归档当前通知。 |
| 撤销收件箱操作 | `Z` | `Z` | 归档、延后或取消订阅的提示还在时,撤销这次操作;没有提示时,把已归档的当前通知放回收件箱,或撤销**收件箱已清空**页面上写明的操作。 |
| 发送 | `⌘↵` | `Ctrl+Enter` | 发送评论和聊天消息,也用于提交新任务。 |
| 语音输入 | 未设置 | 未设置 | 仅 Desktop;先在设置 → 语音输入中开启。见[语音输入](/desktop-app#语音输入)。 |
| 后退 | `⌘[` | `Ctrl+[` | |
| 前进 | `⌘]` | `Ctrl+]` | |
-单键快捷键(`C`、`E`、`H`、`Z`)和后退、前进在输入框里不起作用,避免打字时误触。
+单键快捷键(`C`、`E`、`H`、`U`、`J`、`K`、`Z`)和后退、前进在输入框里不起作用,避免打字时误触。
**导航**类操作还有前往收件箱、聊天、我的任务、任务、项目、自动化、智能体、小队、统计、运行时、Skills 和设置,默认都没有设置按键,需要时自己绑定。前往收件箱打开的是收件箱页面,通知列表本身是工作面板里的一个分区,就在固定下面。前往我的任务打开的是"我的任务"页面,和工作面板里的**我的工作**视图不是一回事。
diff --git a/packages/core/inbox/selection-store.ts b/packages/core/inbox/selection-store.ts
index 5ac1b24a35..1e307f4ad4 100644
--- a/packages/core/inbox/selection-store.ts
+++ b/packages/core/inbox/selection-store.ts
@@ -130,6 +130,15 @@ interface InboxSelectionState {
lastClearedByWorkspace: Record<string, LastInboxCleared>;
recordLastCleared: (wsId: string, entry: LastInboxCleared) => void;
clearLastCleared: (wsId: string, matchKey?: string) => void;
+ /**
+ * The notification the viewer explicitly marked unread while it stayed open.
+ * Kept in the store rather than a page ref so marking unread from the Work
+ * panel sidebar, the Inbox bar, a shortcut, or the command bar all suppress
+ * InboxPage's auto-read effect until the selection moves away.
+ */
+ manualUnreadIdByWorkspace: Record<string, string>;
+ markManualUnread: (wsId: string, itemId: string) => void;
+ clearManualUnread: (wsId: string, itemId?: string) => void;
}
const heldRowId = (wsId: string, list: string) => `${wsId}:${list}`;
@@ -272,4 +281,19 @@ export const useInboxSelectionStore = create<InboxSelectionState>()((set, get) =
const { [wsId]: _cleared, ...lastClearedByWorkspace } = state.lastClearedByWorkspace;
return { lastClearedByWorkspace };
}),
+ manualUnreadIdByWorkspace: {},
+ markManualUnread: (wsId, itemId) =>
+ set((state) =>
+ state.manualUnreadIdByWorkspace[wsId] === itemId
+ ? state
+ : { manualUnreadIdByWorkspace: { ...state.manualUnreadIdByWorkspace, [wsId]: itemId } },
+ ),
+ clearManualUnread: (wsId, itemId) =>
+ set((state) => {
+ const current = state.manualUnreadIdByWorkspace[wsId];
+ if (!current) return state;
+ if (itemId !== undefined && current !== itemId) return state;
+ const { [wsId]: _cleared, ...manualUnreadIdByWorkspace } = state.manualUnreadIdByWorkspace;
+ return { manualUnreadIdByWorkspace };
+ }),
}));
diff --git a/packages/core/shortcuts/definitions.ts b/packages/core/shortcuts/definitions.ts
index 5415a3be5c..4a4a6e6424 100644
--- a/packages/core/shortcuts/definitions.ts
+++ b/packages/core/shortcuts/definitions.ts
@@ -16,6 +16,9 @@ export type ShortcutActionId =
| "archiveInboxItem"
| "unsubscribeArchiveInboxItem"
| "snoozeInboxItem"
+ | "markInboxUnread"
+ | "nextInboxItem"
+ | "prevInboxItem"
| "undoInboxAction"
| "send"
| "voiceInput"
@@ -126,6 +129,24 @@ export const SHORTCUT_ACTIONS: readonly ShortcutActionDefinition[] = [
defaultShortcut: createShortcutChord("H"),
allowInEditable: false,
},
+ {
+ id: "markInboxUnread",
+ category: "general",
+ defaultShortcut: createShortcutChord("U"),
+ allowInEditable: false,
+ },
+ {
+ id: "nextInboxItem",
+ category: "general",
+ defaultShortcut: createShortcutChord("J"),
+ allowInEditable: false,
+ },
+ {
+ id: "prevInboxItem",
+ category: "general",
+ defaultShortcut: createShortcutChord("K"),
+ allowInEditable: false,
+ },
{
id: "undoInboxAction",
category: "general",
diff --git a/packages/views/inbox/components/inbox-archive-all-dialog.tsx b/packages/views/inbox/components/inbox-archive-all-dialog.tsx
new file mode 100644
index 0000000000..fbc5a7730f
--- /dev/null
+++ b/packages/views/inbox/components/inbox-archive-all-dialog.tsx
@@ -0,0 +1,65 @@
+"use client";
+
+import {
+ AlertDialog,
+ AlertDialogCancel,
+ AlertDialogContent,
+ AlertDialogDescription,
+ AlertDialogFooter,
+ AlertDialogHeader,
+ AlertDialogTitle,
+} from "@multica/ui/components/ui/alert-dialog";
+import { Button } from "@multica/ui/components/ui/button";
+import { useT } from "../../i18n";
+
+/**
+ * Confirmation dialog for "Archive all". Archiving everything in the live Inbox
+ * clears unread items in one shot; asking once keeps a stray menu click from
+ * wiping the queue, while leaving Undo and the Archived tab as recovery.
+ */
+export function InboxArchiveAllDialog({
+ open,
+ count,
+ onClose,
+ onConfirm,
+}: {
+ open: boolean;
+ /** Total number of unfiltered active inbox rows (0 falls back to a count-less description). */
+ count: number;
+ onClose: () => void;
+ onConfirm: () => void;
+}) {
+ const { t } = useT("inbox");
+
+ return (
+ <AlertDialog
+ open={open}
+ onOpenChange={(nextOpen) => {
+ if (!nextOpen) onClose();
+ }}
+ >
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>{t(($) => $.archive_all_dialog.title)}</AlertDialogTitle>
+ <AlertDialogDescription>
+ {count > 0
+ ? t(($) => $.archive_all_dialog.description_count, { count })
+ : t(($) => $.archive_all_dialog.description)}
+ </AlertDialogDescription>
+ </AlertDialogHeader>
+ <AlertDialogFooter>
+ <AlertDialogCancel>{t(($) => $.archive_all_dialog.cancel)}</AlertDialogCancel>
+ <Button
+ variant="destructive"
+ onClick={() => {
+ onClose();
+ onConfirm();
+ }}
+ >
+ {t(($) => $.archive_all_dialog.confirm)}
+ </Button>
+ </AlertDialogFooter>
+ </AlertDialogContent>
+ </AlertDialog>
+ );
+}
diff --git a/packages/views/inbox/components/inbox-page.test.tsx b/packages/views/inbox/components/inbox-page.test.tsx
index 6c532d6f2e..4a41f1d18f 100644
--- a/packages/views/inbox/components/inbox-page.test.tsx
+++ b/packages/views/inbox/components/inbox-page.test.tsx
@@ -250,6 +250,18 @@ vi.mock("./autopilot-quota-notice", () => ({
</button>
),
}));
+const archiveAllDialogProps = vi.hoisted(() => ({ count: -1, open: false }));
+vi.mock("./inbox-archive-all-dialog", async (importOriginal) => {
+ const actual = await importOriginal<typeof import("./inbox-archive-all-dialog")>();
+ return {
+ ...actual,
+ InboxArchiveAllDialog: (props: React.ComponentProps<typeof actual.InboxArchiveAllDialog>) => {
+ archiveAllDialogProps.count = props.count;
+ archiveAllDialogProps.open = props.open;
+ return actual.InboxArchiveAllDialog(props);
+ },
+ };
+});
vi.mock("../../i18n", () => ({ useT: () => ({ t: () => "Inbox" }), useLocale: () => "en" }));
function item(overrides: Partial<InboxItem> = {}): InboxItem {
@@ -281,7 +293,10 @@ function reset() {
heldRows: {},
leftRowKeyByWorkspace: {},
lastClearedByWorkspace: {},
+ manualUnreadIdByWorkspace: {},
});
+ archiveAllDialogProps.count = -1;
+ archiveAllDialogProps.open = false;
listData.active = [];
listData.archived = [];
listData.lookup = undefined;
@@ -1343,4 +1358,97 @@ describe("InboxPage", () => {
expect(replace).toHaveBeenCalledWith("/acme/issues/issue-404");
expect(replace).not.toHaveBeenCalledWith("/acme/inbox");
});
+
+ it("steps through notifications with J and K shortcuts on desktop", () => {
+ reset();
+ layout.width = DESKTOP;
+ listData.active = [
+ item({ id: "inbox-a", issue_id: "issue-a", created_at: "2026-04-03T00:00:00Z" }),
+ item({ id: "inbox-b", issue_id: "issue-b", created_at: "2026-04-02T00:00:00Z" }),
+ item({ id: "inbox-c", issue_id: "issue-c", created_at: "2026-04-01T00:00:00Z" }),
+ ];
+
+ render(<InboxPage />);
+
+ // Nothing selected yet: J opens the first notification.
+ fireEvent.keyDown(document, { key: "j", code: "KeyJ" });
+ expect(replace).toHaveBeenLastCalledWith("/acme/inbox?issue=issue-a");
+
+ // J advances to the next row; K moves back to the previous row.
+ fireEvent.keyDown(document, { key: "j", code: "KeyJ" });
+ expect(replace).toHaveBeenLastCalledWith("/acme/inbox?issue=issue-b");
+ expect(useInboxSelectionStore.getState().transitionByWorkspace["workspace-1"]?.direction).toBe("next");
+
+ fireEvent.keyDown(document, { key: "k", code: "KeyK" });
+ expect(replace).toHaveBeenLastCalledWith("/acme/inbox?issue=issue-a");
+ expect(useInboxSelectionStore.getState().transitionByWorkspace["workspace-1"]?.direction).toBe("prev");
+
+ // Clamps at the start of the list.
+ replace.mockClear();
+ fireEvent.keyDown(document, { key: "k", code: "KeyK" });
+ expect(replace).not.toHaveBeenCalled();
+ });
+
+ it("toggles unread and read on the open notification with U without auto-read reverting it", () => {
+ reset();
+ layout.width = DESKTOP;
+ searchParams = new URLSearchParams("issue=issue-a");
+ listData.active = [
+ item({ id: "inbox-a", issue_id: "issue-a", read: true }),
+ ];
+
+ const { rerender } = render(<InboxPage />);
+ markReadMutate.mockClear();
+
+ fireEvent.keyDown(document, { key: "u", code: "KeyU" });
+ expect(markUnreadMutate).toHaveBeenCalledWith("inbox-a", expect.anything());
+ expect(useInboxSelectionStore.getState().manualUnreadIdByWorkspace["workspace-1"]).toBe("inbox-a");
+
+ listData.active = [item({ id: "inbox-a", issue_id: "issue-a", read: false })];
+ rerender(<InboxPage />);
+ expect(markReadMutate).not.toHaveBeenCalled();
+
+ // Pressing U again marks it back read and releases the guard.
+ fireEvent.keyDown(document, { key: "u", code: "KeyU" });
+ expect(markReadMutate).toHaveBeenCalledWith("inbox-a", expect.anything());
+ expect(useInboxSelectionStore.getState().manualUnreadIdByWorkspace["workspace-1"]).toBeUndefined();
+ });
+
+ it("clears the manual-unread guard on unmount so reopening the notification marks it read again", () => {
+ reset();
+ layout.width = DESKTOP;
+ searchParams = new URLSearchParams("issue=issue-a");
+ listData.active = [item({ id: "inbox-a", issue_id: "issue-a", read: true })];
+
+ const first = render(<InboxPage />);
+ markReadMutate.mockClear();
+
+ fireEvent.keyDown(document, { key: "u", code: "KeyU" });
+ expect(useInboxSelectionStore.getState().manualUnreadIdByWorkspace["workspace-1"]).toBe("inbox-a");
+
+ // Navigate away from the Inbox page.
+ first.unmount();
+ expect(useInboxSelectionStore.getState().manualUnreadIdByWorkspace["workspace-1"]).toBeUndefined();
+
+ // Reopening the same unread notification later should auto-mark it read.
+ listData.active = [item({ id: "inbox-a", issue_id: "issue-a", read: false })];
+ render(<InboxPage />);
+ expect(markReadMutate).toHaveBeenCalledWith("inbox-a", expect.anything());
+ });
+
+ it("passes the unfiltered active count to the archive-all dialog when compact filters are active", () => {
+ reset();
+ layout.width = PHONE;
+ listData.active = [
+ item({ id: "inbox-a", issue_id: "issue-a", read: false }),
+ item({ id: "inbox-b", issue_id: "issue-b", read: true }),
+ item({ id: "inbox-c", issue_id: "issue-c", read: true }),
+ ];
+ useInboxFilterStore.getState().toggleUnreadOnly("workspace-1");
+
+ render(<InboxPage />);
+ // Only the 1 unread row is listed under the filter, but archive-all affects all 3 active rows.
+ expect(screen.getAllByTestId("row")).toHaveLength(1);
+ expect(archiveAllDialogProps.count).toBe(3);
+ });
});
diff --git a/packages/views/inbox/components/inbox-page.tsx b/packages/views/inbox/components/inbox-page.tsx
index 02e9a64284..212c894444 100644
--- a/packages/views/inbox/components/inbox-page.tsx
+++ b/packages/views/inbox/components/inbox-page.tsx
@@ -61,7 +61,9 @@ import { toast } from "sonner";
import {
MoreHorizontal,
Inbox,
+ Check,
CheckCheck,
+ CircleDot,
Archive,
ArchiveRestore,
BookCheck,
@@ -89,6 +91,7 @@ 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 { InboxArchiveAllDialog } from "./inbox-archive-all-dialog";
import { InboxDeleteDialog } from "./inbox-delete-dialog";
import { useTimeAgo } from "./inbox-list-item";
import { InboxList } from "./inbox-list";
@@ -280,8 +283,16 @@ export function InboxPage() {
effectiveFilters,
isCompact && tab === "inbox",
);
- // Leaving the page leaves its open row.
- useEffect(() => () => useInboxSelectionStore.getState().dropRow(wsId, INBOX_PAGE_LIST), [wsId]);
+ // Leaving the page leaves its open row and releases any manual-unread guard,
+ // so reopening the same notification later marks it read again.
+ useEffect(
+ () => () => {
+ const store = useInboxSelectionStore.getState();
+ store.dropRow(wsId, INBOX_PAGE_LIST);
+ store.clearManualUnread(wsId);
+ },
+ [wsId],
+ );
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;
@@ -448,6 +459,7 @@ export function InboxPage() {
const unreadCount = useInboxUnreadCount(wsId);
const markReadMutation = useMarkInboxRead();
+ const [archiveAllConfirmOpen, setArchiveAllConfirmOpen] = useState(false);
const [deleteTarget, setDeleteTarget] = useState<InboxItem | null>(null);
const [retainedDeleteTarget, setRetainedDeleteTarget] = useState<InboxItem | null>(null);
if (deleteTarget !== null && retainedDeleteTarget?.id !== deleteTarget.id) {
@@ -469,17 +481,15 @@ export function InboxPage() {
const typeLabels = useTypeLabels();
- // An explicit "mark as unread" on the row that is currently open has to
- // survive the auto-read effect below, which would otherwise fire on the very
- // next commit and silently undo it. Holds that one item's id, and only while
- // it stays selected: moving the selection elsewhere releases the guard, so
- // re-opening the row later marks it read again like any other open.
- const manualUnreadIdRef = useRef<string | null>(null);
-
// Read once on opening, even if the visible row is already read: older
// unread notifications can still be hidden under it. Also read new unread
// arrivals while the row stays open. Track the opening separately from the
// optimistic cache patch so a read row cannot cause a request loop.
+ //
+ // An explicit "mark as unread" on the open row records its id in the
+ // selection store so this effect does not immediately undo it — whether the
+ // user triggered it from the Inbox bar, the Work panel sidebar, a shortcut,
+ // or the command bar.
const openedItemIdRef = useRef<string | null>(null);
const markReadMutate = markReadMutation.mutate;
const selectedId = selected?.id;
@@ -492,7 +502,7 @@ export function InboxPage() {
const justOpened = openedItemIdRef.current !== selectedId;
openedItemIdRef.current = selectedId;
if (!justOpened && selectedRead) return;
- if (manualUnreadIdRef.current === selectedId) return;
+ if (useInboxSelectionStore.getState().manualUnreadIdByWorkspace[wsId] === selectedId) return;
if (filters.unreadOnly) {
pinnedUnreadKeyRef.current = selectedKey;
if (isArchivedView && selected) {
@@ -515,8 +525,10 @@ export function InboxPage() {
// Release the guards as soon as the selection moves off their row.
useEffect(() => {
- if (manualUnreadIdRef.current && manualUnreadIdRef.current !== selectedId) {
- manualUnreadIdRef.current = null;
+ const store = useInboxSelectionStore.getState();
+ const manualUnreadId = store.manualUnreadIdByWorkspace[wsId];
+ if (manualUnreadId && manualUnreadId !== selectedId) {
+ store.clearManualUnread(wsId, manualUnreadId);
}
if (pinnedUnreadKeyRef.current && pinnedUnreadKeyRef.current !== selectedKey) {
pinnedUnreadKeyRef.current = null;
@@ -524,7 +536,7 @@ export function InboxPage() {
if (pinnedAgentRef.current && pinnedAgentRef.current.key !== selectedKey) {
pinnedAgentRef.current = null;
}
- }, [selectedId, selectedKey]);
+ }, [wsId, selectedId, selectedKey]);
// `selected` only exists once the open row passed every filter, so under
// the agent filter this pins a row that matched when the user opened it.
@@ -596,7 +608,7 @@ export function InboxPage() {
const handleMarkRead = (id: string) => {
// Reading it back explicitly cancels an earlier park on the same row.
- if (manualUnreadIdRef.current === id) manualUnreadIdRef.current = null;
+ useInboxSelectionStore.getState().clearManualUnread(wsId, id);
markReadMutation.mutate(id, {
onError: (err) =>
toast.error(
@@ -611,14 +623,16 @@ export function InboxPage() {
// Only the open row needs the guard — the auto-read effect never touches
// the others, and arming it for a background row would suppress the very
// first open of that row later.
- if (selected?.id === id) manualUnreadIdRef.current = id;
+ if (selected?.id === id) useInboxSelectionStore.getState().markManualUnread(wsId, id);
markUnreadMutation.mutate(id, {
- onError: (err) =>
+ onError: (err) => {
+ useInboxSelectionStore.getState().clearManualUnread(wsId, id);
toast.error(
err instanceof Error && err.message
? err.message
: t(($) => $.errors.mark_unread_failed),
- ),
+ );
+ },
});
};
@@ -734,6 +748,47 @@ export function InboxPage() {
: null,
);
+ // U toggles unread/read on any open live notification (issue-backed or not).
+ useInboxShortcut(
+ "markInboxUnread",
+ selected && tab === "inbox" && !settledRow
+ ? () => (selected.read === true ? handleMarkUnread(selected.id) : handleMarkRead(selected.id))
+ : null,
+ );
+
+ // J / K step through the current tab's rows without archiving or touching
+ // the mouse. Uses the same row order the sidebar/list displays.
+ const navigationTargets = useMemo((): readonly { key: string; issueId: string | null }[] => {
+ if (isSnoozedView) {
+ return snoozed.rows.map((entry) => ({ key: entry.issue_id, issueId: entry.issue_id }));
+ }
+ const source = isArchivedView ? (isCompact ? visibleItems : archivedItems) : listedItems;
+ return source.map((item) => ({ key: inboxRowKey(item), issueId: item.issue_id }));
+ }, [isSnoozedView, snoozed.rows, isArchivedView, isCompact, visibleItems, archivedItems, listedItems]);
+
+ const stepSelection = (direction: "next" | "prev") => {
+ if (navigationTargets.length === 0) return;
+ const current = selectedKey ? navigationTargets.findIndex((entry) => entry.key === selectedKey) : -1;
+ const nextIndex =
+ current < 0
+ ? direction === "next"
+ ? 0
+ : navigationTargets.length - 1
+ : Math.min(Math.max(current + (direction === "next" ? 1 : -1), 0), navigationTargets.length - 1);
+ if (nextIndex === current) return;
+ const target = navigationTargets[nextIndex];
+ if (!target) return;
+ if (target.issueId) {
+ writeViewState(issueHighlightMementoKey(target.issueId), undefined);
+ useInboxSelectionStore.getState().requestLanding(target.issueId);
+ }
+ recordTransition(wsId, target.key, direction);
+ setSelectedKey(target.key);
+ };
+
+ useInboxShortcut("nextInboxItem", navigationTargets.length > 0 ? () => stepSelection("next") : null);
+ useInboxShortcut("prevInboxItem", navigationTargets.length > 0 ? () => stepSelection("prev") : null);
+
// Batch operations
const handleMarkAllRead = () => {
markAllReadMutation.mutate(undefined, {
@@ -853,7 +908,7 @@ export function InboxPage() {
{t(($) => $.menu.mark_all_read)}
</DropdownMenuItem>
<DropdownMenuSeparator />
- <DropdownMenuItem onClick={handleArchiveAll}>
+ <DropdownMenuItem onClick={() => setArchiveAllConfirmOpen(true)}>
<Archive className="h-4 w-4" />
{t(($) => $.menu.archive_all)}
</DropdownMenuItem>
@@ -1228,6 +1283,38 @@ export function InboxPage() {
{t(($) => $.detail.edit_advanced)}
</Button>
)}
+ {!isArchivedView && !settledRow && (
+ <Tooltip>
+ <TooltipTrigger
+ render={
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() =>
+ detailItem.read === true
+ ? handleMarkUnread(detailItem.id)
+ : handleMarkRead(detailItem.id)
+ }
+ >
+ {detailItem.read === true ? (
+ <CircleDot className="mr-1.5 h-3.5 w-3.5" />
+ ) : (
+ <Check className="mr-1.5 h-3.5 w-3.5" />
+ )}
+ {detailItem.read === true
+ ? t(($) => $.context_menu.mark_unread)
+ : t(($) => $.context_menu.mark_read)}
+ </Button>
+ }
+ />
+ <TooltipContent side="bottom">
+ {detailItem.read === true
+ ? t(($) => $.context_menu.mark_unread)
+ : t(($) => $.context_menu.mark_read)}
+ <ActionShortcutKeycaps action="markInboxUnread" />
+ </TooltipContent>
+ </Tooltip>
+ )}
{/* Mirrors the row action: the button always reverses the view the
item is being read in. */}
<Tooltip>
@@ -1316,7 +1403,17 @@ export function InboxPage() {
}
// Compact: full-screen list
- return <div className="flex flex-1 flex-col min-h-0">{listPanel}</div>;
+ return (
+ <div className="flex flex-1 flex-col min-h-0">
+ {listPanel}
+ <InboxArchiveAllDialog
+ open={archiveAllConfirmOpen}
+ count={items.length}
+ onClose={() => setArchiveAllConfirmOpen(false)}
+ onConfirm={handleArchiveAll}
+ />
+ </div>
+ );
}
// -- Desktop layout ----------------------------------------------------------
diff --git a/packages/views/inbox/components/inbox-shortcut.ts b/packages/views/inbox/components/inbox-shortcut.ts
index ebe0ffab6f..9ee0059e75 100644
--- a/packages/views/inbox/components/inbox-shortcut.ts
+++ b/packages/views/inbox/components/inbox-shortcut.ts
@@ -18,5 +18,7 @@ export function isInboxShortcut(event: KeyboardEvent, action: ShortcutActionId):
if (isEditableShortcutTarget(event.target)) return false;
if (isPortalLayerShortcutTarget(event.target)) return false;
if (useModalStore.getState().modal) return false;
+ // A floating Issue Peek owns J / K and hides the Inbox detail behind it.
+ if (typeof document !== "undefined" && document.querySelector("[data-issue-peek]")) return false;
return shortcutMatchesEvent(getShortcut(action), event);
}
diff --git a/packages/views/inbox/components/use-inbox-shortcut.test.tsx b/packages/views/inbox/components/use-inbox-shortcut.test.tsx
index bc97b3264f..1d1ea642d8 100644
--- a/packages/views/inbox/components/use-inbox-shortcut.test.tsx
+++ b/packages/views/inbox/components/use-inbox-shortcut.test.tsx
@@ -135,6 +135,14 @@ describe("useInboxShortcut", () => {
expect(press(E)).toBe(true);
expect(handler).not.toHaveBeenCalled();
});
+
+ it("ignores keys while a floating Issue Peek panel is open", () => {
+ const handler = vi.fn();
+ renderHook(() => useInboxShortcut("nextInboxItem", handler));
+ mountTarget("<aside data-issue-peek></aside>");
+ expect(press({ key: "j", code: "KeyJ" })).toBe(true);
+ expect(handler).not.toHaveBeenCalled();
+ });
});
describe("useInboxUndoShortcut", () => {
diff --git a/packages/views/issues/actions/__tests__/issue-inbox-actions.test.tsx b/packages/views/issues/actions/__tests__/issue-inbox-actions.test.tsx
index 35ec2f06f0..26fded08b4 100644
--- a/packages/views/issues/actions/__tests__/issue-inbox-actions.test.tsx
+++ b/packages/views/issues/actions/__tests__/issue-inbox-actions.test.tsx
@@ -22,6 +22,8 @@ const state = vi.hoisted(() => ({
archiveInbox: vi.fn(),
unarchiveInbox: vi.fn(() => Promise.resolve()),
unsubscribeArchive: vi.fn(),
+ markRead: vi.fn(),
+ markUnread: vi.fn(),
snooze: vi.fn(() => Promise.resolve()),
unsnooze: vi.fn(() => Promise.resolve()),
}));
@@ -39,6 +41,8 @@ vi.mock("@multica/core/inbox/mutations", async (importOriginal) => ({
...(await importOriginal<typeof import("@multica/core/inbox/mutations")>()),
useUnsubscribeArchiveInbox: () => ({ mutate: state.unsubscribeArchive }),
undoUnsubscribeArchiveInbox: vi.fn(),
+ useMarkInboxRead: () => ({ mutate: state.markRead }),
+ useMarkInboxUnread: () => ({ mutate: state.markUnread }),
useSnoozeInbox: () => ({ mutateAsync: state.snooze }),
useUnsnoozeInbox: () => ({ mutateAsync: state.unsnooze }),
cachedInboxSnoozedUntil: () => null,
@@ -282,11 +286,22 @@ describe("IssueInboxBar", () => {
});
});
- it("offers snooze in place of a read toggle", () => {
+ it("offers mark unread and read toggle alongside snooze", () => {
+ state.markRead.mockClear();
+ state.markUnread.mockClear();
+ useInboxSelectionStore.setState({ manualUnreadIdByWorkspace: {} });
setup();
- expect(screen.queryByRole("button", { name: "Mark as unread" })).toBeNull();
- expect(screen.queryByRole("button", { name: "Mark as read" })).toBeNull();
expect(screen.getByRole("button", { name: "Snooze" })).toBeInTheDocument();
+
+ fireEvent.click(screen.getByRole("button", { name: "Mark as unread" }));
+ expect(state.markUnread).toHaveBeenCalledWith("n-1", expect.any(Object));
+ expect(useInboxSelectionStore.getState().manualUnreadIdByWorkspace.ws).toBe("n-1");
+ cleanup();
+
+ setup({ rows: [{ ...ROWS[0]!, read: false }, ROWS[1]!] });
+ fireEvent.click(screen.getByRole("button", { name: "Mark as read" }));
+ expect(state.markRead).toHaveBeenCalledWith("n-1", expect.any(Object));
+ expect(useInboxSelectionStore.getState().manualUnreadIdByWorkspace.ws).toBeUndefined();
});
it("snoozes and moves on to the next notification", async () => {
diff --git a/packages/views/issues/actions/issue-inbox-actions.tsx b/packages/views/issues/actions/issue-inbox-actions.tsx
index 4e1024acf6..54781b684f 100644
--- a/packages/views/issues/actions/issue-inbox-actions.tsx
+++ b/packages/views/issues/actions/issue-inbox-actions.tsx
@@ -2,13 +2,22 @@
import { useMemo, useRef, type ReactNode, useState } from "react";
import { useQuery } from "@tanstack/react-query";
-import { AlarmClock, Archive, Bot, ChevronDown } from "@multica/ui/icons";
+import { AlarmClock, Archive, Bot, Check, ChevronDown, CircleDot } from "@multica/ui/icons";
import { ShimmerText } from "@multica/ui/components/common/shimmer-text";
+import { IconButton } from "@multica/ui/components/common/icon-button";
import { Button } from "@multica/ui/components/ui/button";
import { cn } from "@multica/ui/lib/utils";
+import { toast } from "sonner";
import { useWorkspaceId } from "@multica/core/hooks";
-import type { InboxUnsubscribeScope } from "@multica/core/inbox/mutations";
-import type { LastInboxCleared } from "@multica/core/inbox/selection-store";
+import {
+ useMarkInboxRead,
+ useMarkInboxUnread,
+ type InboxUnsubscribeScope,
+} from "@multica/core/inbox/mutations";
+import {
+ useInboxSelectionStore,
+ type LastInboxCleared,
+} from "@multica/core/inbox/selection-store";
import type { InboxItem } from "@multica/core/types";
import { findSnoozedInboxIssue, snoozedInboxOptions } from "@multica/core/inbox/queries";
import { nextInboxRow } from "@multica/core/inbox/open-row";
@@ -32,6 +41,7 @@ import {
useLeaveInboxRow,
useRestoreInbox,
} from "../../inbox/components/use-leave-inbox-row";
+import { ActionShortcutKeycaps } from "../../common/shortcut-keycaps";
import { AgentAvatarStack } from "../../agents/components/agent-avatar-stack";
import { useBuiltinViewNavigation } from "../../issue-views/builtin-views";
import { useNavigation } from "../../navigation";
@@ -91,6 +101,8 @@ export function IssueInboxBar({
const archiveWithUndo = useArchiveInboxWithUndo();
const restore = useRestoreInbox();
const unsubscribeArchive = useUnsubscribeArchive();
+ const markRead = useMarkInboxRead();
+ const markUnread = useMarkInboxUnread();
const { snooze, unsnooze } = useInboxSnooze();
const { data: snoozedList } = useQuery(snoozedInboxOptions(wsId));
const snoozed = item ? undefined : findSnoozedInboxIssue(snoozedList, issueId);
@@ -271,8 +283,45 @@ export function IssueInboxBar({
);
}
+ const toggleReadItem = () => {
+ if (!item) return;
+ const store = useInboxSelectionStore.getState();
+ if (item.read === true) {
+ store.markManualUnread(wsId, item.id);
+ markUnread.mutate(item.id, {
+ onError: (err) => {
+ store.clearManualUnread(wsId, item.id);
+ toast.error(
+ err instanceof Error && err.message
+ ? err.message
+ : t(($) => $.errors.mark_unread_failed),
+ );
+ },
+ });
+ } else {
+ store.clearManualUnread(wsId, item.id);
+ markRead.mutate(item.id, {
+ onError: (err) =>
+ toast.error(
+ err instanceof Error && err.message
+ ? err.message
+ : t(($) => $.errors.mark_read_failed),
+ ),
+ });
+ }
+ };
+
return (
<InboxOpenBar item={item} issueActions={issueActions}>
+ <IconButton
+ label={item.read === true ? t(($) => $.context_menu.mark_unread) : t(($) => $.context_menu.mark_read)}
+ shortcut={<ActionShortcutKeycaps action="markInboxUnread" />}
+ tooltipSide="bottom"
+ className="text-muted-foreground"
+ onClick={toggleReadItem}
+ >
+ {item.read === true ? <CircleDot /> : <Check />}
+ </IconButton>
<UnsubscribeArchiveButton issueId={issueId} userId={item.recipient_id} onConfirm={unsubscribeItem} />
<InboxSnoozeMenu
open={snoozeOpen}
diff --git a/packages/views/layout/panels/inbox-section.test.tsx b/packages/views/layout/panels/inbox-section.test.tsx
index 24fddb1457..2286d22ad0 100644
--- a/packages/views/layout/panels/inbox-section.test.tsx
+++ b/packages/views/layout/panels/inbox-section.test.tsx
@@ -32,6 +32,7 @@ const state = vi.hoisted(() => ({
archiveCompleted: vi.fn(),
markRead: vi.fn(),
markUnread: vi.fn(),
+ deleteInbox: vi.fn(() => Promise.resolve()),
snooze: vi.fn(() => Promise.resolve()),
unsnooze: vi.fn(() => Promise.resolve()),
}));
@@ -68,6 +69,7 @@ vi.mock("@multica/core/inbox/mutations", () => ({
useArchiveCompletedInbox: () => ({ mutateAsync: async () => (await state.archiveCompleted()) ?? { count: 1 } }),
useMarkInboxRead: () => ({ mutate: state.markRead }),
useMarkInboxUnread: () => ({ mutate: state.markUnread }),
+ useDeleteInbox: () => ({ mutateAsync: state.deleteInbox, isPending: false }),
useUnsubscribeArchiveInbox: () => ({ mutate: state.unsubscribeArchive }),
undoUnsubscribeArchiveInbox: vi.fn(),
useSnoozeInbox: () => ({ mutateAsync: state.snooze }),
@@ -85,6 +87,17 @@ vi.mock("@multica/core/workspace/hooks", () => ({
useActorName: () => ({ getActorName: () => "Leo Park", getActorInitials: () => "LP", getActorAvatarUrl: () => null }),
}));
vi.mock("../../common/actor-avatar", () => ({ ActorAvatar: () => null }));
+const contextMenuActionsSeen = vi.hoisted(() => [] as unknown[]);
+vi.mock("../../inbox/components/inbox-context-menu", async (importOriginal) => {
+ const actual = await importOriginal<typeof import("../../inbox/components/inbox-context-menu")>();
+ return {
+ ...actual,
+ InboxContextMenuProvider: (props: React.ComponentProps<typeof actual.InboxContextMenuProvider>) => {
+ contextMenuActionsSeen.push(props.actions);
+ return actual.InboxContextMenuProvider(props);
+ },
+ };
+});
vi.mock("../../agents/components/agent-avatar-stack", () => ({
AgentAvatarStack: ({ agentIds }: { agentIds: string[] }) => <span data-testid="agents">{agentIds.join(",")}</span>,
}));
@@ -340,7 +353,7 @@ describe("InboxSection", () => {
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");
+ expect(state.markRead).toHaveBeenCalledWith("n1", expect.any(Object));
fireEvent.click(actions.getByRole("button", { name: "Archive" }));
expect(state.archive).toHaveBeenCalledWith("n1");
});
@@ -582,9 +595,121 @@ describe("InboxSection", () => {
fireEvent.click(within(await open()).getByRole("menuitem", { name: "Archive completed" }));
expect(state.archiveCompleted).toHaveBeenCalledTimes(1);
fireEvent.click(within(await open()).getByRole("menuitem", { name: "Archive all" }));
+ expect(state.archiveAll).not.toHaveBeenCalled();
+ const dialog = await screen.findByRole("alertdialog");
+ fireEvent.click(within(dialog).getByRole("button", { name: "Archive all" }));
expect(state.archiveAll).toHaveBeenCalledTimes(1);
});
+ it("cancels archive all without mutating when dismissed from the confirmation dialog", async () => {
+ renderSection([item({ id: "n1", issue_id: "issue-a" })]);
+ fireEvent.click(screen.getByRole("button", { name: "Inbox actions" }));
+ fireEvent.click(within(await screen.findByRole("menu")).getByRole("menuitem", { name: "Archive all" }));
+ const dialog = await screen.findByRole("alertdialog");
+ fireEvent.click(within(dialog).getByRole("button", { name: "Cancel" }));
+ expect(state.archiveAll).not.toHaveBeenCalled();
+ });
+
+ it("shows the unfiltered active row count in the archive-all dialog even when filters narrow the list", async () => {
+ useInboxFilterStore.getState().toggleUnreadOnly("ws-1");
+ renderSection([
+ item({ id: "n1", issue_id: "issue-a", read: false }),
+ item({ id: "n2", issue_id: "issue-b", read: true }),
+ item({ id: "n3", issue_id: "issue-c", read: true }),
+ // Duplicate notification for issue-c should not double-count.
+ item({ id: "n4", issue_id: "issue-c", read: true, created_at: "2026-11-10T07:00:00Z" }),
+ // Snoozed issue is left untouched by archive-all and must not be counted.
+ item({ id: "n5", issue_id: "issue-d", read: false, snoozed_until: "2099-01-01T09:00:00Z" }),
+ ]);
+
+ expect(rows()).toHaveLength(1);
+ fireEvent.click(screen.getByRole("button", { name: "Inbox actions" }));
+ fireEvent.click(within(await screen.findByRole("menu")).getByRole("menuitem", { name: "Archive all" }));
+ const dialog = await screen.findByRole("alertdialog");
+ expect(dialog).toHaveTextContent("All 3 active notifications in your inbox will move to Archived.");
+ });
+
+ it("keeps InboxContextMenuProvider actions referentially stable across navigation re-renders", () => {
+ contextMenuActionsSeen.length = 0;
+ const items = [
+ item({ id: "n1", issue_id: "issue-a", title: "Row A" }),
+ item({ id: "n2", issue_id: "issue-b", title: "Row B", created_at: "2026-11-10T07:00:00Z" }),
+ ];
+ const client = new QueryClient({ defaultOptions: { queries: { retry: false, staleTime: Infinity } } });
+ client.setQueryData(["inbox", "ws-1", "list"], items);
+ client.setQueryData(snoozedInboxOptions("ws-1").queryKey, []);
+ client.setQueryData(agentListOptions("ws-1").queryKey, []);
+ client.setQueryData(agentTaskSnapshotOptions("ws-1").queryKey, []);
+
+ const nav = adapter("/acme/issues");
+ let setPathname!: (next: string) => void;
+ function NavigatingHarness() {
+ const [pathname, updatePathname] = useState("/acme/issues");
+ setPathname = updatePathname;
+ return <Harness pathname={pathname} openKey={null} />;
+ }
+
+ renderWithI18n(
+ <QueryClientProvider client={client}>
+ <NavigationProvider value={nav}>
+ <NavigatingHarness />
+ </NavigationProvider>
+ </QueryClientProvider>,
+ );
+ expect(rows()).toHaveLength(2);
+ const initialActions = contextMenuActionsSeen.at(-1);
+ expect(initialActions).toBeDefined();
+
+ act(() => setPathname("/acme/projects"));
+ expect(contextMenuActionsSeen.length).toBeGreaterThanOrEqual(2);
+ expect(contextMenuActionsSeen.at(-1)).toBe(initialActions);
+ });
+
+ it("offers right-click mark unread and delete on desktop sidebar rows", async () => {
+ state.deleteInbox.mockClear();
+ useInboxSelectionStore.setState({ manualUnreadIdByWorkspace: {} });
+ const { nav } = renderSection(
+ [
+ item({ id: "n1", issue_id: "issue-a", title: "Open one", read: true }),
+ item({ id: "n2", issue_id: "issue-b", title: "Next one", read: true, created_at: "2026-11-09T08:00:00Z" }),
+ ],
+ "issue-a",
+ "/acme/inbox?issue=issue-a",
+ );
+
+ fireEvent.contextMenu(rows()[0]!.firstElementChild!);
+ fireEvent.click(within(await screen.findByRole("menu")).getByRole("menuitem", { name: "Mark as unread" }));
+ expect(state.markUnread).toHaveBeenCalledWith("n1", expect.any(Object));
+ expect(useInboxSelectionStore.getState().manualUnreadIdByWorkspace["ws-1"]).toBe("n1");
+
+ fireEvent.contextMenu(rows()[0]!.firstElementChild!);
+ fireEvent.click(within(await screen.findByRole("menu")).getByRole("menuitem", { name: "Delete" }));
+ const dialog = await screen.findByRole("alertdialog");
+ fireEvent.click(within(dialog).getByRole("button", { name: "Delete" }));
+ await waitFor(() => expect(state.deleteInbox).toHaveBeenCalledWith("n1"));
+ expect(nav.push).toHaveBeenCalledWith("/acme/inbox?issue=issue-b");
+ });
+
+ it("offers right-click unarchive and delete on archived sidebar rows", async () => {
+ state.deleteInbox.mockClear();
+ apiMock.listArchivedInboxPage.mockResolvedValue({
+ items: [item({ id: "a1", issue_id: "issue-a", title: "Archived one", archived: true })],
+ nextCursor: null,
+ hasMore: false,
+ });
+ renderSection([], null, "/acme/inbox?view=archived");
+ const archivedRow = await screen.findByRole("link", { name: /^Archived one/ });
+ fireEvent.contextMenu(archivedRow.parentElement!);
+
+ const menu = await screen.findByRole("menu");
+ expect(within(menu).queryByRole("menuitem", { name: "Mark as unread" })).toBeNull();
+ expect(within(menu).getByRole("menuitem", { name: "Unarchive" })).toBeInTheDocument();
+ fireEvent.click(within(menu).getByRole("menuitem", { name: "Delete" }));
+ const dialog = await screen.findByRole("alertdialog");
+ fireEvent.click(within(dialog).getByRole("button", { name: "Delete" }));
+ await waitFor(() => expect(state.deleteInbox).toHaveBeenCalledWith("a1"));
+ });
+
it("opens the next row a bulk archive leaves when it takes the open one", async () => {
const { nav } = renderSection(
[
@@ -604,6 +729,8 @@ describe("InboxSection", () => {
const { nav } = renderSection([item({ id: "n1", issue_id: "issue-a", title: "Open one" })], "issue-a");
fireEvent.click(screen.getByRole("button", { name: "Inbox actions" }));
fireEvent.click(within(await screen.findByRole("menu")).getByRole("menuitem", { name: "Archive all" }));
+ const dialog = await screen.findByRole("alertdialog");
+ fireEvent.click(within(dialog).getByRole("button", { name: "Archive all" }));
expect(state.archiveAll).toHaveBeenCalledTimes(1);
expect(nav.push).toHaveBeenCalledWith("/acme/inbox");
expect(useInboxSelectionStore.getState().leftRowKeyByWorkspace["ws-1"]).toBe("issue-a");
diff --git a/packages/views/layout/panels/inbox-section.tsx b/packages/views/layout/panels/inbox-section.tsx
index 3fb8d092d7..1c6891e3c0 100644
--- a/packages/views/layout/panels/inbox-section.tsx
+++ b/packages/views/layout/panels/inbox-section.tsx
@@ -6,7 +6,7 @@ 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, ArchiveRestore, BellOff, BookCheck, CheckCheck, Filter, ListChecks, MoreHorizontal } from "@multica/ui/icons";
+import { AlarmClock, Archive, ArchiveRestore, BellOff, BookCheck, CheckCheck, CircleDot, Filter, ListChecks, MoreHorizontal } from "@multica/ui/icons";
import { IconButton } from "@multica/ui/components/common/icon-button";
import { UI_EASE_IN, UI_EASE_OUT, UI_MOTION_DURATION } from "@multica/ui/lib/motion";
import { cn } from "@multica/ui/lib/utils";
@@ -29,8 +29,9 @@ import {
useArchiveCompletedInbox,
useMarkAllInboxRead,
useMarkInboxRead,
+ useMarkInboxUnread,
} from "@multica/core/inbox/mutations";
-import { useInboxUnreadCount } from "@multica/core/inbox/queries";
+import { deduplicateInboxItems, 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";
@@ -43,8 +44,12 @@ import { AppLink, useNavigation } from "../../navigation";
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 { inboxTabFromParam, inboxTabHref, type InboxTab } from "../../inbox/components/inbox-view";
+import { inboxTabFromParam, inboxTabHref, type InboxTab, type InboxView } from "../../inbox/components/inbox-view";
import { InboxTabs } from "../../inbox/components/inbox-tabs";
+import { InboxArchiveAllDialog } from "../../inbox/components/inbox-archive-all-dialog";
+import { InboxContextMenuProvider, useInboxContextMenu } from "../../inbox/components/inbox-context-menu";
+import type { InboxRowActions } from "../../inbox/components/inbox-item-actions";
+import { InboxDeleteDialog } from "../../inbox/components/inbox-delete-dialog";
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";
@@ -147,10 +152,21 @@ export function InboxSection({
const compact = useSidebarTreeStore((s) => s.inboxSettings.compact);
const unread = useInboxUnreadCount(wsId);
const archive = useArchiveInboxWithUndo();
+ const restoreInbox = useRestoreInbox();
+ const markRead = useMarkInboxRead();
+ const markUnread = useMarkInboxUnread();
const leave = useLeaveInboxRow();
+ const leaveRow = useInboxSelectionStore((s) => s.leaveRow);
+ const recordTransition = useInboxSelectionStore((s) => s.recordTransition);
const unsubscribable = useInboxUnsubscribable(wsId);
const unsubscribeArchive = useUnsubscribeArchive();
const { snooze } = useInboxSnooze();
+ const [deleteTarget, setDeleteTarget] = useState<{ item: InboxItem; view: InboxView } | null>(null);
+ const [retainedDeleteTarget, setRetainedDeleteTarget] = useState<{ item: InboxItem; view: InboxView } | null>(null);
+ if (deleteTarget !== null && retainedDeleteTarget?.item.id !== deleteTarget.item.id) {
+ setRetainedDeleteTarget(deleteTarget);
+ }
+ const activeDeleteTarget = deleteTarget ?? retainedDeleteTarget;
const { searchParams, replace } = useNavigation();
const isCompact = useIsCompact();
const { list, rows: all, displayed, expanded, limit, setExpanded } = rows;
@@ -226,8 +242,44 @@ export function InboxSection({
// Rows are memoized and re-render only when their own props change, not on
// every navigation that re-renders this section (MUL-9609); the handlers
// keep one identity and read this render's state when they run.
+ const archivedOpenKey = pageTab === "archived" ? pageKey : null;
+ const restoreArchivedItem = (item: InboxItem) => {
+ const key = inboxRowKey(item);
+ if (key === archivedOpenKey) {
+ leaveRow(wsId, key);
+ const next = nextInboxRow(archived.items, key);
+ const nextKey = next ? inboxRowKey(next) : "";
+ recordTransition(wsId, nextKey, "next");
+ replace(inboxTabHref(p, "archived", nextKey || null));
+ }
+ void restoreInbox(item.id);
+ };
+ const markItemRead = (id: string) => {
+ useInboxSelectionStore.getState().clearManualUnread(wsId, id);
+ markRead.mutate(id, {
+ onError: (err) =>
+ toast.error(
+ err instanceof Error && err.message ? err.message : tInbox(($) => $.errors.mark_read_failed),
+ ),
+ });
+ };
+ const markItemUnread = (item: InboxItem) => {
+ const key = inboxRowKey(item);
+ if (key === openRowKey) useInboxSelectionStore.getState().markManualUnread(wsId, item.id);
+ markUnread.mutate(item.id, {
+ onError: (err) => {
+ useInboxSelectionStore.getState().clearManualUnread(wsId, item.id);
+ toast.error(
+ err instanceof Error && err.message ? err.message : tInbox(($) => $.errors.mark_unread_failed),
+ );
+ },
+ });
+ };
+ const contextView: InboxView = tab === "archived" ? "archived" : "inbox";
const latest = {
prefetch: (item: InboxItem) => void prefetchRow(item),
+ markRead: (item: InboxItem) => markItemRead(item.id),
+ markUnread: (item: InboxItem) => markItemUnread(item),
archive: (item: InboxItem) => {
const key = inboxRowKey(item);
archive(item.id, key);
@@ -268,6 +320,38 @@ export function InboxSection({
clearedAt: Date.now(),
});
},
+ contextMarkRead: (id: string) => markItemRead(id),
+ contextMarkUnread: (id: string) => {
+ const target = all.find((item) => item.id === id);
+ if (target) markItemUnread(target);
+ else {
+ markUnread.mutate(id, {
+ onError: (err) =>
+ toast.error(
+ err instanceof Error && err.message ? err.message : tInbox(($) => $.errors.mark_unread_failed),
+ ),
+ });
+ }
+ },
+ contextAction: (id: string) => {
+ if (contextView === "archived") {
+ const target = archived.items.find((item) => item.id === id);
+ if (target) restoreArchivedItem(target);
+ return;
+ }
+ const target = all.find((item) => item.id === id);
+ if (target) latestRef.current.archive(target);
+ },
+ contextDelete: (id: string) => {
+ const source = contextView === "archived" ? archived.items : all;
+ const target = source.find((item) => item.id === id);
+ if (target) setDeleteTarget({ item: target, view: contextView });
+ },
+ contextUnsubscribeArchive: (id: string) => {
+ const target = all.find((item) => item.id === id);
+ if (target?.issue_id) latestRef.current.unsubscribe(target);
+ },
+ canUnsubscribe: unsubscribable,
};
const latestRef = useRef(latest);
useLayoutEffect(() => {
@@ -275,10 +359,28 @@ export function InboxSection({
});
const handlers = useMemo<InboxRowHandlers>(() => ({
prefetch: (item) => latestRef.current.prefetch(item),
+ markRead: (item) => latestRef.current.markRead(item),
+ markUnread: (item) => latestRef.current.markUnread(item),
archive: (item) => latestRef.current.archive(item),
unsubscribe: (item) => latestRef.current.unsubscribe(item),
snooze: (item, until) => latestRef.current.snooze(item, until),
}), []);
+ // Keep one stable identity for the context menu provider too: a fresh object
+ // every render would churn the context value and re-render every memoized row.
+ const contextMenuActions = useMemo<InboxRowActions>(() => ({
+ onMarkRead: (id) => latestRef.current.contextMarkRead(id),
+ onMarkUnread: (id) => latestRef.current.contextMarkUnread(id),
+ onAction: (id) => latestRef.current.contextAction(id),
+ onDelete: (id) => latestRef.current.contextDelete(id),
+ onUnsubscribeArchive: (id) => latestRef.current.contextUnsubscribeArchive(id),
+ canUnsubscribe: (item) => latestRef.current.canUnsubscribe(item),
+ }), []);
+ // Server-side `archive-all` ignores client filters and leaves snoozed issues
+ // alone, so the confirmation dialog counts every unfiltered active row group.
+ const totalActiveCount = useMemo(
+ () => deduplicateInboxItems(list.notifications).length,
+ [list.notifications],
+ );
const renderRow = (item: InboxItem, measure?: RowMeasure) => (
<InboxRow
key={item.id}
@@ -344,6 +446,7 @@ export function InboxSection({
<InboxSectionActions
wsId={wsId}
rows={all}
+ totalActiveCount={totalActiveCount}
openRowKey={openRowKey}
bulk={tab === "inbox"}
triggerRef={actionsRef}
@@ -356,6 +459,7 @@ export function InboxSection({
}
>
<InboxTabBody tab={tab} loading={tabLoading}>
+ <InboxContextMenuProvider view={contextView} actions={contextMenuActions}>
{tab === "snoozed" ? (
<SnoozedSectionList
wsId={wsId}
@@ -368,7 +472,7 @@ export function InboxSection({
wsId={wsId}
archived={archived}
limit={limit}
- openKey={pageTab === "archived" ? pageKey : null}
+ openKey={archivedOpenKey}
/>
) : displayed.length > 0 ? (
displayed.length > VIRTUALIZE_AFTER && scrollRef ? (
@@ -410,6 +514,39 @@ export function InboxSection({
{t(($) => $.panels.work.inbox_empty)}
</p>
) : null}
+ </InboxContextMenuProvider>
+ {activeDeleteTarget && (
+ <InboxDeleteDialog
+ key={activeDeleteTarget.item.id}
+ open={deleteTarget !== null}
+ item={activeDeleteTarget.item}
+ view={activeDeleteTarget.view}
+ onClose={() => setDeleteTarget(null)}
+ onOpenChangeComplete={(nextOpen) => {
+ if (!nextOpen) {
+ setRetainedDeleteTarget((prev) =>
+ prev?.item.id === activeDeleteTarget.item.id ? null : prev,
+ );
+ }
+ }}
+ onDeleted={() => {
+ const { item: deleted, view: deletedView } = activeDeleteTarget;
+ const key = inboxRowKey(deleted);
+ if (deletedView === "archived") {
+ if (key === archivedOpenKey) {
+ leaveRow(wsId, key);
+ const next = nextInboxRow(archived.items, key);
+ const nextKey = next ? inboxRowKey(next) : "";
+ recordTransition(wsId, nextKey, "next");
+ replace(inboxTabHref(p, "archived", nextKey || null));
+ }
+ } else if (key === openRowKey) {
+ leave(key, nextInboxRow(all, key));
+ }
+ toast.success(tInbox(($) => $.toasts.deleted));
+ }}
+ />
+ )}
{tab === "inbox" && all.length > limit && (
<button
type="button"
@@ -591,6 +728,7 @@ function VirtualInboxList({
function InboxSectionActions({
wsId,
rows,
+ totalActiveCount,
openRowKey,
bulk,
triggerRef,
@@ -600,6 +738,7 @@ function InboxSectionActions({
}: {
wsId: string;
rows: readonly InboxItem[];
+ totalActiveCount: number;
openRowKey: string | null;
/** Offers the bulk actions, which act on the live Inbox. */
bulk: boolean;
@@ -652,11 +791,13 @@ function InboxSectionActions({
const archiveAll = useArchiveAllInbox();
const archiveAllRead = useArchiveAllReadInbox();
const archiveCompleted = useArchiveCompletedInbox();
+ const [archiveAllConfirmOpen, setArchiveAllConfirmOpen] = useState(false);
const label = t(($) => $.panels.work.inbox_actions);
const onError = (fallback: string) => (err: unknown) =>
toast.error(err instanceof Error && err.message ? err.message : fallback);
return (
+ <>
<DropdownMenu>
<DropdownMenuTrigger
render={
@@ -718,15 +859,7 @@ function InboxSectionActions({
<ListChecks className="size-4" />
{tInbox(($) => $.menu.archive_completed)}
</DropdownMenuItem>
- <DropdownMenuItem
- onClick={() =>
- archiveBatch(
- () => archiveAll.mutateAsync(),
- () => true,
- tInbox(($) => $.errors.archive_all_failed),
- )
- }
- >
+ <DropdownMenuItem onClick={() => setArchiveAllConfirmOpen(true)}>
<Archive className="size-4" />
{tInbox(($) => $.menu.archive_all)}
</DropdownMenuItem>
@@ -734,6 +867,19 @@ function InboxSectionActions({
)}
</DropdownMenuContent>
</DropdownMenu>
+ <InboxArchiveAllDialog
+ open={archiveAllConfirmOpen}
+ count={totalActiveCount}
+ onClose={() => setArchiveAllConfirmOpen(false)}
+ onConfirm={() =>
+ archiveBatch(
+ () => archiveAll.mutateAsync(),
+ () => true,
+ tInbox(($) => $.errors.archive_all_failed),
+ )
+ }
+ />
+ </>
);
}
@@ -741,6 +887,8 @@ function InboxSectionActions({
interface InboxRowHandlers {
/** Warms the issue a row opens, so the click renders from cache. */
prefetch: (item: InboxItem) => void;
+ markRead: (item: InboxItem) => void;
+ markUnread: (item: InboxItem) => void;
archive: (item: InboxItem) => void;
/** Unsubscribe & archive. */
unsubscribe: (item: InboxItem) => void;
@@ -779,9 +927,12 @@ const InboxRow = memo(function InboxRow({
handlers: InboxRowHandlers;
}) {
const onPrefetch = () => handlers.prefetch(item);
+ const onMarkRead = () => handlers.markRead(item);
+ const onMarkUnread = () => handlers.markUnread(item);
const onArchive = () => handlers.archive(item);
const onUnsubscribe = unsubscribable ? () => handlers.unsubscribe(item) : undefined;
const onSnooze = (until: Date) => handlers.snooze(item, until);
+ const openContextMenu = useInboxContextMenu();
const { t } = useT("inbox");
const typeLabels = useTypeLabels();
const timeAgo = useTimeAgo();
@@ -894,13 +1045,26 @@ const InboxRow = memo(function InboxRow({
render={<div />}
onPointerDown={dismissCard}
onPointerLeave={() => setCardDismissed(false)}
+ onContextMenu={
+ !settled && openContextMenu
+ ? (event) => {
+ dismissCard();
+ openContextMenu(item, event);
+ }
+ : undefined
+ }
// Enter on the focused link opens the issue too. Focus does not
// move, so the card stays shut without the dismissed flag.
onKeyDown={(event) => {
if (event.key === "Enter") setCardOpen(false);
}}
{...panelRowAnchor(active)}
- className={cn(PANEL_ROW_CLASS, panelRowStateClass(active), "relative", !compact && "items-start py-1.5")}
+ className={cn(
+ PANEL_ROW_CLASS,
+ panelRowStateClass(active),
+ "relative select-none data-[popup-open]:bg-surface-hover",
+ !compact && "items-start py-1.5",
+ )}
>
{statusIcon ||
(compact ? (
@@ -994,6 +1158,8 @@ const InboxRow = memo(function InboxRow({
dismissCard();
land();
}}
+ onMarkRead={settled ? undefined : onMarkRead}
+ onMarkUnread={settled ? undefined : onMarkUnread}
onArchive={settled ? undefined : onArchive}
onUnsubscribe={settled ? undefined : onUnsubscribe}
onSnooze={
@@ -1380,6 +1546,7 @@ function ArchivedSectionRow({
const status = item.issue_status;
const restoreLabel = t(($) => $.detail.restore);
const requestLanding = useInboxSelectionStore((s) => s.requestLanding);
+ const openContextMenu = useInboxContextMenu();
const isPresent = useIsPresent();
const reduceMotion = useReducedMotion();
return (
@@ -1397,7 +1564,11 @@ function ArchivedSectionRow({
}}
className={cn("group/inbox relative", !isPresent && "pointer-events-none")}
>
- <div {...panelRowAnchor(active)} className={cn(PANEL_ROW_CLASS, panelRowStateClass(active), "relative")}>
+ <div
+ {...panelRowAnchor(active)}
+ onContextMenu={openContextMenu ? (event) => openContextMenu(item, event) : undefined}
+ className={cn(PANEL_ROW_CLASS, panelRowStateClass(active), "relative select-none data-[popup-open]:bg-surface-hover")}
+ >
{status ? (
<span aria-hidden className="flex shrink-0">
<StatusIcon
@@ -1481,6 +1652,8 @@ function InboxRowCard({
href,
title,
onOpen,
+ onMarkRead,
+ onMarkUnread,
onArchive,
onUnsubscribe,
onSnooze,
@@ -1489,6 +1662,8 @@ function InboxRowCard({
href: string;
title: string;
onOpen: () => void;
+ onMarkRead?: () => void;
+ onMarkUnread?: () => void;
/** Left out for a row kept after it left the Inbox. */
onArchive?: () => void;
onUnsubscribe?: () => void;
@@ -1501,7 +1676,6 @@ function InboxRowCard({
const timeAgo = useTimeAgo();
const { categoryOf, colorOf, iconOf } = useIssueStatuses(item.workspace_id);
const statusLabelOf = useStatusLabel(item.workspace_id);
- const markRead = useMarkInboxRead();
const { data: issue } = useQuery({ ...issueDetailOptions(item.workspace_id, item.issue_id ?? ""), enabled: !!item.issue_id });
const unread = item.read !== true;
// A comment gets its own block, so the line above names only the kind.
@@ -1547,8 +1721,8 @@ function InboxRowCard({
>
{t(($) => $.panels.work.inbox_open)}
</AppLink>
- {unread && (
- <Button size="sm" variant="ghost" className="text-muted-foreground" onClick={() => markRead.mutate(item.id)}>
+ {unread && onMarkRead && (
+ <Button size="sm" variant="ghost" className="text-muted-foreground" onClick={onMarkRead}>
{tInbox(($) => $.context_menu.mark_read)}
</Button>
)}
@@ -1562,14 +1736,27 @@ function InboxRowCard({
{tInbox(($) => $.context_menu.archive)}
</Button>
)}
- {onUnsubscribe && (
- <IconButton
- label={tInbox(($) => $.context_menu.unsubscribe_archive)}
- className="ml-auto text-muted-foreground"
- onClick={onUnsubscribe}
- >
- <BellOff />
- </IconButton>
+ {((!unread && onMarkUnread) || onUnsubscribe) && (
+ <div className="ml-auto flex items-center gap-0.5">
+ {!unread && onMarkUnread && (
+ <IconButton
+ label={tInbox(($) => $.context_menu.mark_unread)}
+ className="text-muted-foreground"
+ onClick={onMarkUnread}
+ >
+ <CircleDot />
+ </IconButton>
+ )}
+ {onUnsubscribe && (
+ <IconButton
+ label={tInbox(($) => $.context_menu.unsubscribe_archive)}
+ className="text-muted-foreground"
+ onClick={onUnsubscribe}
+ >
+ <BellOff />
+ </IconButton>
+ )}
+ </div>
)}
</div>
</div>
diff --git a/packages/views/locales/en/inbox.json b/packages/views/locales/en/inbox.json
index 51c775d3e6..7efbd153aa 100644
--- a/packages/views/locales/en/inbox.json
+++ b/packages/views/locales/en/inbox.json
@@ -185,6 +185,14 @@
"cancel": "Cancel",
"active_issue_description": "This permanently deletes active inbox notifications for this issue. Previously archived notifications, the issue, and its runs are kept."
},
+ "archive_all_dialog": {
+ "title": "Archive all notifications?",
+ "description": "Every active notification in your inbox will move to Archived. Snoozed issues stay snoozed, and you can restore notifications anytime.",
+ "description_count_one": "{{count}} active notification in your inbox will move to Archived. Snoozed issues stay snoozed, and you can restore it anytime.",
+ "description_count_other": "All {{count}} active notifications in your inbox will move to Archived. Snoozed issues stay snoozed, and you can restore them anytime.",
+ "cancel": "Cancel",
+ "confirm": "Archive all"
+ },
"unsubscribe": {
"title": "Unsubscribe and archive. Its updates stop reaching you; an @mention still does.",
"this_issue": "This issue only",
diff --git a/packages/views/locales/en/settings.json b/packages/views/locales/en/settings.json
index 19acfa5580..88c5f6aa04 100644
--- a/packages/views/locales/en/settings.json
+++ b/packages/views/locales/en/settings.json
@@ -439,6 +439,18 @@
"label": "Snooze notification",
"description": "Snooze the open inbox issue, or bring it back now if it is snoozed."
},
+ "markInboxUnread": {
+ "label": "Mark notification unread",
+ "description": "Toggle read or unread on the open inbox notification without leaving it."
+ },
+ "nextInboxItem": {
+ "label": "Next notification",
+ "description": "Open the next notification in the active inbox list."
+ },
+ "prevInboxItem": {
+ "label": "Previous notification",
+ "description": "Open the previous notification in the active inbox list."
+ },
"undoInboxAction": {
"label": "Undo inbox action",
"description": "Undo the last archive, snooze or unsubscribe while its toast shows; after that, put back the open notification once it is archived, or what Inbox cleared names."
diff --git a/packages/views/locales/es/inbox.json b/packages/views/locales/es/inbox.json
index 120965d8ad..85449884c4 100644
--- a/packages/views/locales/es/inbox.json
+++ b/packages/views/locales/es/inbox.json
@@ -185,6 +185,14 @@
"cancel": "Cancelar",
"active_issue_description": "Esto elimina permanentemente las notificaciones activas de la bandeja de entrada para esta tarea. Las notificaciones archivadas anteriormente, la tarea y sus ejecuciones se conservan."
},
+ "archive_all_dialog": {
+ "title": "¿Archivar todas las notificaciones?",
+ "description": "Todas las notificaciones activas de tu bandeja de entrada pasarán a Archivadas. Las incidencias pospuestas seguirán pospuestas y podrás restaurar las notificaciones en cualquier momento.",
+ "description_count_one": "{{count}} notificación activa de tu bandeja de entrada pasará a Archivadas. Las incidencias pospuestas seguirán pospuestas y podrás restaurarla en cualquier momento.",
+ "description_count_other": "Las {{count}} notificaciones activas de tu bandeja de entrada pasarán a Archivadas. Las incidencias pospuestas seguirán pospuestas y podrás restaurarlas en cualquier momento.",
+ "cancel": "Cancelar",
+ "confirm": "Archivar todo"
+ },
"unsubscribe": {
"title": "Darse de baja y archivar. Dejarás de recibir sus actualizaciones; las @menciones te seguirán llegando.",
"this_issue": "Solo esta tarea",
diff --git a/packages/views/locales/es/settings.json b/packages/views/locales/es/settings.json
index 88540f1ff7..c09278559e 100644
--- a/packages/views/locales/es/settings.json
+++ b/packages/views/locales/es/settings.json
@@ -439,6 +439,18 @@
"label": "Posponer notificación",
"description": "Pospone el issue abierto de la bandeja, o lo recupera ahora si ya está pospuesto."
},
+ "markInboxUnread": {
+ "label": "Marcar notificación como no leída",
+ "description": "Alterna entre leída y no leída en la notificación abierta sin salir de ella."
+ },
+ "nextInboxItem": {
+ "label": "Siguiente notificación",
+ "description": "Abre la siguiente notificación en la lista activa de la bandeja de entrada."
+ },
+ "prevInboxItem": {
+ "label": "Notificación anterior",
+ "description": "Abre la notificación anterior en la lista activa de la bandeja de entrada."
+ },
"undoInboxAction": {
"label": "Deshacer acción de la bandeja",
"description": "Deshace el último archivado, posposición o baja mientras se ve su aviso; después, restaura la notificación abierta una vez archivada o lo que indica Bandeja de entrada vacía."
diff --git a/packages/views/locales/fr/inbox.json b/packages/views/locales/fr/inbox.json
index 70c00b2ed2..41392a70da 100644
--- a/packages/views/locales/fr/inbox.json
+++ b/packages/views/locales/fr/inbox.json
@@ -185,6 +185,14 @@
"cancel": "Annuler",
"active_issue_description": "Cette action supprime définitivement les notifications actives de la boîte de réception pour cette tâche. Les notifications précédemment archivées, la tâche et ses exécutions sont conservées."
},
+ "archive_all_dialog": {
+ "title": "Tout archiver ?",
+ "description": "Toutes les notifications actives de votre boîte de réception seront déplacées dans Archivées. Les tickets reportés restent reportés et vous pouvez restaurer les notifications à tout moment.",
+ "description_count_one": "{{count}} notification active de votre boîte de réception sera déplacée dans Archivées. Les tickets reportés restent reportés et vous pouvez la restaurer à tout moment.",
+ "description_count_other": "Les {{count}} notifications actives de votre boîte de réception seront déplacées dans Archivées. Les tickets reportés restent reportés et vous pouvez les restaurer à tout moment.",
+ "cancel": "Annuler",
+ "confirm": "Tout archiver"
+ },
"unsubscribe": {
"title": "Se désabonner et archiver. Ses mises à jour ne vous parviendront plus ; les @mentions, si.",
"this_issue": "Cette tâche uniquement",
diff --git a/packages/views/locales/fr/settings.json b/packages/views/locales/fr/settings.json
index 66bcce17e8..5383a911a7 100644
--- a/packages/views/locales/fr/settings.json
+++ b/packages/views/locales/fr/settings.json
@@ -439,6 +439,18 @@
"label": "Reporter la notification",
"description": "Reporte la tâche ouverte depuis la boîte de réception, ou la fait revenir si elle est reportée."
},
+ "markInboxUnread": {
+ "label": "Marquer la notification comme non lue",
+ "description": "Bascule l'état lu ou non lu de la notification ouverte sans la quitter."
+ },
+ "nextInboxItem": {
+ "label": "Notification suivante",
+ "description": "Ouvre la notification suivante dans la liste active de la boîte de réception."
+ },
+ "prevInboxItem": {
+ "label": "Notification précédente",
+ "description": "Ouvre la notification précédente dans la liste active de la boîte de réception."
+ },
"undoInboxAction": {
"label": "Annuler l'action de la boîte de réception",
"description": "Annule le dernier archivage, report ou désabonnement tant que son message s'affiche ; ensuite, restaure la notification ouverte une fois archivée ou ce qu'indique Boîte de réception vide."
diff --git a/packages/views/locales/ja/inbox.json b/packages/views/locales/ja/inbox.json
index 4f9495e09a..c4b64b2487 100644
--- a/packages/views/locales/ja/inbox.json
+++ b/packages/views/locales/ja/inbox.json
@@ -182,6 +182,13 @@
"cancel": "キャンセル",
"active_issue_description": "このタスクに対する受信トレイのアクティブな通知を完全に削除します。これまでにアーカイブされた通知、タスク本体、および実行履歴は保持されます。"
},
+ "archive_all_dialog": {
+ "title": "すべての通知をアーカイブしますか?",
+ "description": "インボックスのアクティブな通知がすべてアーカイブに移動します。スヌーズ中の課題はそのまま維持され、いつでも復元できます。",
+ "description_count_other": "インボックスのアクティブな通知 {{count}} 件がすべてアーカイブに移動します。スヌーズ中の課題はそのまま維持され、いつでも復元できます。",
+ "cancel": "キャンセル",
+ "confirm": "すべてアーカイブ"
+ },
"unsubscribe": {
"title": "購読を解除してアーカイブします。このタスクの更新は届かなくなりますが、@メンションは引き続き通知されます。",
"this_issue": "このタスクのみ",
diff --git a/packages/views/locales/ja/settings.json b/packages/views/locales/ja/settings.json
index dfd148df7f..52b287740a 100644
--- a/packages/views/locales/ja/settings.json
+++ b/packages/views/locales/ja/settings.json
@@ -433,6 +433,18 @@
"label": "通知をスヌーズ",
"description": "インボックスから開いたタスクをスヌーズします。スヌーズ中なら今すぐ戻します。"
},
+ "markInboxUnread": {
+ "label": "通知を未読にする",
+ "description": "開いているインボックス通知の既読・未読を切り替えます。"
+ },
+ "nextInboxItem": {
+ "label": "次の通知",
+ "description": "現在のインボックス一覧で次の通知を開きます。"
+ },
+ "prevInboxItem": {
+ "label": "前の通知",
+ "description": "現在のインボックス一覧で前の通知を開きます。"
+ },
"undoInboxAction": {
"label": "インボックスの操作を取り消す",
"description": "トーストが表示されている間は直前のアーカイブ・スヌーズ・購読解除を取り消します。トーストが消えた後は、開いている通知がアーカイブ済みならインボックスに戻し、「インボックスは空です」画面ではそこに表示された操作を取り消します。"
diff --git a/packages/views/locales/ko/inbox.json b/packages/views/locales/ko/inbox.json
index b09fc95401..5303620ddd 100644
--- a/packages/views/locales/ko/inbox.json
+++ b/packages/views/locales/ko/inbox.json
@@ -182,6 +182,13 @@
"cancel": "취소",
"active_issue_description": "이 태스크의 활성 받은 편지함 알림이 영구적으로 삭제됩니다. 이전에 보관한 알림과 태스크, 실행 기록은 유지됩니다."
},
+ "archive_all_dialog": {
+ "title": "모든 알림을 보관할까요?",
+ "description": "인박스의 모든 활성 알림이 보관함으로 이동합니다. 다시 알림으로 미룬 이슈는 유지되며 언제든 복원할 수 있습니다.",
+ "description_count_other": "인박스의 활성 알림 {{count}}개가 모두 보관함으로 이동합니다. 다시 알림으로 미룬 이슈는 유지되며 언제든 복원할 수 있습니다.",
+ "cancel": "취소",
+ "confirm": "모두 보관"
+ },
"unsubscribe": {
"title": "구독을 해제하고 보관합니다. 이 태스크의 업데이트 알림은 오지 않지만 @멘션은 계속 알림을 받습니다.",
"this_issue": "이 태스크만",
diff --git a/packages/views/locales/ko/settings.json b/packages/views/locales/ko/settings.json
index ec145bd25f..9617b3235a 100644
--- a/packages/views/locales/ko/settings.json
+++ b/packages/views/locales/ko/settings.json
@@ -433,6 +433,18 @@
"label": "알림 미루기",
"description": "인박스에서 연 태스크를 미룹니다. 이미 미뤘다면 지금 되돌립니다."
},
+ "markInboxUnread": {
+ "label": "알림 읽지 않음으로 표시",
+ "description": "열려 있는 인박스 알림을 닫지 않고 읽음 또는 읽지 않음으로 전환합니다."
+ },
+ "nextInboxItem": {
+ "label": "다음 알림",
+ "description": "현재 인박스 목록에서 다음 알림을 엽니다."
+ },
+ "prevInboxItem": {
+ "label": "이전 알림",
+ "description": "현재 인박스 목록에서 이전 알림을 엽니다."
+ },
"undoInboxAction": {
"label": "인박스 작업 실행 취소",
"description": "토스트가 보이는 동안 마지막 보관, 미루기, 구독 해제를 취소합니다. 토스트가 사라진 뒤에는 열린 알림이 보관되었다면 인박스로 되돌리고, '인박스가 비었습니다' 화면에서는 그곳에 표시된 작업을 취소합니다."
diff --git a/packages/views/locales/ru/inbox.json b/packages/views/locales/ru/inbox.json
index 68891b5952..bf900ab919 100644
--- a/packages/views/locales/ru/inbox.json
+++ b/packages/views/locales/ru/inbox.json
@@ -191,6 +191,16 @@
"cancel": "Отмена",
"active_issue_description": "Активные уведомления во входящих для этой задачи будут удалены безвозвратно. Ранее архивированные уведомления, сама задача и её запуски сохранятся."
},
+ "archive_all_dialog": {
+ "title": "Архивировать все уведомления?",
+ "description": "Все активные уведомления во входящих переместятся в архив. Отложенные задачи останутся отложенными, а уведомления всегда можно восстановить.",
+ "description_count_one": "{{count}} активное уведомление во входящих переместится в архив. Отложенные задачи останутся отложенными, а уведомление всегда можно восстановить.",
+ "description_count_few": "{{count}} активных уведомления во входящих переместятся в архив. Отложенные задачи останутся отложенными, а уведомления всегда можно восстановить.",
+ "description_count_many": "Все {{count}} активных уведомлений во входящих переместятся в архив. Отложенные задачи останутся отложенными, а уведомления всегда можно восстановить.",
+ "description_count_other": "Все {{count}} активных уведомлений во входящих переместятся в архив. Отложенные задачи останутся отложенными, а уведомления всегда можно восстановить.",
+ "cancel": "Отмена",
+ "confirm": "Архивировать всё"
+ },
"unsubscribe": {
"title": "Отписаться и отправить в архив. Обновления задачи больше не придут, но @упоминания по-прежнему будут.",
"this_issue": "Только эта задача",
diff --git a/packages/views/locales/ru/settings.json b/packages/views/locales/ru/settings.json
index bd1393f85c..32a7ed1d59 100644
--- a/packages/views/locales/ru/settings.json
+++ b/packages/views/locales/ru/settings.json
@@ -451,6 +451,18 @@
"label": "Отложить уведомление",
"description": "Откладывает открытое issue из входящих или возвращает его, если оно уже отложено."
},
+ "markInboxUnread": {
+ "label": "Отметить уведомление непрочитанным",
+ "description": "Переключает статус прочтения открытого уведомления, не закрывая его."
+ },
+ "nextInboxItem": {
+ "label": "Следующее уведомление",
+ "description": "Открывает следующее уведомление в текущем списке входящих."
+ },
+ "prevInboxItem": {
+ "label": "Предыдущее уведомление",
+ "description": "Открывает предыдущее уведомление в текущем списке входящих."
+ },
"undoInboxAction": {
"label": "Отменить действие во входящих",
"description": "Отменяет последнее архивирование, откладывание или отписку, пока видно уведомление; после этого возвращает открытое уведомление во входящие после архивирования или отменяет действие, указанное на экране «Входящие разобраны»."
diff --git a/packages/views/locales/zh-Hans/inbox.json b/packages/views/locales/zh-Hans/inbox.json
index 72ac9d5b75..84b89acc7b 100644
--- a/packages/views/locales/zh-Hans/inbox.json
+++ b/packages/views/locales/zh-Hans/inbox.json
@@ -182,6 +182,13 @@
"cancel": "取消",
"active_issue_description": "此任务在收件箱中的通知将被永久删除,此前归档的通知、任务本身及运行记录均不受影响。"
},
+ "archive_all_dialog": {
+ "title": "归档全部通知?",
+ "description": "收件箱中的所有活跃通知都会移至已归档。已延后的任务会保持延后,你随时可以恢复通知。",
+ "description_count_other": "收件箱中的全部 {{count}} 条活跃通知都会移至已归档。已延后的任务会保持延后,你随时可以恢复它们。",
+ "cancel": "取消",
+ "confirm": "归档全部"
+ },
"unsubscribe": {
"title": "取消订阅并归档:不再收到它的订阅通知,@你时仍会通知",
"this_issue": "仅此任务",
diff --git a/packages/views/locales/zh-Hans/settings.json b/packages/views/locales/zh-Hans/settings.json
index 0be5dda320..ad20bd0a6b 100644
--- a/packages/views/locales/zh-Hans/settings.json
+++ b/packages/views/locales/zh-Hans/settings.json
@@ -433,6 +433,18 @@
"label": "延后通知",
"description": "延后从收件箱打开的任务;已延后时让它现在回来。"
},
+ "markInboxUnread": {
+ "label": "切换通知未读状态",
+ "description": "在当前打开的收件箱通知上切换已读或未读,不离开当前页面。"
+ },
+ "nextInboxItem": {
+ "label": "下一条通知",
+ "description": "打开当前收件箱列表中的下一条通知。"
+ },
+ "prevInboxItem": {
+ "label": "上一条通知",
+ "description": "打开当前收件箱列表中的上一条通知。"
+ },
"undoInboxAction": {
"label": "撤销收件箱操作",
"description": "提示还在时,撤销上一次归档、延后或取消订阅;提示消失后,打开的通知已归档时把它放回收件箱,在\"收件箱已清空\"页撤销页面上写明的操作。"
diff --git a/packages/views/locales/zh-Hant/inbox.json b/packages/views/locales/zh-Hant/inbox.json
index 807f7f3d8d..61ee86d55f 100644
--- a/packages/views/locales/zh-Hant/inbox.json
+++ b/packages/views/locales/zh-Hant/inbox.json
@@ -182,6 +182,13 @@
"cancel": "取消",
"active_issue_description": "這將永久刪除此任務在收件匣中的待處理通知。先前歸檔的通知、任務本身及其執行記錄都會保留。"
},
+ "archive_all_dialog": {
+ "title": "歸檔全部通知?",
+ "description": "收件匣中的所有活躍通知都會移至已歸檔。已延後的任務會保持延後,你隨時可以恢復通知。",
+ "description_count_other": "收件匣中的全部 {{count}} 則活躍通知都會移至已歸檔。已延後的任務會保持延後,你隨時可以恢復它們。",
+ "cancel": "取消",
+ "confirm": "歸檔全部"
+ },
"unsubscribe": {
"title": "取消訂閱並歸檔:不再收到它的訂閱通知,@你時仍會通知",
"this_issue": "僅此任務",
diff --git a/packages/views/locales/zh-Hant/settings.json b/packages/views/locales/zh-Hant/settings.json
index aeb2f97733..c55ae75927 100644
--- a/packages/views/locales/zh-Hant/settings.json
+++ b/packages/views/locales/zh-Hant/settings.json
@@ -433,6 +433,18 @@
"label": "延後通知",
"description": "延後從收件箱開啟的任務;已延後時讓它現在回來。"
},
+ "markInboxUnread": {
+ "label": "切換通知未讀狀態",
+ "description": "在目前開啟的收件匣通知上切換已讀或未讀,不離開目前頁面。"
+ },
+ "nextInboxItem": {
+ "label": "下一則通知",
+ "description": "開啟目前收件匣清單中的下一則通知。"
+ },
+ "prevInboxItem": {
+ "label": "上一則通知",
+ "description": "開啟目前收件匣清單中的上一則通知。"
+ },
"undoInboxAction": {
"label": "復原收件箱操作",
"description": "提示還在時,復原上一次歸檔、延後或取消訂閱;提示消失後,開啟的通知已歸檔時把它放回收件箱,在「收件箱已清空」頁復原頁面上寫明的操作。"
diff --git a/packages/views/search/commands/context-commands.tsx b/packages/views/search/commands/context-commands.tsx
index 865ef073e7..9a28556e82 100644
--- a/packages/views/search/commands/context-commands.tsx
+++ b/packages/views/search/commands/context-commands.tsx
@@ -267,6 +267,7 @@ export function useInboxCommandGroup(context: ContextOf<"inbox"> | null): Palett
label: t(($) => $.inbox.mark_unread),
icon: MailOpen,
keywords: ["unread", "未读"],
+ shortcut: getShortcut("markInboxUnread"),
run: () => context.markUnread(item.id),
primary: true,
});
diff --git a/packages/views/settings/components/keyboard-shortcuts-tab.tsx b/packages/views/settings/components/keyboard-shortcuts-tab.tsx
index 99d2092e23..f9a8b9adb5 100644
--- a/packages/views/settings/components/keyboard-shortcuts-tab.tsx
+++ b/packages/views/settings/components/keyboard-shortcuts-tab.tsx
@@ -273,7 +273,18 @@ function ShortcutRow({
const { t } = useT("settings");
const label = t(($) => $.shortcuts.actions[action.id].label);
// Keep descriptions in the search index, but only show non-obvious behavior.
- const description = ["openSearch", "toggleRightSidebar", "archiveInboxItem", "unsubscribeArchiveInboxItem", "snoozeInboxItem", "undoInboxAction", "send"].includes(action.id)
+ const description = [
+ "openSearch",
+ "toggleRightSidebar",
+ "archiveInboxItem",
+ "unsubscribeArchiveInboxItem",
+ "snoozeInboxItem",
+ "markInboxUnread",
+ "nextInboxItem",
+ "prevInboxItem",
+ "undoInboxAction",
+ "send",
+ ].includes(action.id)
? t(($) => $.shortcuts.actions[action.id].description)
: undefined;
const errorText = error?.kind === "reserved"
diff --git a/server/cmd/server/listeners.go b/server/cmd/server/listeners.go
index 076ca997c3..96f2ab6f21 100644
--- a/server/cmd/server/listeners.go
+++ b/server/cmd/server/listeners.go
@@ -118,6 +118,7 @@ func registerListeners(bus *events.Bus, b realtime.Broadcaster, audience ...priv
personalEvents := map[string]bool{
protocol.EventInboxNew: true,
protocol.EventInboxRead: true,
+ protocol.EventInboxUnread: true,
protocol.EventInboxArchived: true,
protocol.EventInboxUnarchived: true,
protocol.EventInboxDeleted: true,
@@ -171,11 +172,12 @@ func registerListeners(bus *events.Bus, b realtime.Broadcaster, audience ...priv
sendToRecipient(b, e, recipientID)
})
- // inbox:read, inbox:archived, inbox:unarchived, inbox:batch-read,
+ // inbox:read, inbox:unread, inbox:archived, inbox:unarchived, inbox:batch-read,
// inbox:batch-archived, issue_unread:changed — extract recipient from
// top-level payload
for _, eventType := range []string{
- protocol.EventInboxRead, protocol.EventInboxArchived, protocol.EventInboxUnarchived,
+ protocol.EventInboxRead, protocol.EventInboxUnread,
+ protocol.EventInboxArchived, protocol.EventInboxUnarchived,
protocol.EventInboxDeleted,
protocol.EventInboxBatchRead, protocol.EventInboxBatchArchived,
protocol.EventInboxUnsnoozed,
diff --git a/server/cmd/server/listeners_scope_test.go b/server/cmd/server/listeners_scope_test.go
index add8bf8d32..73bd7c5521 100644
--- a/server/cmd/server/listeners_scope_test.go
+++ b/server/cmd/server/listeners_scope_test.go
@@ -456,4 +456,23 @@ func TestRegisterListeners_InvitationRevokedStillTargetsInviteeNotActor(t *testi
}
}
+func TestRegisterListeners_InboxUnreadGoesOnlyToRecipient(t *testing.T) {
+ bus := events.New()
+ fb := &fakeBroadcaster{}
+ registerListeners(bus, fb)
+
+ bus.Publish(events.Event{
+ Type: protocol.EventInboxUnread, WorkspaceID: "ws-1",
+ ActorType: "member", ActorID: "user-1",
+ Payload: map[string]any{"item_id": "item-1", "recipient_id": "user-1"},
+ })
+
+ if len(fb.workspaceCalls) != 0 {
+ t.Fatalf("inbox:unread leaked to workspace fanout: %+v", fb.workspaceCalls)
+ }
+ if len(fb.userCalls) != 1 || fb.userCalls[0].userID != "user-1" {
+ t.Fatalf("inbox:unread fanout = %+v, want user-1 only", fb.userCalls)
+ }
+}
+
func inviteePtr(s string) *string { return &s }