Skip to content

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

Go

feat(inbox): MUL-10068 fold settled status into the bar's actions, keep … last (#11445)

Jiayuan Zhangd408c0ba8afc
diff --git a/apps/docs/content/docs/inbox.fr.mdx b/apps/docs/content/docs/inbox.fr.mdx
index 33c4da3b56..bbbc66af5f 100644
--- a/apps/docs/content/docs/inbox.fr.mdx
+++ b/apps/docs/content/docs/inbox.fr.mdx
@@ -97,11 +97,11 @@ Cliquez sur une ligne pour ouvrir la notification sur la page Boîte de récepti
Un groupe d'actions flotte au-dessus de la zone de commentaire, centré sur la tâche. Il propose ce qui règle d'habitude la notification, d'abord les actions de la tâche, puis celles de la notification, chacune avec son raccourci à côté :
- **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.
-- **⋯** regroupe les actions moins fréquentes :
+- **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`), le bouton plein, 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).
+- **⋯**, toujours en dernier, regroupe les actions moins fréquentes :
- **Marquer comme non lu / Marquer comme lu** (`U`) bascule l'état de lecture de la notification ouverte sans la fermer.
- **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, le menu propose deux choix, cette tâche seulement ou cette tâche avec toutes ses sous-tâches, et `⇧E` l'ouvre directement sur ces choix. 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.
-- **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`), le bouton plein à droite, 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).
Quand la fenêtre est étroite, les raccourcis s'effacent d'abord, puis les noms ; survolez un bouton pour voir les deux.
@@ -127,7 +127,7 @@ Tant qu'une tâche est reportée :
- ses nouvelles notifications attendent avec elle et ne comptent pas dans le badge non lu. À son retour, la ligne indique **Report terminé** et le nombre de nouveautés arrivées entre-temps ;
- elle revient plus tôt si quelqu'un vous mentionne nommément, si elle vous est assignée, si une exécution échoue ou si toutes ses sous-tâches sont terminées. Les mentions `@all` ne la réveillent pas ;
- **Tout marquer comme lu** et les actions d'archivage groupé l'ignorent. L'archiver met fin au report, tout comme terminer vous-même la tâche quand **Archiver les tâches que vous traitez** compte la fin de la tâche (c'est le cas par défaut) ;
-- ouvrir directement la page de la tâche ne la marque pas comme lue et ne met pas fin au report. Ouverte depuis l'onglet **Reportés**, son groupe indique quand elle revient ; **Changer l'heure** la fait revenir maintenant (`H`) ou choisit une autre heure.
+- ouvrir directement la page de la tâche ne la marque pas comme lue et ne met pas fin au report. Ouverte depuis l'onglet **Reportés**, son groupe indique quand elle revient. Cliquez sur cette heure pour la faire revenir maintenant (`H`) ou en choisir une autre.
Le report est personnel : il ne change que votre boîte de réception. Tout ce que vous avez reporté se trouve dans l'onglet **Reportés**, où le bouton de chaque ligne le fait revenir maintenant.
@@ -143,7 +143,7 @@ Lire une notification ne la retire pas. Une ligne quitte la boîte de réception
- quand c'est une notification **Exécution en échec** et que sa tâche passe à un statut qui la rend à une personne : `in_review`, un statut personnalisé de la catégorie `started`, ou n'importe quel statut des catégories `done` ou `closed`. Les notifications Exécution en échec de tout le monde sur cette tâche sont alors archivées, quelle que soit la personne qui a changé le statut, et indépendamment du réglage ci-dessus. `blocked` fait exception : il rend aussi la tâche, mais le travail reste bloqué, donc les échecs précédents méritent encore d'être lus.
- quand votre boîte de réception dans l'espace de travail dépasse 2 000 notifications. Elle garde les 2 000 plus récentes et archive peu après les plus anciennes, lues ou non. Une notification revenue d'un report ou restaurée depuis l'archive compte à partir de son retour. Les notifications d'une tâche reportée ne comptent pas et restent en place.
-Les fenêtres ouvertes retirent aussitôt une ligne archivée, sauf celle que vous avez ouverte. Quand sa notification quitte la boîte de réception d'elle-même (vous passez la tâche à `done` depuis son statut, vous déclenchez un agent, une autre fenêtre l'archive, ou une modification la sort des filtres de la section), la ligne reste en surbrillance à sa place et le groupe au-dessus de la tâche indique **Archivée**. Survolez-le pour savoir pourquoi et ce qui suit, par exemple *Statut passé à En cours · Revient dans la boîte de réception en cas de nouvelle activité*. Quand vous déclenchez un agent, l'en-tête de la tâche montre qu'il est au travail, tandis que la ligne de la barre latérale se met à jour sur place jusqu'à votre départ. Quand un changement fait depuis le groupe archive la notification, le groupe garde **Statut**, **Assigné à** et **Actions rapides** pour la suite. **Annuler** (`Z`) fait revenir la notification, et **Suivante** (`E`), devenu le bouton plein, ouvre la ligne suivante. La ligne disparaît dès que vous passez à autre chose, et la tâche en cours reste visible sous **Vues → En cours**. Si c'était la dernière notification de votre boîte de réception, il n'y a pas de **Suivante** ; `E` ouvre la boîte de réception vide.
+Les fenêtres ouvertes retirent aussitôt une ligne archivée, sauf celle que vous avez ouverte. Quand sa notification quitte la boîte de réception d'elle-même (vous passez la tâche à `done` depuis son statut, vous déclenchez un agent, une autre fenêtre l'archive, ou une modification la sort des filtres de la section), la ligne reste en surbrillance à sa place et le groupe au-dessus de la tâche propose **Annuler l'archivage** (`Z`), qui fait revenir la notification. Survolez-le pour savoir pourquoi elle a été archivée et ce qui suit, par exemple *Statut passé à En cours · Revient dans la boîte de réception en cas de nouvelle activité*. Quand vous déclenchez un agent, l'en-tête de la tâche montre qu'il est au travail, tandis que la ligne de la barre latérale se met à jour sur place jusqu'à votre départ. Quand un changement fait depuis le groupe archive la notification, le groupe garde **Statut**, **Assigné à** et **Actions rapides** pour la suite. **Suivante** (`E`), devenu le bouton plein, ouvre la ligne suivante. Sur une tâche qui n'est pas la vôtre, **⋯** en dernier propose **Se désabonner de cette tâche**, qui laisse la notification où elle est ; le groupe d'une tâche reportée ou ouverte depuis l'onglet **Archivées** le propose aussi. La ligne disparaît dès que vous passez à autre chose, et la tâche en cours reste visible sous **Vues → En cours**. Si c'était la dernière notification de votre boîte de réception, il n'y a pas de **Suivante** ; `E` ouvre la boîte de réception vide.
Quand vous retirez vous-même la ligne ouverte, depuis le groupe au-dessus de la tâche, sa ligne, la carte de survol ou une action groupée qui l'inclut, c'est la ligne suivante qui s'ouvre. S'il n'en reste aucune, la page de la boîte de réception s'ouvre sur **Boîte de réception vide**. Elle rappelle ce que vous venez de faire, avec **Annuler** (ou `Z`) pour revenir en arrière, et indique combien de tâches sont reportées et quand la prochaine revient. Quand des filtres masquaient le reste de votre boîte de réception, elle indique plutôt combien de notifications restent et propose **Effacer les filtres et continuer**. Revenir en arrière ramène à la tâche. L'archivage et les actions groupées proposent **Annuler**, qui fait revenir les notifications sans changer le statut de la tâche. Les confirmations qui proposent **Annuler**, pour l'archivage, le report comme le désabonnement, restent 10 secondes ; tant que l'une d'elles est affichée, `Z` annule cette dernière action.
diff --git a/apps/docs/content/docs/inbox.ja.mdx b/apps/docs/content/docs/inbox.ja.mdx
index eb30f03172..a6e1cf134e 100644
--- a/apps/docs/content/docs/inbox.ja.mdx
+++ b/apps/docs/content/docs/inbox.ja.mdx
@@ -97,11 +97,11 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w
コメント欄の上に、操作のグループが中央に浮かんで表示されます。通知を片付けるための操作が、タスク自体のもの、通知のものの順に並び、それぞれの横にショートカットが表示されます。
- **ステータス**、**担当者**、**クイックアクション** はタスクそのものを変更します。プロパティと同じです。クイックアクションはワークスペースにあるときだけ表示されます。
-- **⋯** には使用頻度の低い操作が入っています。
+- **スヌーズ**(`H`)は、指定した時間までタスクをインボックスから外し、次の通知を開きます。詳しくは下の「タスクをスヌーズする」を参照してください。
+- **アーカイブ**(`E`)は塗りつぶしボタンで、通知をアーカイブして次の通知を開きます。アーカイブしてもタスクは変更・削除されません。タスクを終えるときはステータスを変えます。既定ではそれで通知もアーカイブされます(下の「通知がインボックスから外れるとき」を参照)。
+- 常に右端にある **⋯** には、使用頻度の低い操作が入っています。
- **未読にする / 既読にする**(`U`)は、開いている通知を閉じずにその場で未読・既読を切り替えます。
- **購読解除してアーカイブ**(`⇧E`)は、自分のタスクではないとき(担当者が自分でも自分のエージェントでもない)に表示されます。タスクの購読を解除し、通知をアーカイブして次の通知を開きます。以降の通常の更新はインボックスに届きませんが、@メンションは引き続き通知されます。サブタスクがある場合は、メニューに「このタスクのみ」と「すべてのサブタスクを含める」の 2 つが並び、`⇧E` でその選択肢を開いた状態のメニューが開きます。このタスクのみの場合は確認メッセージの **元に戻す** で購読を元どおりに戻せます。サブタスクごと解除した場合はここでは戻せないので、タスクのページで購読し直してください。ホバーカードと行の右クリックメニューにも同じ操作があります。
-- **スヌーズ**(`H`)は、指定した時間までタスクをインボックスから外し、次の通知を開きます。詳しくは下の「タスクをスヌーズする」を参照してください。
-- **アーカイブ**(`E`)は右端の塗りつぶしボタンで、通知をアーカイブして次の通知を開きます。アーカイブしてもタスクは変更・削除されません。タスクを終えるときはステータスを変えます。既定ではそれで通知もアーカイブされます(下の「通知がインボックスから外れるとき」を参照)。
ウィンドウが狭いときは、まずショートカット、次に名前が省かれます。ボタンにカーソルを合わせると両方が表示されます。
@@ -127,7 +127,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w
- 新しい通知も一緒に待機し、未読バッジには数えられません。戻ってきた行には **スヌーズ終了** と、その間に届いた更新の数が表示されます。
- 名指しでメンションされたとき、自分に割り当てられたとき、実行が失敗したとき、すべてのサブタスクが完了したときは早めに戻ります。`@all` へのメンションでは戻りません。
- **すべて既読にする** や一括アーカイブはスヌーズ中のタスクをスキップします。アーカイブするとスヌーズは終了します。**自分が対応したタスクをアーカイブ** が完了を含む(既定で含む)ときに自分でタスクを完了した場合も同じです。
-- タスクページから直接開いても既読にはならず、スヌーズも終了しません。**スヌーズ中** タブから開くと操作グループに戻る時間が表示され、**時間を変更** から今すぐ戻す(`H`)か別の時間を選べます。
+- タスクページから直接開いても既読にはならず、スヌーズも終了しません。**スヌーズ中** タブから開くと操作グループに戻る時間が表示され、その時間をクリックすると今すぐ戻す(`H`)か別の時間を選べます。
スヌーズは自分のインボックスだけに影響します。スヌーズ中のタスクは **スヌーズ中** タブにあり、各行のボタンで今すぐ戻せます。
@@ -143,7 +143,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w
- 「実行失敗」の通知で、タスクが人に引き継がれるステータスになったとき。対象は `in_review`、`started` カテゴリのカスタムステータス、`done`・`closed` カテゴリのすべてのステータスです。誰がステータスを変えたかにかかわらず、そのタスクの全員分の「実行失敗」の通知がアーカイブされ、上の設定には左右されません。`blocked` は例外です。人に引き継がれはしますが作業は止まったままなので、それまでの失敗の記録はまだ確認する必要があります。
- そのワークスペースのインボックスが 2,000 件を超えたとき。新しい 2,000 件を残し、それより古い通知は既読かどうかにかかわらず、少し後に自動でアーカイブされます。スヌーズから戻った通知やアーカイブから戻した通知は、戻った時点の新しさで数えます。スヌーズ中のタスクの通知は数えず、そのまま残ります。
-アーカイブされた行は、開いているウィンドウからもすぐに消えます。ただし、いま開いている行は別です。その通知が自動でインボックスから外れたとき(ステータスからタスクを `done` にした、エージェントを起動した、別のウィンドウでアーカイブされた、編集でセクションのフィルターに合わなくなった)、行は元の位置でハイライトされたまま残り、操作グループに **アーカイブ済み** と表示されます。カーソルを合わせると、理由とこの先どうなるかが「進行中 に変更 · 新しい動きがあるとインボックスに戻ります」のように表示されます。エージェントを起動したときは、タスクのヘッダーに作業中であることが表示され、サイドバーの行も移動するまでその場で更新されます。操作グループの **ステータス**、**担当者**、**クイックアクション** で変更して通知がアーカイブされたときも、これらの操作はグループに残るので続けて変更できます。**元に戻す**(`Z`)で通知が戻り、塗りつぶしボタンになった **次へ**(`E`)で次の行が開きます。行が消えるのはほかへ移ったときで、実行中のタスクは **ビュー → 実行中** で引き続き確認できます。それがインボックスの最後の通知だった場合、**次へ** は出ません。`E` で空になったインボックスが開きます。
+アーカイブされた行は、開いているウィンドウからもすぐに消えます。ただし、いま開いている行は別です。その通知が自動でインボックスから外れたとき(ステータスからタスクを `done` にした、エージェントを起動した、別のウィンドウでアーカイブされた、編集でセクションのフィルターに合わなくなった)、行は元の位置でハイライトされたまま残り、操作グループに **アーカイブを取り消す**(`Z`)が表示され、押すと通知が戻ります。カーソルを合わせると、アーカイブされた理由とこの先どうなるかが「進行中 に変更 · 新しい動きがあるとインボックスに戻ります」のように表示されます。エージェントを起動したときは、タスクのヘッダーに作業中であることが表示され、サイドバーの行も移動するまでその場で更新されます。操作グループの **ステータス**、**担当者**、**クイックアクション** で変更して通知がアーカイブされたときも、これらの操作はグループに残るので続けて変更できます。塗りつぶしボタンになった **次へ**(`E`)で次の行が開きます。自分のタスクでなければ、右端の **⋯** に **このタスクの購読を解除** があり、通知はそのまま残ります。スヌーズ中のタスクや **アーカイブ済み** タブから開いたタスクの操作グループにもあります。行が消えるのはほかへ移ったときで、実行中のタスクは **ビュー → 実行中** で引き続き確認できます。それがインボックスの最後の通知だった場合、**次へ** は出ません。`E` で空になったインボックスが開きます。
開いている行を自分で処理したとき(操作グループ、その行、ホバーカード、その行を含む一括操作)は、代わりに次の行が開きます。残りがなければ、インボックスのページが開き、**インボックスは空です** と表示されます。直前の操作が示されて **元に戻す**(または `Z`)で取り戻せるほか、スヌーズ中のタスク数と次に戻る時刻が表示されます。フィルターでほかの通知が隠れているだけのときは、残りの件数と **フィルターを解除して続ける** が代わりに表示されます。戻るとタスクに戻れます。アーカイブと一括操作の確認には **元に戻す** があり、通知は戻りますが、タスクのステータスはそのままです。**元に戻す** のある確認メッセージ(アーカイブ、スヌーズ、購読解除のいずれも)は 10 秒間表示され、表示中に `Z` を押すとその操作を取り消せます。
diff --git a/apps/docs/content/docs/inbox.ko.mdx b/apps/docs/content/docs/inbox.ko.mdx
index 7f2c57754d..2d7427afd9 100644
--- a/apps/docs/content/docs/inbox.ko.mdx
+++ b/apps/docs/content/docs/inbox.ko.mdx
@@ -97,11 +97,11 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339, 30m, 3h, 1d, 1w; uns
댓글 입력창 위 가운데에 작업 그룹이 떠 있습니다. 알림을 처리하는 작업이 태스크 자체의 작업, 알림의 작업 순으로 놓이고, 각 작업 옆에 단축키가 표시됩니다.
- **상태**, **담당자**, **퀵 액션**은 태스크 자체를 바꾸며, 속성에서 바꾸는 것과 같습니다. 퀵 액션은 워크스페이스에 있을 때만 나타납니다.
-- **⋯** 메뉴에는 자주 쓰지 않는 작업이 있습니다.
+- **다시 알림**(`H`)은 지정한 시간까지 태스크를 인박스에서 빼고 다음 알림을 엽니다. 자세한 내용은 아래 '태스크 미루기'를 참고하세요.
+- **보관**(`E`)은 채워진 버튼으로, 알림을 보관하고 다음 알림을 엽니다. 보관해도 태스크는 변경되거나 삭제되지 않습니다. 태스크를 끝내려면 상태를 바꾸세요. 기본적으로 그 알림도 함께 보관됩니다(아래 '알림이 인박스에서 빠지는 경우' 참고).
+- 항상 오른쪽 끝에 있는 **⋯** 메뉴에는 자주 쓰지 않는 작업이 있습니다.
- **읽지 않음으로 표시 / 읽음으로 표시**(`U`)는 열어 둔 알림을 닫지 않고 그 자리에서 읽음 상태를 전환합니다.
- **구독 해제 후 보관**(`⇧E`)은 내 태스크가 아닐 때(담당자가 나도, 내 에이전트도 아닐 때) 표시됩니다. 태스크 구독을 해제하고 알림을 보관한 뒤 다음 알림을 엽니다. 이후 일반 업데이트는 인박스에 오지 않지만 @멘션은 계속 알림을 받습니다. 하위 태스크가 있으면 메뉴에 이 태스크만, 모든 하위 태스크까지의 두 가지 선택지가 나오고, `⇧E`를 누르면 그 선택지가 보이는 상태로 메뉴가 열립니다. 이 태스크만 해제했다면 확인 메시지의 **실행 취소**로 구독을 원래대로 되돌릴 수 있습니다. 하위 태스크까지 해제한 경우에는 여기서 되돌릴 수 없으니 태스크 페이지에서 다시 구독하세요. 호버 카드와 행의 우클릭 메뉴에도 같은 동작이 있습니다.
-- **다시 알림**(`H`)은 지정한 시간까지 태스크를 인박스에서 빼고 다음 알림을 엽니다. 자세한 내용은 아래 '태스크 미루기'를 참고하세요.
-- **보관**(`E`)은 오른쪽 끝의 채워진 버튼으로, 알림을 보관하고 다음 알림을 엽니다. 보관해도 태스크는 변경되거나 삭제되지 않습니다. 태스크를 끝내려면 상태를 바꾸세요. 기본적으로 그 알림도 함께 보관됩니다(아래 '알림이 인박스에서 빠지는 경우' 참고).
창이 좁으면 단축키가 먼저, 그다음 이름이 숨겨집니다. 버튼에 마우스를 올리면 둘 다 볼 수 있습니다.
@@ -127,7 +127,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339, 30m, 3h, 1d, 1w; uns
- 새 알림도 함께 기다리며 읽지 않음 배지에 포함되지 않습니다. 돌아온 행에는 **다시 알림 종료**와 그동안 쌓인 업데이트 수가 표시됩니다.
- 누군가 이름으로 멘션하거나, 나에게 할당되거나, 실행이 실패하거나, 모든 하위 태스크가 끝나면 일찍 돌아옵니다. `@all` 멘션으로는 돌아오지 않습니다.
- **모두 읽음으로 표시**와 일괄 보관은 미뤄둔 태스크를 건너뜁니다. 보관하면 미루기가 끝나며, **내가 처리한 태스크 보관**에 완료가 포함된 상태(기본값)에서 직접 태스크를 완료한 경우도 마찬가지입니다.
-- 태스크 페이지에서 직접 열어도 읽음으로 바뀌지 않고 미루기도 끝나지 않습니다. **미뤄둔 항목** 탭에서 열면 작업 그룹에 돌아올 시간이 표시되며, **시간 변경**에서 지금 되돌리거나(`H`) 다른 시간을 고를 수 있습니다.
+- 태스크 페이지에서 직접 열어도 읽음으로 바뀌지 않고 미루기도 끝나지 않습니다. **미뤄둔 항목** 탭에서 열면 작업 그룹에 돌아올 시간이 표시되며, 그 시간을 누르면 지금 되돌리거나(`H`) 다른 시간을 고를 수 있습니다.
미루기는 내 인박스에만 영향을 줍니다. 미뤄둔 태스크는 **미뤄둔 항목** 탭에 있고, 각 행의 버튼으로 지금 되돌릴 수 있습니다.
@@ -143,7 +143,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339, 30m, 3h, 1d, 1w; uns
- "실행 실패함" 알림이고, 태스크가 사람에게 넘어가는 상태가 될 때. 해당 상태는 `in_review`, `started` 카테고리의 사용자 지정 상태, `done`·`closed` 카테고리의 모든 상태입니다. 누가 상태를 바꿨는지와 관계없이 그 태스크의 모든 사람의 "실행 실패함" 알림이 보관되며, 위 설정의 영향을 받지 않습니다. `blocked`는 예외입니다. 사람에게 넘어가기는 하지만 작업이 여전히 막혀 있으므로 지난 실패 기록을 계속 확인해야 합니다.
- 그 워크스페이스의 인박스가 알림 2,000개를 넘을 때. 최신 2,000개를 남기고, 그보다 오래된 알림은 읽음 여부와 관계없이 잠시 후 자동으로 보관됩니다. 미루기에서 돌아온 알림과 보관함에서 복원한 알림은 돌아온 시점을 기준으로 셉니다. 미룬 태스크의 알림은 개수에 포함되지 않으며 그대로 남습니다.
-보관된 행은 열려 있는 창에서도 바로 사라집니다. 단, 지금 열어 둔 행은 예외입니다. 그 알림이 자동으로 인박스에서 빠지면(상태에서 태스크를 `done`으로 바꿨거나, 에이전트를 실행했거나, 다른 창에서 보관했거나, 편집으로 섹션 필터에 더 이상 맞지 않게 된 경우) 행은 제자리에서 강조된 채 남고, 작업 그룹에 **보관됨**이 표시됩니다. 마우스를 올리면 '상태 변경됨: 진행 중 · 새 활동이 있으면 인박스로 돌아옵니다'처럼 이유와 이후에 일어날 일이 표시됩니다. 에이전트를 실행하면 태스크 헤더에 작업 중임이 표시되고, 사이드바 행도 이동할 때까지 제자리에서 갱신됩니다. 작업 그룹의 **상태**, **담당자**, **퀵 액션**으로 바꿔서 알림이 보관된 경우에도 이 동작들은 그룹에 그대로 남아 이어서 바꿀 수 있습니다. **실행 취소**(`Z`)로 알림을 되돌리고, 이제 채워진 버튼이 된 **다음**(`E`)으로 다음 행을 엽니다. 행은 다른 곳으로 이동할 때 사라지며, 실행 중인 태스크는 **뷰 → 작업 중**에서 계속 확인할 수 있습니다. 그것이 인박스의 마지막 알림이었다면 **다음**은 나오지 않습니다. `E`를 누르면 비워진 인박스가 열립니다.
+보관된 행은 열려 있는 창에서도 바로 사라집니다. 단, 지금 열어 둔 행은 예외입니다. 그 알림이 자동으로 인박스에서 빠지면(상태에서 태스크를 `done`으로 바꿨거나, 에이전트를 실행했거나, 다른 창에서 보관했거나, 편집으로 섹션 필터에 더 이상 맞지 않게 된 경우) 행은 제자리에서 강조된 채 남고, 작업 그룹에 **보관 취소**(`Z`)가 표시되며, 누르면 알림이 돌아옵니다. 마우스를 올리면 '상태 변경됨: 진행 중 · 새 활동이 있으면 인박스로 돌아옵니다'처럼 보관된 이유와 이후에 일어날 일이 표시됩니다. 에이전트를 실행하면 태스크 헤더에 작업 중임이 표시되고, 사이드바 행도 이동할 때까지 제자리에서 갱신됩니다. 작업 그룹의 **상태**, **담당자**, **퀵 액션**으로 바꿔서 알림이 보관된 경우에도 이 동작들은 그룹에 그대로 남아 이어서 바꿀 수 있습니다. 이제 채워진 버튼이 된 **다음**(`E`)으로 다음 행을 엽니다. 내 태스크가 아니면 오른쪽 끝 **⋯** 메뉴에 **이 태스크 구독 해제**가 있으며, 알림은 그대로 남습니다. 미뤄 둔 태스크나 **보관됨** 탭에서 연 태스크의 작업 그룹에도 있습니다. 행은 다른 곳으로 이동할 때 사라지며, 실행 중인 태스크는 **뷰 → 작업 중**에서 계속 확인할 수 있습니다. 그것이 인박스의 마지막 알림이었다면 **다음**은 나오지 않습니다. `E`를 누르면 비워진 인박스가 열립니다.
열어 둔 행을 직접 처리하면(작업 그룹, 그 행, 호버 카드, 그 행을 포함한 일괄 작업) 대신 다음 행이 열립니다. 남은 행이 없으면 인박스 페이지가 열리고 **인박스가 비었습니다**가 표시됩니다. 방금 한 동작이 표시되고 **실행 취소**(또는 `Z`)로 되돌릴 수 있으며, 미뤄 둔 태스크 수와 다음으로 돌아오는 시각이 표시됩니다. 필터 때문에 나머지 알림이 가려진 경우에는 남은 알림 수와 **필터 지우고 계속하기**가 대신 표시됩니다. 뒤로 가면 태스크로 돌아갑니다. 보관과 일괄 작업의 확인에는 **실행 취소**가 있으며, 알림은 돌아오고 태스크 상태는 그대로 유지됩니다. **실행 취소**가 있는 확인 알림(보관, 미루기, 구독 해제 모두)은 10초 동안 표시되며, 표시되는 동안 `Z`를 누르면 그 동작을 취소합니다.
diff --git a/apps/docs/content/docs/inbox.mdx b/apps/docs/content/docs/inbox.mdx
index 3c07fcdb73..7ffc7d0c5f 100644
--- a/apps/docs/content/docs/inbox.mdx
+++ b/apps/docs/content/docs/inbox.mdx
@@ -97,11 +97,11 @@ Click a row to open the notification on the Inbox page, at the comment it is abo
A group of actions floats above the comment box, centred on the issue. It offers what usually settles the notification, the issue's own actions first, then the notification's, each with its shortcut beside it:
- **Status**, **Assignee** and **Quick actions** change the issue itself, as its properties do. Quick actions appear once your workspace has some.
-- **⋯** holds the less frequent ones:
+- **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`), the filled button, 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)).
+- **⋯**, always last, holds the less frequent ones:
- **Mark as unread / Mark as read** (`U`) toggles the open notification's read state in place without closing it.
- **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 the menu lists two choices, this issue only or this issue with all its sub-issues, and `⇧E` opens it on them. 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.
-- **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`), the filled button at the end, 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)).
When the window is narrow, the shortcuts give way first, then the names; hover a button for both.
@@ -127,7 +127,7 @@ While an issue is snoozed:
- new notifications on it wait with it and don't count toward the unread badge. When it comes back, the row says **Snooze ended** and how many updates arrived meanwhile;
- it comes back early when someone mentions you by name, it is assigned to you, a run fails, or all its sub-issues finish. `@all` mentions don't wake it;
- **Mark all as read** and the archive-all actions leave it alone. Archiving it ends the snooze, and so does completing the issue yourself while **Archive issues you handle** counts completing (it does by default);
-- opening the issue's own page doesn't read it or end the snooze. Open it from the **Snoozed** tab and the group over it shows when it comes back; **Change time** there brings it back now (`H`) or picks another time.
+- opening the issue's own page doesn't read it or end the snooze. Open it from the **Snoozed** tab and the group over it shows when it comes back. Click that time to bring it back now (`H`) or pick another time.
Snooze is personal: it only changes your own inbox. Everything you've snoozed is on the **Snoozed** tab, where the button on each row brings it back now.
@@ -143,7 +143,7 @@ Reading a notification doesn't remove it. A row leaves the inbox only when:
- it's a **Run failed** notification and its issue moves to a status that hands it back to a person: `in_review`, a custom status in the `started` category, or any status in the `done` or `closed` category. This archives everyone's Run failed notifications on the issue, whoever moved it, and doesn't depend on the setting above. `blocked` is the exception: it hands the issue over too, but the work is still stuck, so the earlier failures are still worth reading.
- your inbox in the workspace goes past 2,000 notifications. It keeps the newest 2,000 and shortly afterwards archives the older ones, read or not. A notification that comes back from a snooze or that you restore from the archive counts from when it came back. Notifications on a snoozed issue don't count and are left alone.
-Open windows drop an archived row right away, except the one you have open. When its notification leaves the inbox on its own (you set the issue to `done` from its status, trigger an agent on it, another window archived it, or an edit took it out of the section's filters), the row stays lit where it was and the group over the issue says **Archived**. Hover it for why and what happens next, as in *Changed to In Progress · Returns to Inbox on new activity*. When you trigger an agent, the issue's header shows it at work, while the sidebar row updates in place until you move on. When a change you made from the group archived the notification, the group keeps **Status**, **Assignee** and **Quick actions** for the next change. **Undo** (`Z`) brings the notification back, and **Next** (`E`), now the filled button, opens the next row. The row leaves once you move on, and any running issue stays visible under **Views → Working**. When it was the last notification in your inbox, there is no **Next**; `E` opens the cleared inbox.
+Open windows drop an archived row right away, except the one you have open. When its notification leaves the inbox on its own (you set the issue to `done` from its status, trigger an agent on it, another window archived it, or an edit took it out of the section's filters), the row stays lit where it was and the group over the issue offers **Undo archive** (`Z`), which brings the notification back. Hover it for why it was archived and what happens next, as in *Changed to In Progress · Returns to Inbox on new activity*. When you trigger an agent, the issue's header shows it at work, while the sidebar row updates in place until you move on. When a change you made from the group archived the notification, the group keeps **Status**, **Assignee** and **Quick actions** for the next change. **Next** (`E`), now the filled button, opens the next row. On an issue that isn't yours, **⋯** at the end offers **Unsubscribe from this issue**, which leaves the notification where it is; the group over a snoozed issue or one opened from the **Archived** tab offers it too. The row leaves once you move on, and any running issue stays visible under **Views → Working**. When it was the last notification in your inbox, there is no **Next**; `E` opens the cleared inbox.
When you take the open row out yourself, from the group over the issue, its row, the hover card, or a bulk action that includes it, the next row opens instead. With nothing left to open, the inbox page opens on **Inbox cleared**. It names what you just did, with **Undo** (or `Z`) to bring it back, and shows how many issues are snoozed and when the next one returns. When filters hid the rest of your inbox, it says how many notifications are left and offers **Clear filters and continue** instead. Going back returns to the issue. Archiving and the bulk actions confirm with **Undo**, which brings the notifications back and leaves the issue's status as it is. Confirmations that offer **Undo**, for archiving, snoozing and unsubscribing alike, stay for 10 seconds, and while one shows, `Z` undoes that latest action.
diff --git a/apps/docs/content/docs/inbox.zh-Hant.mdx b/apps/docs/content/docs/inbox.zh-Hant.mdx
index 92c51069b6..144db95d67 100644
--- a/apps/docs/content/docs/inbox.zh-Hant.mdx
+++ b/apps/docs/content/docs/inbox.zh-Hant.mdx
@@ -97,11 +97,11 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w
評論框上方置中浮著一組操作,給出通常能處理掉這條通知的操作:先是任務本身的,再是通知的,快捷鍵顯示在各自旁邊:
- **狀態**、**負責人**和**快捷操作**直接修改任務本身,和屬性裡一樣;工作區有快捷操作時才會出現。
-- **⋯** 裡是不常用的操作:
+- **延後**(`H`)把任務移出收件箱,到你選的時間再回來,並開啟下一條。詳見下方的「延後任務」。
+- **歸檔**(`E`)是實心按鈕,會歸檔這條通知並開啟下一條。歸檔不會修改或刪除任務。要結束任務,請修改它的狀態;預設情況下這也會歸檔它的通知(見下文「通知何時離開收件箱」)。
+- **⋯** 始終在最右邊,裡面是不常用的操作:
- **標為未讀 / 標為已讀**(`U`)原地切換目前開啟通知的未讀或已讀狀態,不會關閉目前通知。
- **取消訂閱並歸檔**(`⇧E`):任務不是你的(負責人不是你,也不是你擁有的 AI 代理)時出現。它取消你對這個任務的訂閱,歸檔這條通知並開啟下一條;之後一般動態不再進入收件箱,@你仍會通知。有子任務時,選單裡列出兩個選項:只退訂這個任務,或連同全部子任務一起退訂;按 `⇧E` 會直接開啟選單停在這兩項上。只退訂這個任務時,提示裡可以**復原**,訂閱會按原來的方式恢復;連同子任務一起退訂無法在這裡復原,可以在任務頁面重新訂閱。懸停卡片和列的右鍵選單裡也有這個操作。
-- **延後**(`H`)把任務移出收件箱,到你選的時間再回來,並開啟下一條。詳見下方的「延後任務」。
-- **歸檔**(`E`)是最右邊的實心按鈕,會歸檔這條通知並開啟下一條。歸檔不會修改或刪除任務。要結束任務,請修改它的狀態;預設情況下這也會歸檔它的通知(見下文「通知何時離開收件箱」)。
視窗較窄時,先收起快捷鍵,再收起名稱;懸停按鈕可以看到兩者。
@@ -127,7 +127,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w
- 它的新通知會跟著一起等,不計入未讀角標。回來時,這一列會顯示 **延後到期** 以及期間有多少則動態;
- 有人點名 @ 你、它被指派給你、執行失敗,或全部子任務完成時,它會提前回來。`@all` 提及不會喚醒它;
- **全部標為已讀** 和各種全部歸檔操作會跳過它。歸檔它會結束延後;**自動歸檔我處理過的任務**包含完成(預設包含)時,你自己完成這個任務也一樣;
-- 直接開啟這個任務的任務頁不會把它標為已讀,也不會結束延後。從**已延後**分頁開啟時,操作組會顯示它何時回來,點**修改時間**可以讓它現在回來(`H`)或換個時間。
+- 直接開啟這個任務的任務頁不會把它標為已讀,也不會結束延後。從**已延後**分頁開啟時,操作組會顯示它何時回來,點這個時間可以讓它現在回來(`H`)或換個時間。
延後只影響你自己的收件箱。所有延後的任務都在**已延後**分頁裡,點每列的按鈕可以讓它現在回來。
@@ -143,7 +143,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w
- 它是"執行失敗"通知,且任務進入交回給人的狀態:`in_review`、`started` 分類下的自定義狀態,或 `done`、`closed` 分類下的任一狀態。這會歸檔所有人在該任務上的"執行失敗"通知,不論是誰改的狀態,也不受上面的開關影響。`blocked` 例外:它同樣交回給人,但工作還卡著,之前的失敗記錄還要看。
- 你在該工作區的收件箱超過 2,000 條通知。收件箱保留最新的 2,000 條,隨後自動歸檔更早的通知,無論是否已讀。從延後中回來或從歸檔中還原的通知,按回來的時間算作新通知。已延後任務上的通知不計入,也不會被歸檔。
-開著的視窗會立即移除已歸檔的列,但你正開著的那一列除外。它的通知自動離開收件箱時(你在狀態裡把任務改為 `done`、觸發了 AI 代理、別的視窗歸檔了它,或修改後不再符合分區的篩選),這一列會在原位保持高亮,操作組會顯示**已歸檔**;懸停可以看到原因和之後會怎樣,例如「已改為進行中 · 有新動態時會回到收件箱」。觸發 AI 代理時,任務頁首會顯示它正在工作,側邊欄列也會原位更新直到你離開。在操作組裡改**狀態**、**負責人**或執行**快捷操作**後通知被歸檔時,這幾個操作仍留在組裡,可以接著改。**復原**(`Z`)讓通知回來,**下一條**(`E`)此時是實心按鈕,開啟下一列。你離開之後,這一列才會移出,仍在執行中的任務會繼續顯示在**檢視 → 執行中**裡。如果這是收件箱裡的最後一條通知,就沒有**下一條**;按 `E` 會開啟已清空的收件箱。
+開著的視窗會立即移除已歸檔的列,但你正開著的那一列除外。它的通知自動離開收件箱時(你在狀態裡把任務改為 `done`、觸發了 AI 代理、別的視窗歸檔了它,或修改後不再符合分區的篩選),這一列會在原位保持高亮,操作組會顯示**復原歸檔**(`Z`),點它讓通知回來;懸停它可以看到歸檔原因和之後會怎樣,例如「已改為進行中 · 有新動態時會回到收件箱」。觸發 AI 代理時,任務頁首會顯示它正在工作,側邊欄列也會原位更新直到你離開。在操作組裡改**狀態**、**負責人**或執行**快捷操作**後通知被歸檔時,這幾個操作仍留在組裡,可以接著改。**下一條**(`E`)此時是實心按鈕,開啟下一列。任務不是你的時,最右邊的 **⋯** 裡有**取消訂閱此任務**,通知本身保持不動;已延後的任務和從**已歸檔**分頁開啟的任務,操作組裡也有它。你離開之後,這一列才會移出,仍在執行中的任務會繼續顯示在**檢視 → 執行中**裡。如果這是收件箱裡的最後一條通知,就沒有**下一條**;按 `E` 會開啟已清空的收件箱。
如果是你自己把正開著的這一列處理掉(在操作組、它所在的列、懸停卡片,或包含它的批次操作裡),會直接開啟下一列;沒有剩下的列時,會開啟收件箱頁面,顯示**收件箱已清空**:寫明你剛才的操作,可以**復原**(或按 `Z`)把它找回,並顯示延後中的任務數和下一條回來的時間。如果是篩選隱藏了收件箱裡的其餘通知,會改為說明還剩多少條,並提供**清除篩選,繼續處理**。返回上一頁可以回到任務。歸檔和批次操作的提示裡都可以**復原**:通知會回來,任務的狀態保持不變。帶**復原**的提示(歸檔、延後、取消訂閱都一樣)會停留 10 秒;提示還在時,按 `Z` 復原這次操作。
diff --git a/apps/docs/content/docs/inbox.zh.mdx b/apps/docs/content/docs/inbox.zh.mdx
index 85b642d451..593326a5e7 100644
--- a/apps/docs/content/docs/inbox.zh.mdx
+++ b/apps/docs/content/docs/inbox.zh.mdx
@@ -97,11 +97,11 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w
评论框上方居中浮着一组操作,给出通常能处理掉这条通知的操作:先是任务本身的,再是通知的,快捷键显示在各自旁边:
- **状态**、**负责人**和**快捷操作**直接修改任务本身,和属性里一样;工作区有快捷操作时才会出现。
-- **⋯** 里是不常用的操作:
+- **延后**(`H`)把任务移出收件箱,到你选的时间再回来,并打开下一条。详见下方的「延后任务」。
+- **归档**(`E`)是实心按钮,会归档这条通知并打开下一条。归档不会修改或删除任务。要结束任务,请修改它的状态;默认情况下这也会归档它的通知(见下文「通知何时离开收件箱」)。
+- **⋯** 始终在最右边,里面是不常用的操作:
- **标为未读 / 标为已读**(`U`)原地切换当前打开通知的未读或已读状态,不会关闭当前通知。
- **取消订阅并归档**(`⇧E`):任务不是你的(负责人不是你,也不是你拥有的智能体)时出现。它取消你对这个任务的订阅,归档这条通知并打开下一条;之后普通动态不再进入收件箱,@你仍会通知。有子任务时,菜单里列出两个选项:只退订这个任务,或连同全部子任务一起退订;按 `⇧E` 会直接打开菜单停在这两项上。只退订这个任务时,提示里可以**撤销**,订阅会按原来的方式恢复;连同子任务一起退订无法在这里撤销,可以在任务页面重新订阅。悬停卡片和行的右键菜单里也有这个操作。
-- **延后**(`H`)把任务移出收件箱,到你选的时间再回来,并打开下一条。详见下方的「延后任务」。
-- **归档**(`E`)是最右边的实心按钮,会归档这条通知并打开下一条。归档不会修改或删除任务。要结束任务,请修改它的状态;默认情况下这也会归档它的通知(见下文「通知何时离开收件箱」)。
窗口较窄时,先收起快捷键,再收起名称;悬停按钮可以看到两者。
@@ -127,7 +127,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w
- 它的新通知会跟着一起等,不计入未读角标。回来时,这一行会显示 **延后到期** 以及期间有多少条动态;
- 有人点名 @ 你、它被指派给你、运行失败,或全部子任务完成时,它会提前回来。`@all` 提及不会唤醒它;
- **全部标为已读** 和各种全部归档操作会跳过它。归档它会结束延后;**自动归档我处理过的任务**包含完成(默认包含)时,你自己完成这个任务也一样;
-- 直接打开这个任务的任务页不会把它标为已读,也不会结束延后。从**已延后**标签打开时,操作组会显示它何时回来,点**修改时间**可以让它现在回来(`H`)或换个时间。
+- 直接打开这个任务的任务页不会把它标为已读,也不会结束延后。从**已延后**标签打开时,操作组会显示它何时回来,点这个时间可以让它现在回来(`H`)或换个时间。
延后只影响你自己的收件箱。所有延后的任务都在**已延后**标签里,点每行的按钮可以让它现在回来。
@@ -143,7 +143,7 @@ multica inbox snooze <id>... --until tomorrow # RFC 3339、30m、3h、1d、1w
- 它是"运行失败"通知,且任务进入交回给人的状态:`in_review`、`started` 分类下的自定义状态,或 `done`、`closed` 分类下的任一状态。这会归档所有人在该任务上的"运行失败"通知,不论是谁改的状态,也不受上面的开关影响。`blocked` 例外:它同样交回给人,但工作还卡着,之前的失败记录还要看。
- 你在该工作区的收件箱超过 2,000 条通知。收件箱保留最新的 2,000 条,随后自动归档更早的通知,无论是否已读。从延后中回来或从归档中还原的通知,按回来的时间算作新通知。已延后任务上的通知不计入,也不会被归档。
-打开着的窗口会立即移除已归档的行,但你正打开的那一行除外。它的通知自动离开收件箱时(你在状态里把任务改为 `done`、触发了智能体、别的窗口归档了它,或修改后不再符合分区的筛选),这一行会在原位保持高亮,操作组会显示**已归档**;悬停可以看到原因和之后会怎样,比如"已改为进行中 · 有新动态时会回到收件箱"。触发智能体时,任务页头会显示它正在工作,侧边栏行也会原位更新直到你离开。在操作组里改**状态**、**负责人**或运行**快捷操作**后通知被归档时,这几个操作仍留在组里,可以接着改。**撤销**(`Z`)让通知回来,**下一条**(`E`)此时是实心按钮,打开下一行。你离开之后,这一行才会移出,仍在运行中的任务会继续显示在**视图 → 运行中**里。如果这是收件箱里的最后一条通知,就没有**下一条**;按 `E` 会打开已清空的收件箱。
+打开着的窗口会立即移除已归档的行,但你正打开的那一行除外。它的通知自动离开收件箱时(你在状态里把任务改为 `done`、触发了智能体、别的窗口归档了它,或修改后不再符合分区的筛选),这一行会在原位保持高亮,操作组会显示**撤销归档**(`Z`),点它让通知回来;悬停它可以看到归档原因和之后会怎样,比如"已改为进行中 · 有新动态时会回到收件箱"。触发智能体时,任务页头会显示它正在工作,侧边栏行也会原位更新直到你离开。在操作组里改**状态**、**负责人**或运行**快捷操作**后通知被归档时,这几个操作仍留在组里,可以接着改。**下一条**(`E`)此时是实心按钮,打开下一行。任务不是你的时,最右边的 **⋯** 里有**取消订阅此任务**,通知本身保持不动;已延后的任务和从**已归档**标签打开的任务,操作组里也有它。你离开之后,这一行才会移出,仍在运行中的任务会继续显示在**视图 → 运行中**里。如果这是收件箱里的最后一条通知,就没有**下一条**;按 `E` 会打开已清空的收件箱。
如果是你自己把正打开的这一行处理掉(在操作组、它所在的行、悬停卡片,或包含它的批量操作里),会直接打开下一行;没有剩下的行时,会打开收件箱页面,显示**收件箱已清空**:写明你刚才的操作,可以**撤销**(或按 `Z`)把它找回,并显示延后中的任务数和下一条回来的时间。如果是筛选隐藏了收件箱里的其余通知,会改为说明还剩多少条,并提供**清除筛选,继续处理**。返回上一页可以回到任务。归档和批量操作的提示里都可以**撤销**:通知会回来,任务的状态保持不变。带**撤销**的提示(归档、延后、取消订阅都一样)会停留 10 秒;提示还在时,按 `Z` 撤销这次操作。
diff --git a/packages/views/inbox/components/inbox-bar.tsx b/packages/views/inbox/components/inbox-bar.tsx
index b03deaaa26..922762c799 100644
--- a/packages/views/inbox/components/inbox-bar.tsx
+++ b/packages/views/inbox/components/inbox-bar.tsx
@@ -50,7 +50,10 @@ export function InboxBar({ settled = false, children }: { settled?: boolean; chi
);
}
-/** The open notification's group: the issue's actions, then the notification's own (`children`). */
+/**
+ * The open notification's group: the issue's actions, then the notification's
+ * own (`children`), its filled action followed only by `…`.
+ */
export function InboxOpenBar({
issueActions,
children,
@@ -150,12 +153,15 @@ export function InboxArchiveButton({ onClick }: { onClick: () => void }) {
);
}
-/** An archived notification's group: the way back into the Inbox. */
-export function InboxArchivedBar({ onRestore }: { onRestore: () => void }) {
+/**
+ * An archived notification's group: the way back into the Inbox, which says
+ * where it is on its own, then `more` last, as in every state of the group.
+ */
+export function InboxArchivedBar({ onRestore, more }: { onRestore: () => void; more?: ReactNode }) {
const { t } = useT("inbox");
return (
<InboxBar settled>
- <InboxBarStatus icon={<Archive />} label={t(($) => $.kept.archived)} />
+ <span className="sr-only">{t(($) => $.kept.archived)}</span>
<InboxBarButton
icon={<ArchiveRestore />}
label={t(($) => $.detail.restore)}
@@ -163,6 +169,7 @@ export function InboxArchivedBar({ onRestore }: { onRestore: () => void }) {
variant="default"
onClick={onRestore}
/>
+ {more}
</InboxBar>
);
}
diff --git a/packages/views/inbox/components/inbox-kept-actions.tsx b/packages/views/inbox/components/inbox-kept-actions.tsx
index 10910cee7d..323fe6781f 100644
--- a/packages/views/inbox/components/inbox-kept-actions.tsx
+++ b/packages/views/inbox/components/inbox-kept-actions.tsx
@@ -81,19 +81,26 @@ export function useKeptInboxRowText(wsId: string) {
return `${why} · ${t(($) => $.kept.leaves)}`;
},
/**
- * The floating group's word for a kept row, and what its tooltip adds:
- * why it was archived, when known, and that it comes back on new activity.
- * `cause` is the group action that archived it, `agentTriggered` that an
- * agent started on it (both from `useAutoArchiveCause`).
+ * The floating group's word for a kept row, what undoing it is called, and
+ * what the undo's tooltip adds: why it was archived, when known, and that
+ * it comes back on new activity. `cause` is the group action that archived
+ * it, `agentTriggered` that an agent started on it (both from
+ * `useAutoArchiveCause`).
*/
status: (kept: KeptInboxRow, cause?: InboxBarAction | null, agentTriggered = false) => {
- if (kept.reason === "snoozed") return { label: backAt(kept.item), hint: undefined };
+ if (kept.reason === "snoozed") {
+ return { label: backAt(kept.item), hint: undefined, undo: t(($) => $.toasts.undo) };
+ }
const why =
(cause && kept.reason === "archived" ? did(cause) : null) ??
finished(kept.item) ??
(agentTriggered ? t(($) => $.kept.agent_triggered) : null);
const returns = t(($) => $.kept.returns_on_activity);
- return { label: t(($) => $.kept.archived), hint: why ? `${why} · ${returns}` : returns };
+ return {
+ label: t(($) => $.kept.archived),
+ hint: why ? `${why} · ${returns}` : returns,
+ undo: t(($) => $.kept.undo_archive),
+ };
},
};
}
@@ -102,48 +109,68 @@ export function useKeptInboxRowText(wsId: string) {
* What the open notification's group offers once it has left the Inbox on its
* own (its issue reached Done, another window archived it) and stays on
* screen until the user moves on: the issue's own actions when it was
- * archived, so the next change needs no trip to its properties, what
- * happened, then the way to undo it (Z) and the next notification.
+ * archived, so the next change needs no trip to its properties, the way to
+ * undo it (Z), the next notification, then `more`.
+ *
+ * What happened is not a word of its own between the buttons: the undo names
+ * it ("Undo archive"), its tooltip says why, and a screen reader hears both
+ * from the group's status.
*/
export function InboxKeptActions({
label,
hint,
- icon,
+ undoLabel,
issueActions,
onUndo,
next,
onNext,
+ more,
}: {
- /** What happened, in a word ("Archived"); `hint` says the rest on hover. */
- label: ReactNode;
- hint?: ReactNode;
- /** Defaults to the archive icon. */
- icon?: ReactNode;
+ /** What happened, in a word ("Archived"); `hint` says the rest. */
+ label: string;
+ hint?: string;
+ /** Names what the undo takes back ("Undo archive"). */
+ undoLabel: string;
issueActions?: ReactNode;
onUndo?: () => void;
/** The notification `onNext` opens; without one there is nothing to move on to. */
next: InboxItem | null;
onNext: () => void;
+ more?: ReactNode;
}) {
- const { t } = useT("inbox");
useInboxUndoShortcut(onUndo ?? null);
- const undoLabel = t(($) => $.toasts.undo);
+ const note = hint ?? label;
return (
<InboxBar settled>
{issueActions}
{issueActions && <InboxBarSeparator />}
- <InboxBarStatus icon={icon ?? <Archive />} label={label} hint={hint} />
- {onUndo && (
- <TooltipHint label={undoLabel} shortcut={<ActionShortcutKeycaps action="undoInboxAction" />} side="top">
- <Button size="sm" variant="ghost" aria-label={undoLabel} className="shrink-0 text-muted-foreground" onClick={onUndo}>
- <Undo2 />
- <span className="@max-[32rem]/inbox-bar:hidden">{undoLabel}</span>
- <InboxBarKeycaps action="undoInboxAction" />
- </Button>
- </TooltipHint>
+ {onUndo ? (
+ <>
+ <span className="sr-only">{label}</span>
+ {hint && <span className="sr-only">{hint}</span>}
+ <TooltipHint
+ label={
+ <span className="flex flex-col">
+ <span>{undoLabel}</span>
+ <span className="text-muted-foreground">{note}</span>
+ </span>
+ }
+ shortcut={<ActionShortcutKeycaps action="undoInboxAction" />}
+ side="top"
+ >
+ <Button size="sm" variant="ghost" aria-label={undoLabel} className="shrink-0 text-muted-foreground" onClick={onUndo}>
+ <Undo2 />
+ <span className="@max-[32rem]/inbox-bar:hidden">{undoLabel}</span>
+ <InboxBarKeycaps action="undoInboxAction" />
+ </Button>
+ </TooltipHint>
+ </>
+ ) : (
+ <InboxBarStatus icon={<Archive />} label={label} hint={hint} />
)}
{next && <InboxNextButton next={next} onNext={onNext} />}
+ {more}
</InboxBar>
);
}
diff --git a/packages/views/inbox/components/inbox-more-menu.test.tsx b/packages/views/inbox/components/inbox-more-menu.test.tsx
index 55db3e905f..c0d65641e3 100644
--- a/packages/views/inbox/components/inbox-more-menu.test.tsx
+++ b/packages/views/inbox/components/inbox-more-menu.test.tsx
@@ -1,6 +1,7 @@
-import { describe, expect, it, vi } from "vitest";
-import { fireEvent, screen, waitFor } from "@testing-library/react";
+import { beforeEach, describe, expect, it, vi } from "vitest";
+import { act, fireEvent, screen, waitFor } from "@testing-library/react";
import { QueryClientProvider } from "@tanstack/react-query";
+import { toast } from "sonner";
import { setApiInstance } from "@multica/core/api";
import type { ApiClient } from "@multica/core/api/client";
import { createQueryClient } from "@multica/core/query-client";
@@ -8,15 +9,20 @@ import type { Agent, Issue, IssueSubscriber } from "@multica/core/types";
import { renderWithI18n } from "../../test/i18n";
vi.mock("@multica/core/hooks", () => ({ useWorkspaceId: () => "ws-1" }));
+vi.mock("@multica/core/auth", () => ({
+ useAuthStore: (selector: (state: { user: { id: string } }) => unknown) => selector({ user: { id: "me" } }),
+}));
+vi.mock("sonner", () => ({ toast: { success: vi.fn(), error: vi.fn() } }));
-import { InboxMoreMenu } from "./inbox-more-menu";
+import { InboxMoreMenu, InboxSettledMoreMenu } from "./inbox-more-menu";
const ISSUE_ID = "issue-1";
-function setup({
+function mockApi({
assignee = { assignee_type: "member", assignee_id: "someone" } as Partial<Issue>,
subscribed = true,
children = [] as Partial<Issue>[],
+ extra = {} as Record<string, unknown>,
} = {}) {
const issue = { id: ISSUE_ID, workspace_id: "ws-1", ...assignee } as Issue;
const subscribers: IssueSubscriber[] = subscribed
@@ -28,7 +34,12 @@ function setup({
listAgents: vi.fn(async () => agents),
listIssueSubscribers: vi.fn(async () => subscribers),
listChildIssues: vi.fn(async () => ({ issues: children })),
+ ...extra,
} as unknown as ApiClient);
+}
+
+function setup(options: Parameters<typeof mockApi>[0] = {}) {
+ mockApi(options);
const onConfirm = vi.fn();
const onToggleRead = vi.fn();
renderWithI18n(
@@ -100,3 +111,64 @@ describe("InboxMoreMenu", () => {
expect(screen.queryByRole("menuitem", { name: /Unsubscribe/ })).toBeNull();
});
});
+
+describe("InboxSettledMoreMenu", () => {
+ beforeEach(() => vi.clearAllMocks());
+
+ /** A request the test settles by hand, after the menu is gone. */
+ function pending() {
+ let settle!: { resolve: () => void; reject: (err: Error) => void };
+ const call = vi.fn(() => new Promise<void>((resolve, reject) => (settle = { resolve, reject })));
+ return { call, resolve: () => act(async () => settle.resolve()), reject: (e: Error) => act(async () => settle.reject(e)) };
+ }
+
+ function render(extra: Record<string, unknown>, children: Partial<Issue>[] = []) {
+ mockApi({ children, extra });
+ return renderWithI18n(
+ <QueryClientProvider client={createQueryClient()}>
+ <InboxSettledMoreMenu issueId={ISSUE_ID} />
+ </QueryClientProvider>,
+ );
+ }
+
+ async function pick(name: string, call: ReturnType<typeof vi.fn>) {
+ fireEvent.click(await screen.findByRole("button", { name: "More notification actions" }));
+ fireEvent.click(await screen.findByRole("menuitem", { name }));
+ await waitFor(() => expect(call).toHaveBeenCalledWith(ISSUE_ID, "me", "member"));
+ }
+
+ it("confirms the unsubscribe after moving on to the next notification", async () => {
+ const req = pending();
+ const { unmount } = render({ unsubscribeFromIssue: req.call });
+ await pick("Unsubscribe from this issue", req.call);
+ unmount();
+ await req.resolve();
+ expect(toast.success).toHaveBeenCalledWith("Unsubscribed", expect.any(Object));
+ });
+
+ it("still reports a failed unsubscribe after moving on", async () => {
+ const req = pending();
+ const { unmount } = render({ unsubscribeFromIssue: req.call });
+ await pick("Unsubscribe from this issue", req.call);
+ unmount();
+ await req.reject(new Error("nope"));
+ expect(toast.error).toHaveBeenCalledOnce();
+ expect(toast.success).not.toHaveBeenCalled();
+ });
+
+ it("reports the sub-issue unsubscribe either way after moving on", async () => {
+ const ok = pending();
+ const first = render({ unsubscribeFromIssueSubtree: ok.call }, [{ id: "c1" }]);
+ await pick("Unsubscribe from this issue and its sub-issues", ok.call);
+ first.unmount();
+ await ok.resolve();
+ expect(toast.success).toHaveBeenCalledOnce();
+
+ const fail = pending();
+ const second = render({ unsubscribeFromIssueSubtree: fail.call }, [{ id: "c1" }]);
+ await pick("Unsubscribe from this issue and its sub-issues", fail.call);
+ second.unmount();
+ await fail.reject(new Error("nope"));
+ expect(toast.error).toHaveBeenCalledOnce();
+ });
+});
diff --git a/packages/views/inbox/components/inbox-more-menu.tsx b/packages/views/inbox/components/inbox-more-menu.tsx
index 7820654a16..14f6b65e20 100644
--- a/packages/views/inbox/components/inbox-more-menu.tsx
+++ b/packages/views/inbox/components/inbox-more-menu.tsx
@@ -2,6 +2,7 @@
import { useState } from "react";
import { useQuery } from "@tanstack/react-query";
+import { toast } from "sonner";
import { BellOff, Check, CircleDot, ListTree, MoreHorizontal } from "@multica/ui/icons";
import { IconButton } from "@multica/ui/components/common/icon-button";
import {
@@ -14,8 +15,10 @@ import {
DropdownMenuShortcut,
DropdownMenuTrigger,
} from "@multica/ui/components/ui/dropdown-menu";
+import { useAuthStore } from "@multica/core/auth";
import { useWorkspaceId } from "@multica/core/hooks";
import type { InboxUnsubscribeScope } from "@multica/core/inbox/mutations";
+import { useToggleIssueSubscriber, useUnsubscribeFromIssueSubtree } from "@multica/core/issues/mutations";
import { childIssuesOptions, issueDetailOptions, issueSubscribersOptions } from "@multica/core/issues/queries";
import { isOwnIssue } from "@multica/core/issues/ownership";
import { agentListOptions } from "@multica/core/workspace/queries";
@@ -53,22 +56,9 @@ export function InboxMoreMenu({
onUnsubscribe: (scope: InboxUnsubscribeScope) => void;
}) {
const { t } = useT("inbox");
- const wsId = useWorkspaceId();
- const { data: issue } = useQuery(issueDetailOptions(wsId, issueId));
- const { data: agents, isSuccess: agentsKnown } = useQuery(agentListOptions(wsId));
- const { data: subscribers, isSuccess: subscribersKnown } = useQuery(issueSubscribersOptions(issueId));
- const { data: children = [], isSuccess: childrenLoaded, isFetching: childrenFetching } = useQuery({
- ...childIssuesOptions(wsId, issueId),
- enabled: !!issue,
- });
+ const { offered, asksScope, childCountKnown, childCount } = useUnsubscribeOffer(issueId, userId);
const [open, setOpen] = useState(false);
- const subscribed = !!subscribers?.some((s) => s.user_type === "member" && s.user_id === userId);
- const offered =
- !!issue && agentsKnown && subscribersKnown && subscribed && !isOwnIssue(issue, userId, agents ?? []);
- const childCountKnown = childrenLoaded && !childrenFetching;
- const asksScope = !childCountKnown || children.length > 0;
-
useInboxShortcut(
"unsubscribeArchiveInboxItem",
offered ? (asksScope ? () => setOpen(true) : () => onUnsubscribe("issue")) : null,
@@ -83,7 +73,7 @@ export function InboxMoreMenu({
>
<MoreHorizontal />
</DropdownMenuTrigger>
- <DropdownMenuContent side="top" align="start" className="w-auto min-w-56 max-w-80">
+ <DropdownMenuContent side="top" align="end" className="w-auto min-w-56 max-w-80">
{/* onClick, not onSelect: Base UI's Menu.Item has no onSelect. */}
<DropdownMenuItem onClick={onToggleRead}>
{read ? <CircleDot /> : <Check />}
@@ -113,7 +103,7 @@ export function InboxMoreMenu({
<DropdownMenuItem onClick={() => onUnsubscribe("subtree")}>
<ListTree />
{childCountKnown
- ? t(($) => $.unsubscribe.subtree, { count: children.length })
+ ? t(($) => $.unsubscribe.subtree, { count: childCount })
: t(($) => $.unsubscribe.subtree_unknown)}
</DropdownMenuItem>
</DropdownMenuGroup>
@@ -123,3 +113,77 @@ export function InboxMoreMenu({
</DropdownMenu>
);
}
+
+/**
+ * `…` once the open notification has settled (archived, snoozed) and stays on
+ * screen: following its issue is all that is left to change there, so it
+ * offers only the way out. Unlike "Unsubscribe & archive" it leaves the
+ * notification as it is. Renders nothing where unsubscribing is not offered.
+ */
+export function InboxSettledMoreMenu({ issueId }: { issueId: string }) {
+ const { t } = useT("inbox");
+ const { t: tIssues } = useT("issues");
+ const userId = useAuthStore((s) => s.user?.id);
+ const { offered, asksScope } = useUnsubscribeOffer(issueId, userId);
+ const leave = useToggleIssueSubscriber(issueId);
+ const leaveSubtree = useUnsubscribeFromIssueSubtree(issueId);
+ if (!offered || !userId) return null;
+
+ // On the request's promise: moving on to the next notification unmounts the
+ // menu before the request settles, and React Query skips per-call callbacks then.
+ const unsubscribe = () =>
+ void leave.mutateAsync({ userId, userType: "member", subscribed: true }).then(
+ () => toast.success(t(($) => $.kept.unsubscribed), { description: t(($) => $.toasts.unsubscribed_hint) }),
+ () => toast.error(tIssues(($) => $.detail.subscription_update_failed)),
+ );
+ const unsubscribeSubtree = () =>
+ void leaveSubtree.mutateAsync({ userId, userType: "member" }).then(
+ () => toast.success(tIssues(($) => $.detail.unsubscribe_subtree_succeeded)),
+ () => toast.error(tIssues(($) => $.detail.unsubscribe_subtree_failed)),
+ );
+
+ return (
+ <DropdownMenu>
+ <DropdownMenuTrigger
+ render={
+ <IconButton label={t(($) => $.detail.more_actions)} tooltipSide="top" className="text-muted-foreground" />
+ }
+ >
+ <MoreHorizontal />
+ </DropdownMenuTrigger>
+ <DropdownMenuContent side="top" align="end" className="w-auto min-w-56 max-w-80">
+ <DropdownMenuItem disabled={leave.isPending} onClick={unsubscribe}>
+ <BellOff />
+ {tIssues(($) => $.detail.unsubscribe_this)}
+ </DropdownMenuItem>
+ {asksScope && (
+ <DropdownMenuItem disabled={leaveSubtree.isPending} onClick={unsubscribeSubtree}>
+ <ListTree />
+ {tIssues(($) => $.detail.unsubscribe_subtree)}
+ </DropdownMenuItem>
+ )}
+ </DropdownMenuContent>
+ </DropdownMenu>
+ );
+}
+
+/**
+ * Whether the viewer may leave the issue from the Inbox: they follow it, and
+ * it is not theirs or their agent's. Unknown until every query behind that
+ * has answered, so the offer never flashes where it does not belong.
+ */
+function useUnsubscribeOffer(issueId: string, userId: string | undefined) {
+ const wsId = useWorkspaceId();
+ const { data: issue } = useQuery(issueDetailOptions(wsId, issueId));
+ const { data: agents, isSuccess: agentsKnown } = useQuery(agentListOptions(wsId));
+ const { data: subscribers, isSuccess: subscribersKnown } = useQuery(issueSubscribersOptions(issueId));
+ const { data: children = [], isSuccess: childrenLoaded, isFetching: childrenFetching } = useQuery({
+ ...childIssuesOptions(wsId, issueId),
+ enabled: !!issue,
+ });
+ const subscribed = !!subscribers?.some((s) => s.user_type === "member" && s.user_id === userId);
+ const offered =
+ !!issue && agentsKnown && subscribersKnown && subscribed && !isOwnIssue(issue, userId, agents ?? []);
+ const childCountKnown = childrenLoaded && !childrenFetching;
+ return { offered, childCountKnown, childCount: children.length, asksScope: !childCountKnown || children.length > 0 };
+}
diff --git a/packages/views/inbox/components/inbox-page.tsx b/packages/views/inbox/components/inbox-page.tsx
index 197b425ba3..30b0180f1c 100644
--- a/packages/views/inbox/components/inbox-page.tsx
+++ b/packages/views/inbox/components/inbox-page.tsx
@@ -117,6 +117,7 @@ import { AutopilotQuotaNotice } from "./autopilot-quota-notice";
import { AppCallQuotaNotice } from "./app-call-quota-notice";
import { InboxEmptyState } from "./inbox-empty-state";
import { InboxKeptActions, useKeptInboxRowText } from "./inbox-kept-actions";
+import { InboxSettledMoreMenu } from "./inbox-more-menu";
import { inboxListLoad, useFilteredInboxRows } from "./use-filtered-inbox-rows";
import { useKeptOpenInboxRow } from "./use-kept-open-inbox-row";
import { useAutoArchiveCause } from "./use-auto-archive-cause";
@@ -1088,6 +1089,7 @@ export function InboxPage() {
<InboxKeptActions
label={keptStatus.label}
hint={keptStatus.hint}
+ undoLabel={keptStatus.undo}
onUndo={() => void restoreInbox(settledNotice.item.id, { quiet: true })}
next={nextInboxRow(listedItems, settledNotice.key)}
onNext={() => advanceSelectionPast(settledNotice.item.id, listedItems)}
@@ -1102,7 +1104,10 @@ export function InboxPage() {
item: tab === "inbox" ? (detailItem ?? undefined) : undefined,
bar: (issueActions) =>
isArchivedView && detailItem ? (
- <InboxArchivedBar onRestore={() => handleUnarchive(detailItem.id)} />
+ <InboxArchivedBar
+ onRestore={() => handleUnarchive(detailItem.id)}
+ more={<InboxSettledMoreMenu issueId={issueId} />}
+ />
) : (
<IssueInboxBar issueId={issueId} issueActions={issueActions} movingOn={detailSwapping} isSnoozedView={isSnoozedView} />
),
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 9f02677767..466737a9eb 100644
--- a/packages/views/issues/actions/__tests__/issue-inbox-actions.test.tsx
+++ b/packages/views/issues/actions/__tests__/issue-inbox-actions.test.tsx
@@ -31,6 +31,9 @@ const state = vi.hoisted(() => ({
vi.mock("sonner", () => ({ toast: { success: vi.fn(), error: vi.fn(), dismiss: vi.fn() } }));
vi.mock("@multica/core/hooks", () => ({ useWorkspaceId: () => "ws" }));
vi.mock("@multica/core/permissions", () => ({ useIsGuest: () => false }));
+vi.mock("@multica/core/auth", () => ({
+ useAuthStore: (selector: (state: { user: { id: string } }) => unknown) => selector({ user: { id: "member-1" } }),
+}));
vi.mock("@multica/core/paths", async (importOriginal) => {
const actual = await importOriginal<typeof import("@multica/core/paths")>();
return { ...actual, useWorkspacePaths: () => actual.paths.workspace("acme") };
@@ -186,7 +189,7 @@ describe("IssueInboxBar", () => {
// Still reading the issue (now still in Inbox), a later side-effect archive keeps it.
act(() => nav.qc.setQueryData(inboxListOptions("ws").queryKey, []));
expect(await screen.findByText("Archived")).toBeInTheDocument();
- expect(screen.getByRole("button", { name: "Undo" })).toBeInTheDocument();
+ expect(screen.getByRole("button", { name: "Undo archive" })).toBeInTheDocument();
});
it("keeps the last row on a later side-effect archive after undoing snooze", async () => {
@@ -205,7 +208,7 @@ describe("IssueInboxBar", () => {
act(() => nav.qc.setQueryData(inboxListOptions("ws").queryKey, []));
expect(await screen.findByText("Archived")).toBeInTheDocument();
- expect(screen.getByRole("button", { name: "Undo" })).toBeInTheDocument();
+ expect(screen.getByRole("button", { name: "Undo archive" })).toBeInTheDocument();
});
it("stays on the open issue until the next notification's issue arrives", async () => {
@@ -239,10 +242,10 @@ describe("IssueInboxBar", () => {
expect(archive).toHaveAttribute("data-variant", "default");
expect(within(archive).getByText("E")).toBeInTheDocument();
expect(within(screen.getByRole("button", { name: "Snooze" })).getByText("H")).toBeInTheDocument();
- // Its last button is Archive; the rarer actions wait behind More, first.
+ // Archive ends the named actions; the rarer ones wait behind More, last.
const buttons = within(bar).getAllByRole("button");
- expect(buttons.at(-1)).toBe(archive);
- expect(buttons.at(-3)).toHaveAccessibleName("More notification actions");
+ expect(buttons.at(-2)).toBe(archive);
+ expect(buttons.at(-1)).toHaveAccessibleName("More notification actions");
});
it("moves on with Next as the settled group's one filled action", async () => {
@@ -250,7 +253,7 @@ describe("IssueInboxBar", () => {
act(() => nav.qc.setQueryData(inboxListOptions("ws").queryKey, [ROWS[1]!]));
const next = await screen.findByRole("button", { name: "Next" });
expect(next).toHaveAttribute("data-variant", "default");
- const undo = screen.getByRole("button", { name: "Undo" });
+ const undo = screen.getByRole("button", { name: "Undo archive" });
expect(undo).toHaveAttribute("data-variant", "ghost");
expect(within(next).getByText("E")).toBeInTheDocument();
expect(within(undo).getByText("Z")).toBeInTheDocument();
@@ -261,7 +264,7 @@ describe("IssueInboxBar", () => {
act(() => nav.qc.setQueryData(inboxListOptions("ws").queryKey, [ROWS[1]!]));
expect(await screen.findByText("Archived")).toBeInTheDocument();
const issueAction = screen.getByRole("button", { name: "Set status" });
- const undo = screen.getByRole("button", { name: "Undo" });
+ const undo = screen.getByRole("button", { name: "Undo archive" });
expect(issueAction.compareDocumentPosition(undo) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
});
@@ -280,7 +283,7 @@ describe("IssueInboxBar", () => {
expect(screen.getByRole("button", { name: "Set status" })).toBeInTheDocument();
expect(nav.push).not.toHaveBeenCalled();
- await act(async () => fireEvent.click(screen.getByRole("button", { name: "Undo" })));
+ await act(async () => fireEvent.click(screen.getByRole("button", { name: "Undo archive" })));
expect(state.unarchiveInbox).toHaveBeenCalledWith("n-1");
});
@@ -378,7 +381,7 @@ describe("IssueInboxBar", () => {
expect(screen.queryByRole("button", { name: "Archive" })).toBeNull();
expect(nav.push).not.toHaveBeenCalled();
- await act(async () => fireEvent.click(screen.getByRole("button", { name: "Undo" })));
+ await act(async () => fireEvent.click(screen.getByRole("button", { name: "Undo archive" })));
expect(state.unarchiveInbox).toHaveBeenCalledWith("n-1");
expect(toast.success).not.toHaveBeenCalled();
});
@@ -501,7 +504,7 @@ describe("IssueInboxBar", () => {
expect(bar).toHaveTextContent("Archived");
expect(bar).not.toHaveTextContent("Inbox cleared");
expect(bar).not.toHaveTextContent("snoozed");
- expect(within(bar).getAllByRole("button").map((button) => button.getAttribute("aria-label"))).toEqual(["Undo"]);
+ expect(within(bar).getAllByRole("button").map((button) => button.getAttribute("aria-label"))).toEqual(["Undo archive"]);
fireEvent.keyDown(document, { key: "e", code: "KeyE" });
expect(nav.push).toHaveBeenCalledWith("/acme/inbox");
@@ -577,6 +580,63 @@ describe("IssueInboxBar", () => {
await screen.findByRole("menuitem", { name: /^Mark as unread/ });
expect(screen.queryByRole("menuitem", { name: /Unsubscribe/ })).toBeNull();
});
+
+ it("names what its undo takes back, and says why in its tooltip rather than between the buttons", async () => {
+ const nav = setup();
+ noteInboxBarAction("issue-1", { type: "status", status: "in_review" });
+ noteInboxAutoArchive({ issue_id: "issue-1", reason: "actor_acted" });
+ act(() => nav.qc.setQueryData(inboxListOptions("ws").queryKey, [ROWS[1]!]));
+
+ const undo = await screen.findByRole("button", { name: "Undo archive" });
+ const bar = document.querySelector<HTMLElement>("[data-inbox-bar]")!;
+ const visible = [...bar.querySelectorAll("span")].filter((el) => !el.className.includes("sr-only"));
+ expect(visible.some((el) => el.textContent === "Archived")).toBe(false);
+
+ await act(async () => {
+ fireEvent.pointerEnter(undo, { pointerType: "mouse" });
+ fireEvent.mouseEnter(undo);
+ fireEvent.mouseMove(undo);
+ });
+ await waitFor(() =>
+ expect(document.querySelector("[data-slot=tooltip-content]")).toHaveTextContent(
+ "Undo archiveChanged to In Review · Returns to Inbox on new activity",
+ ),
+ );
+ });
+
+ it("ends a settled group with More, which only unsubscribes, leaving the notification as it is", async () => {
+ const nav = setup({ theirs: true });
+ act(() => nav.qc.setQueryData(inboxListOptions("ws").queryKey, [ROWS[1]!]));
+ await screen.findByRole("button", { name: "Undo archive" });
+
+ const bar = document.querySelector<HTMLElement>("[data-inbox-bar]")!;
+ const more = within(bar).getAllByRole("button").at(-1)!;
+ expect(more).toHaveAccessibleName("More notification actions");
+ fireEvent.click(more);
+ expect(await screen.findByRole("menuitem", { name: "Unsubscribe from this issue" })).toBeInTheDocument();
+ expect(screen.queryByRole("menuitem", { name: /Mark as/ })).toBeNull();
+ expect(screen.queryByRole("menuitem", { name: /archive/i })).toBeNull();
+ });
+
+ it("leaves More out of a settled group with nothing behind it", async () => {
+ const nav = setup();
+ act(() => nav.qc.setQueryData(inboxListOptions("ws").queryKey, [ROWS[1]!]));
+ await screen.findByRole("button", { name: "Undo archive" });
+ expect(screen.queryByRole("button", { name: "More notification actions" })).toBeNull();
+ });
+
+ it("opens the way to bring a snoozed issue back or change its time from when it comes back", async () => {
+ const until = new Date(Date.now() + 60 * 60 * 1000).toISOString();
+ setup({
+ rows: [ROWS[1]!],
+ snoozed: [{ issue_id: "issue-1", item_id: "n-1", snoozed_until: until, snoozed_at: SNOOZED_AT, updates: 0 }],
+ });
+ expect(screen.queryByRole("button", { name: "Change time" })).toBeNull();
+ fireEvent.click(screen.getByRole("button", { name: /^Back / }));
+ expect(await screen.findByText("Change time")).toBeInTheDocument();
+ fireEvent.click(screen.getByRole("menuitem", { name: /^Bring back now/ }));
+ expect(state.unsnooze).toHaveBeenCalledWith({ id: "n-1" });
+ });
});
describe("IssueInboxBar once an action is undone", () => {
@@ -642,7 +702,7 @@ describe("IssueInboxBar once an action is undone", () => {
expect(statusBar).toHaveTextContent("Archived");
expect(statusBar).toHaveTextContent("Agent triggered · Returns to Inbox on new activity");
expect(statusBar).not.toHaveTextContent("Emacs is working");
- expect(screen.getByRole("button", { name: "Undo" })).toBeInTheDocument();
+ expect(screen.getByRole("button", { name: "Undo archive" })).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Next" })).toBeInTheDocument();
expect(nav.push).not.toHaveBeenCalled();
diff --git a/packages/views/issues/actions/issue-inbox-actions.tsx b/packages/views/issues/actions/issue-inbox-actions.tsx
index 41bb8cbb63..68e3f457c1 100644
--- a/packages/views/issues/actions/issue-inbox-actions.tsx
+++ b/packages/views/issues/actions/issue-inbox-actions.tsx
@@ -2,7 +2,7 @@
import { useRef, type ReactNode, useState } from "react";
import { useQuery } from "@tanstack/react-query";
-import { AlarmClock, Archive, CalendarClock } from "@multica/ui/icons";
+import { AlarmClock, Archive } from "@multica/ui/icons";
import { toast } from "sonner";
import { useWorkspaceId } from "@multica/core/hooks";
import {
@@ -21,7 +21,7 @@ import { useWorkspacePaths } from "@multica/core/paths";
import { InboxArchiveButton, InboxBar, InboxBarButton, InboxBarStatus, InboxOpenBar } from "../../inbox/components/inbox-bar";
import { inboxRowHref } from "../../inbox/components/inbox-display";
import { InboxKeptActions, InboxNextButton, useKeptInboxRowText } from "../../inbox/components/inbox-kept-actions";
-import { InboxMoreMenu } from "../../inbox/components/inbox-more-menu";
+import { InboxMoreMenu, InboxSettledMoreMenu } from "../../inbox/components/inbox-more-menu";
import { InboxSnoozeMenu } from "../../inbox/components/inbox-snooze-menu";
import { formatSnoozeTime } from "../../inbox/components/inbox-snooze-time";
import { useInboxShortcut } from "../../inbox/components/use-inbox-shortcut";
@@ -46,11 +46,11 @@ import { useLocale, useT } from "../../i18n";
*
* Once the notification leaves the Inbox on its own (the issue reached Done,
* another window archived it, an action from this group archived it), the
- * section keeps the row in place and the group says so instead, with the
+ * section keeps the row in place and the group changes to match, with the
* issue's actions still there, an undo and the way on to the next one.
*
- * A snoozed issue's group says when it comes back instead, with the way to
- * bring it back now or change the time.
+ * A snoozed issue's group shows when it comes back instead, with the way to
+ * bring it back now or change the time. In every state `…` comes last.
*
* `movingOn`: the page is still handing off to another notification, so a
* group this issue showed stays up rather than blinking out and back in.
@@ -175,6 +175,7 @@ export function IssueInboxBar({
if (snoozed) {
return (
<SnoozedBar
+ issueId={issueId}
until={new Date(snoozed.snoozed_until)}
open={snoozeOpen}
onOpenChange={setSnoozeOpen}
@@ -201,10 +202,12 @@ export function IssueInboxBar({
<InboxKeptActions
label={status.label}
hint={status.hint}
+ undoLabel={status.undo}
issueActions={settled.reason === "archived" ? issueActions : undefined}
onUndo={() => restore(settled.item.id, { quiet: true })}
next={next}
onNext={moveOn}
+ more={<InboxSettledMoreMenu issueId={issueId} />}
/>
);
}
@@ -239,13 +242,6 @@ export function IssueInboxBar({
return (
<InboxOpenBar issueActions={issueActions}>
- <InboxMoreMenu
- issueId={issueId}
- userId={item.recipient_id}
- read={item.read === true}
- onToggleRead={toggleReadItem}
- onUnsubscribe={unsubscribeItem}
- />
<InboxSnoozeMenu
open={snoozeOpen}
onOpenChange={setSnoozeOpen}
@@ -254,12 +250,23 @@ export function IssueInboxBar({
trigger={<InboxBarButton icon={<AlarmClock />} label={t(($) => $.snooze.action)} shortcut="snoozeInboxItem" />}
/>
<InboxArchiveButton onClick={archiveItem} />
+ <InboxMoreMenu
+ issueId={issueId}
+ userId={item.recipient_id}
+ read={item.read === true}
+ onToggleRead={toggleReadItem}
+ onUnsubscribe={unsubscribeItem}
+ />
</InboxOpenBar>
);
}
-/** When a snoozed issue comes back, with the way to bring it back now or later. */
+/**
+ * A snoozed issue's group: when it comes back, which opens the way to bring it
+ * back now or change the time, then the way on and `…`.
+ */
function SnoozedBar({
+ issueId,
until,
open,
onOpenChange,
@@ -268,6 +275,7 @@ function SnoozedBar({
next,
onNext,
}: {
+ issueId: string;
until: Date;
open: boolean;
onOpenChange: (open: boolean) => void;
@@ -282,7 +290,6 @@ function SnoozedBar({
const label = t(($) => $.snooze.back_at, { time: formatSnoozeTime(until, new Date(), locale) });
return (
<InboxBar settled>
- <InboxBarStatus icon={<AlarmClock />} label={label} />
<InboxSnoozeMenu
open={open}
onOpenChange={onOpenChange}
@@ -290,9 +297,10 @@ function SnoozedBar({
onSnooze={onSnooze}
onUnsnooze={onUnsnooze}
side="top"
- trigger={<InboxBarButton icon={<CalendarClock />} label={t(($) => $.snooze.change_time)} />}
+ trigger={<InboxBarButton icon={<AlarmClock />} label={label} />}
/>
{next && <InboxNextButton next={next} onNext={onNext} />}
+ <InboxSettledMoreMenu issueId={issueId} />
</InboxBar>
);
}
diff --git a/packages/views/locales/en/inbox.json b/packages/views/locales/en/inbox.json
index b30eec6030..e34f9a9a7d 100644
--- a/packages/views/locales/en/inbox.json
+++ b/packages/views/locales/en/inbox.json
@@ -153,6 +153,8 @@
},
"kept": {
"archived": "Archived",
+ "undo_archive": "Undo archive",
+ "unsubscribed": "Unsubscribed",
"leaves": "Leaves the Inbox when you move on",
"filtered": "No longer matches your filters",
"changed_status": "Changed to {{status}}",
diff --git a/packages/views/locales/es/inbox.json b/packages/views/locales/es/inbox.json
index a2935367f6..eb63f57a92 100644
--- a/packages/views/locales/es/inbox.json
+++ b/packages/views/locales/es/inbox.json
@@ -153,6 +153,8 @@
},
"kept": {
"archived": "Archivado",
+ "undo_archive": "Deshacer archivado",
+ "unsubscribed": "Te diste de baja",
"leaves": "Sale de la bandeja al continuar",
"filtered": "Ya no coincide con tus filtros",
"changed_status": "Estado cambiado a {{status}}",
diff --git a/packages/views/locales/fr/inbox.json b/packages/views/locales/fr/inbox.json
index 1c4821f7b6..d4d87aff06 100644
--- a/packages/views/locales/fr/inbox.json
+++ b/packages/views/locales/fr/inbox.json
@@ -153,6 +153,8 @@
},
"kept": {
"archived": "Archivée",
+ "undo_archive": "Annuler l'archivage",
+ "unsubscribed": "Désabonnement effectué",
"leaves": "Quitte la boîte de réception quand vous passez à la suite",
"filtered": "Ne correspond plus à vos filtres",
"changed_status": "Statut passé à {{status}}",
diff --git a/packages/views/locales/ja/inbox.json b/packages/views/locales/ja/inbox.json
index 9e8049ed31..fd266eba93 100644
--- a/packages/views/locales/ja/inbox.json
+++ b/packages/views/locales/ja/inbox.json
@@ -150,6 +150,8 @@
},
"kept": {
"archived": "アーカイブ済み",
+ "undo_archive": "アーカイブを取り消す",
+ "unsubscribed": "購読を解除しました",
"leaves": "移動するとインボックスから外れます",
"filtered": "フィルターに一致しなくなりました",
"changed_status": "{{status}} に変更",
diff --git a/packages/views/locales/ko/inbox.json b/packages/views/locales/ko/inbox.json
index bd01dd9f5f..ae2ee81914 100644
--- a/packages/views/locales/ko/inbox.json
+++ b/packages/views/locales/ko/inbox.json
@@ -150,6 +150,8 @@
},
"kept": {
"archived": "보관됨",
+ "undo_archive": "보관 취소",
+ "unsubscribed": "구독 해제됨",
"leaves": "다른 곳으로 이동하면 인박스에서 빠집니다",
"filtered": "더 이상 필터와 일치하지 않음",
"changed_status": "상태 변경됨: {{status}}",
diff --git a/packages/views/locales/ru/inbox.json b/packages/views/locales/ru/inbox.json
index 8a0dd7d7de..27d9241f70 100644
--- a/packages/views/locales/ru/inbox.json
+++ b/packages/views/locales/ru/inbox.json
@@ -159,6 +159,8 @@
},
"kept": {
"archived": "В архиве",
+ "undo_archive": "Отменить архивацию",
+ "unsubscribed": "Вы отписались",
"leaves": "Уйдёт из входящих, когда вы перейдёте дальше",
"filtered": "Больше не подходит под фильтры",
"changed_status": "Статус изменён на {{status}}",
diff --git a/packages/views/locales/zh-Hans/inbox.json b/packages/views/locales/zh-Hans/inbox.json
index 504a720e47..fd2ab1b664 100644
--- a/packages/views/locales/zh-Hans/inbox.json
+++ b/packages/views/locales/zh-Hans/inbox.json
@@ -150,6 +150,8 @@
},
"kept": {
"archived": "已归档",
+ "undo_archive": "撤销归档",
+ "unsubscribed": "已取消订阅",
"leaves": "离开后移出收件箱",
"filtered": "不再符合筛选",
"changed_status": "已改为{{status}}",
diff --git a/packages/views/locales/zh-Hant/inbox.json b/packages/views/locales/zh-Hant/inbox.json
index aefad1386e..e322c3b6e9 100644
--- a/packages/views/locales/zh-Hant/inbox.json
+++ b/packages/views/locales/zh-Hant/inbox.json
@@ -150,6 +150,8 @@
},
"kept": {
"archived": "已歸檔",
+ "undo_archive": "復原歸檔",
+ "unsubscribed": "已取消訂閱",
"leaves": "離開後移出收件箱",
"filtered": "不再符合篩選",
"changed_status": "已改為{{status}}",