Skip to content

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

Go

feat(issues): slim the issue sidebar to sections with content (MUL-9997) (#11352)

Jiayuan Zhang215dd89a6f76
diff --git a/apps/docs/content/docs/analytics.fr.mdx b/apps/docs/content/docs/analytics.fr.mdx
index 50a627c5fa..70cdd3b75d 100644
--- a/apps/docs/content/docs/analytics.fr.mdx
+++ b/apps/docs/content/docs/analytics.fr.mdx
@@ -103,7 +103,7 @@ Les tarifs personnalisés ne s'appliquent qu'aux modèles absents de la table :
## Coût d'une tâche
-Le **Journal d'exécution** de la barre latérale de chaque tâche affiche son **Dépensé**, ses **Tokens** et son **Travail d'agent**, ainsi qu'une barre de coût par exécution. Cliquez sur le total, sur une barre de coût ou sur **Ouvrir la chronologie** pour ouvrir la boîte de dialogue **Exécutions** :
+Le **Journal d'exécution** de la barre latérale de chaque tâche affiche dans son en-tête ce que la tâche a dépensé. Cliquez sur **Ouvrir la chronologie** pour ouvrir la boîte de dialogue **Exécutions** :
- Le résumé du haut montre **Dépensé**, **Tokens** (et la part venue du cache), **Sortie**, **Travail d'agent** et **Exécutions**. Le travail d'agent est la somme des durées des exécutions ; la durée affichée à côté va du début de la première exécution à la fin de la dernière. À côté du nombre d'exécutions figurent celles en échec, annulées et en cours.
- La vue **Par exécution** du graphique trace une barre par exécution pour le coût, les tokens ou le travail d'agent ; la vue **Cumul** trace le coût cumulé au fil du temps.
diff --git a/apps/docs/content/docs/analytics.ja.mdx b/apps/docs/content/docs/analytics.ja.mdx
index 6a2709a43c..cc6dac483b 100644
--- a/apps/docs/content/docs/analytics.ja.mdx
+++ b/apps/docs/content/docs/analytics.ja.mdx
@@ -103,7 +103,7 @@ import { UsageDemo } from "@/components/demos/usage-demo";
## タスクのコスト
-各タスクのサイドバーにある**実行ログ**には、そのタスクの**費用**、**トークン**、**エージェント作業**の時間と、実行ごとに 1 本ずつのコストバーが出ます。合計、コストバー、または**タイムラインを開く**をクリックすると**実行履歴**ダイアログが開きます。
+各タスクのサイドバーにある**実行ログ**の見出しには、そのタスクの費用が出ます。**タイムラインを開く**をクリックすると**実行履歴**ダイアログが開きます。
- 上部に**費用**、**トークン**(そのうちキャッシュの割合)、**出力**、**エージェント作業**、**実行回数**がまとまっています。エージェント作業は各実行の所要時間の合計で、横の「経過」は最初の実行の開始から最後の実行の終了までの時間です。実行回数の横には失敗、キャンセル、進行中の数が並びます。
- グラフは**実行ごと**にすると実行 1 回につき 1 本の棒で費用・トークン・エージェント作業を表示し、**累計**にすると累計費用が時間とともに増える線を表示します。
diff --git a/apps/docs/content/docs/analytics.ko.mdx b/apps/docs/content/docs/analytics.ko.mdx
index 7bd2a098a7..91d162da9f 100644
--- a/apps/docs/content/docs/analytics.ko.mdx
+++ b/apps/docs/content/docs/analytics.ko.mdx
@@ -103,7 +103,7 @@ import { UsageDemo } from "@/components/demos/usage-demo";
## 태스크 비용
-태스크마다 사이드바의 **실행 로그**에 그 태스크의 **비용**, **토큰**, **에이전트 작업** 시간과 실행마다 하나씩의 비용 막대가 표시됩니다. 합계나 비용 막대, 또는 **타임라인 열기**를 클릭하면 **실행 기록** 대화상자가 열립니다.
+태스크마다 사이드바 **실행 로그**의 머리글에 그 태스크의 비용이 표시됩니다. **타임라인 열기**를 클릭하면 **실행 기록** 대화상자가 열립니다.
- 맨 위에 **비용**, **토큰**(그중 캐시 비율), **출력**, **에이전트 작업**, **실행**이 요약됩니다. 에이전트 작업은 각 실행 시간의 합이고, 옆의 "경과"는 첫 실행이 시작된 때부터 마지막 실행이 끝난 때까지의 시간입니다. 실행 옆에는 실패, 취소, 진행 중인 횟수가 나옵니다.
- 차트를 **실행별**로 두면 실행마다 막대 하나로 비용, 토큰, 에이전트 작업을 보여 주고, **누적**으로 두면 누적 비용이 시간에 따라 늘어나는 선을 그립니다.
diff --git a/apps/docs/content/docs/analytics.mdx b/apps/docs/content/docs/analytics.mdx
index af0af22fb7..d60b1bc46d 100644
--- a/apps/docs/content/docs/analytics.mdx
+++ b/apps/docs/content/docs/analytics.mdx
@@ -103,7 +103,7 @@ Custom prices apply only to models missing from the price table; they cannot ove
## Issue cost
-The **Execution log** in each issue's sidebar shows the issue's **Spent**, **Tokens**, and **Agent time**, plus one cost bar per run. Click the total, a cost bar, or **Open timeline** to open the **Runs** dialog:
+The **Execution log** in each issue's sidebar shows what the issue has spent in its header. Click **Open timeline** to open the **Runs** dialog:
- The summary at the top shows **Spent**, **Tokens** (and how much came from cache), **Output**, **Agent time**, and **Runs**. Agent time is the sum of the runs' durations; the "elapsed" figure next to it is the time from the first run's start to the last run's end. Next to Runs are the failed, cancelled, and active counts.
- The chart's **Per run** view draws a bar per run for cost, tokens, or agent time; **Cumulative** draws cumulative cost growing over time.
diff --git a/apps/docs/content/docs/analytics.zh-Hant.mdx b/apps/docs/content/docs/analytics.zh-Hant.mdx
index 4416328f51..0310ba5335 100644
--- a/apps/docs/content/docs/analytics.zh-Hant.mdx
+++ b/apps/docs/content/docs/analytics.zh-Hant.mdx
@@ -103,7 +103,7 @@ token 由 AI 程式設計工具上報。工具沒有上報時,這次執行仍
## 任務的花費
-每條任務右側的**執行日誌**會顯示這條任務的**已花費**、**Token** 和**AI 代理工作**時長,以及每次執行一根的費用條。點合計、費用條或**開啟時間線**,開啟**執行記錄**對話方塊:
+每條任務右側的**執行日誌**在標題列顯示這條任務的花費。點**開啟時間線**,開啟**執行記錄**對話方塊:
- 頂部彙總**已花費**、**Token**(其中多少來自快取)、**輸出**、**AI 代理工作**和**執行次數**。AI 代理工作是各次執行時長之和,旁邊的"歷時"是從第一次執行開始到最後一次結束經過的時間;執行次數旁邊列出失敗、取消和進行中的次數。
- 圖表切**按次**時每次執行一根柱,可以看費用、Token 或 AI 代理工作;切**累計**時顯示累計費用隨時間增長的曲線。
diff --git a/apps/docs/content/docs/analytics.zh.mdx b/apps/docs/content/docs/analytics.zh.mdx
index b77899a337..27c8c75008 100644
--- a/apps/docs/content/docs/analytics.zh.mdx
+++ b/apps/docs/content/docs/analytics.zh.mdx
@@ -103,7 +103,7 @@ token 由 AI 编程工具上报。工具没有上报时,这次运行仍计入
## 任务的花费
-每条任务右侧的**执行日志**会显示这条任务的**已花费**、**Token** 和**智能体工作**时长,以及每次运行一根的费用条。点合计、费用条或**打开时间线**,打开**运行记录**对话框:
+每条任务右侧的**执行日志**在标题栏显示这条任务的花费。点**打开时间线**,打开**运行记录**对话框:
- 顶部汇总**已花费**、**Token**(其中多少来自缓存)、**输出**、**智能体工作**和**运行次数**。智能体工作是各次运行时长之和,旁边的"历时"是从第一次运行开始到最后一次结束经过的时间;运行次数旁边列出失败、取消和进行中的次数。
- 图表切**按次**时每次运行一根柱,可以看费用、Token 或智能体工作;切**累计**时显示累计费用随时间增长的曲线。
diff --git a/apps/docs/content/docs/environments.fr.mdx b/apps/docs/content/docs/environments.fr.mdx
index 82bef85680..9eb29d6aeb 100644
--- a/apps/docs/content/docs/environments.fr.mdx
+++ b/apps/docs/content/docs/environments.fr.mdx
@@ -195,9 +195,9 @@ Les environnements appartiennent à la tâche, pas à une exécution : une exéc
## Gérer les environnements dans la barre latérale [#sidebar]
-Chaque environnement affiche son état, quand il a démarré ou s'est terminé, quand il expire et qui l'a démarré. **Ouvrir** ouvre son URL et **Copier l'URL** la copie. Les environnements terminés sont regroupés sous « N terminés ».
+Chaque environnement affiche son état, quand il a démarré ou s'est terminé, et qui l'a démarré. Son expiration apparaît sur la ligne à moins d'une heure, et avant cela dans l'infobulle de la ligne. **Ouvrir** ouvre son URL et **Copier l'URL** la copie. Les environnements terminés sont regroupés sous « N terminés ».
-- **Démarrer** : cliquez sur **+** à côté de **Environnements**. Le menu liste les environnements déclarés par la dernière exécution sur chaque appareil, et démarre celui que vous choisissez avec le code de cette exécution. Si la tâche n'a pas encore été exécutée ou si ce code a été nettoyé, il propose plutôt de le demander à un agent : l'agent prépare le code et lance `multica env start`, ou détermine comment démarrer le projet s'il ne déclare rien.
+- **Démarrer** : cliquez sur **+** à côté de **Environnements**. Le menu liste les environnements déclarés par la dernière exécution sur chaque appareil, et démarre celui que vous choisissez avec le code de cette exécution. Il propose aussi de le demander à un agent, par exemple quand ce code a été nettoyé : l'agent prépare le code et lance `multica env start`, ou détermine comment démarrer le projet s'il ne déclare rien. Tant que la tâche n'a aucun environnement, la section est masquée ; dès qu'une exécution en a déclaré un, utilisez plutôt la ligne **Ajouter …** en bas de la barre latérale, par exemple **Ajouter un environnement** ou **Ajouter un réveil ou un environnement**. Pour qu'un agent en démarre un sur une tâche dont les exécutions n'en ont déclaré aucun, mentionnez-le dans un commentaire.
- **Arrêter, redémarrer, voir les journaux** : ouvrez le menu **Plus d'actions** de l'environnement. **Redémarrer** relit la déclaration dans le checkout ; le checkout et son `.multica/environments.toml` doivent donc encore exister. Un serveur détecté ne propose que **Arrêter**, après confirmation.
Démarrer, arrêter et redémarrer demandent d'être un membre de l'espace de travail qui a accès à la tâche et peut utiliser le runtime de cet appareil (voir [Daemon et runtimes](/daemon-runtimes)). L'appareil doit être en ligne, avec une version de Multica qui prend en charge le contrôle des environnements ; sinon, les boutons indiquent ce qui manque. Lire les journaux demande seulement l'accès à la tâche.
diff --git a/apps/docs/content/docs/environments.ja.mdx b/apps/docs/content/docs/environments.ja.mdx
index 7534685a64..6a7a250452 100644
--- a/apps/docs/content/docs/environments.ja.mdx
+++ b/apps/docs/content/docs/environments.ja.mdx
@@ -195,9 +195,9 @@ services:
## サイドバーで管理する [#sidebar]
-各環境には、状態、起動・終了の時刻、期限、起動した人が表示されます。**開く**で URL を開き、**URL をコピー**でコピーします。終了した環境は「終了済み N 件」にまとめられます。
+各環境には、状態、起動・終了の時刻、起動した人が表示されます。期限は残り 1 時間を切ると行に、それまでは行のツールチップに表示されます。**開く**で URL を開き、**URL をコピー**でコピーします。終了した環境は「終了済み N 件」にまとめられます。
-- **起動**: **環境**の横の **+** をクリックします。各マシンで最新の実行が宣言した環境が並び、選んだものをその実行のコードで起動します。タスクがまだ実行されていないか、そのコードが削除されている場合は、代わりにエージェントへの依頼を提案します。エージェントはコードを用意して `multica env start` を実行し、宣言がなければ起動方法を自分で判断します。
+- **起動**: **環境**の横の **+** をクリックします。各マシンで最新の実行が宣言した環境が並び、選んだものをその実行のコードで起動します。そのコードが削除されている場合などのために、エージェントへの依頼も提案します。エージェントはコードを用意して `multica env start` を実行し、宣言がなければ起動方法を自分で判断します。環境がまだないタスクではこの欄は表示されません。実行が環境を宣言したら、代わりにサイドバー下部の **…を追加** 行(**環境を追加**、**ウェイクアップまたは環境を追加** など)を使います。どの実行も環境を宣言していないタスクでエージェントに起動してもらうには、コメントでエージェントをメンションします。
- **停止・再起動・ログを表示**: 環境の**その他の操作**メニューを開きます。**再起動**はチェックアウト内の宣言を読み直すため、チェックアウトとその `.multica/environments.toml` が残っている必要があります。自動検出されたサーバーは確認のうえ**停止**だけができます。
起動・停止・再起動には、タスクにアクセスでき、そのマシンのランタイムを使えるワークスペースメンバーである必要があります([デーモンとランタイム](/daemon-runtimes)を参照)。マシンがオンラインで、その Multica が環境の操作に対応したバージョンである必要もあります。足りないものがあればボタンが理由を示します。ログの表示に必要なのはタスクへのアクセスだけです。
diff --git a/apps/docs/content/docs/environments.ko.mdx b/apps/docs/content/docs/environments.ko.mdx
index 9113ef168b..ed19944a64 100644
--- a/apps/docs/content/docs/environments.ko.mdx
+++ b/apps/docs/content/docs/environments.ko.mdx
@@ -195,9 +195,9 @@ services:
## 사이드바에서 관리하기 [#sidebar]
-각 환경에는 상태, 시작·종료 시각, 만료 시각, 시작한 사람이 표시됩니다. **열기**는 URL을 열고 **URL 복사**는 URL을 복사합니다. 종료된 환경은 "종료됨 N개" 아래에 접혀 있습니다.
+각 환경에는 상태, 시작·종료 시각, 시작한 사람이 표시됩니다. 만료 시각은 1시간도 남지 않았을 때 행에, 그 전에는 행의 툴팁에 표시됩니다. **열기**는 URL을 열고 **URL 복사**는 URL을 복사합니다. 종료된 환경은 "종료됨 N개" 아래에 접혀 있습니다.
-- **시작**: **환경** 옆의 **+** 버튼을 클릭합니다. 각 기기에서 최근 실행이 선언한 환경이 나열되며, 고른 환경을 그 실행의 코드로 시작합니다. 태스크가 아직 실행되지 않았거나 그 코드가 정리되었다면 대신 에이전트에게 맡기도록 제안합니다. 에이전트는 코드를 준비해 `multica env start`를 실행하고, 선언이 없으면 시작 방법을 스스로 판단합니다.
+- **시작**: **환경** 옆의 **+** 버튼을 클릭합니다. 각 기기에서 최근 실행이 선언한 환경이 나열되며, 고른 환경을 그 실행의 코드로 시작합니다. 그 코드가 정리된 경우 등을 위해 에이전트에게 맡기는 항목도 제공합니다. 에이전트는 코드를 준비해 `multica env start`를 실행하고, 선언이 없으면 시작 방법을 스스로 판단합니다. 환경이 없는 태스크에서는 이 영역이 숨겨집니다. 실행이 환경을 선언한 뒤에는 대신 사이드바 아래쪽의 **… 추가** 행(**환경 추가**, **깨우기 또는 환경 추가** 등)을 사용합니다. 어떤 실행도 환경을 선언하지 않은 태스크에서 에이전트가 환경을 시작하게 하려면 댓글에서 에이전트를 멘션합니다.
- **중지, 재시작, 로그 보기**: 환경의 **추가 작업** 메뉴를 엽니다. **재시작**은 체크아웃의 선언을 다시 읽으므로 체크아웃과 그 안의 `.multica/environments.toml`이 남아 있어야 합니다. 자동 감지된 서버는 확인 후 **중지**만 할 수 있습니다.
시작, 중지, 재시작은 태스크에 접근할 수 있고 그 기기의 런타임을 사용할 수 있는 워크스페이스 멤버만 할 수 있습니다([데몬과 런타임](/daemon-runtimes) 참고). 기기가 온라인이어야 하고, 그 기기의 Multica가 환경 조작을 지원하는 버전이어야 합니다. 조건이 맞지 않으면 버튼이 무엇이 부족한지 알려 줍니다. 로그를 보는 데는 태스크 접근 권한만 있으면 됩니다.
diff --git a/apps/docs/content/docs/environments.mdx b/apps/docs/content/docs/environments.mdx
index aae76f3c99..0d83e34d09 100644
--- a/apps/docs/content/docs/environments.mdx
+++ b/apps/docs/content/docs/environments.mdx
@@ -195,9 +195,9 @@ Environments belong to the issue, not to a single run: a later run on the same i
## Manage environments in the sidebar [#sidebar]
-Each environment shows its state, when it started or ended, when it expires, and who started it. **Open** opens its URL and **Copy URL** copies it. Environments that ended are folded under "N ended".
+Each environment shows its state, when it started or ended, and who started it. When it expires shows on the row once that is under an hour away, and in the row's tooltip before then. **Open** opens its URL and **Copy URL** copies it. Environments that ended are folded under "N ended".
-- **Start**: click **+** next to **Environments**. The menu lists the environments the latest run on each machine declared, and starts the one you pick in that run's code. If the issue has not run yet or that code has been cleaned up, it offers to ask an agent instead: the agent gets the code ready and runs `multica env start`, or works out how to start the project if it declares nothing.
+- **Start**: click **+** next to **Environments**. The menu lists the environments the latest run on each machine declared, and starts the one you pick in that run's code. It also offers to ask an agent instead, for example when that code has been cleaned up: the agent gets the code ready and runs `multica env start`, or works out how to start the project if it declares nothing. While the issue has no environments, the section is hidden; once a run has declared one, use the **Add …** row at the bottom of the sidebar instead, such as **Add environment** or **Add wakeup or environment**. To have an agent start one on an issue whose runs declared none, mention the agent in a comment.
- **Stop, restart, view logs**: open an environment's **More actions** menu. **Restart** reads the declaration in the checkout again, so the checkout and its `.multica/environments.toml` must still exist. A detected server offers only **Stop**, after a confirmation.
Starting, stopping, and restarting require a workspace member who can access the issue and use that machine's runtime (see [Daemon and runtimes](/daemon-runtimes)). The machine must be online, and its Multica must be recent enough to support environment controls; otherwise the buttons explain what is missing. Reading logs only requires access to the issue.
diff --git a/apps/docs/content/docs/environments.zh-Hant.mdx b/apps/docs/content/docs/environments.zh-Hant.mdx
index e4538906f8..83e61779be 100644
--- a/apps/docs/content/docs/environments.zh-Hant.mdx
+++ b/apps/docs/content/docs/environments.zh-Hant.mdx
@@ -195,9 +195,9 @@ services:
## 在側欄裡管理環境 [#sidebar]
-每個環境顯示狀態、啟動或結束的時間、到期時間和啟動者。**開啟**會開啟它的 URL,**複製位址**會複製 URL。已經結束的環境收在"N 個已結束"裡。
+每個環境顯示狀態、啟動或結束的時間和啟動者。不到 1 小時就到期時,到期時間顯示在這一列上,在那之前顯示在這一列的懸停提示裡。**開啟**會開啟它的 URL,**複製位址**會複製 URL。已經結束的環境收在"N 個已結束"裡。
-- **啟動**:點擊**環境**旁邊的 **+**。選單列出每台機器上最近一次執行宣告的環境,選中後用那次執行的程式碼啟動。這條任務還沒執行過、或者那份程式碼已被清理時,選單會改為讓 AI 代理來啟動:AI 代理準備好程式碼後執行 `multica env start`;專案裡沒有宣告時,它會自己判斷怎麼啟動。
+- **啟動**:點擊**環境**旁邊的 **+**。選單列出每台機器上最近一次執行宣告的環境,選中後用那次執行的程式碼啟動。選單也提供讓 AI 代理來啟動,例如那份程式碼已被清理時:AI 代理準備好程式碼後執行 `multica env start`;專案裡沒有宣告時,它會自己判斷怎麼啟動。任務還沒有環境時這個區域不顯示;有執行宣告過環境後,改用側欄底部以「新增」開頭的那一列,例如**新增環境**或**新增喚醒或環境**。任務的執行都沒有宣告環境時,想讓 AI 代理啟動,就在留言裡 @ AI 代理。
- **停止、重新啟動、查看日誌**:開啟環境的**更多操作**選單。**重新啟動**會重新讀取程式碼裡的宣告,所以那份程式碼和其中的 `.multica/environments.toml` 必須還在。自動識別的服務只有**停止**,並且需要確認。
啟動、停止和重新啟動需要工作區成員能存取這條任務,並且能使用那台機器的執行時(參見[守護程序與執行時](/daemon-runtimes))。機器必須在線上,且上面的 Multica 版本支援環境操作;否則按鈕會說明缺了什麼。查看日誌只需要能存取這條任務。
diff --git a/apps/docs/content/docs/environments.zh.mdx b/apps/docs/content/docs/environments.zh.mdx
index d6e653e8b9..6f2b24b3c0 100644
--- a/apps/docs/content/docs/environments.zh.mdx
+++ b/apps/docs/content/docs/environments.zh.mdx
@@ -195,9 +195,9 @@ services:
## 在侧栏里管理环境 [#sidebar]
-每个环境显示状态、启动或结束的时间、到期时间和启动者。**打开**会打开它的 URL,**复制地址**会复制 URL。已经结束的环境收在"N 个已结束"里。
+每个环境显示状态、启动或结束的时间和启动者。不到 1 小时就到期时,到期时间显示在这一行上,在那之前显示在这一行的悬停提示里。**打开**会打开它的 URL,**复制地址**会复制 URL。已经结束的环境收在"N 个已结束"里。
-- **启动**:点击**环境**旁边的 **+**。菜单列出每台机器上最近一次运行声明的环境,选中后用那次运行的代码启动。这条任务还没运行过、或者那份代码已被清理时,菜单会改为让智能体来启动:智能体准备好代码后执行 `multica env start`;项目里没有声明时,它会自己判断怎么启动。
+- **启动**:点击**环境**旁边的 **+**。菜单列出每台机器上最近一次运行声明的环境,选中后用那次运行的代码启动。菜单也提供让智能体来启动,例如那份代码已被清理时:智能体准备好代码后执行 `multica env start`;项目里没有声明时,它会自己判断怎么启动。任务还没有环境时这个区域不显示;有运行声明过环境后,改用侧栏底部以“添加”开头的那一行,例如**添加环境**或**添加唤醒或环境**。任务的运行都没有声明环境时,想让智能体启动,就在评论里 @ 智能体。
- **停止、重启、查看日志**:打开环境的**更多操作**菜单。**重启**会重新读取代码里的声明,所以那份代码和其中的 `.multica/environments.toml` 必须还在。自动识别的服务只有**停止**,并且需要确认。
启动、停止和重启需要工作区成员能访问这条任务,并且能使用那台机器的运行时(参见[守护进程与运行时](/daemon-runtimes))。机器必须在线,且上面的 Multica 版本支持环境操作;否则按钮会说明缺了什么。查看日志只需要能访问这条任务。
diff --git a/apps/docs/content/docs/github-integration.fr.mdx b/apps/docs/content/docs/github-integration.fr.mdx
index c397fa5b13..2932aa15f1 100644
--- a/apps/docs/content/docs/github-integration.fr.mdx
+++ b/apps/docs/content/docs/github-integration.fr.mdx
@@ -82,7 +82,7 @@ Resolves MUL-123
Une simple mention dans la description, comme `Related to MUL-123`, n'associe pas du tout la PR à cette tâche. Les messages de commit et les commentaires de PR ne déclenchent pas non plus l'association.
-Vous pouvez aussi associer une PR à la main : dans le bloc **Pull requests** de la tâche, cliquez sur **+** et collez l'URL de la PR. Pour retirer une PR d'une tâche, ouvrez le menu **⋯** de sa ligne et choisissez **Retirer de la tâche** ; Multica ne la réassociera plus à partir de son titre ou de sa branche.
+Vous pouvez aussi associer une PR à la main : dans le bloc **Pull requests** de la tâche, cliquez sur **+** et collez l'URL de la PR. Tant que la tâche n'a aucune PR, le bloc est masqué : utilisez plutôt la ligne **Ajouter …** en bas de la barre latérale, par exemple **Ajouter une pull request** ou **Ajouter un réveil ou une pull request**. Pour retirer une PR d'une tâche, ouvrez le menu **⋯** de sa ligne et choisissez **Retirer de la tâche** ; Multica ne la réassociera plus à partir de son titre ou de sa branche.
## Voir les PR d'une tâche
@@ -90,13 +90,13 @@ Une fois associées, les PR apparaissent dans le bloc **Pull requests** du déta
- le dépôt, le numéro, le titre et l'auteur ;
- l'état `Ouverte`, `Brouillon`, `Fusionnée` ou `Fermée` ;
-- le nombre de lignes ajoutées et supprimées, et le nombre de fichiers modifiés ;
+- le nombre de lignes ajoutées et supprimées, et le nombre de fichiers modifiés, au survol de la ligne ;
- le statut CI : toutes les vérifications ont réussi (avec leur nombre), certaines sont en échec (avec le nom des vérifications concernées) ou certaines sont en cours ; les PR sans vérification configurée n'affichent pas cet élément, et « aucune vérification » n'est jamais considéré comme une réussite ;
- la possibilité de fusion : « Prête à fusionner » (uniquement lorsque GitHub signale un état de fusion propre), « Conflits de fusion », « Bloquée » ou « En retard sur la base ».
Le statut CI et la possibilité de fusion proviennent d'instantanés que Multica récupère depuis l'API GitHub, et les deux sont indépendants ; les PR fusionnées ou fermées n'affichent plus ni l'un ni l'autre. Lorsque GitHub est momentanément indisponible, la carte conserve le dernier instantané et le signale comme périmé.
-Sous la liste, une ligne indique ce qui va se passer : par exemple *Passe à Terminé quand #19 est fusionnée*, ou quelle PR a été fermée sans fusion. Cette ligne n'apparaît pas lorsque l'espace de travail ne change pas le statut ou que la tâche a déjà le statut cible.
+Sous la liste, une ligne indique ce qui va se passer : par exemple *Passe à Terminé quand #19 est fusionnée*, ou quelle PR a été fermée sans fusion. Quand une seule PR attend sa fusion, sa ligne l'indique directement : *À la fusion → Terminé*. Cette ligne n'apparaît pas lorsque l'espace de travail ne change pas le statut ou que la tâche a déjà le statut cible.
Cliquez sur une entrée pour ouvrir la PR sur GitHub. Désactiver la **Barre latérale des pull requests** masque seulement ce bloc ; cela ne déconnecte rien.
diff --git a/apps/docs/content/docs/github-integration.ja.mdx b/apps/docs/content/docs/github-integration.ja.mdx
index 26292ca2f1..0db070d5e1 100644
--- a/apps/docs/content/docs/github-integration.ja.mdx
+++ b/apps/docs/content/docs/github-integration.ja.mdx
@@ -80,7 +80,7 @@ Resolves MUL-123
本文に `Related to MUL-123` のような通常の参照を書いただけでは、そのタスクへまったく紐づきません。Commit message と PR コメントも紐づけの対象外です。
-手動で紐づけることもできます。タスクの **Pull requests** セクションで **+** をクリックし、PR の URL を貼り付けます。PR をタスクから外すには、その行の **⋯** メニューから **タスクから外す** を選びます。以後、Multica がタイトルやブランチから再び紐づけることはありません。
+手動で紐づけることもできます。タスクの **Pull requests** セクションで **+** をクリックし、PR の URL を貼り付けます。PR がまだないタスクではこのセクションは表示されないため、代わりにサイドバー下部の **…を追加** 行(**Pull request を追加**、**ウェイクアップまたは Pull request を追加** など)を使います。PR をタスクから外すには、その行の **⋯** メニューから **タスクから外す** を選びます。以後、Multica がタイトルやブランチから再び紐づけることはありません。
## タスクから PR を確認する
@@ -88,13 +88,13 @@ Resolves MUL-123
- リポジトリ、番号、タイトル、作成者
- `Open`、`Draft`、`Merged`、`Closed` の状態
-- 追加行数、削除行数、変更ファイル数
+- 追加行数、削除行数、変更ファイル数(行にカーソルを合わせると表示)
- CI の状態: すべて成功した check の件数、失敗した check の名前、実行中の check の件数。check が 1 つも設定されていない PR ではこの項目を表示せず、「check なし」を成功として扱いません。
- マージ可能性: GitHub がマージ状態を clean と報告した場合だけマージ可能。ほかに競合、blocked、behind を表示します。
CI の状態とマージ可能性は、Multica が GitHub API から取得したスナップショットで、互いに独立しています。マージ済みまたはクローズ済みの PR では、この 2 項目を表示しません。GitHub が一時的に利用できない場合、カードは前回のスナップショットを残し、古い情報として表示します。
-リストの下には、次に何が起きるかを 1 行で表示します。たとえば「#19 がマージされると 完了 に変更」や、マージされずにクローズされた PR です。ワークスペースが「変更しない」に設定されている場合や、タスクがすでに変更先のステータスにある場合は表示されません。
+リストの下には、次に何が起きるかを 1 行で表示します。たとえば「#19 がマージされると 完了 に変更」や、マージされずにクローズされた PR です。マージ待ちの PR が 1 件だけのときは、その行に直接「マージ後 → 完了」と表示されます。ワークスペースが「変更しない」に設定されている場合や、タスクがすでに変更先のステータスにある場合は表示されません。
項目をクリックすると GitHub の PR が開きます。**PR サイドバー**を無効にしてもこのセクションが非表示になるだけで、接続は解除されません。
diff --git a/apps/docs/content/docs/github-integration.ko.mdx b/apps/docs/content/docs/github-integration.ko.mdx
index e2c1f55bd3..dcf979669b 100644
--- a/apps/docs/content/docs/github-integration.ko.mdx
+++ b/apps/docs/content/docs/github-integration.ko.mdx
@@ -80,7 +80,7 @@ Resolves MUL-123
본문에 `Related to MUL-123`처럼 단순히 언급만 하면 해당 태스크와 전혀 연결되지 않습니다. Commit message와 PR 댓글도 연결을 트리거하지 않습니다.
-직접 연결할 수도 있습니다. 태스크의 **Pull requests** 영역에서 **+** 버튼을 누르고 PR URL을 붙여넣습니다. PR을 태스크에서 빼려면 해당 행의 **⋯** 메뉴에서 **태스크에서 제거**를 선택합니다. 이후 Multica는 제목이나 브랜치를 보고 다시 연결하지 않습니다.
+직접 연결할 수도 있습니다. 태스크의 **Pull requests** 영역에서 **+** 버튼을 누르고 PR URL을 붙여넣습니다. PR이 없는 태스크에서는 이 영역이 숨겨지므로, 대신 사이드바 아래쪽의 **… 추가** 행(**Pull request 추가**, **깨우기 또는 Pull request 추가** 등)을 사용합니다. PR을 태스크에서 빼려면 해당 행의 **⋯** 메뉴에서 **태스크에서 제거**를 선택합니다. 이후 Multica는 제목이나 브랜치를 보고 다시 연결하지 않습니다.
## 태스크에서 PR 확인
@@ -88,13 +88,13 @@ Resolves MUL-123
- 저장소, 번호, 제목, 작성자
- `Open`, `Draft`, `Merged`, `Closed` 상태
-- 추가 및 삭제한 줄 수와 변경한 파일 수
+- 추가 및 삭제한 줄 수와 변경한 파일 수(행에 마우스를 올리면 표시)
- CI 상태: 모두 통과(개수 표시), 일부 실패(실패한 check 이름 표시), 일부 진행 중. 설정된 check가 없는 PR에는 이 항목을 표시하지 않으며 "check 없음"을 통과로 간주하지 않습니다.
- merge 가능 여부: merge 가능(GitHub가 merge 상태를 clean으로 보고한 경우만), conflict 있음, blocked, behind
CI 상태와 merge 가능 여부는 Multica가 GitHub API에서 가져온 snapshot이며 서로 독립적입니다. 이미 merge되거나 닫힌 PR에는 두 항목을 더 이상 표시하지 않습니다. GitHub를 일시적으로 사용할 수 없으면 카드는 마지막 snapshot을 유지하고 만료된 정보라고 표시합니다.
-목록 아래에는 다음에 일어날 일을 한 줄로 보여 줍니다. 예를 들어 "#19 병합 시 완료(으)로 변경"이나 병합되지 않고 닫힌 PR입니다. 워크스페이스가 "변경하지 않음"으로 설정되어 있거나 태스크가 이미 대상 상태이면 표시되지 않습니다.
+목록 아래에는 다음에 일어날 일을 한 줄로 보여 줍니다. 예를 들어 "#19 병합 시 완료(으)로 변경"이나 병합되지 않고 닫힌 PR입니다. 병합을 기다리는 PR이 하나뿐이면 그 행에 바로 "병합 후 → 완료"로 표시됩니다. 워크스페이스가 "변경하지 않음"으로 설정되어 있거나 태스크가 이미 대상 상태이면 표시되지 않습니다.
항목을 클릭하면 GitHub의 PR이 열립니다. **PR 사이드바**를 꺼도 이 영역만 숨겨질 뿐 연결은 해제되지 않습니다.
diff --git a/apps/docs/content/docs/github-integration.mdx b/apps/docs/content/docs/github-integration.mdx
index 424db9b1e1..e770b5caf1 100644
--- a/apps/docs/content/docs/github-integration.mdx
+++ b/apps/docs/content/docs/github-integration.mdx
@@ -82,7 +82,7 @@ Resolves MUL-123
A bare mention in the body, such as `Related to MUL-123`, doesn't link the PR at all. Commit messages and PR comments don't trigger linking either.
-You can also link a PR by hand: in the issue's **Pull requests** block, click **+** and paste the PR URL. To take a PR off an issue, open the **⋯** menu on its row and choose **Remove from issue**; Multica won't link it again from its title or branch.
+You can also link a PR by hand: in the issue's **Pull requests** block, click **+** and paste the PR URL. While the issue has no PRs, the block is hidden: use the **Add …** row at the bottom of the sidebar instead, such as **Add pull request** or **Add wakeup or pull request**. To take a PR off an issue, open the **⋯** menu on its row and choose **Remove from issue**; Multica won't link it again from its title or branch.
## View PRs on an issue
@@ -90,13 +90,13 @@ Once linked, PRs appear in the **Pull requests** block of issue detail. Each ent
- repository, number, title, and author;
- `Open`, `Draft`, `Merged`, or `Closed` state;
-- added and deleted lines and the number of changed files;
+- added and deleted lines and the number of changed files, when you hover the row;
- CI status: all passed (with a count), some failed (naming the failing checks), or some in progress; PRs with no checks configured don't show this item, and "no checks" is never treated as passing;
- mergeability: mergeable (only when GitHub reports a clean merge state), conflicting, blocked, or behind.
CI status and mergeability come from snapshots Multica pulls from the GitHub API, and the two are independent; merged or closed PRs no longer show either. When GitHub is temporarily unavailable, the card keeps the last snapshot and marks it stale.
-Under the list, one line says what happens next: for example *Moves to Done when #19 merges*, or which PR closed without merging. There's no line when the workspace leaves status alone or the issue already has the target status.
+Under the list, one line says what happens next: for example *Moves to Done when #19 merges*, or which PR closed without merging. When a single PR is waiting to merge, its row says it instead: *On merge → Done*. There's no line when the workspace leaves status alone or the issue already has the target status.
Click an entry to open the PR on GitHub. Turning off the **PR sidebar** only hides this block; it doesn't disconnect anything.
diff --git a/apps/docs/content/docs/github-integration.zh-Hant.mdx b/apps/docs/content/docs/github-integration.zh-Hant.mdx
index 3a899fbb9b..8e8d0f5cb8 100644
--- a/apps/docs/content/docs/github-integration.zh-Hant.mdx
+++ b/apps/docs/content/docs/github-integration.zh-Hant.mdx
@@ -82,7 +82,7 @@ Resolves MUL-123
正文中的普通提及,例如 `Related to MUL-123`,不會與該任務建立關聯。Commit message 和 PR 評論也不會觸發關聯。
-也可以手動關聯:在任務的 **Pull requests** 區塊點 **+**,貼上 PR 連結。要把 PR 從任務上移除,開啟這一行的 **⋯** 選單,選擇 **移除關聯**;之後 Multica 不會再根據標題或分支把它關聯回來。
+也可以手動關聯:在任務的 **Pull requests** 區塊點 **+**,貼上 PR 連結。任務還沒有 PR 時這個區塊不顯示,改用側欄底部以「新增」開頭的那一列,例如**新增 Pull Request**或**新增喚醒或 Pull Request**。要把 PR 從任務上移除,開啟這一行的 **⋯** 選單,選擇 **移除關聯**;之後 Multica 不會再根據標題或分支把它關聯回來。
## 在任務中檢視 PR
@@ -90,13 +90,13 @@ Resolves MUL-123
- 倉庫、編號、標題和作者;
- `Open`、`Draft`、`Merged` 或 `Closed` 狀態;
-- 新增、刪除行數和改動檔案數;
+- 新增、刪除行數和改動檔案數(懸停這一列時顯示);
- CI 狀態:全部透過(帶計數)、若干個失敗(點名失敗的 check),或若干個進行中;沒有配置任何 check 的 PR 不顯示這一項,"沒有 check"不會被當成透過;
- 可合併性:可合併(僅當 GitHub 報告合併狀態為 clean)、有衝突、blocked 或 behind。
CI 狀態和可合併性來自 Multica 從 GitHub API 拉取的快照,兩者互相獨立;已合併或已關閉的 PR 不再顯示這兩項。GitHub 暫時不可用時,卡片保留上一次的快照並標記為過期。
-列表下方有一行說明接下來會發生什麼,例如"等待 #19 合併後改為 已完成",或者哪個 PR 已關閉、未合併。工作區設定為不改變、或者任務已經是目標狀態時,不顯示這行說明。
+列表下方有一行說明接下來會發生什麼,例如"等待 #19 合併後改為 已完成",或者哪個 PR 已關閉、未合併。只有一個 PR 等待合併時,改為直接顯示在它那一列,例如「合併後 → 已完成」。工作區設定為不改變、或者任務已經是目標狀態時,不顯示這行說明。
點選記錄可以開啟 GitHub 上的 PR。關閉 **PR 側欄** 只會隱藏這個區塊,不會斷開連線。
diff --git a/apps/docs/content/docs/github-integration.zh.mdx b/apps/docs/content/docs/github-integration.zh.mdx
index eb665b9dae..1b5c683cb5 100644
--- a/apps/docs/content/docs/github-integration.zh.mdx
+++ b/apps/docs/content/docs/github-integration.zh.mdx
@@ -82,7 +82,7 @@ Resolves MUL-123
正文中的普通提及,例如 `Related to MUL-123`,不会与该任务建立关联。Commit message 和 PR 评论也不会触发关联。
-也可以手动关联:在任务的 **Pull requests** 区块点 **+**,粘贴 PR 链接。要把 PR 从任务上移除,打开这一行的 **⋯** 菜单,选择 **移除关联**;之后 Multica 不会再根据标题或分支把它关联回来。
+也可以手动关联:在任务的 **Pull requests** 区块点 **+**,粘贴 PR 链接。任务还没有 PR 时这个区块不显示,改用侧栏底部以“添加”开头的那一行,例如**添加 Pull Request**或**添加唤醒或 Pull Request**。要把 PR 从任务上移除,打开这一行的 **⋯** 菜单,选择 **移除关联**;之后 Multica 不会再根据标题或分支把它关联回来。
## 在任务中查看 PR
@@ -90,13 +90,13 @@ Resolves MUL-123
- 仓库、编号、标题和作者;
- `Open`、`Draft`、`Merged` 或 `Closed` 状态;
-- 新增、删除行数和改动文件数;
+- 新增、删除行数和改动文件数(悬停这一行时显示);
- CI 状态:全部通过(带计数)、若干个失败(点名失败的 check),或若干个进行中;没有配置任何 check 的 PR 不显示这一项,"没有 check"不会被当成通过;
- 可合并性:可合并(仅当 GitHub 报告合并状态为 clean)、有冲突、blocked 或 behind。
CI 状态和可合并性来自 Multica 从 GitHub API 拉取的快照,两者互相独立;已合并或已关闭的 PR 不再显示这两项。GitHub 暂时不可用时,卡片保留上一次的快照并标记为过期。
-列表下方有一行说明接下来会发生什么,例如"等待 #19 合并后改为 已完成",或者哪个 PR 已关闭、未合并。工作区设置为不改变、或者任务已经是目标状态时,不显示这行说明。
+列表下方有一行说明接下来会发生什么,例如"等待 #19 合并后改为 已完成",或者哪个 PR 已关闭、未合并。只有一个 PR 等待合并时,改为直接显示在它那一行,例如“合并后 → 已完成”。工作区设置为不改变、或者任务已经是目标状态时,不显示这行说明。
点击记录可以打开 GitHub 上的 PR。关闭 **PR 侧栏** 只会隐藏这个区块,不会断开连接。
diff --git a/apps/docs/content/docs/issue-wakeups.fr.mdx b/apps/docs/content/docs/issue-wakeups.fr.mdx
index 3821b716e5..ecb858cb3e 100644
--- a/apps/docs/content/docs/issue-wakeups.fr.mdx
+++ b/apps/docs/content/docs/issue-wakeups.fr.mdx
@@ -15,7 +15,7 @@ La règle est enregistrée sur la tâche : rien ne tourne pendant l'attente. Les
<Steps>
<Step>
-Ouvrez la tâche et cliquez sur **+** à côté de **Réveils** dans la barre latérale.
+Ouvrez la tâche et cliquez sur **+** à côté de **Réveils** dans la barre latérale. Tant que la tâche n'a aucun réveil, la section est masquée : utilisez plutôt la ligne **Ajouter …** en bas de la barre latérale, par exemple **Ajouter un réveil** ou **Ajouter un réveil ou une pull request**.
</Step>
<Step>
@@ -99,7 +99,7 @@ La section Réveils de la barre latérale liste les règles de la tâche : la co
| Action | Effet |
|---|---|
-| Désactiver l'interrupteur | Arrête les réveils suivants et retire les exécutions pas encore démarrées. Une exécution déjà lancée continue ; arrêtez-la depuis le journal d'exécution si besoin. |
+| Désactiver l'interrupteur dans ses détails | Arrête les réveils suivants et retire les exécutions pas encore démarrées. Une exécution déjà lancée continue ; arrêtez-la depuis le journal d'exécution si besoin. |
| **Réveiller maintenant** | Réveille l'agent une fois tout de suite, sans attendre la condition. |
| Modifier l'instruction | Ne vaut que pour les réveils suivants ; une exécution en cours ne change pas. |
| **Supprimer** | La règle ne réveille plus personne. Les exécutions pas encore démarrées sont retirées, celles qui ont démarré continuent. |
@@ -118,7 +118,7 @@ Pour voir tous les réveils de l'espace de travail, ouvrez **Auto** dans la barr
## Réveiller le parent quand les sous-tâches se terminent [#child-done]
-Quand une tâche a des sous-tâches, sa section Réveils affiche une règle marquée **Système**. Personne n'a besoin de la créer :
+Quand une tâche a des sous-tâches, une puce à côté de l'en-tête **Sous-tâches** affiche une règle marquée **Système**, par exemple « Réveille Lambda à la fin ». Cliquez dessus pour voir sa progression, son instruction et l'interrupteur qui la désactive pour cette tâche. Personne n'a besoin de la créer :
- Quand toutes les sous-tâches d'une étape sont closes alors qu'une étape suivante attend, elle réveille l'assigné du parent, puis une fois encore quand toutes les sous-tâches sont closes. Des sous-tâches sans étape réveillent le parent une fois, à la clôture de la dernière.
- Ajouter ou rouvrir une sous-tâche ne réveille personne, y compris une étape ajoutée après la clôture de toutes les autres : sortez-la de `backlog` pour la lancer, ou mentionnez l'assigné pour qu'il l'organise.
diff --git a/apps/docs/content/docs/issue-wakeups.ja.mdx b/apps/docs/content/docs/issue-wakeups.ja.mdx
index c969b80a7e..89a86d0e3a 100644
--- a/apps/docs/content/docs/issue-wakeups.ja.mdx
+++ b/apps/docs/content/docs/issue-wakeups.ja.mdx
@@ -15,7 +15,7 @@ import { WakeupDemo } from "@/components/demos/wakeup-demo";
<Steps>
<Step>
-タスクを開き、サイドバーの**ウェイクアップ**欄の右にある **+** をクリックします。
+タスクを開き、サイドバーの**ウェイクアップ**欄の右にある **+** をクリックします。ウェイクアップがまだないタスクではこの欄は表示されないため、代わりにサイドバー下部の **…を追加** 行(**ウェイクアップを追加**、**ウェイクアップまたは Pull request を追加** など)を使います。
</Step>
<Step>
@@ -99,7 +99,7 @@ import { WakeupDemo } from "@/components/demos/wakeup-demo";
| 操作 | 結果 |
|---|---|
-| スイッチをオフ | 以降のウェイクアップを止め、まだ始まっていない実行を取り下げます。始まった実行は続くので、必要なら実行ログで停止します。 |
+| 詳細でスイッチをオフ | 以降のウェイクアップを止め、まだ始まっていない実行を取り下げます。始まった実行は続くので、必要なら実行ログで停止します。 |
| **今すぐ起こす** | 条件を待たずに、このルールで今すぐ 1 回起こします。 |
| 指示を編集 | 以降のウェイクアップにだけ反映されます。実行中の実行は変わりません。 |
| **削除** | ルールはもう起動しません。まだ始まっていない実行は取り下げ、始まったものは続きます。 |
@@ -118,7 +118,7 @@ import { WakeupDemo } from "@/components/demos/wakeup-demo";
## サブタスクが終わったら親を起こす [#child-done]
-サブタスクがあるタスクでは、ウェイクアップ欄に**システム**の印が付いたルールが表示されます。手で作る必要はありません。
+サブタスクがあるタスクでは、**サブタスク**見出しの横のチップに**システム**の印が付いたルールが表示されます(例:「完了後に Lambda を起動」)。クリックすると、進捗、指示、このタスクでルールをオフにするスイッチが表示されます。手で作る必要はありません。
- あるステージのサブタスクがすべて閉じ、後ろのステージがまだ待っているときに、親タスクの担当者を起こします。すべてのサブタスクが閉じたときにもう一度起こします。ステージのないサブタスクは、最後の 1 件が閉じたときに一度起こします。
- サブタスクの追加や再オープンでは起こしません。すべて閉じた後に足したステージも同じで、`backlog` から出せば始まります。担当者に段取りを任せたいときはメンションしてください。
diff --git a/apps/docs/content/docs/issue-wakeups.ko.mdx b/apps/docs/content/docs/issue-wakeups.ko.mdx
index 5ec1574883..0ab78a7ec2 100644
--- a/apps/docs/content/docs/issue-wakeups.ko.mdx
+++ b/apps/docs/content/docs/issue-wakeups.ko.mdx
@@ -15,7 +15,7 @@ import { WakeupDemo } from "@/components/demos/wakeup-demo";
<Steps>
<Step>
-태스크를 열고 사이드바 **깨우기** 영역 오른쪽의 **+** 버튼을 클릭합니다.
+태스크를 열고 사이드바 **깨우기** 영역 오른쪽의 **+** 버튼을 클릭합니다. 깨우기가 없는 태스크에서는 이 영역이 숨겨지므로, 대신 사이드바 아래쪽의 **… 추가** 행(**깨우기 추가**, **깨우기 또는 Pull request 추가** 등)을 사용합니다.
</Step>
<Step>
@@ -99,7 +99,7 @@ import { WakeupDemo } from "@/components/demos/wakeup-demo";
| 작업 | 결과 |
|---|---|
-| 스위치 끄기 | 이후 깨우기를 멈추고 아직 시작하지 않은 실행을 거둬들입니다. 이미 시작한 실행은 계속되므로, 필요하면 실행 로그에서 중지합니다. |
+| 상세 정보에서 스위치 끄기 | 이후 깨우기를 멈추고 아직 시작하지 않은 실행을 거둬들입니다. 이미 시작한 실행은 계속되므로, 필요하면 실행 로그에서 중지합니다. |
| **지금 깨우기** | 조건을 기다리지 않고 이 규칙으로 지금 한 번 깨웁니다. |
| 지시 수정 | 이후 깨우기에만 적용되며 진행 중인 실행은 그대로입니다. |
| **삭제** | 규칙이 더는 깨우지 않습니다. 시작하지 않은 실행은 거둬들이고, 시작한 실행은 계속됩니다. |
@@ -118,7 +118,7 @@ import { WakeupDemo } from "@/components/demos/wakeup-demo";
## 하위 태스크가 끝나면 상위 태스크 깨우기 [#child-done]
-하위 태스크가 있는 태스크의 깨우기 영역에는 **시스템** 표시가 붙은 규칙이 나타납니다. 따로 만들 필요는 없습니다.
+하위 태스크가 있는 태스크에서는 **하위 태스크** 제목 옆의 칩에 **시스템** 표시가 붙은 규칙이 나타납니다(예: "모두 끝나면 Lambda 깨우기"). 클릭하면 진행 상황, 지시 사항, 이 태스크에서 규칙을 끄는 스위치가 표시됩니다. 따로 만들 필요는 없습니다.
- 한 단계의 하위 태스크가 모두 닫히고 뒤 단계가 아직 기다리고 있으면 상위 태스크의 담당자를 깨웁니다. 모든 하위 태스크가 닫히면 한 번 더 깨웁니다. 단계가 없는 하위 태스크는 마지막 하나가 닫힐 때 한 번 깨웁니다.
- 하위 태스크를 추가하거나 다시 열 때는 깨우지 않으며, 모두 닫힌 뒤에 추가한 단계도 마찬가지입니다. `backlog`에서 꺼내면 시작되고, 담당자가 정리해야 하면 멘션하세요.
diff --git a/apps/docs/content/docs/issue-wakeups.mdx b/apps/docs/content/docs/issue-wakeups.mdx
index dfd7ff175a..5710bd076b 100644
--- a/apps/docs/content/docs/issue-wakeups.mdx
+++ b/apps/docs/content/docs/issue-wakeups.mdx
@@ -15,7 +15,7 @@ The rule is stored on the issue, so nothing runs while it waits. Members create
<Steps>
<Step>
-Open the issue and click **+** next to **Wakeups** in the issue sidebar.
+Open the issue and click **+** next to **Wakeups** in the issue sidebar. While the issue has no wakeups, the section is hidden: use the **Add …** row at the bottom of the sidebar instead, such as **Add wakeup** or **Add wakeup or pull request**.
</Step>
<Step>
@@ -99,7 +99,7 @@ The Wakeups section of the issue sidebar lists the issue's rules: the condition,
| Action | Result |
|---|---|
-| Turn the switch off | Stops later wakeups and withdraws runs that have not started. A run that already started keeps going; stop it from the execution log if needed. |
+| Turn the switch in its details off | Stops later wakeups and withdraws runs that have not started. A run that already started keeps going; stop it from the execution log if needed. |
| **Wake now** | Wakes the agent once right away, without waiting for the condition. |
| Edit the instruction | Affects later wakeups only; a run in progress is unchanged. |
| **Delete** | The rule no longer wakes anyone. Runs that have not started are withdrawn; started ones continue. |
@@ -118,7 +118,7 @@ To see every wakeup in the workspace, open **Auto** in the app rail and switch t
## Wake the parent when sub-issues finish [#child-done]
-When an issue has sub-issues, its Wakeups section shows a rule marked **System**. Nobody needs to create it:
+When an issue has sub-issues, a chip next to its **Sub-issues** heading shows a rule marked **System**, such as "Wakes Lambda when all finish". Click it for the rule's progress, its instruction, and the switch that turns it off for this issue. Nobody needs to create it:
- When every sub-issue in a stage is closed and a later stage is still waiting, it wakes the parent's assignee, and it wakes them once more when every sub-issue is closed. Sub-issues without stages wake the parent once, when the last one closes.
- Adding or reopening a sub-issue does not wake anyone, including a stage added after every sub-issue closed: move it out of `backlog` to start it, or mention the assignee to organize it.
diff --git a/apps/docs/content/docs/issue-wakeups.zh-Hant.mdx b/apps/docs/content/docs/issue-wakeups.zh-Hant.mdx
index 092f94f35b..cc4b33301b 100644
--- a/apps/docs/content/docs/issue-wakeups.zh-Hant.mdx
+++ b/apps/docs/content/docs/issue-wakeups.zh-Hant.mdx
@@ -15,7 +15,7 @@ import { WakeupDemo } from "@/components/demos/wakeup-demo";
<Steps>
<Step>
-開啟任務,點任務側欄**喚醒**區域右側的 **+**。
+開啟任務,點任務側欄**喚醒**區域右側的 **+**。任務還沒有喚醒時這個區域不顯示,改用側欄底部以「新增」開頭的那一列,例如**新增喚醒**或**新增喚醒或 Pull Request**。
</Step>
<Step>
@@ -99,7 +99,7 @@ import { WakeupDemo } from "@/components/demos/wakeup-demo";
| 操作 | 結果 |
|---|---|
-| 關閉開關 | 停止後續喚醒,撤回還沒開始的執行。已經開始的執行繼續,需要時在執行日誌裡停止。 |
+| 在詳情裡關閉開關 | 停止後續喚醒,撤回還沒開始的執行。已經開始的執行繼續,需要時在執行日誌裡停止。 |
| **立即喚醒** | 現在就按這條規則喚醒一次,不等條件。 |
| 編輯指令 | 只影響以後的喚醒,正在執行的執行不變。 |
| **刪除** | 規則不再喚醒,還沒開始的執行被撤回,已經開始的繼續。 |
@@ -118,7 +118,7 @@ import { WakeupDemo } from "@/components/demos/wakeup-demo";
## 子任務結束時喚醒父任務 [#child-done]
-任務有子任務時,喚醒區域會出現一條帶**系統**標記的規則,它不用手動建立:
+任務有子任務時,**子任務**標題旁會出現一個 chip,顯示一條帶**系統**標記的規則,例如「結束後喚醒 Lambda」。點開可以看到進度、指令,以及為這條任務關閉規則的開關。它不用手動建立:
- 某個階段的子任務全部結束、後面還有階段在等時,喚醒父任務的負責人;全部子任務結束時再喚醒一次。沒有分階段的子任務,全部結束時喚醒一次。
- 新建或重新開啟子任務不會喚醒,全部結束後再補的階段也一樣:把它移出 `backlog` 就會開始,需要負責人安排時 @ 一下。
diff --git a/apps/docs/content/docs/issue-wakeups.zh.mdx b/apps/docs/content/docs/issue-wakeups.zh.mdx
index 59ccd7af23..d22b3734af 100644
--- a/apps/docs/content/docs/issue-wakeups.zh.mdx
+++ b/apps/docs/content/docs/issue-wakeups.zh.mdx
@@ -15,7 +15,7 @@ import { WakeupDemo } from "@/components/demos/wakeup-demo";
<Steps>
<Step>
-打开任务,点任务侧栏**唤醒**区域右侧的 **+**。
+打开任务,点任务侧栏**唤醒**区域右侧的 **+**。任务还没有唤醒时这个区域不显示,改用侧栏底部以“添加”开头的那一行,例如**添加唤醒**或**添加唤醒或 Pull Request**。
</Step>
<Step>
@@ -99,7 +99,7 @@ import { WakeupDemo } from "@/components/demos/wakeup-demo";
| 操作 | 结果 |
|---|---|
-| 关闭开关 | 停止后续唤醒,撤回还没开始的运行。已经开始的运行继续,需要时在执行日志里停止。 |
+| 在详情里关闭开关 | 停止后续唤醒,撤回还没开始的运行。已经开始的运行继续,需要时在执行日志里停止。 |
| **立即唤醒** | 现在就按这条规则唤醒一次,不等条件。 |
| 编辑指令 | 只影响以后的唤醒,正在执行的运行不变。 |
| **删除** | 规则不再唤醒,还没开始的运行被撤回,已经开始的继续。 |
@@ -118,7 +118,7 @@ import { WakeupDemo } from "@/components/demos/wakeup-demo";
## 子任务结束时唤醒父任务 [#child-done]
-任务有子任务时,唤醒区域会出现一条带**系统**标记的规则,它不用手动创建:
+任务有子任务时,**子任务**标题旁会出现一个 chip,显示一条带**系统**标记的规则,例如“结束后唤醒 Lambda”。点开可以看到进度、指令,以及为这条任务关闭规则的开关。它不用手动创建:
- 某个阶段的子任务全部结束、后面还有阶段在等时,唤醒父任务的负责人;全部子任务结束时再唤醒一次。没有分阶段的子任务,全部结束时唤醒一次。
- 新建或重新打开子任务不会唤醒,全部结束后再补的阶段也一样:把它移出 `backlog` 就会开始,需要负责人安排时 @ 一下。
diff --git a/apps/docs/content/docs/issues.fr.mdx b/apps/docs/content/docs/issues.fr.mdx
index a3a7214da4..0d96141793 100644
--- a/apps/docs/content/docs/issues.fr.mdx
+++ b/apps/docs/content/docs/issues.fr.mdx
@@ -140,7 +140,7 @@ Une tâche appartient à un [projet](/projects) au plus ; le projet fournit des
Un travail plus important peut être découpé en sous-tâches : la tâche parente conserve l'objectif global tandis que les sous-tâches avancent indépendamment. Les statuts de la tâche parente et des sous-tâches ne s'influencent pas.
-Ouvrez une sous-tâche directe depuis **Sous-tâches** dans la barre latérale droite de la tâche. Jusqu'à 10 sous-tâches, l'ordre correspond à la liste principale. Au-delà, les 10 premières s'affichent en donnant la priorité aux sous-tâches non terminées, tout en conservant l'ordre des étapes dans chaque groupe. **Afficher N de plus** déplie toute la liste dans la barre latérale ; **Réduire** revient aux 10 premières. Votre position de lecture est conservée et la barre latérale reste ouverte sur écran étroit. La progression compte toutes les sous-tâches. **Personnaliser la barre latérale** permet de masquer cette section.
+Les sous-tâches directes d'une tâche sont listées sous **Sous-tâches**, sous sa description, avec une progression qui compte toutes les sous-tâches. Ouvrez-en une depuis cette liste.
Les sous-tâches peuvent recevoir une **Étape** pour avancer par lots — 1, 2, 3. Lorsque toutes les sous-tâches de la première étape non terminée atteignent `done` ou `cancelled`, la tâche parente reçoit une notification « sous-tâches terminées » ; si l'assigné de la tâche parente est un agent, celui-ci se réveille et décide s'il lance l'étape suivante. Les sous-tâches sans étape forment un seul lot et ne déclenchent qu'une notification, lorsqu'elles sont toutes terminées. Ce réveil est déclenché par le système ; ses règles et les autres types de réveil sont décrits dans [Réveils de tâches](/issue-wakeups).
diff --git a/apps/docs/content/docs/issues.ja.mdx b/apps/docs/content/docs/issues.ja.mdx
index 53354c75bb..57c61054cf 100644
--- a/apps/docs/content/docs/issues.ja.mdx
+++ b/apps/docs/content/docs/issues.ja.mdx
@@ -140,7 +140,7 @@ import { DeliverablesDemo } from "@/components/demos/deliverables-demo";
大きな作業は子タスクに分割できます。親タスクが全体の目標を保持し、子タスクはそれぞれ独立して進みます。親子のステータスは連動しません。
-タスクの右サイドバーの**サブタスク**から、直接の子タスクを開けます。10 件以下では本文の一覧と同じ順序です。10 件を超える場合は未完了の子タスクを優先して最初の 10 件を表示し、各グループ内ではステージ順を保ちます。**さらに N 件表示** でサイドバー内にすべて展開し、**折りたたむ** で最初の 10 件に戻します。本文の閲覧位置は変わらず、狭い画面でもサイドバーは開いたままです。進捗はすべての子タスクを集計します。**サイドバーをカスタマイズ**で、このセクションを非表示にできます。
+タスクの直接の子タスクは説明の下の**サブタスク**に一覧表示され、進捗はすべての子タスクを集計します。子タスクはそこから開きます。
子タスクには**ステージ**(stage)を設定でき、1、2、3 とバッチごとに進められます。未完了の最も早いステージのすべての子タスクが `done` または `cancelled` に到達すると、親タスクに子タスク完了の通知が届きます。親タスクの担当者がエージェントの場合は、そのエージェントが起こされ、次のステージへ進むかどうかを判断します。ステージ未設定の子タスクは同じバッチとして扱われ、すべて終了したときに一度だけ通知されます。このウェイクアップはシステムが行います。ルールとほかのウェイクアップの種類は[タスクのウェイクアップ](/issue-wakeups)を参照してください。
diff --git a/apps/docs/content/docs/issues.ko.mdx b/apps/docs/content/docs/issues.ko.mdx
index f8b1420667..38c24c9b56 100644
--- a/apps/docs/content/docs/issues.ko.mdx
+++ b/apps/docs/content/docs/issues.ko.mdx
@@ -140,7 +140,7 @@ import { DeliverablesDemo } from "@/components/demos/deliverables-demo";
큰 작업은 하위 태스크로 나눌 수 있습니다. 상위 태스크에는 전체 목표를 남기고 하위 태스크는 각각 독립적으로 진행합니다. 상위와 하위 태스크의 상태는 서로 연동되지 않습니다.
-태스크 오른쪽 사이드바의 **하위 태스크**에서 직속 하위 태스크를 열 수 있습니다. 10개 이하면 본문 목록과 같은 순서이며, 10개를 넘으면 미완료 항목을 우선해 처음 10개를 표시하고 각 그룹 안에서는 단계 순서를 유지합니다. **N개 더 보기**로 사이드바에서 전체를 펼치고, **접기**로 처음 10개로 돌아갑니다. 본문을 읽던 위치는 바뀌지 않으며 좁은 화면에서도 사이드바는 열린 상태를 유지합니다. 진행률은 전체 하위 태스크를 기준으로 계산합니다. **사이드바 사용자 지정**에서 이 섹션을 숨길 수 있습니다.
+태스크의 직속 하위 태스크는 설명 아래 **하위 태스크** 목록에 표시되며, 진행률은 전체 하위 태스크를 기준으로 계산합니다. 하위 태스크는 이 목록에서 엽니다.
하위 태스크에는 **단계**(stage)를 지정해 1, 2, 3처럼 묶어서 진행할 수 있습니다. 현재 가장 이른 미완료 단계의 모든 하위 태스크가 `done` 또는 `cancelled`가 되면 상위 태스크에 "하위 태스크 완료" 알림이 전달됩니다. 상위 태스크 담당자가 에이전트이면 에이전트가 깨어나 다음 단계로 진행할지 결정합니다. 단계를 지정하지 않은 하위 태스크는 같은 묶음으로 간주하며 모두 끝났을 때 한 번 알립니다. 이 깨우기는 시스템이 합니다. 규칙과 다른 깨우기 방식은 [태스크 깨우기](/issue-wakeups)를 참고하세요.
diff --git a/apps/docs/content/docs/issues.mdx b/apps/docs/content/docs/issues.mdx
index b77a6bbd32..94bb993650 100644
--- a/apps/docs/content/docs/issues.mdx
+++ b/apps/docs/content/docs/issues.mdx
@@ -140,7 +140,7 @@ An issue belongs to at most one [project](/projects); the project provides share
Larger work can be split into sub-issues: the parent issue keeps the overall goal while sub-issues progress independently. Parent and child statuses do not affect each other.
-Open a direct child from **Sub-issues** in the issue's right sidebar. With 10 or fewer children, their order matches the inline list. With more, it initially shows 10, putting unfinished children first and keeping stage order within each group. **Show N more** expands all children in the sidebar; **Collapse** returns to the first 10. Both keep your reading position and leave the narrow-screen sidebar open. Progress counts all children. **Customize sidebar** lets you hide or reorder this section.
+An issue's direct children are listed under **Sub-issues** below its description, with progress counting all children. Open a child from there.
Creating a sub-issue from a parent prefills its project and, when set, its assignee. In manual create, **Copy parent fields** lets you choose priority, labels, dates, or individual custom properties to copy. Only the selected values replace your form values, once; later parent changes do not sync. The child keeps its own description and status. Labels, start date, and custom properties stay in the manual draft when switching to Create with agent.
diff --git a/apps/docs/content/docs/issues.zh-Hant.mdx b/apps/docs/content/docs/issues.zh-Hant.mdx
index a9bbecce56..f80edc6404 100644
--- a/apps/docs/content/docs/issues.zh-Hant.mdx
+++ b/apps/docs/content/docs/issues.zh-Hant.mdx
@@ -140,7 +140,7 @@ AI 代理會隨工作進展更新任務狀態:預設開始工作時改為 `in_
較大的工作可以拆成子任務:父任務保留整體目標,子任務各自獨立推進。父子狀態互不聯動。
-在任務右側欄的**子任務**區可以直接開啟子任務。不超過 10 筆時,順序與正文列表一致;超過時預設顯示 10 筆,未完成項目優先,兩組內各自保持階段順序。點擊**再顯示 N 筆**會在側欄展開全部,點擊**收合**恢復前 10 筆,正文閱讀位置不變,窄螢幕側欄也不會關閉。進度始終統計全部子任務。透過**自訂側邊欄**可以隱藏這個分區。
+任務的直屬子任務列在正文下方的**子任務**列表裡,進度統計全部子任務,從這裡開啟子任務。
子任務可以設定**階段**(stage),按 1、2、3 分批推進。當前最早未完成階段的全部子任務到達 `done` 或 `cancelled` 時,父任務會收到"子任務完成"通知;父任務的負責人是 AI 代理時,它會被喚醒並決定是否推進下一階段。未設定階段的子任務視為同一批,全部結束時通知一次。這次喚醒由系統發起,規則和其他喚醒方式見[任務喚醒](/issue-wakeups)。
diff --git a/apps/docs/content/docs/issues.zh.mdx b/apps/docs/content/docs/issues.zh.mdx
index c8110e93e9..15a41a056f 100644
--- a/apps/docs/content/docs/issues.zh.mdx
+++ b/apps/docs/content/docs/issues.zh.mdx
@@ -140,7 +140,7 @@ import { DeliverablesDemo } from "@/components/demos/deliverables-demo";
较大的工作可以拆成子任务:父任务保留整体目标,子任务各自独立推进。父子状态互不联动。
-在任务右侧栏的**子任务**区可以直接打开子任务。不超过 10 条时,顺序与正文列表一致;超过时默认显示 10 条,未完成项优先,两组内各自保持阶段顺序。点击**再显示 N 条**会在侧栏展开全部,点击**收起**恢复前 10 条,正文阅读位置不变,窄屏侧栏也不会关闭。进度始终统计全部子任务。通过**自定义侧边栏**可以隐藏或调整这个分区的顺序。
+任务的直属子任务列在正文下方的**子任务**列表里,进度统计全部子任务,从这里打开子任务。
从父任务创建子任务时,会预填项目;父任务已指派时,也会预填负责人。手动创建中可通过**复制父任务字段**选择优先级、标签、日期或某个自定义属性。仅覆盖选中的字段,复制一次,父任务后续修改不再同步。子任务的描述和状态独立。切换到智能体创建时,标签、开始日期和自定义属性保留在手动草稿中。
diff --git a/apps/docs/content/docs/tasks.fr.mdx b/apps/docs/content/docs/tasks.fr.mdx
index 3f35c7f039..0e7f037e0a 100644
--- a/apps/docs/content/docs/tasks.fr.mdx
+++ b/apps/docs/content/docs/tasks.fr.mdx
@@ -80,7 +80,7 @@ La démo ci-dessous parcourt un cycle complet : une exécution entre en file, d
Changer l'assigné ou le statut d'une tâche n'arrête pas une exécution déjà démarrée. Pour en interrompre une, arrêtez-la dans le journal d'exécution. Supprimer une tâche annule ses exécutions actives.
</Callout>
-Le journal d'exécution totalise aussi le **Dépensé**, les **Tokens** et le **Travail d'agent** de la tâche, avec une barre de coût par exécution. Cliquer sur le total, sur une barre ou sur **Ouvrir la chronologie** ouvre la boîte de dialogue **Exécutions**, qui montre le coût par exécution ou en cumul, le répartit par agent et par modèle, et compte les exécutions en échec et annulées. Les coûts sont des estimations ; leur calcul et la consommation de tout l'espace de travail sont décrits dans [Statistiques](/analytics#coût-dune-tâche).
+L'en-tête du journal d'exécution indique ce que la tâche a déjà dépensé. **Ouvrir la chronologie** ouvre la boîte de dialogue **Exécutions**, qui totalise le **Dépensé**, les **Tokens** et le **Travail d'agent**, montre le coût par exécution ou en cumul, le répartit par agent et par modèle, et compte les exécutions en échec et annulées. Les coûts sont des estimations ; leur calcul et la consommation de tout l'espace de travail sont décrits dans [Statistiques](/analytics#coût-dune-tâche).
## Échecs et relances automatiques
diff --git a/apps/docs/content/docs/tasks.ja.mdx b/apps/docs/content/docs/tasks.ja.mdx
index 376beb89c7..272bf51730 100644
--- a/apps/docs/content/docs/tasks.ja.mdx
+++ b/apps/docs/content/docs/tasks.ja.mdx
@@ -80,7 +80,7 @@ import { RunLifecycleDemo } from "@/components/demos/run-lifecycle-demo";
タスクの担当者やステータスを変更しても、すでに始まった実行は止まりません。中断したいときは、実行ログで該当する実行を停止してください。タスクを削除すると、そのアクティブな実行も一緒にキャンセルされます。
</Callout>
-実行ログには、このタスクの**費用**、**トークン**、**エージェント作業**の合計と、実行ごとに 1 本のコストバーも表示されます。合計、コストバー、または**タイムラインを開く**をクリックすると**実行履歴**ダイアログが開き、費用を実行ごとまたは累計で表示し、エージェント別とモデル別に分け、失敗とキャンセルの回数も示します。費用は概算です。計算方法とワークスペース全体の使用量は[分析](/analytics#タスクのコスト)を参照してください。
+実行ログの見出しには、このタスクのこれまでの費用が表示されます。**タイムラインを開く**をクリックすると**実行履歴**ダイアログが開き、**費用**、**トークン**、**エージェント作業**の合計を示し、費用を実行ごとまたは累計で表示し、エージェント別とモデル別に分け、失敗とキャンセルの回数も示します。費用は概算です。計算方法とワークスペース全体の使用量は[分析](/analytics#タスクのコスト)を参照してください。
## 失敗と自動リトライ
diff --git a/apps/docs/content/docs/tasks.ko.mdx b/apps/docs/content/docs/tasks.ko.mdx
index 2880019ded..5cae534093 100644
--- a/apps/docs/content/docs/tasks.ko.mdx
+++ b/apps/docs/content/docs/tasks.ko.mdx
@@ -80,7 +80,7 @@ import { RunLifecycleDemo } from "@/components/demos/run-lifecycle-demo";
태스크의 담당자나 상태를 바꿔도 이미 시작된 실행은 중지되지 않습니다. 중단하려면 실행 로그에서 해당 실행을 중지하세요. 태스크를 삭제하면 연결된 활성 실행도 함께 취소됩니다.
</Callout>
-실행 로그에는 이 태스크의 **비용**, **토큰**, **에이전트 작업** 합계와 실행마다 하나씩의 비용 막대도 표시됩니다. 합계나 비용 막대, 또는 **타임라인 열기**를 클릭하면 **실행 기록** 대화상자가 열립니다. 비용을 실행별 또는 누적으로 보고, 에이전트별·모델별로 나누며, 실패와 취소 횟수도 보여 줍니다. 비용은 추정치이며, 계산 방식과 워크스페이스 전체 사용량은 [분석](/analytics#태스크-비용)을 보세요.
+실행 로그 머리글에는 이 태스크가 지금까지 쓴 비용이 표시됩니다. **타임라인 열기**를 클릭하면 **실행 기록** 대화상자가 열립니다. **비용**, **토큰**, **에이전트 작업** 합계를 보여 주고, 비용을 실행별 또는 누적으로 보고, 에이전트별·모델별로 나누며, 실패와 취소 횟수도 보여 줍니다. 비용은 추정치이며, 계산 방식과 워크스페이스 전체 사용량은 [분석](/analytics#태스크-비용)을 보세요.
## 실패와 자동 재시도
diff --git a/apps/docs/content/docs/tasks.mdx b/apps/docs/content/docs/tasks.mdx
index b39852d019..eaaa0b47b9 100644
--- a/apps/docs/content/docs/tasks.mdx
+++ b/apps/docs/content/docs/tasks.mdx
@@ -80,7 +80,7 @@ The demo below walks through a full cycle: a run queues, starts, and fails; you
Changing an issue's assignee or status does not stop a run that has already started; to interrupt one, stop it in the execution log. Deleting an issue cancels its active runs.
</Callout>
-The execution log also totals the issue's **Spent**, **Tokens**, and **Agent time**, with one cost bar per run. Clicking the total, a bar, or **Open timeline** opens the **Runs** dialog, which charts cost per run or cumulatively, splits it by agent and by model, and counts failed and cancelled runs. Costs are estimates; see [Analytics](/analytics#issue-cost) for how they are calculated and for workspace-wide usage.
+The execution log's header shows what the issue has spent so far. **Open timeline** opens the **Runs** dialog, which totals **Spent**, **Tokens**, and **Agent time**, which charts cost per run or cumulatively, splits it by agent and by model, and counts failed and cancelled runs. Costs are estimates; see [Analytics](/analytics#issue-cost) for how they are calculated and for workspace-wide usage.
## Failures and automatic retries
diff --git a/apps/docs/content/docs/tasks.zh-Hant.mdx b/apps/docs/content/docs/tasks.zh-Hant.mdx
index fd535ae028..8fcca7e8c4 100644
--- a/apps/docs/content/docs/tasks.zh-Hant.mdx
+++ b/apps/docs/content/docs/tasks.zh-Hant.mdx
@@ -80,7 +80,7 @@ AI 代理工作期間,任務頂部還有一個實時狀態條,例如 "Engine
修改任務的負責人或狀態不會停止已經開始的執行,要中斷就在執行日誌中停止對應的執行。刪除任務時,關聯的活動執行會一併取消。
</Callout>
-執行日誌還彙總這條任務的**已花費**、**Token** 和**AI 代理工作**時長,每次執行對應一根費用條。點合計、費用條或**開啟時間線**,開啟**執行記錄**對話方塊:按次或累計檢視費用,按 AI 代理和模型拆分,並列出失敗和取消的次數。費用是估算值,怎麼算的以及整個工作區的用量見[統計](/analytics#任務的花費)。
+執行日誌的標題列顯示這條任務目前的花費。點**開啟時間線**,開啟**執行記錄**對話方塊:彙總**已花費**、**Token** 和**AI 代理工作**時長,按次或累計檢視費用,按 AI 代理和模型拆分,並列出失敗和取消的次數。費用是估算值,怎麼算的以及整個工作區的用量見[統計](/analytics#任務的花費)。
## 失敗與自動重試
diff --git a/apps/docs/content/docs/tasks.zh.mdx b/apps/docs/content/docs/tasks.zh.mdx
index ce76b15ea9..6e3a0f3a76 100644
--- a/apps/docs/content/docs/tasks.zh.mdx
+++ b/apps/docs/content/docs/tasks.zh.mdx
@@ -80,7 +80,7 @@ import { RunLifecycleDemo } from "@/components/demos/run-lifecycle-demo";
修改任务的负责人或状态不会停止已经开始的运行,要中断就在执行日志中停止对应的运行。删除任务时,关联的活动运行会一并取消。
</Callout>
-执行日志还汇总这条任务的**已花费**、**Token** 和**智能体工作**时长,每次运行对应一根费用条。点合计、费用条或**打开时间线**,打开**运行记录**对话框:按次或累计查看费用,按智能体和模型拆分,并列出失败和取消的次数。费用是估算值,怎么算的以及整个工作区的用量见[统计](/analytics#任务的花费)。
+执行日志的标题栏显示这条任务目前的花费。点**打开时间线**,打开**运行记录**对话框:汇总**已花费**、**Token** 和**智能体工作**时长,按次或累计查看费用,按智能体和模型拆分,并列出失败和取消的次数。费用是估算值,怎么算的以及整个工作区的用量见[统计](/analytics#任务的花费)。
## 失败与自动重试
diff --git a/e2e/issue-wakeups.spec.ts b/e2e/issue-wakeups.spec.ts
index eb48d841b8..d73bd269e1 100644
--- a/e2e/issue-wakeups.spec.ts
+++ b/e2e/issue-wakeups.spec.ts
@@ -1,12 +1,22 @@
import "./env";
-import { expect, test } from "@playwright/test";
+import { expect, test, type Page } from "@playwright/test";
import pg from "pg";
import { createTestApi } from "./helpers";
+// An issue without wakeups offers one from the sidebar's add row, which may
+// also offer other empty sections behind a menu.
+async function openNewWakeup(page: Page) {
+ const add = page.getByTestId("issue-sidebar-add-row").getByRole("button");
+ await expect(add).toBeVisible({ timeout: 45_000 });
+ const label = (await add.textContent())?.trim();
+ await add.click();
+ if (label !== "Add wakeup") await page.getByRole("menuitem", { name: "Wakeup", exact: true }).click();
+}
+
// Rule semantics live in the Go service and handler tests. This browser test
-// covers the sidebar a member uses: the platform's child-done rule is visible
-// and can be turned off, and a new wakeup can be created from the form.
+// covers what a member uses: the platform's child-done rule sits beside the
+// sub-issues and can be turned off, and a new wakeup can be created from the form.
test("members see the child-done system rule and create a wakeup", async ({ page }) => {
test.setTimeout(120_000);
const api = await createTestApi();
@@ -44,11 +54,14 @@ test("members see the child-done system rule and create a wakeup", async ({ page
await page.setViewportSize({ width: 1440, height: 1000 });
await page.goto(`/${workspace.slug}/issues/${parent.identifier}`, { waitUntil: "domcontentloaded" });
- const systemRule = page.getByRole("button", { name: /When stage 1's sub-issues all finish/ });
+ const systemRule = page.getByRole("button", { name: "Wakes Wakeup Emacs when all finish" });
await expect(systemRule).toBeVisible({ timeout: 45_000 });
- await expect(systemRule).toContainText("Wake assignee Wakeup Emacs · 1 to go");
+ await systemRule.click();
+ const ruleDetail = page.getByRole("dialog", { name: /When stage 1's sub-issues all finish/ });
+ await expect(ruleDetail).toContainText("1/2 finished");
+ await page.keyboard.press("Escape");
- await page.getByRole("button", { name: "New wakeup" }).click();
+ await openNewWakeup(page);
const form = page.getByRole("form", { name: "New wakeup" });
await expect(form).toBeVisible();
await form.getByRole("button", { name: /Choose a condition/ }).click();
@@ -61,15 +74,18 @@ test("members see the child-done system rule and create a wakeup", async ({ page
const created = page.getByRole("button", { name: /When this issue receives a new comment/ });
await expect(created).toBeVisible();
- await expect(created).toContainText("Wake Wakeup Emacs · Trigger once · 2d 23h left");
+ // The assignee is woken by default, so the row leaves its name out.
+ await expect(created).toContainText("Trigger once · 2d 23h left");
+ await expect(created).not.toContainText("Wakeup Emacs");
const stored = await db.query<{ expiry_seconds: string; on_timeout: string; created_by: string }>(
`SELECT expiry_seconds, on_timeout, created_by FROM issue_wakeup WHERE issue_id = $1 AND system_rule IS NULL`,
[parent.id],
);
expect(stored.rows).toEqual([{ expiry_seconds: "259200", on_timeout: "wake", created_by: userId }]);
- await page.getByRole("switch", { name: "Wake the assignee when sub-issues finish" }).first().click();
- await expect(systemRule).toContainText("Turned off for this issue");
+ await systemRule.click();
+ await page.getByRole("switch", { name: "Wake the assignee when sub-issues finish" }).click();
+ await expect(page.getByRole("button", { name: "Sub-issue wakeup off" })).toBeVisible();
const override = await db.query<{ enabled: boolean; customized: boolean }>(
`SELECT enabled, customized_at IS NOT NULL AS customized FROM issue_wakeup WHERE issue_id = $1 AND system_rule = 'child_done'`,
[parent.id],
@@ -119,7 +135,7 @@ test("a member waits for a condition the platform checks", async ({ page }) => {
await page.setViewportSize({ width: 1440, height: 1000 });
await page.goto(`/${workspace.slug}/issues/${issue.identifier}`, { waitUntil: "domcontentloaded" });
- await page.getByRole("button", { name: "New wakeup" }).click({ timeout: 45_000 });
+ await openNewWakeup(page);
const form = page.getByRole("form", { name: "New wakeup" });
await form.getByRole("button", { name: /Choose a condition/ }).click();
await page.getByRole("menuitem", { name: /A field changes to a value/ }).click();
@@ -131,7 +147,7 @@ test("a member waits for a condition the platform checks", async ({ page }) => {
const rule = page.getByRole("button", { name: /When this issue moves to In Review/ });
await expect(rule).toBeVisible();
- await expect(rule).toContainText("Wake Condition Grok · Trigger once");
+ await expect(rule).toContainText("Trigger once");
const stored = await db.query<{ id: string; condition: unknown; event_types: string[] }>(
`SELECT id, condition, event_types FROM issue_wakeup WHERE issue_id = $1`,
[issue.id],
diff --git a/packages/core/issues/stores/issue-sidebar-sections-persistence.test.ts b/packages/core/issues/stores/issue-sidebar-sections-persistence.test.ts
index b2ef00e896..44b5159008 100644
--- a/packages/core/issues/stores/issue-sidebar-sections-persistence.test.ts
+++ b/packages/core/issues/stores/issue-sidebar-sections-persistence.test.ts
@@ -7,11 +7,12 @@ import {
} from "@multica/core/issues/stores";
const STORAGE_KEY = "multica_issue_sidebar_sections";
-// The order persisted before the Sub-issues section was introduced.
-const OLD_ORDER = [
- "properties", "quick_actions", "wakeups", "plugins", "parent", "duplicates",
+// An order saved while the sidebar still had Sub-issues and Details sections.
+const SAVED_ORDER = [
+ "properties", "quick_actions", "wakeups", "plugins", "parent", "sub_issues", "duplicates",
"pull_requests", "environments", "deliverables", "apps", "execution_log", "details", "metadata",
];
+const RETIRED = new Set(["sub_issues", "details"]);
async function reloadPreferences() {
const saved = localStorage.getItem(STORAGE_KEY)!;
@@ -20,54 +21,44 @@ async function reloadPreferences() {
await useIssueSidebarSectionsStore.persist.rehydrate();
}
-describe("Sub-issues sidebar persisted preferences", () => {
+describe("issue sidebar persisted preferences", () => {
beforeEach(() => {
localStorage.clear();
useIssueSidebarSectionsStore.getState().reset();
});
it.each([
- { name: "default", order: OLD_ORDER },
- { name: "customized", order: [...OLD_ORDER].reverse() },
- ])("hydrates an older $name order without changing existing relative order", async ({ order: savedOrder }) => {
+ { name: "default", order: SAVED_ORDER },
+ { name: "customized", order: [...SAVED_ORDER].reverse() },
+ ])("drops retired sections from an older $name save and keeps the rest in order", async ({ order: savedOrder }) => {
localStorage.setItem(STORAGE_KEY, JSON.stringify({
- state: { order: [...savedOrder, "unknown", "parent"], hidden: ["parent", "apps", "properties", "apps", "unknown"] },
+ state: { order: [...savedOrder, "unknown", "parent"], hidden: ["parent", "details", "sub_issues", "apps", "properties", "unknown"] },
version: 0,
}));
await useIssueSidebarSectionsStore.persist.rehydrate();
const state = useIssueSidebarSectionsStore.getState();
const order = [...selectIssueSidebarOrder(state)];
- expect(order.filter((id) => id !== "sub_issues")).toEqual(savedOrder);
- expect(order.indexOf("sub_issues")).toBe(order.indexOf("parent") + 1);
- expect(order.filter((id) => id === "sub_issues")).toHaveLength(1);
+ expect(order).toEqual(savedOrder.filter((id) => !RETIRED.has(id)));
expect(state.hidden).toEqual(["parent", "apps"]);
await reloadPreferences();
expect(selectIssueSidebarOrder(useIssueSidebarSectionsStore.getState())).toEqual(order);
expect(useIssueSidebarSectionsStore.getState().hidden).toEqual(["parent", "apps"]);
});
- it("persists hiding and reordering Sub-issues, then restores defaults", async () => {
+ it("persists hiding and reordering, then restores defaults", async () => {
const store = useIssueSidebarSectionsStore;
- store.getState().setHidden("sub_issues", true);
- store.getState().setOrder(["sub_issues", ...ISSUE_SIDEBAR_SECTIONS]);
+ store.getState().setHidden("duplicates", true);
+ store.getState().setOrder(["duplicates", ...ISSUE_SIDEBAR_SECTIONS]);
await reloadPreferences();
- expect(selectIssueSidebarOrder(store.getState())[0]).toBe("sub_issues");
- expect(store.getState().hidden).toEqual(["sub_issues"]);
- store.getState().setHidden("sub_issues", false);
+ expect(selectIssueSidebarOrder(store.getState())[0]).toBe("duplicates");
+ expect(store.getState().hidden).toEqual(["duplicates"]);
+ store.getState().setHidden("duplicates", false);
await reloadPreferences();
expect(store.getState().hidden).toEqual([]);
- expect(selectIssueSidebarOrder(store.getState())[0]).toBe("sub_issues");
store.getState().reset();
await reloadPreferences();
expect(store.getState().order).toBeNull();
expect(store.getState().hidden).toEqual([]);
expect(selectIssueSidebarOrder(store.getState())).toEqual(ISSUE_SIDEBAR_SECTIONS);
});
-
- it("shows a newly added section for an uncustomized older save", async () => {
- localStorage.setItem(STORAGE_KEY, JSON.stringify({ state: { order: null, hidden: ["metadata"] }, version: 0 }));
- await useIssueSidebarSectionsStore.persist.rehydrate();
- expect(selectIssueSidebarOrder(useIssueSidebarSectionsStore.getState())).toContain("sub_issues");
- expect(useIssueSidebarSectionsStore.getState().hidden).toEqual(["metadata"]);
- });
});
diff --git a/packages/core/issues/stores/issue-sidebar-sections-store.test.ts b/packages/core/issues/stores/issue-sidebar-sections-store.test.ts
index cd71666526..b341045677 100644
--- a/packages/core/issues/stores/issue-sidebar-sections-store.test.ts
+++ b/packages/core/issues/stores/issue-sidebar-sections-store.test.ts
@@ -29,7 +29,7 @@ describe("resolveIssueSidebarOrder", () => {
describe("resolveIssueSidebarHidden", () => {
it("keeps known sections once and never hides properties", () => {
- expect(resolveIssueSidebarHidden(["details", "details", "properties", "nope"])).toEqual(["details"]);
+ expect(resolveIssueSidebarHidden(["apps", "apps", "properties", "nope"])).toEqual(["apps"]);
});
});
@@ -47,12 +47,12 @@ describe("useIssueSidebarSectionsStore", () => {
it("hides and shows sections", () => {
const { setHidden } = useIssueSidebarSectionsStore.getState();
- setHidden("details", true);
+ setHidden("deliverables", true);
setHidden("metadata", true);
setHidden("properties", true);
- expect(useIssueSidebarSectionsStore.getState().hidden).toEqual(["details", "metadata"]);
+ expect(useIssueSidebarSectionsStore.getState().hidden).toEqual(["deliverables", "metadata"]);
- setHidden("details", false);
+ setHidden("deliverables", false);
expect(useIssueSidebarSectionsStore.getState().hidden).toEqual(["metadata"]);
});
diff --git a/packages/core/issues/stores/issue-sidebar-sections-store.ts b/packages/core/issues/stores/issue-sidebar-sections-store.ts
index 49d53dc0aa..9a617eefba 100644
--- a/packages/core/issues/stores/issue-sidebar-sections-store.ts
+++ b/packages/core/issues/stores/issue-sidebar-sections-store.ts
@@ -11,14 +11,12 @@ export const ISSUE_SIDEBAR_SECTIONS = [
"wakeups",
"plugins",
"parent",
- "sub_issues",
"duplicates",
"pull_requests",
"environments",
"deliverables",
"apps",
"execution_log",
- "details",
"metadata",
] as const;
diff --git a/packages/views/issues/components/deliverables/deliverables-section.tsx b/packages/views/issues/components/deliverables/deliverables-section.tsx
index e42d1d64ee..880af56936 100644
--- a/packages/views/issues/components/deliverables/deliverables-section.tsx
+++ b/packages/views/issues/components/deliverables/deliverables-section.tsx
@@ -56,7 +56,8 @@ export function DeliverablesSection({
return (
<div>
- <IssueSidebarSectionHeader title={t(($) => $.deliverables.section_title)} open={open} onOpenChange={setOpen} count={files.length} actions={
+ <IssueSidebarSectionHeader title={t(($) => $.deliverables.section_title)} open={open} onOpenChange={setOpen} count={files.length}
+ countWhenOpen={images.length + others.length < files.length} actions={
<IconButton size="icon-xs" label={t(($) => $.deliverables.view_all, { count: files.length })} onClick={onOpenOverview}><LayoutGrid /></IconButton>
} />
<IssueSidebarCollapsible open={open}>
diff --git a/packages/views/issues/components/deliverables/deliverables.test.tsx b/packages/views/issues/components/deliverables/deliverables.test.tsx
index 57b37c495d..465ec297ae 100644
--- a/packages/views/issues/components/deliverables/deliverables.test.tsx
+++ b/packages/views/issues/components/deliverables/deliverables.test.tsx
@@ -153,7 +153,7 @@ describe("DeliverablesSection", () => {
it("shows the latest version of each file and the total", () => {
renderSection(FILES);
- expect(screen.getByRole("button", { name: /Deliverables/ })).toHaveTextContent("3");
+ expect(screen.getByRole("button", { name: /Deliverables/ })).not.toHaveTextContent("3");
// One row for the report, marked as its second version.
const report = screen.getByRole("button", { name: "report.md, version 2" });
expect(report).toHaveTextContent("v2");
@@ -162,6 +162,14 @@ describe("DeliverablesSection", () => {
expect(screen.getByRole("button", { name: "View all 3 deliverables" })).toBeInTheDocument();
});
+ it("keeps the total in the open header once the section lists only the latest", () => {
+ const files = Array.from({ length: 5 }, (_, i) =>
+ attachment({ id: `doc-${i}`, filename: `notes-${i}.md`, created_at: `2026-09-2${i}T10:00:00Z` }),
+ );
+ renderSection(collectDeliverableFiles([comment("c-5", files)]));
+ expect(screen.getByRole("button", { name: "Deliverables 5" })).toHaveAttribute("aria-expanded", "true");
+ });
+
it("opens the latest version in the page's viewer", () => {
renderSection(FILES);
fireEvent.click(screen.getByRole("button", { name: "report.md, version 2" }));
diff --git a/packages/views/issues/components/environment-start-menu.tsx b/packages/views/issues/components/environment-start-menu.tsx
index 11ba671a54..823a157fa3 100644
--- a/packages/views/issues/components/environment-start-menu.tsx
+++ b/packages/views/issues/components/environment-start-menu.tsx
@@ -1,6 +1,6 @@
"use client";
-import { Fragment } from "react";
+import { Fragment, useState } from "react";
import type { Agent, DeclaredEnvironment, IssueEnvironmentConfig } from "@multica/core/types";
import { Bot, Plus, Server } from "@multica/ui/icons";
import { IconButton } from "@multica/ui/components/common/icon-button";
@@ -17,6 +17,7 @@ import {
DropdownMenuTrigger,
} from "@multica/ui/components/ui/dropdown-menu";
import { useT } from "../../i18n";
+import { useReopenOnReveal } from "./use-sidebar-reveal-motion";
export type DeclaredState = "available" | "running" | "starting";
@@ -42,6 +43,8 @@ export function EnvironmentStartMenu({
agentChoices,
preparing,
onAskAgent,
+ defaultOpen,
+ onOpenChange,
}: {
configs: IssueEnvironmentConfig[];
machineFor: (runtimeId: string) => StartMenuMachine;
@@ -53,6 +56,8 @@ export function EnvironmentStartMenu({
agentChoices: Agent[];
preparing: boolean;
onAskAgent: (agent: Agent) => void;
+ defaultOpen?: boolean;
+ onOpenChange?: (open: boolean) => void;
}) {
const { t } = useT("issues");
const declaring = configs.filter((config) => config.environments.length > 0);
@@ -60,9 +65,17 @@ export function EnvironmentStartMenu({
? t(($) => $.environments.start_menu.ask_agent, { name: agent.name })
: t(($) => $.environments.start_menu.ask_any_agent);
const askSide = preparing ? t(($) => $.environments.start_menu.preparing) : t(($) => $.environments.start_menu.new_run);
+ const [open, setOpen] = useState(!!defaultOpen);
+ useReopenOnReveal(!!defaultOpen, () => setOpen(true));
return (
- <DropdownMenu>
+ <DropdownMenu
+ open={open}
+ onOpenChange={(next) => {
+ setOpen(next);
+ onOpenChange?.(next);
+ }}
+ >
<DropdownMenuTrigger
render={
<IconButton variant="ghost" size="icon-xs" label={t(($) => $.environments.start_menu.trigger)}>
diff --git a/packages/views/issues/components/execution-log-section.test.tsx b/packages/views/issues/components/execution-log-section.test.tsx
index 4e152e2ba6..629e332b41 100644
--- a/packages/views/issues/components/execution-log-section.test.tsx
+++ b/packages/views/issues/components/execution-log-section.test.tsx
@@ -1,6 +1,6 @@
// @vitest-environment jsdom
-import { cleanup, fireEvent, screen, waitFor } from "@testing-library/react";
+import { cleanup, fireEvent, screen } from "@testing-library/react";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { AgentTask } from "@multica/core/types";
import { renderWithI18n } from "../../test/i18n";
@@ -101,19 +101,17 @@ describe("subtree execution log", () => {
renderParent([own], [own, child, grandchild]);
const toggle = screen.getByRole("checkbox", { name: "Include sub-issues" });
expect(toggle).not.toBeChecked();
- expect(screen.getByRole("button", { name: "Execution log 1" })).toBeInTheDocument();
- expect(screen.getAllByText("$1.00").length).toBeGreaterThan(0);
+ expect(screen.getByTestId("execution-log-spend")).toHaveTextContent("$1.00");
expect(screen.queryByText("Child run")).not.toBeInTheDocument();
fireEvent.click(toggle);
expect(toggle).toBeChecked();
- expect(screen.getByRole("button", { name: "Execution log 3" })).toBeInTheDocument();
- expect(screen.getAllByText("$3.00").length).toBeGreaterThan(0);
+ expect(screen.getByTestId("execution-log-spend")).toHaveTextContent("$3.00");
expect(screen.getByText("Child run")).toBeInTheDocument();
expect(screen.getByText("Grandchild run")).toBeInTheDocument();
expect(screen.getByText("MUL-2")).toHaveAttribute("title", "Child");
expect(screen.getByText("MUL-3")).toBeInTheDocument();
const header = screen.getByText("Execution log").closest("div")!;
- expect(within(header).getByText("1 active")).toBeInTheDocument();
+ expect(within(header).queryByText("1 active")).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Open timeline" }));
const dialog = screen.getByRole("dialog");
const dialogToggle = within(dialog).getByRole("checkbox", { name: "Include sub-issues" });
@@ -137,8 +135,12 @@ describe("subtree execution log", () => {
expect(within(screen.getByRole("dialog")).getByRole("checkbox", { name: "Include sub-issues" })).toBeChecked();
expect(within(screen.getByRole("dialog")).getByText("Grandchild run")).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Close" }));
- fireEvent.click(toggle);
- expect(screen.getByRole("button", { name: "Execution log 1" })).toBeInTheDocument();
+ fireEvent.click(screen.getByRole("button", { name: "Execution log" }));
+ expect(within(header).getByText("1 active")).toBeInTheDocument();
+ expect(screen.getByRole("button", { name: "Execution log 3" })).toHaveAttribute("aria-expanded", "false");
+ fireEvent.click(screen.getByRole("button", { name: "Execution log 3" }));
+ fireEvent.click(screen.getByRole("checkbox", { name: "Include sub-issues" }));
+ expect(screen.getByTestId("execution-log-spend")).toHaveTextContent("$1.00");
expect(screen.queryByText("Grandchild run")).not.toBeInTheDocument();
});
@@ -156,9 +158,10 @@ describe("subtree execution log", () => {
expect(within(active).getAllByText(/^Descendant /)).toHaveLength(8);
expect(within(active).getByText("MUL-9")).toBeInTheDocument();
expect(active).toHaveClass("max-h-48", "overflow-y-auto");
- const disclosure = screen.getByRole("button", { name: "Execution log 9" });
+ const disclosure = screen.getByRole("button", { name: "Execution log" });
fireEvent.click(disclosure);
expect(disclosure).toHaveAttribute("aria-expanded", "false");
+ expect(disclosure).toHaveAccessibleName("Execution log 9");
expect(screen.queryByRole("checkbox", { name: "Include sub-issues" })).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Open timeline" }));
const dialog = screen.getByRole("dialog");
@@ -276,13 +279,13 @@ describe("subtree execution log", () => {
);
fireEvent.click(screen.getByRole("checkbox", { name: "Include sub-issues" }));
expect(screen.getByRole("status", { name: "Loading runs..." })).toBeInTheDocument();
- expect(screen.queryByRole("button", { name: "Execution log 1" })).not.toBeInTheDocument();
+ expect(screen.queryByTestId("execution-log-spend")).not.toBeInTheDocument();
expect(list).toHaveBeenCalledWith("issue-1", true, { view: "timeline" });
await act(async () => { rejectRequest(new Error("unavailable")); });
const retry = await screen.findByRole("button", { name: "Could not load runs. Retry" });
- list.mockResolvedValue([makeTask({ id: "deep", issue_id: "deep-issue" })]);
+ list.mockResolvedValue([makeTask({ id: "deep", issue_id: "deep-issue", issue_identifier: "MUL-9" })]);
fireEvent.click(retry);
- await waitFor(() => expect(screen.getByRole("button", { name: "Execution log 1" })).toBeInTheDocument());
+ expect(await screen.findByText("MUL-9")).toBeInTheDocument();
expect(list).toHaveBeenCalledTimes(2);
queryClient.clear();
});
@@ -626,21 +629,29 @@ describe("execution log header geometry", () => {
expect(cls).not.toMatch(/^(sm|md|lg|xl|2xl):/);
}
}
- expect(screen.getByRole("button", { name: "Execution log 1" })).toHaveAttribute("aria-expanded", "true");
+ expect(screen.getByRole("button", { name: "Execution log" })).toHaveAttribute("aria-expanded", "true");
});
- it("keeps complete cost figures in the summary rather than crowding the header", () => {
+ it("puts the spend in the header, open or collapsed, and the count only once collapsed", () => {
renderSection([completed]);
- expect(within(headerOf()).queryByText("$2.00")).not.toBeInTheDocument();
- const spent = screen.getByText("Spent", { selector: "dt" }).parentElement!;
- expect(spent).toHaveTextContent("$2.00");
- fireEvent.click(screen.getByRole("button", { name: "Execution log 1" }));
- expect(screen.getByRole("button", { name: "Execution log 1" })).toHaveAttribute("aria-expanded", "false");
+ expect(within(headerOf()).getByTestId("execution-log-spend")).toHaveTextContent("$2.00");
+ expect(within(headerOf()).getByTestId("execution-log-spend")).toHaveAttribute("title", "Spent");
expect(screen.queryByText("Spent", { selector: "dt" })).not.toBeInTheDocument();
+ fireEvent.click(screen.getByRole("button", { name: "Execution log" }));
+ expect(screen.getByRole("button", { name: "Execution log 1" })).toHaveAttribute("aria-expanded", "false");
+ expect(within(headerOf()).getByTestId("execution-log-spend")).toHaveTextContent("$2.00");
+ });
+
+ it("says a run is active in the header only while collapsed", () => {
+ renderSection([makeTask({ status: "running", trigger_summary: "Live run" })]);
+ expect(within(headerOf()).queryByText("1 active")).not.toBeInTheDocument();
+ fireEvent.click(screen.getByRole("button", { name: "Execution log" }));
+ expect(within(headerOf()).getByText("1 active")).toBeInTheDocument();
});
it("keeps the count without inventing zero cost when no usage was reported", () => {
renderSection([makeTask({ status: "completed", completed_at: "2026-06-08T08:04:00Z" })]);
+ fireEvent.click(screen.getByRole("button", { name: "Execution log" }));
expect(within(headerOf()).getByText("1")).toBeVisible();
expect(screen.queryByText("$0.00")).not.toBeInTheDocument();
});
@@ -729,33 +740,24 @@ describe("execution log past runs", () => {
expect(row).not.toHaveTextContent("10m");
});
- it("totals the spend, tokens and agent time", () => {
+ it("totals the spend in the header and leaves tokens and agent time to the dialog", () => {
renderSection([past(1), past(2), past(3, { status: "failed", usage: [] })]);
- const term = (label: string) => screen.getByText(label, { selector: "dt" }).parentElement!;
- expect(term("Spent")).toHaveTextContent("$4.00");
- expect(term("Tokens")).toHaveTextContent("1.8M");
- expect(term("Agent time")).toHaveTextContent("30m");
- });
-
- it("opens the full history from the compact cost chart", () => {
- renderSection([past(1), past(2), past(3, { status: "failed", usage: [] })]);
- fireEvent.click(screen.getByRole("button", { name: /Cost per run/ }));
- expect(screen.getByRole("heading", { name: "Runs" })).toBeInTheDocument();
+ expect(screen.getByTestId("execution-log-spend")).toHaveTextContent("$4.00");
+ expect(screen.queryByText("Tokens", { selector: "dt" })).not.toBeInTheDocument();
+ expect(screen.queryByText("Agent time", { selector: "dt" })).not.toBeInTheDocument();
+ expect(screen.queryByRole("button", { name: /Cost per run/ })).not.toBeInTheDocument();
});
- it("bounds the chart and recent list while keeping all-run totals and a visible history entry", () => {
+ it("bounds the recent list while keeping the all-run spend, count and a visible history entry", () => {
const tasks = Array.from({ length: 35 }, (_, i) => past(i + 1, {
started_at: new Date(Date.UTC(2026, 5, i + 1, 8)).toISOString(),
completed_at: new Date(Date.UTC(2026, 5, i + 1, 8, 10)).toISOString(),
usage: [usageSlice({ cost_usd_ticks: 20_000_000_000 })],
}));
renderSection(tasks);
- const chart = screen.getByRole("button", { name: /Cost per run/ });
- expect(chart.querySelectorAll("[data-run]")).toHaveLength(30);
- expect(chart.querySelector("[data-run]")).toHaveAttribute("data-run", "past-6");
- expect(chart.querySelectorAll("[data-run]")[29]).toHaveAttribute("data-run", "past-35");
- expect(screen.getByText("Spent", { selector: "dt" }).parentElement).toHaveTextContent("$70.00");
+ expect(screen.getByTestId("execution-log-spend")).toHaveTextContent("$70.00");
+ expect(screen.getByRole("button", { name: "Execution log 35" })).toHaveAttribute("aria-expanded", "true");
expect(screen.getAllByText(/^Past run \d+$/)).toHaveLength(3);
expect(screen.queryByText("Latest")).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Open timeline · Show 32 more" }));
@@ -770,56 +772,12 @@ describe("execution log past runs", () => {
expect(active).toHaveAttribute("tabindex", "0");
});
- it("scales sidebar bars by cost to match the default run history", () => {
- renderSection([
- past(1, { usage: [usageSlice({ input_tokens: 100, output_tokens: 0, cache_read_tokens: 0, cache_write_tokens: 0, cost_usd_ticks: 100_000_000_000 })] }),
- past(2, { usage: [usageSlice({ input_tokens: 1000, output_tokens: 0, cache_read_tokens: 0, cache_write_tokens: 0, cost_usd_ticks: 10_000_000_000 })] }),
- ]);
- const bars = screen.getByRole("button", { name: /Cost per run/ }).querySelectorAll("[data-run]");
- expect((bars[0] as HTMLElement).style.height).toBe("24px");
- expect(parseFloat((bars[1] as HTMLElement).style.height)).toBeCloseTo(2.4);
- });
-
- it.each([1, 8, 15, 30])("preserves upstream slots for %i runs", (count) => {
- renderSection(Array.from({ length: count }, (_, i) => past(i + 1, {
- started_at: new Date(Date.UTC(2026, 5, i + 1, 8)).toISOString(),
- completed_at: new Date(Date.UTC(2026, 5, i + 1, 8, 10)).toISOString(),
- })));
- const chart = screen.getByRole("button", { name: /Cost per run/ });
- const plot = chart.querySelector("[aria-hidden]") as HTMLElement;
- expect(plot.style.height).toBe("24px");
- expect(plot.children).toHaveLength(Math.max(20, count));
- expect(chart.querySelectorAll("[data-run]")).toHaveLength(count);
- expect(plot.children[plot.children.length - count]).toHaveAttribute("data-run");
- expect(chart).not.toHaveTextContent("Latest");
- expect(chart).not.toHaveTextContent("Cost per run");
- expect(chart).not.toHaveTextContent("#1");
- });
-
- it("preserves run status colors and marks missing usage", () => {
- renderSection([
- past(1, { status: "failed" }),
- past(2, { status: "cancelled" }),
- past(3, { usage: [] }),
- makeTask({ id: "active", status: "running", usage: [] }),
- ]);
- const chart = screen.getByRole("button", { name: /Cost per run/ });
- expect(chart.querySelector('[data-run="past-1"]')).toHaveClass("bg-destructive");
- expect(chart.querySelector('[data-run="past-2"]')).toHaveClass("bg-faint-foreground");
- expect(chart.querySelector('[data-run="past-3"]')).toHaveClass("border-dashed");
- expect(chart.querySelector('[data-run="active"]')).toHaveClass("bg-info");
- });
-
it("makes full details reachable from the first priced run", () => {
renderSection([past(1)]);
fireEvent.click(screen.getByRole("button", { name: /Open timeline/ }));
expect(screen.getByRole("heading", { name: "Runs" })).toBeInTheDocument();
});
- it("skips the bars when no run recorded usage — there are no costs to compare", () => {
- renderSection([past(1, { usage: [] }), past(2, { usage: [] })]);
- expect(screen.queryByRole("button", { name: /Cost per run/ })).not.toBeInTheDocument();
- });
});
describe("IssueRunsTotal pricing", () => {
diff --git a/packages/views/issues/components/execution-log-section.tsx b/packages/views/issues/components/execution-log-section.tsx
index f8e1d2a704..dd828acbcf 100644
--- a/packages/views/issues/components/execution-log-section.tsx
+++ b/packages/views/issues/components/execution-log-section.tsx
@@ -36,19 +36,14 @@ import {
} from "../../runtimes/utils";
import { TerminateTaskConfirmDialog } from "./terminate-task-confirm-dialog";
import { IssueRunsDialog } from "./issue-runs-dialog";
-import { RunTriggerLabel } from "./run-trigger-label";
-import {
- buildRunTimeline,
- type TimelineRun,
- type RunTimeline,
-} from "./issue-run-timeline";
+import { buildRunTimeline } from "./issue-run-timeline";
import { canRetryRun, RetryRunButton } from "./retry-run-button";
import { TaskStatusIcon } from "./task-status-icon";
import { useFormatSpend, useStatusLabel, useTriggerText } from "./task-run-labels";
import { WakeupRunLabel } from "./wakeup-source-chip";
-// Sidebar summary: totals, a bounded cost chart, active runs and recent history.
-// Full charts and history live in the Runs dialog.
+// Sidebar summary: total spend in the header, active runs and recent history.
+// Totals, charts and full history live in the Runs dialog.
//
// Row layout — simple left/right flex:
// 1. Agent avatar (no status dot — agent availability is not the
@@ -144,7 +139,8 @@ export function ExecutionLogSection({
});
}, [tasks]);
- // Keep summary totals priced with the same helpers and custom rates as the dialog.
+ const formatSpend = useFormatSpend();
+ // Keep the header total priced with the same helpers and custom rates as the dialog.
const timeline = useMemo(
() => buildRunTimeline(tasks, Date.now()),
// eslint-disable-next-line react-hooks/exhaustive-deps -- `pricings` re-prices on a saved custom rate
@@ -160,31 +156,32 @@ export function ExecutionLogSection({
const latest = pastTasks.slice(0, Math.max(0, LIST_ROWS - activeRows));
const hiddenCount = pastTasks.length - latest.length;
const openRuns = () => setRunsOpen(true);
+ // Open, the active rows speak for themselves; collapsed, the header says it.
+ const status = !open && activeTasks.length > 0 ? (
+ <span className="inline-flex shrink-0 items-center gap-1 text-caption text-info tabular-nums">
+ <span aria-hidden="true" className="size-1.5 rounded-full bg-info motion-safe:animate-pulse" />
+ {t(($) => $.runs_timeline.count_active, { count: activeTasks.length })}
+ </span>
+ ) : timeline.pricedCount > 0 ? (
+ <span data-testid="execution-log-spend" title={t(($) => $.runs_timeline.stat_spent)} className="shrink-0 text-caption text-muted-foreground tabular-nums">
+ {formatSpend({ cost: timeline.totalCost, credits: timeline.totalCredits })}
+ </span>
+ ) : undefined;
return (
<div className="@container/execution-log">
<IssueSidebarSectionHeader
title={t(($) => $.execution_log.section)} open={open} onOpenChange={setOpen}
count={activeTasks.length + pastTasks.length}
+ countWhenOpen={hiddenCount > 0}
actions={<IconButton size="icon-xs" onClick={openRuns}
label={[t(($) => $.execution_log.open_timeline), hiddenCount > 0 ? t(($) => $.execution_log.more_runs, { count: hiddenCount }) : null].filter(Boolean).join(" · ")}>
<Maximize2 />
</IconButton>}
- status={activeTasks.length > 0 ? (
- <span className="inline-flex shrink-0 items-center gap-1 text-caption text-info tabular-nums">
- <span aria-hidden="true" className="size-1.5 rounded-full bg-info motion-safe:animate-pulse" />
- {t(($) => $.runs_timeline.count_active, { count: activeTasks.length })}
- </span>
- ) : undefined}
+ status={status}
/>
<IssueSidebarCollapsible open={open}>
<div className="space-y-2 px-2">
- {(timeline.pricedCount > 0 || timeline.agentMs > 0) && (
- <div className="space-y-0.5 pt-2">
- <RunTotals timeline={timeline} />
- {timeline.pricedCount > 0 && <RunCostBars timeline={timeline} onOpen={openRuns} />}
- </div>
- )}
{activeTasks.length > 0 && (
<div className="max-h-48 space-y-0.5 overflow-y-auto overscroll-contain rounded-md focus-visible:outline-2 focus-visible:outline-ring" role="region" aria-label={t(($) => $.runs_timeline.count_active, { count: activeTasks.length })} tabIndex={0}>
{startedTasks.map((task) => <ActiveTaskRow key={task.id} task={task} issueId={task.issue_id || issueId} showIssue={includeDescendants} />)}
@@ -240,159 +237,6 @@ export function ExecutionLogSection({
);
}
-// ─── Totals ────────────────────────────────────────────────────────────────
-
-// The issue's spend, tokens and agent time at a glance. "—" for a figure no
-// run reported, never 0.
-function RunTotals({ timeline }: { timeline: RunTimeline }) {
- const { t } = useT("issues");
- const formatSpend = useFormatSpend();
- const priced = timeline.pricedCount > 0;
- const stats = [
- [
- t(($) => $.runs_timeline.stat_spent),
- priced ? formatSpend({ cost: timeline.totalCost, credits: timeline.totalCredits }) : "—",
- ],
- [
- t(($) => $.runs_timeline.stat_tokens),
- priced && hasTokenFigure({ tokens: timeline.tokens.total, credits: timeline.totalCredits })
- ? formatTokens(timeline.tokens.total)
- : "—",
- ],
- [t(($) => $.runs_timeline.stat_agent_time), formatAgentTime(timeline.agentMs / 1000, "0s")],
- ] as const;
- return (
- <dl className="grid grid-cols-3 gap-2 px-1 pb-1.5">
- {stats.map(([label, value]) => (
- <div key={label} className="flex min-w-0 flex-col-reverse">
- <dt className="truncate text-micro text-muted-foreground">{label}</dt>
- <dd className="break-words text-label font-medium tabular-nums">{value}</dd>
- </div>
- ))}
- </dl>
- );
-}
-
-// ─── Cost bars ─────────────────────────────────────────────────────────────
-
-// How many runs the strip holds. A short history leaves the older slots
-// empty, so it sits at the "Now" end instead of stretching two runs into
-// slabs; past the minimum the slots narrow to fit, up to the maximum.
-const MIN_BAR_SLOTS = 20;
-const MAX_BAR_SLOTS = 30;
-const BAR_HEIGHT = 24;
-// A run that reported no cost still gets a mark, short enough to never read
-// as a cheap run.
-const STUB_HEIGHT = 3;
-
-function costBarTone(run: TimelineRun): string {
- if (run.active) return "bg-info animate-pulse";
- if (run.task.status === "failed") return "bg-destructive";
- if (run.task.status === "cancelled") return "bg-faint-foreground";
- if (!run.usage) return "border border-b-0 border-dashed border-faint-foreground";
- return "bg-chart-2";
-}
-
-// One bar per recent run, oldest on the left: height is what the run cost
-// against the most expensive one shown, colour is how it ended. It answers
-// "which run was expensive, and which failed" at a glance; when it happened
-// is the Runs dialog's job, which clicking the strip opens — so the strip
-// carries no time axis.
-function RunCostBars({ timeline, onOpen }: { timeline: RunTimeline; onOpen: () => void }) {
- const { t } = useT("issues");
- const [hoverSlot, setHoverSlot] = useState<number | null>(null);
- const shown = timeline.runs.slice(-MAX_BAR_SLOTS);
- const slots = Math.max(MIN_BAR_SLOTS, shown.length);
- const emptySlots = slots - shown.length;
- const maxCost = Math.max(0, ...shown.map((run) => run.usage?.cost ?? 0));
- const hovered = hoverSlot != null && hoverSlot >= emptySlots ? shown[hoverSlot - emptySlots] : undefined;
-
- const trackPointer = (event: React.PointerEvent<HTMLElement>) => {
- const rect = event.currentTarget.getBoundingClientRect();
- if (rect.width <= 0) return;
- const slot = Math.floor(((event.clientX - rect.left) / rect.width) * slots);
- setHoverSlot(Math.min(Math.max(slot, 0), slots - 1));
- };
-
- return (
- <div className="px-1">
- <Tooltip trackCursorAxis="x">
- <TooltipTrigger
- render={
- <button
- type="button"
- onClick={onOpen}
- onPointerMove={trackPointer}
- onPointerDown={trackPointer}
- onPointerLeave={() => setHoverSlot(null)}
- aria-label={t(($) => $.execution_log.strip_aria)}
- />
- }
- className="relative block w-full rounded-xs text-left"
- >
- <span aria-hidden className="flex items-end gap-0.5" style={{ height: BAR_HEIGHT }}>
- {Array.from({ length: emptySlots }, (_, i) => (
- <span key={`empty-${i}`} className="h-0.5 flex-1 rounded-full bg-border" />
- ))}
- {shown.map((run) => {
- const height = run.usage && maxCost > 0
- ? Math.max(2, (run.usage.cost / maxCost) * BAR_HEIGHT)
- : STUB_HEIGHT;
- return (
- <span
- key={run.task.id}
- data-run={run.task.id}
- className={cn(
- "flex-1 rounded-t-xs transition-opacity",
- costBarTone(run),
- hovered && run !== hovered && "opacity-35",
- )}
- style={{ height }}
- />
- );
- })}
- </span>
- </TooltipTrigger>
- <TooltipContent className="max-w-64 flex-col items-start gap-0">
- {hovered ? <RunBarSummary run={hovered} /> : t(($) => $.execution_log.usage_total_tooltip)}
- </TooltipContent>
- </Tooltip>
- </div>
- );
-}
-
-function RunBarSummary({ run }: { run: TimelineRun }) {
- const { t } = useT("issues");
- const formatSpend = useFormatSpend();
- const trigger = useTriggerText(run.task);
- const status = useStatusLabel(run.task.status);
- return (
- <>
- <RunTriggerLabel task={run.task} fallback={trigger}>
- {(label) => <span className="max-w-full truncate">{label}</span>}
- </RunTriggerLabel>
- <span className="text-micro text-muted-foreground">
- {[
- run.task.issue_identifier,
- // A run still going has not reported usage yet — that is not "none".
- run.usage
- ? formatSpend(run.usage)
- : run.active
- ? null
- : t(($) => $.execution_log.strip_no_usage),
- run.usage && hasTokenFigure(run.usage)
- ? t(($) => $.runs_timeline.tokens_count, { tokens: formatTokens(run.usage.tokens) })
- : null,
- run.durationMs != null ? formatAgentTime(run.durationMs / 1000, "0s") : null,
- run.task.status === "completed" ? null : status,
- ]
- .filter(Boolean)
- .join(" · ")}
- </span>
- </>
- );
-}
-
// ─── Issue total ───────────────────────────────────────────────────────────
// The issue's run count and whole spend, as a header affordance: "21 runs ·
@@ -794,7 +638,8 @@ function RowShell({
multiline ? "items-start" : "items-center",
)}
>
- <span className={cn("flex shrink-0", multiline && "mt-0.5")}>
+ {/* 20px avatar + 4px puts the row text on the sidebar's shared text column. */}
+ <span className={cn("-mr-1 flex shrink-0", multiline && "mt-0.5")}>
{task.agent_id ? (
<ActorAvatar
actorType="agent"
diff --git a/packages/views/issues/components/issue-detail.test.tsx b/packages/views/issues/components/issue-detail.test.tsx
index de253fd1bc..2a310eba25 100644
--- a/packages/views/issues/components/issue-detail.test.tsx
+++ b/packages/views/issues/components/issue-detail.test.tsx
@@ -369,6 +369,7 @@ const mockApiObj = vi.hoisted(() => ({
listRuntimes: vi.fn().mockResolvedValue([]),
getProject: vi.fn(),
listProjects: vi.fn().mockResolvedValue({ projects: [] }),
+ listIssueSystemWakeups: vi.fn().mockResolvedValue([]),
listPins: vi.fn().mockResolvedValue([]),
createIssueCollabTicket: vi.fn().mockResolvedValue({ enabled: false }),
}));
@@ -855,6 +856,7 @@ describe("IssueDetail (shared)", () => {
mockApiObj.listIssueSubscribers.mockResolvedValue([]);
mockApiObj.listChildIssues.mockResolvedValue({ issues: [] });
mockApiObj.getChildIssueProgress.mockResolvedValue({ progress: [] });
+ mockApiObj.listIssueSystemWakeups.mockResolvedValue([]);
mockApiObj.getAgentTaskSnapshot.mockResolvedValue([]);
mockApiObj.getWorkspaceWorkingAgents.mockResolvedValue([]);
mockApiObj.listProperties.mockResolvedValue({ properties: [], total: 0 });
@@ -923,10 +925,11 @@ describe("IssueDetail (shared)", () => {
renderIssueDetail();
const header = await screen.findByRole("button", { name: /^Deliverables/ });
- expect(header).toHaveTextContent("1");
expect(screen.getByRole("button", { name: "report.md, version 2" })).toBeInTheDocument();
expect(screen.getByRole("button", { name: "View 1 deliverable" })).toBeInTheDocument();
expect(screen.queryByRole("button", { name: "brief.pdf" })).toBeNull();
+ fireEvent.click(header);
+ expect(header).toHaveTextContent("1");
});
it("keeps images from comments outside the loaded history in deliverables", async () => {
@@ -1389,8 +1392,8 @@ describe("IssueDetail (shared)", () => {
// Core rows — always rendered regardless of whether the issue has a value.
expect(screen.getByText("Status")).toBeInTheDocument();
expect(screen.getByText("Assignee")).toBeInTheDocument();
- // "Project" appears twice (row label + picker stub), so disambiguate by id.
- expect(screen.getByTestId("project-picker")).toBeInTheDocument();
+ // Project is optional: the fixture has none, so its row waits in Add property.
+ expect(screen.queryByTestId("project-picker")).not.toBeInTheDocument();
// priority="high" + due_date are set in the fixture, so both optional rows show.
expect(screen.getByText("Priority")).toBeInTheDocument();
expect(screen.getByText("Due date")).toBeInTheDocument();
@@ -1423,13 +1426,25 @@ describe("IssueDetail (shared)", () => {
expect(screen.queryByText("Priority")).not.toBeInTheDocument();
expect(screen.queryByText("Due date")).not.toBeInTheDocument();
expect(screen.queryByText("Labels")).not.toBeInTheDocument();
- // Project stays as a core row regardless of value.
- expect(screen.getByTestId("project-picker")).toBeInTheDocument();
+ expect(screen.queryByTestId("project-picker")).not.toBeInTheDocument();
// No parent → no standalone Parent issue section either.
expect(screen.queryByText("Parent issue")).not.toBeInTheDocument();
expect(screen.getByRole("button", { name: "Add property" })).toBeInTheDocument();
});
+ it("shows the Project row once the issue has a project, and offers it otherwise", async () => {
+ mockApiObj.getProject.mockResolvedValue({ id: "proj-1", name: "Demo" });
+ mockApiObj.getIssue.mockResolvedValue({ ...mockIssue, project_id: "proj-1" });
+ const { unmount } = renderIssueDetail();
+ expect(await screen.findByTestId("project-picker")).toBeInTheDocument();
+ unmount();
+
+ mockApiObj.getIssue.mockResolvedValue(mockIssue);
+ renderIssueDetail();
+ fireEvent.click(await screen.findByRole("button", { name: "Add property" }));
+ expect(await screen.findByRole("button", { name: "Project" })).toBeInTheDocument();
+ });
+
it("keeps the Properties header free of add and settings buttons", async () => {
renderIssueDetail();
const disclosure = await screen.findByRole("button", { name: "Properties" });
@@ -1811,9 +1826,7 @@ describe("IssueDetail (shared)", () => {
// Default fixture already has metadata: {}, asserted explicitly here.
renderIssueDetail();
- await waitFor(() => {
- expect(screen.getByText("Details")).toBeInTheDocument();
- });
+ await screen.findByTestId("issue-sidebar-footer");
expect(screen.queryByRole("button", { name: /^Metadata\b/ })).not.toBeInTheDocument();
});
@@ -2287,9 +2300,8 @@ describe("IssueDetail (shared)", () => {
});
});
- // Details is creator + immutable timestamps, so it ranks below the
- // execution log, which is what people actually open the sidebar for.
- it("orders the Details section after the execution log", async () => {
+ // Creator and dates are one line under every section, not a section.
+ it("closes the sidebar with a one-line creation footer after the sections", async () => {
mockApiObj.listTasksByIssue.mockResolvedValue([
{
id: "task-past",
@@ -2311,11 +2323,11 @@ describe("IssueDetail (shared)", () => {
renderIssueDetail();
const executionLog = await screen.findByText("Execution log");
- const details = screen.getByText("Details");
-
- // DOCUMENT_POSITION_FOLLOWING: Details comes after the execution log.
+ const footer = await screen.findByTestId("issue-sidebar-footer");
+ expect(footer).toHaveTextContent(/^Created by Test User · Jan 1[45]$/);
+ expect(screen.queryByText("Details")).not.toBeInTheDocument();
expect(
- executionLog.compareDocumentPosition(details) & Node.DOCUMENT_POSITION_FOLLOWING,
+ executionLog.compareDocumentPosition(footer) & Node.DOCUMENT_POSITION_FOLLOWING,
).toBeTruthy();
});
@@ -2380,14 +2392,14 @@ describe("IssueDetail (shared)", () => {
it("does not re-render comment cards when unrelated page state changes", async () => {
renderIssueDetail();
await screen.findByText("I can help with this");
- await screen.findByText("Details");
+ const properties = await screen.findByRole("button", { name: "Properties" });
const commentBodies = new Set(mockTimeline.map((entry) => entry.content));
const cardRenders = () =>
readonlyContentRenders.filter((content) => commentBodies.has(content)).length;
const before = cardRenders();
- fireEvent.click(screen.getByText("Details"));
+ fireEvent.click(properties);
expect(cardRenders()).toBe(before);
});
@@ -2532,11 +2544,7 @@ describe("IssueDetail (shared)", () => {
renderIssueDetail();
expect(await screen.findByText("created this issue on behalf of Test User")).toBeInTheDocument();
- fireEvent.click(screen.getByText("Details"));
- const creatorRow = screen.getByText("Created by").parentElement!;
- expect(creatorRow).toHaveTextContent("Claude Agent");
- expect(within(creatorRow).getByRole("link", { name: "On behalf of Test User" }))
- .toHaveAttribute("href", "/test/members/user-1");
+ expect(screen.getByTestId("issue-sidebar-footer")).toHaveTextContent(/^Created by Claude Agent for Test User · Jan 1[45]$/);
expect(screen.queryByText("Requested by")).not.toBeInTheDocument();
});
@@ -2556,8 +2564,7 @@ describe("IssueDetail (shared)", () => {
renderIssueDetail();
expect(await screen.findByText("created this issue")).toBeInTheDocument();
- fireEvent.click(screen.getByText("Details"));
- expect(screen.queryByText(/On behalf of/)).not.toBeInTheDocument();
+ expect(screen.getByTestId("issue-sidebar-footer")).not.toHaveTextContent(" for ");
expect(screen.queryByText("Requested by")).not.toBeInTheDocument();
});
@@ -2573,8 +2580,7 @@ describe("IssueDetail (shared)", () => {
renderIssueDetail();
expect(await screen.findByText("created this issue on behalf of Unknown")).toBeInTheDocument();
- fireEvent.click(screen.getByText("Details"));
- expect(screen.getByText("Created by").parentElement).toHaveTextContent("On behalf of Unknown");
+ expect(screen.getByTestId("issue-sidebar-footer")).toHaveTextContent("for Unknown");
});
});
@@ -4066,155 +4072,20 @@ describe("IssueDetail (shared)", () => {
const inlineChildren = () => within(document.querySelector<HTMLElement>('[class~="group/sub-issues"]')!);
const findInlineChild = (title: string) => waitFor(() => inlineChildren().getByText(title));
- it("offers direct sidebar child links and an independent disclosure", async () => {
+ it("lists sub-issues in the main column only, with the system wakeup beside its heading", async () => {
mockApiObj.listChildIssues.mockResolvedValue({
- issues: [
- subIssue({ id: "child-open", identifier: "TES-11", title: "Open destination", status: "todo" }),
- subIssue({ id: "child-done", identifier: "TES-12", title: "Custom completion", status: "verified", status_category: "done" }),
- subIssue({ id: "child-cancelled", identifier: "TES-13", title: "Cancelled destination", status: "cancelled" }),
- ],
+ issues: [subIssue({ id: "child-open", identifier: "TES-11", title: "Open destination", status: "todo" })],
});
+ mockApiObj.listIssueSystemWakeups.mockResolvedValue([{
+ id: "rule", revision: 1, default_instruction: "Advance the next stage.", customized: false, paused_reason: null,
+ rule: "child_done", workspace_default: true, enabled: true, instruction: "", staged: false, stage: null, total: 1, remaining: 1,
+ waiting: ["TES-11"], target: { type: "agent", id: "agent-1", name: "Claude Agent" }, blocked: "",
+ }]);
const { container } = renderIssueDetail();
- await waitFor(() => expect(container.querySelector('[data-issue-sidebar-section="sub_issues"]')).not.toBeNull());
- const sidebar = within(container.querySelector<HTMLElement>('[data-issue-sidebar-section="sub_issues"]')!);
- expect(sidebar.getAllByRole("link")).toHaveLength(3);
- expect(sidebar.getByRole("link", { name: /TES-11 Open destination/ })).toHaveAttribute("href", "/test/issues/TES-11");
- expect(sidebar.getByRole("link", { name: /TES-13 Cancelled destination/ })).toBeInTheDocument();
- expect(sidebar.getByRole("progressbar", { name: "Sub-issues" })).toHaveAttribute("aria-valuenow", "1");
- expect(sidebar.getByRole("progressbar", { name: "Sub-issues" })).toHaveAttribute("aria-valuemax", "3");
- const toggle = sidebar.getByRole("button", { name: "Sub-issues" });
- expect(toggle).toHaveAttribute("aria-expanded", "true");
- fireEvent.click(toggle);
- expect(toggle).toHaveAttribute("aria-expanded", "false");
- expect(sidebar.queryAllByRole("link")).toHaveLength(0);
- expect(inlineChildren().getByText("Open destination")).toBeInTheDocument();
- fireEvent.click(toggle);
- expect(sidebar.getAllByRole("link")).toHaveLength(3);
- });
-
- const stagedSidebarChildren = () => Array.from({ length: 25 }, (_, i) => subIssue({
- id: `child-${i + 1}`,
- number: i + 1,
- identifier: `TES-${i + 1}`,
- title: `Child ${i + 1}`,
- stage: i % 3 === 0 ? 2 : i % 3 === 1 ? 1 : null,
- status: i === 1 || i >= 20 ? "verified" : i === 2 ? "declined" : i === 5 ? "cancelled" : "todo",
- status_category: i === 1 || i >= 20 ? "done" : i === 2 ? "closed" : undefined,
- }));
-
- it.each([false, true])("expands unfinished-first sidebar children in place (mobile: %s)", async (isMobile) => {
- mockViewport.isMobile = isMobile;
- mockApiObj.listChildIssues.mockResolvedValue({ issues: stagedSidebarChildren() });
- const { container } = renderIssueDetail();
- await findInlineChild("Child 25");
- const section = container.querySelector<HTMLDivElement>('[class~="group/sub-issues"]')!;
- const inlineOrder = inlineChildren().getAllByText(/^Child \d+$/).map((row) => row.textContent);
- fireEvent.click(within(section).getByRole("button", { name: "Sub-issues" }));
- const scroller = container.querySelector<HTMLDivElement>("[data-tab-scroll-root]")!;
- scroller.scrollTop = 600;
- vi.spyOn(scroller, "getBoundingClientRect").mockReturnValue({ top: 100 } as DOMRect);
- vi.spyOn(section, "getBoundingClientRect").mockReturnValue({ top: -200 } as DOMRect);
- let sheet: HTMLElement | undefined;
- if (isMobile) {
- fireEvent.click(screen.getByRole("button", { name: enIssues.detail.sidebar_tooltip }));
- sheet = await screen.findByRole("dialog");
- }
- const sidebar = within(document.querySelector<HTMLElement>('[data-issue-sidebar-section="sub_issues"]')!);
- const childLinks = () => sidebar.getAllByRole("link").map((link) => link.getAttribute("href"));
- const urls = (numbers: number[]) => numbers.map((n) => `/test/issues/TES-${n}`);
- const firstTen = [5, 8, 11, 14, 17, 20, 1, 4, 7, 10];
- expect(childLinks()).toEqual(urls(firstTen));
- expect(sidebar.getByText("6/25")).toBeInTheDocument();
- expect(sidebar.getByRole("progressbar")).toHaveAttribute("aria-valuemax", "25");
- expect(sidebar.getByRole("progressbar")).toHaveAttribute("aria-valuenow", "6");
- const showMore = sidebar.getByRole("button", { name: "Show 15 more" });
- expect(showMore).toHaveAttribute("aria-expanded", "false");
- fireEvent.click(showMore);
- expect(childLinks()).toEqual(urls([
- 5, 8, 11, 14, 17, 20, 1, 4, 7, 10, 13, 16, 19, 9, 12, 15, 18,
- 2, 23, 22, 25, 3, 6, 21, 24,
- ]));
- expect(inlineChildren().queryByText("Child 25")).not.toBeInTheDocument();
- expect(scroller.scrollTop).toBe(600);
- if (isMobile) {
- expect(screen.getByRole("dialog")).toBe(sheet);
- expect(document.querySelector('[data-slot="sheet-overlay"]')).not.toBeNull();
- }
- const collapse = sidebar.getByRole("button", { name: "Collapse" });
- expect(collapse).toHaveAttribute("aria-expanded", "true");
- fireEvent.click(collapse);
- expect(childLinks()).toEqual(urls(firstTen));
- expect(sidebar.getByRole("button", { name: "Show 15 more" })).toHaveAttribute("aria-expanded", "false");
- expect(sidebar.getByText("6/25")).toBeInTheDocument();
- expect(scroller.scrollTop).toBe(600);
- expect(inlineChildren().queryByText("Child 25")).not.toBeInTheDocument();
- if (isMobile) {
- expect(screen.getByRole("dialog")).toBe(sheet);
- expect(document.querySelector('[data-slot="sheet-overlay"]')).not.toBeNull();
- fireEvent.keyDown(sheet!, { key: "Escape" });
- await waitFor(() => expect(screen.queryByRole("dialog")).not.toBeInTheDocument());
- }
- fireEvent.click(within(section).getByRole("button", { name: "Sub-issues" }));
- expect(inlineChildren().getAllByText(/^Child \d+$/).map((row) => row.textContent)).toEqual(inlineOrder);
- });
-
- it("keeps inline stage order including completed children at the ten-child limit", async () => {
- mockApiObj.listChildIssues.mockResolvedValue({ issues: stagedSidebarChildren().slice(0, 10) });
- const { container } = renderIssueDetail();
- await findInlineChild("Child 10");
- const sidebar = within(container.querySelector<HTMLElement>('[data-issue-sidebar-section="sub_issues"]')!);
- expect(sidebar.getAllByRole("link").map((link) => link.getAttribute("href"))).toEqual(
- [2, 5, 8, 1, 4, 7, 10, 3, 6, 9].map((n) => `/test/issues/TES-${n}`),
- );
- expect(sidebar.queryByRole("button", { name: /Show .* more|Collapse|View all/ })).not.toBeInTheDocument();
- expect(sidebar.getByText("1/10")).toBeInTheDocument();
- });
-
- it("shows the remaining count when only one child is hidden", async () => {
- mockApiObj.listChildIssues.mockResolvedValue({ issues: stagedSidebarChildren().slice(0, 11) });
- const { container } = renderIssueDetail();
- await findInlineChild("Child 11");
- const sidebar = within(container.querySelector<HTMLElement>('[data-issue-sidebar-section="sub_issues"]')!);
- expect(sidebar.getAllByRole("link")).toHaveLength(10);
- fireEvent.click(sidebar.getByRole("button", { name: "Show 1 more" }));
- expect(sidebar.getAllByRole("link")).toHaveLength(11);
- fireEvent.click(sidebar.getByRole("button", { name: "Collapse" }));
- expect(sidebar.getAllByRole("link")).toHaveLength(10);
- });
-
- it("leaves the sidebar slot empty while loading and when no children exist", async () => {
- let resolveChildren!: (value: { issues: Issue[] }) => void;
- mockApiObj.listChildIssues.mockImplementation(() => new Promise((resolve) => {
- resolveChildren = resolve;
- }));
- const { container } = renderIssueDetail();
- await screen.findByText("Implement authentication");
- const sidebar = () => container.querySelector('[data-issue-sidebar-section="sub_issues"]');
- expect(sidebar()?.childElementCount).toBe(0);
- await act(async () => resolveChildren({ issues: [] }));
- expect(sidebar()?.childElementCount).toBe(0);
- });
-
- it("removes cached sidebar links after a child query loses access", async () => {
- let rejectChildren!: (reason: unknown) => void;
- mockApiObj.listChildIssues.mockImplementation(() => new Promise((_resolve, reject) => {
- rejectChildren = reject;
- }));
- const queryClient = createTestQueryClient();
- queryClient.setQueryData(issueKeys.children("ws-1", "issue-1"), [
- subIssue({ id: "child-private", identifier: "TES-11", title: "Previously authorized child" }),
- ]);
- const { container } = render(
- <I18nProvider locale="en" resources={TEST_RESOURCES}>
- <QueryClientProvider client={queryClient}>
- <IssueDetail issueId="issue-1" />
- </QueryClientProvider>
- </I18nProvider>,
- );
- const sidebar = () => container.querySelector<HTMLElement>('[data-issue-sidebar-section="sub_issues"]')!;
- await waitFor(() => expect(within(sidebar()).getByRole("link", { name: /Previously authorized child/ })).toBeInTheDocument());
- await act(async () => rejectChildren(new ApiError("Access denied", 403, "Forbidden")));
- await waitFor(() => expect(sidebar().childElementCount).toBe(0));
+ await findInlineChild("Open destination");
+ expect(container.querySelector('[data-issue-sidebar-section="sub_issues"]')).toBeNull();
+ const section = container.querySelector<HTMLElement>('[class~="group/sub-issues"]')!;
+ expect(await within(section).findByRole("button", { name: "Wakes Claude Agent when all finish" })).toBeInTheDocument();
});
it("jumps from the outline to the expanded sub-issues section without comments", async () => {
diff --git a/packages/views/issues/components/issue-detail.tsx b/packages/views/issues/components/issue-detail.tsx
index 2e4bd848b1..7ac29d2397 100644
--- a/packages/views/issues/components/issue-detail.tsx
+++ b/packages/views/issues/components/issue-detail.tsx
@@ -22,6 +22,7 @@ import {
AlertTriangle,
Calendar,
CalendarClock,
+ FolderKanban,
CalendarDays,
ChevronDown,
ChevronLeft,
@@ -75,8 +76,6 @@ import { Checkbox } from "@multica/ui/components/ui/checkbox";
import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from "@multica/ui/components/ui/command";
import { AvatarGroup, AvatarGroupCount } from "@multica/ui/components/ui/avatar";
import { ActorAvatar } from "../../common/actor-avatar";
-import { MemberProfileCard } from "../../members/member-profile-card";
-import { HoverCard, HoverCardTrigger, HoverCardContent } from "@multica/ui/components/ui/hover-card";
import { ActionShortcutKeycaps } from "../../common/shortcut-keycaps";
import { COMPOSER_DOCK_GAP, ComposerDock, JumpToLatestButton } from "./composer-dock";
import { InboxIssueActions } from "./inbox-issue-actions";
@@ -210,6 +209,9 @@ import { READING_COLUMN } from "../../layout/reading-column";
import { useShowInSidebar } from "../../layout/panels/show-in-sidebar";
import { ProgressRing } from "./progress-ring";
+import { IssueSidebarAddRow, useIssueSidebarAddables, type IssueSidebarAddable } from "./issue-sidebar-add-row";
+import { IssueSidebarFooter } from "./issue-sidebar-footer";
+import { SystemWakeupChips } from "./system-wakeup-chip";
import { matchesPinyin } from "../../editor/extensions/pinyin-match";
import { MetadataSection } from "./metadata-section";
import { IssueSidebarCollapsible, IssueSidebarSectionHeader, IssueSidebarPropertyGrid } from "./issue-sidebar-section";
@@ -445,7 +447,7 @@ const EMPTY_REPLIES: TimelineEntry[] = [];
/** The sidebar sections a guest gets: read-only facts about the issue itself. */
const GUEST_SIDEBAR_SECTIONS = new Set<IssueSidebarSection>(["properties", "parent", "deliverables"]);
-const OPTIONAL_PROP_KEYS = ["priority", "stage", "start_date", "due_date", "labels"] as const;
+const OPTIONAL_PROP_KEYS = ["project", "priority", "stage", "start_date", "due_date", "labels"] as const;
type OptionalPropKey = (typeof OPTIONAL_PROP_KEYS)[number];
function isOptionalPropSet(
@@ -454,6 +456,8 @@ function isOptionalPropSet(
attachedLabelsCount: number,
): boolean {
switch (key) {
+ case "project":
+ return !!issue.project_id;
case "priority":
return issue.priority !== "none";
case "stage":
@@ -467,8 +471,6 @@ function isOptionalPropSet(
}
}
-const SIDEBAR_SUB_ISSUES_LIMIT = 10;
-
// groupSubIssuesByStage orders a parent's children for display: staged groups
// ascending by stage, then the unstaged group (stage === null) last. Callers
// render a per-group stage header only when the set is actually staged.
@@ -1474,12 +1476,10 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
}, [isMobile]);
const sidebarOpen = isMobile ? mobileSidebarOpen : desktopSidebarOpen;
const [propertiesOpen, setPropertiesOpen] = useState(true);
- const [detailsOpen, setDetailsOpen] = useState(false);
const [parentIssueOpen, setParentIssueOpen] = useState(true);
- const [sidebarSubIssuesOpen, setSidebarSubIssuesOpen] = useState(true);
- const [sidebarSubIssuesExpanded, setSidebarSubIssuesExpanded] = useState(false);
- const sidebarSubIssuesListId = useId();
- useEffect(() => setSidebarSubIssuesExpanded(false), [id]);
+ // An empty section the reader picked from the add row, shown until its form closes.
+ const [sidebarReveal, setSidebarReveal] = useState<IssueSidebarAddable | null>(null);
+ useEffect(() => setSidebarReveal(null), [id]);
const [pullRequestsOpen, setPullRequestsOpen] = useState(true);
const githubSettings = useGitHubSettings();
const pluginsEnabled = useFeatureEnabled(PLUGINS_V1_FLAG, false);
@@ -2608,15 +2608,6 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
});
}, [setSubIssuesCollapsed, scrollContainerEl]);
const doneChildCount = childIssues.filter((child) => issueBehavesAs(child, "done")).length;
- const sidebarChildIssues = useMemo(() => {
- let ordered = groupSubIssuesByStage(childIssues).flatMap(({ items }) => items);
- if (ordered.length > SIDEBAR_SUB_ISSUES_LIMIT) {
- const unfinished = ordered.filter((child) => !issueBehavesAsAny(child, ["done", "closed"]));
- const finished = ordered.filter((child) => issueBehavesAsAny(child, ["done", "closed"]));
- ordered = [...unfinished, ...finished];
- }
- return sidebarSubIssuesExpanded ? ordered : ordered.slice(0, SIDEBAR_SUB_ISSUES_LIMIT);
- }, [childIssues, sidebarSubIssuesExpanded]);
// The sub-issue list owns its selection, reset per issue. Rows, select-all
// and the inline batch toolbar must read the same one: a peek renders this
@@ -3157,6 +3148,15 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
overrideTop: restoredScrollTop,
});
+ const issueClosed = !!issue && ["done", "closed"].includes(resolveStatusCategory(issue.status));
+ const sidebarAddables = useIssueSidebarAddables({
+ issueId: id,
+ closed: issueClosed,
+ enabled: !!issue && !guest,
+ pullRequestsAvailable: githubSettings.prSidebar,
+ });
+ const endSidebarReveal = useCallback(() => setSidebarReveal(null), []);
+
// Keep the identity value stable across unrelated issue-detail updates so
// context consumers only re-render when the owning issue changes identity.
const resolvedIssueId = issue?.id;
@@ -3264,9 +3264,9 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
<div className="col-span-2 mt-1">
<Popover open={addPropPopoverOpen} onOpenChange={setAddPropPopoverOpen}>
<PopoverTrigger
- className="-mx-2 flex items-center gap-1.5 rounded-md px-2 py-1 text-label text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground"
+ className="-mx-2 flex items-center gap-2.5 rounded-md px-2 py-1 text-label text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground"
>
- <Plus className="h-3 w-3 shrink-0" />
+ <Plus className="size-3.5 shrink-0" />
<span>{t(($) => $.detail.add_property_action)}</span>
</PopoverTrigger>
{/* Each option leads with the icon the resulting picker uses, so the
@@ -3287,6 +3287,9 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
onClick={() => addOptionalProp(k)}
className="flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-caption text-foreground transition-colors hover:bg-accent focus-visible:bg-accent focus-visible:outline-none"
>
+ {k === "project" && (
+ <FolderKanban className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
+ )}
{k === "priority" && (
<PriorityIcon priority="medium" inheritColor className="text-muted-foreground" />
)}
@@ -3303,6 +3306,7 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
<Tag className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
)}
<span className="truncate">
+ {k === "project" && t(($) => $.detail.prop_project)}
{k === "priority" && t(($) => $.detail.prop_priority)}
{k === "stage" && t(($) => $.detail.prop_stage)}
{k === "start_date" && t(($) => $.detail.prop_start_date)}
@@ -3346,6 +3350,17 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
</div>
);
+ const builtInPropLabels = [
+ t(($) => $.detail.prop_status),
+ t(($) => $.detail.prop_assignee),
+ t(($) => $.detail.prop_project),
+ t(($) => $.workflows.project.label),
+ t(($) => $.detail.prop_priority),
+ t(($) => $.detail.prop_stage),
+ t(($) => $.detail.prop_start_date),
+ t(($) => $.detail.prop_due_date),
+ t(($) => $.detail.prop_labels),
+ ];
const locked = (value: ReactNode) => (
<>
<div inert className="flex min-w-0 flex-1 items-center">{value}</div>
@@ -3356,7 +3371,7 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
<div>
<IssueSidebarSectionHeader title={t(($) => $.detail.section_properties)} open={propertiesOpen} onOpenChange={setPropertiesOpen} />
<IssueSidebarCollapsible open={propertiesOpen}>
- <IssueSidebarPropertyGrid>
+ <IssueSidebarPropertyGrid sizerLabels={builtInPropLabels}>
<PropRow interactive={false} label={t(($) => $.detail.prop_status)}>
{locked(<StatusPicker status={issue.status} onUpdate={handleUpdateField} align="start" projectId={issue.project_id} issue={issue} />)}
</PropRow>
@@ -3366,9 +3381,11 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
<PropRow interactive={false} label={t(($) => $.detail.prop_priority)}>
{locked(<PriorityPicker priority={issue.priority} onUpdate={handleUpdateField} align="start" />)}
</PropRow>
- <PropRow interactive={false} label={t(($) => $.detail.prop_project)}>
- {locked(<IssueProjectPicker projectId={issue.project_id} onUpdate={handleUpdateField} issue={issue} />)}
- </PropRow>
+ {issue.project_id && (
+ <PropRow interactive={false} label={t(($) => $.detail.prop_project)}>
+ {locked(<IssueProjectPicker projectId={issue.project_id} onUpdate={handleUpdateField} issue={issue} />)}
+ </PropRow>
+ )}
{attachedLabels.length > 0 && (
<PropRow interactive={false} label={t(($) => $.detail.prop_labels)}>
{locked(<LabelPicker issueId={issue.id} align="start" />)}
@@ -3384,8 +3401,8 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
properties: guest ? guestProperties : (
<div>
<IssueSidebarSectionHeader title={t(($) => $.detail.section_properties)} open={propertiesOpen} onOpenChange={setPropertiesOpen} />
- <IssueSidebarCollapsible open={propertiesOpen}><IssueSidebarPropertyGrid>
- {/* Core props — always rendered. */}
+ <IssueSidebarCollapsible open={propertiesOpen}><IssueSidebarPropertyGrid sizerLabels={builtInPropLabels}>
+ {/* Status and assignee — always rendered. */}
<PropRow label={t(($) => $.detail.prop_status)}>
<StatusPicker
status={issue.status}
@@ -3400,13 +3417,16 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
<PropRow label={t(($) => $.detail.prop_assignee)}>
<AssigneePicker assigneeType={issue.assignee_type} assigneeId={issue.assignee_id} onUpdate={handleUpdateField} align="start" />
</PropRow>
- <PropRow label={t(($) => $.detail.prop_project)}>
- <IssueProjectPicker
- projectId={issue.project_id}
- onUpdate={handleUpdateField}
- issue={issue}
- />
- </PropRow>
+ {visibleOptionalProps.has("project") && (
+ <PropRow label={t(($) => $.detail.prop_project)}>
+ <IssueProjectPicker
+ projectId={issue.project_id}
+ onUpdate={handleUpdateField}
+ issue={issue}
+ defaultOpen={autoOpenProp === "project"}
+ />
+ </PropRow>
+ )}
<IssueWorkflowPropRow projectId={issue.project_id} status={issue.status} label={t(($) => $.workflows.project.label)} />
{/* Optional props — rendered only when set on the issue OR added
@@ -3499,8 +3519,10 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
wakeups: (
<WakeupsSection
issueId={issue.id}
- closed={["done", "closed"].includes(resolveStatusCategory(issue.status))}
+ closed={issueClosed}
defaultAgentId={issue.assignee_type === "agent" ? (issue.assignee_id ?? undefined) : undefined}
+ reveal={sidebarReveal === "wakeups"}
+ onRevealEnd={endSidebarReveal}
/>
),
plugins: <PluginPanelSection issueId={issue.id} />,
@@ -3533,72 +3555,6 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
</div></IssueSidebarCollapsible>
</div>
),
- sub_issues: childIssuesLoaded && childIssues.length > 0 && (
- <div>
- <IssueSidebarSectionHeader
- title={t(($) => $.detail.sub_issues_label)}
- open={sidebarSubIssuesOpen}
- onOpenChange={setSidebarSubIssuesOpen}
- status={
- <span
- role="progressbar"
- aria-label={t(($) => $.detail.sub_issues_label)}
- aria-valuemin={0}
- aria-valuemax={childIssues.length}
- aria-valuenow={doneChildCount}
- aria-valuetext={t(($) => $.detail.sub_issues_nav_progress, { done: doneChildCount, total: childIssues.length })}
- className="inline-flex shrink-0 items-center gap-1.5 pr-2 text-caption tabular-nums text-muted-foreground"
- >
- <ProgressRing done={doneChildCount} total={childIssues.length} size={11} />
- <span>{doneChildCount}/{childIssues.length}</span>
- </span>
- }
- />
- <IssueSidebarCollapsible open={sidebarSubIssuesOpen}>
- <ul id={sidebarSubIssuesListId} className="px-2">
- {sidebarChildIssues.map((child) => (
- <li key={child.id}>
- <AppLink
- href={paths.issueDetail(issueRouteRef(child))}
- title={`${child.identifier} ${child.title}`}
- aria-label={`${child.identifier} ${child.title}, ${resolveStatusLabel(child.status)}`}
- className="group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-2 text-label transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
- >
- <span role="img" aria-label={resolveStatusLabel(child.status)} className="shrink-0">
- <StatusIcon
- status={child.status}
- color={resolveStatusColor(child.status)}
- icon={resolveStatusIcon(child.status)}
- category={issueStatusCategory(child) ?? undefined}
- className="h-3.5 w-3.5"
- />
- </span>
- <span className="max-w-[45%] shrink-0 truncate text-muted-foreground">{child.identifier}</span>
- <span className="min-w-0 truncate group-hover:text-foreground">{child.title}</span>
- </AppLink>
- </li>
- ))}
- {childIssues.length > SIDEBAR_SUB_ISSUES_LIMIT && (
- <li>
- <Button
- type="button"
- variant="ghost"
- size="sm"
- className="w-full justify-start text-muted-foreground"
- aria-expanded={sidebarSubIssuesExpanded}
- aria-controls={sidebarSubIssuesListId}
- onClick={() => setSidebarSubIssuesExpanded((expanded) => !expanded)}
- >
- {sidebarSubIssuesExpanded
- ? t(($) => $.detail.sub_issues_show_less)
- : t(($) => $.detail.sub_issues_show_more, { count: childIssues.length - SIDEBAR_SUB_ISSUES_LIMIT })}
- </Button>
- </li>
- )}
- </ul>
- </IssueSidebarCollapsible>
- </div>
- ),
duplicates: <IssueDuplicatesSection issueId={issue.id} />,
// Pull requests — unavailable when the workspace disables the PR sidebar
// (or the GitHub master switch is off). Backend data is kept either
@@ -3609,10 +3565,20 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
identifier={issue.identifier}
open={pullRequestsOpen}
onOpenChange={setPullRequestsOpen}
+ reveal={sidebarReveal === "pull_requests"}
+ onRevealEnd={endSidebarReveal}
/>
),
// Environments the issue's runs left running, and the "+" that starts one.
- environments: <IssueEnvironmentsSection issueId={id} assigneeType={issue.assignee_type} assigneeId={issue.assignee_id} />,
+ environments: (
+ <IssueEnvironmentsSection
+ issueId={id}
+ assigneeType={issue.assignee_type}
+ assigneeId={issue.assignee_id}
+ reveal={sidebarReveal === "environments"}
+ onRevealEnd={endSidebarReveal}
+ />
+ ),
// Deliverables — the files this issue's comments delivered. Hidden
// while there are none.
deliverables: (
@@ -3626,49 +3592,6 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
apps: <IssueAppsSection issueId={id} />,
// Execution summary owns its query, realtime updates and disclosure.
execution_log: <ExecutionLogSection key={id} issueId={id} identifier={issue.identifier} issueTitle={issue.title} hasChildren={childIssues.length > 0} />,
- // Details — creator and timestamps. Defaults to below the execution
- // log because it is the least-read block in the sidebar: the values
- // never change once the issue exists, while the log above it is
- // what people actually come here to check.
- details: (
- <div>
- <IssueSidebarSectionHeader title={t(($) => $.detail.section_details)} open={detailsOpen} onOpenChange={setDetailsOpen} />
- <IssueSidebarCollapsible open={detailsOpen}><IssueSidebarPropertyGrid>
- <PropRow
- interactive={false}
- label={t(($) => $.detail.prop_created_by)}
- className={requesterName ? "items-start py-1.5" : undefined}
- >
- <div className="flex min-w-0 flex-1 items-start gap-1.5">
- <ActorAvatar actorType={issue.creator_type} actorId={issue.creator_id} size="sm" enableHoverCard />
- <div className="flex min-w-0 flex-1 flex-col">
- <span className="cursor-pointer truncate">{getActorName(issue.creator_type, issue.creator_id)}</span>
- {requesterName && issue.requester_id && (
- <HoverCard>
- <HoverCardTrigger
- render={<AppLink href={paths.memberDetail(issue.requester_id)} />}
- className="block truncate text-caption text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
- title={t(($) => $.execution_log.attribution.on_behalf_of, { name: requesterName })}
- >
- {t(($) => $.execution_log.attribution.on_behalf_of, { name: requesterName })}
- </HoverCardTrigger>
- <HoverCardContent align="start" className="w-72">
- <MemberProfileCard userId={issue.requester_id} />
- </HoverCardContent>
- </HoverCard>
- )}
- </div>
- </div>
- </PropRow>
- <PropRow interactive={false} label={t(($) => $.detail.prop_created)}>
- <span className="text-muted-foreground">{shortDate(issue.created_at, locale)}</span>
- </PropRow>
- <PropRow interactive={false} label={t(($) => $.detail.prop_updated)}>
- <span className="text-muted-foreground">{shortDate(issue.updated_at, locale)}</span>
- </PropRow>
- </IssueSidebarPropertyGrid></IssueSidebarCollapsible>
- </div>
- ),
metadata: <MetadataSection metadata={issue.metadata ?? {}} />,
};
@@ -3683,6 +3606,8 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
? GUEST_SIDEBAR_SECTIONS.has(section)
: (section !== "pull_requests" || githubSettings.prSidebar) && (section !== "plugins" || pluginsEnabled),
)}
+ addRow={<IssueSidebarAddRow items={sidebarAddables.filter((item) => item !== sidebarReveal)} onPick={setSidebarReveal} />}
+ footer={guest ? undefined : <IssueSidebarFooter issue={issue} />}
/>
);
@@ -4330,6 +4255,11 @@ export function IssueDetail({ issueId, onDelete, inbox, defaultSidebarOpen = tru
: "opacity-0 group-hover/sub-issues:opacity-100 focus-visible:opacity-100",
)}
/>}
+ {!guest && !issueClosed && (
+ <span className="ml-1 flex min-w-0 items-center gap-0.5 empty:hidden">
+ <SystemWakeupChips workspaceId={wsId} issueId={issue.id} />
+ </span>
+ )}
<div className="ml-auto flex items-center gap-0.5">
<SubIssueDisplayPopover workspaceProperties={activeWorkspaceProperties} />
{!guest && <Tooltip>
diff --git a/packages/views/issues/components/issue-duplicates.test.tsx b/packages/views/issues/components/issue-duplicates.test.tsx
index 286137df60..19d410e34d 100644
--- a/packages/views/issues/components/issue-duplicates.test.tsx
+++ b/packages/views/issues/components/issue-duplicates.test.tsx
@@ -144,10 +144,12 @@ describe("IssueDuplicatesSection", () => {
const row = await screen.findByRole("link", { name: /MUL-7412/ });
expect(row.getAttribute("href")).toBe("/acme/issues/MUL-7412");
- expect(screen.getByRole("button", { name: "Duplicates 2" })).toBeTruthy();
// Every duplicate is cancelled, so the row shows who reported it instead
// of a status icon that would be identical on each line.
expect(screen.getAllByTestId("avatar").map((el) => el.textContent)).toEqual(["user-2", "user-3"]);
+ // Open, the rows are the count; collapsed, the header says it.
+ fireEvent.click(screen.getByRole("button", { name: "Duplicates" }));
+ expect(screen.getByRole("button", { name: "Duplicates 2" })).toBeTruthy();
});
it("renders nothing when there are no duplicates", async () => {
diff --git a/packages/views/issues/components/issue-environments-section.test.tsx b/packages/views/issues/components/issue-environments-section.test.tsx
index 7cac5896a6..7188c4d613 100644
--- a/packages/views/issues/components/issue-environments-section.test.tsx
+++ b/packages/views/issues/components/issue-environments-section.test.tsx
@@ -63,9 +63,10 @@ vi.mock("../../platform/use-local-daemon-status", () => ({
useLocalDaemonStatus: () => ({ daemonId: mockLocalDaemonId, deviceName: null, running: !!mockLocalDaemonId }),
}));
const control = vi.hoisted(() => vi.fn());
+const controlState = vi.hoisted(() => ({ isPending: false, variables: undefined as { action: string } | undefined }));
vi.mock("@multica/core/issues/environments", async (importOriginal) => ({
...(await importOriginal<typeof import("@multica/core/issues/environments")>()),
- useControlIssueEnvironment: () => ({ mutate: control }),
+ useControlIssueEnvironment: () => ({ mutate: control, ...controlState }),
}));
const createComment = vi.hoisted(() => vi.fn());
vi.mock("@multica/core/issues/mutations", () => ({
@@ -177,7 +178,9 @@ function task(overrides: Partial<AgentTask>): AgentTask {
const lambda = { id: "agent-1", name: "Lambda", archived_at: null } as Agent;
-function renderSection(props: { assigneeType?: "agent" | "member" | null; assigneeId?: string | null } = {}) {
+function renderSection(
+ props: { assigneeType?: "agent" | "member" | null; assigneeId?: string | null; reveal?: boolean; onRevealEnd?: () => void } = {},
+) {
const qc = new QueryClient({ defaultOptions: { queries: { retry: false } } });
return render(
<QueryClientProvider client={qc}>
@@ -208,16 +211,59 @@ describe("IssueEnvironmentsSection", () => {
focusEnvironment.mockReset();
delete (window as { daemonAPI?: unknown }).daemonAPI;
control.mockReset();
+ controlState.isPending = false;
+ controlState.variables = undefined;
createComment.mockReset();
apiMock.readIssueEnvironmentLogs.mockReset();
apiMock.getIssueEnvironmentCommand.mockReset();
});
- it("keeps the header and its start menu while the issue has no environments", async () => {
+ it("stays out of the sidebar while the issue has no environments", async () => {
mockTasks = [];
- renderSection();
+ const { container } = renderSection();
+ await waitFor(() => expect(container).toBeEmptyDOMElement());
+ });
+
+ it("opens the start menu when revealed and ends the reveal when it closes", async () => {
+ mockTasks = [];
+ const onRevealEnd = vi.fn();
+ renderSection({ reveal: true, onRevealEnd });
expect(await screen.findByText("Environments")).toBeVisible();
expect(screen.queryByTestId("environment-row")).not.toBeInTheDocument();
+ fireEvent.keyDown(await screen.findByRole("menu"), { key: "Escape" });
+ await waitFor(() => expect(onRevealEnd).toHaveBeenCalled());
+ });
+
+ it("hides again once a reveal ends empty, but not while a start is in flight", async () => {
+ mockTasks = [];
+ const qc = new QueryClient({ defaultOptions: { queries: { retry: false } } });
+ const view = (reveal: boolean) => (
+ <QueryClientProvider client={qc}>
+ <I18nProvider resources={TEST_RESOURCES} locale="en">
+ <IssueEnvironmentsSection issueId="issue-1" reveal={reveal} />
+ </I18nProvider>
+ </QueryClientProvider>
+ );
+ const { container, rerender } = render(view(true));
+ expect(await screen.findByText("Environments")).toBeVisible();
+
+ controlState.isPending = true;
+ controlState.variables = { action: "start" };
+ rerender(view(false));
+ expect(screen.getByText("Environments")).toBeVisible();
+
+ controlState.isPending = false;
+ rerender(view(false));
+ await waitFor(() => expect(container).toBeEmptyDOMElement());
+ });
+
+ it("names a lone machine on the row instead of above it", async () => {
+ mockEnvironments = [environment({ expires_at: new Date(Date.now() + 30 * 60_000).toISOString() })];
+ renderSection();
+ const row = await screen.findByTestId("environment-row");
+ expect(within(row).getByText("studio.local")).toBeVisible();
+ expect(screen.getAllByText("studio.local")).toHaveLength(1);
+ expect(within(row).getByText("Expires in 30m")).toHaveClass("text-warning");
});
it("groups live environments by machine and links the running ones", async () => {
@@ -229,28 +275,31 @@ describe("IssueEnvironmentsSection", () => {
renderSection();
expect(await screen.findByText("Web app")).toBeVisible();
- expect(screen.getByText("2 running")).toBeVisible();
+ expect(screen.queryByText("2 running")).not.toBeInTheDocument();
expect(screen.getByText("This machine")).toBeVisible();
expect(screen.getByText("studio.local")).toBeVisible();
expect(screen.getByText("build-02")).toBeVisible();
const [local, remote] = screen.getAllByTestId("environment-row");
expect(within(local!).getByText("localhost:41000")).toBeVisible();
- expect(within(local!).getByText("Expires in 23h")).toBeVisible();
+ expect(within(local!).queryByText("Expires in 23h")).not.toBeInTheDocument();
expect(within(local!).getAllByRole("link")[0]).toHaveAttribute("href", "http://localhost:41000");
expect(within(remote!).getByText("localhost:5173")).toBeVisible();
expect(remote).toHaveAttribute("title", expect.stringContaining("Runs on build-02"));
- expect(local).not.toHaveAttribute("title");
+ expect(local).toHaveAttribute("title", "Expires in 23h");
fireEvent.click(within(local!).getByRole("button", { name: "Copy URL" }));
expect(copyText).toHaveBeenCalledWith("http://localhost:41000");
+
+ fireEvent.click(screen.getByRole("button", { name: /^Environments/ }));
+ expect(screen.getByText("2 running")).toBeVisible();
});
it("tells a viewer who may be on another machine where each localhost URL opens", async () => {
mockEnvironments = [
- environment({ runtime_id: "rt-2" }),
- environment({ id: "env-2", runtime_id: "rt-gone", name: "api", label: "API", url: "http://127.0.0.1:41010", port: 41010 }),
- environment({ id: "env-3", runtime_id: "rt-2", name: "docs", label: "Docs", url: "https://docs.example.com", port: 0 }),
+ environment({ runtime_id: "rt-2", expires_at: null }),
+ environment({ id: "env-2", runtime_id: "rt-gone", name: "api", label: "API", url: "http://127.0.0.1:41010", port: 41010, expires_at: null }),
+ environment({ id: "env-3", runtime_id: "rt-2", name: "docs", label: "Docs", url: "https://docs.example.com", port: 0, expires_at: null }),
];
renderSection();
@@ -635,11 +684,10 @@ describe("IssueEnvironmentsSection", () => {
it("asks the agent to start it when nothing can be started directly", async () => {
mockTasks = [];
- renderSection({ assigneeType: "agent", assigneeId: "agent-1" });
- fireEvent.click(await screen.findByRole("button", { name: "Start an environment" }));
+ renderSection({ assigneeType: "agent", assigneeId: "agent-1", reveal: true });
const menu = await screen.findByRole("menu");
expect(within(menu).getByText(/hasn't run yet/)).toBeInTheDocument();
- fireEvent.click(within(menu).getByRole("menuitem", { name: /Ask Lambda to start it/ }));
+ fireEvent.click(await within(menu).findByRole("menuitem", { name: /Ask Lambda to start it/ }));
expect(createComment).toHaveBeenCalledTimes(1);
const [{ content }] = createComment.mock.calls[0]!;
expect(content).toMatch(/^\[@Lambda\]\(mention:\/\/agent\/agent-1\) /);
diff --git a/packages/views/issues/components/issue-environments-section.tsx b/packages/views/issues/components/issue-environments-section.tsx
index 7360278306..53b1295be9 100644
--- a/packages/views/issues/components/issue-environments-section.tsx
+++ b/packages/views/issues/components/issue-environments-section.tsx
@@ -82,6 +82,7 @@ import {
} from "./environment-model";
import { EnvironmentStartMenu, type DeclaredState } from "./environment-start-menu";
import { IssueSidebarCollapsible, IssueSidebarSectionHeader } from "./issue-sidebar-section";
+import { useSidebarRevealMotion } from "./use-sidebar-reveal-motion";
type IssuesT = ReturnType<typeof useT<"issues">>["t"];
@@ -110,6 +111,8 @@ interface RowAccess {
/** Why this machine cannot switch to an app's window; null when it can. */
appHint: string | null;
originLabel: string | null;
+ /** Names the machine on the row when no machine heading above does. */
+ machineInline: string | null;
}
/**
@@ -126,10 +129,15 @@ export function IssueEnvironmentsSection({
issueId,
assigneeType = null,
assigneeId = null,
+ reveal = false,
+ onRevealEnd,
}: {
issueId: string;
assigneeType?: IssueAssigneeType | null;
assigneeId?: string | null;
+ /** Shows the section while empty with the start menu open, until it closes. */
+ reveal?: boolean;
+ onRevealEnd?: () => void;
}) {
const { t } = useT("issues");
const wsId = useWorkspaceId();
@@ -282,6 +290,19 @@ export function IssueEnvironmentsSection({
Number(b.machine?.isCurrent ?? false) - Number(a.machine?.isCurrent ?? false));
};
+ type MainItem = { kind: "env"; env: IssueEnvironment } | { kind: "start" | "failed"; start: IssueEnvironmentActionRecord };
+ const mainItems: MainItem[] = [
+ ...[...live, ...pinned].map((env) => ({ kind: "env" as const, env })),
+ ...shownStarts.map((start) => ({ kind: "start" as const, start })),
+ ...shownFailures.map((start) => ({ kind: "failed" as const, start })),
+ ];
+ const mainGroups = groupBy(mainItems, (item) => (item.kind === "env" ? item.env.runtime_id : item.start.runtime_id));
+ const endedGroups = groupBy(ended, (env) => env.runtime_id);
+ // One reachable machine needs no heading; its name moves onto the rows.
+ const machineKeys = new Set([...mainGroups, ...endedGroups].map((group) => group.key));
+ const onlyGroup = mainGroups[0] ?? endedGroups[0];
+ const singleMachine = machineKeys.size === 1 && !!onlyGroup && !onlyGroup.offline;
+
const access = (env: IssueEnvironment, group: MachineGroup<unknown>): RowAccess => {
const hint = knowsLocal && group.machine?.isCurrent
? null
@@ -302,17 +323,11 @@ export function IssueEnvironmentsSection({
localhostHint: hint,
appHint,
originLabel: originLabel(env),
+ machineInline: singleMachine ? (group.machine?.title ?? t(($) => $.environments.unknown_machine)) : null,
};
};
- type MainItem = { kind: "env"; env: IssueEnvironment } | { kind: "start" | "failed"; start: IssueEnvironmentActionRecord };
- const mainItems: MainItem[] = [
- ...[...live, ...pinned].map((env) => ({ kind: "env" as const, env })),
- ...shownStarts.map((start) => ({ kind: "start" as const, start })),
- ...shownFailures.map((start) => ({ kind: "failed" as const, start })),
- ];
-
- const renderGroupHeader = (group: MachineGroup<unknown>) => (
+ const renderGroupHeader = (group: MachineGroup<unknown>) => singleMachine ? null : (
<div className="flex min-h-7 items-center gap-1.5 px-2 text-micro text-muted-foreground">
<Laptop className="size-3 shrink-0" />
<span className="min-w-0 truncate">{group.machine?.title ?? t(($) => $.environments.unknown_machine)}</span>
@@ -385,14 +400,21 @@ export function IssueEnvironmentsSection({
);
};
+ // A start in flight counts: it settles only once the refetched list carries it.
+ const starting = control.isPending && control.variables?.action === "start";
+ const hasContent = envs.length > 0 || shownStarts.length > 0 || shownFailures.length > 0 || !!preparingShown || justRequested !== null || starting;
+ const motion = useSidebarRevealMotion<HTMLDivElement>(reveal, hasContent, onRevealEnd);
+ // An empty section is offered by the sidebar's add row instead.
+ if (!motion.shown) return null;
+
return (
- <div>
+ <div ref={motion.ref}>
<IssueSidebarSectionHeader
title={t(($) => $.environments.section_title)}
open={open}
onOpenChange={setOpen}
count={live.length + pinned.length}
- status={running > 0 ? (
+ status={!open && running > 0 ? (
<span className="inline-flex shrink-0 items-center gap-1 text-caption text-success tabular-nums">
<span aria-hidden="true" className="size-1.5 rounded-full bg-success" />
{t(($) => $.environments.running_count, { count: running })}
@@ -411,6 +433,8 @@ export function IssueEnvironmentsSection({
agentChoices={activeAgents}
preparing={!!preparing || justRequested !== null}
onAskAgent={askAgent}
+ defaultOpen={reveal}
+ onOpenChange={(next) => !next && reveal && motion.end()}
/>
}
/>
@@ -424,7 +448,7 @@ export function IssueEnvironmentsSection({
meta={t(($) => $.environments.preparing_hint)}
/>
)}
- {groupBy(mainItems, (item) => (item.kind === "env" ? item.env.runtime_id : item.start.runtime_id)).map((group) => (
+ {mainGroups.map((group) => (
<div key={group.key}>
{renderGroupHeader(group)}
{group.items.map((item) =>
@@ -444,7 +468,7 @@ export function IssueEnvironmentsSection({
<ChevronRight aria-hidden="true" className={cn("size-3 text-faint-foreground transition-transform duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none", showEnded && "rotate-90")} />
</button>
<IssueSidebarCollapsible open={showEnded}>
- {groupBy(ended, (env) => env.runtime_id).map((group) => (
+ {endedGroups.map((group) => (
<div key={group.key}>
{renderGroupHeader(group)}
{group.items.map((env) => renderEnv(env, group))}
@@ -470,7 +494,7 @@ function PendingState({ label }: { label: string }) {
function StatusRow({ icon, title, state, meta }: { icon: ReactNode; title: string; state: ReactNode; meta: string }) {
return (
- <div data-testid="environment-pending-row" className="flex items-start gap-2 rounded-md px-2 py-2">
+ <div data-testid="environment-pending-row" className="flex items-start gap-2.5 rounded-md px-2 py-2">
{icon}
<div className="min-w-0 flex-1">
<p className="flex min-w-0 items-center gap-2">
@@ -503,7 +527,7 @@ function FailedStartRow({
const { t } = useT("issues");
return (
<div data-testid="environment-failed-start" className="group/env relative rounded-md px-2 py-2" title={error || undefined}>
- <div className="flex items-start gap-2">
+ <div className="flex items-start gap-2.5">
<Server className="mt-px size-3.5 shrink-0 text-destructive" />
<div className="min-w-0 flex-1">
<p className="flex min-w-0 items-center gap-2">
@@ -565,7 +589,9 @@ function EnvironmentRow({
const title = environmentTitle(env);
const primary = declared ? host : app ? null : env.name;
const meta = environmentMeta(env, pending, t, timeAgo, actorName);
+ const expiry = live && !pending ? environmentExpiry(env, t) : null;
const tooltip = [
+ expiry && !expiry.soon ? expiry.label : null,
env.source === "detected" ? t(($) => $.environments.detected_hint) : null,
failure?.error || null,
env.detail || null,
@@ -609,9 +635,14 @@ function EnvironmentRow({
</span>
</p>
<p className="mt-1 flex min-w-0 items-center gap-1.5 overflow-hidden whitespace-nowrap text-caption text-muted-foreground tabular-nums">
- {primary && <span className="max-w-[60%] shrink-0 truncate">{primary}</span>}
- {primary && meta && <span aria-hidden="true" className="text-faint-foreground">·</span>}
- {meta && <span className="min-w-0 truncate">{meta}</span>}
+ {[
+ primary && <span key="primary" className="max-w-[60%] shrink-0 truncate">{primary}</span>,
+ meta && <span key="meta" className="min-w-0 truncate">{meta}</span>,
+ expiry?.soon && <span key="expiry" className="shrink-0 text-warning">{expiry.label}</span>,
+ access.machineInline && <span key="machine" className="min-w-0 truncate">{access.machineInline}</span>,
+ ]
+ .filter(Boolean)
+ .flatMap((part, index) => (index === 0 ? [part] : [<span key={`dot-${index}`} aria-hidden="true" className="text-faint-foreground">·</span>, part]))}
{failure && (
<>
<span aria-hidden="true" className="text-faint-foreground">·</span>
@@ -631,18 +662,18 @@ function EnvironmentRow({
return (
<div data-testid="environment-row" className="group/env relative rounded-md transition-colors hover:bg-accent/50" title={tooltip || undefined}>
{openable ? (
- <a href={env.url} target="_blank" rel="noreferrer noopener" className="flex items-start gap-2 rounded-md px-2 py-2">
+ <a href={env.url} target="_blank" rel="noreferrer noopener" className="flex items-start gap-2.5 rounded-md px-2 py-2">
{body}
</a>
) : focusable ? (
- <button type="button" onClick={focus} className="flex w-full items-start gap-2 rounded-md px-2 py-2 text-left">
+ <button type="button" onClick={focus} className="flex w-full items-start gap-2.5 rounded-md px-2 py-2 text-left">
{body}
</button>
) : (
- <div className="flex items-start gap-2 px-2 py-2">{body}</div>
+ <div className="flex items-start gap-2.5 px-2 py-2">{body}</div>
)}
{pinned && (
- <div className="px-2 pb-2 pl-7.5">
+ <div className="px-2 pb-2 pl-8">
{env.excerpt && (
<pre className="mb-2 overflow-hidden rounded-sm bg-destructive/10 px-2 py-1 font-mono text-micro leading-4 text-destructive">
{env.excerpt.split("\n").slice(-2).map((line, index) => (
@@ -829,13 +860,18 @@ function environmentMeta(
: t(($) => $.environments.started_by, { name: actorName(env.origin) });
return `${by} · ${t(($) => $.environments.waiting_ready)}`;
}
- if (env.expires_at) {
- const minutes = Math.max(1, Math.round((new Date(env.expires_at).getTime() - Date.now()) / 60_000));
- if (minutes < 60) return t(($) => $.environments.expires_in_minutes, { count: minutes });
- const hours = Math.round(minutes / 60);
- if (hours < 48) return t(($) => $.environments.expires_in_hours, { count: hours });
- return t(($) => $.environments.expires_in_days, { count: Math.round(hours / 24) });
- }
+ // Expiry speaks for a live environment that has one; see environmentExpiry.
+ if (env.expires_at) return null;
return t(($) => $.environments.started_ago, { time: timeAgo(env.started_at) });
}
+/** When a live environment stops on its own; `soon` within the hour, when the row says it. */
+function environmentExpiry(env: IssueEnvironment, t: IssuesT): { label: string; soon: boolean } | null {
+ if (!env.expires_at) return null;
+ const minutes = Math.max(1, Math.round((new Date(env.expires_at).getTime() - Date.now()) / 60_000));
+ if (minutes < 60) return { label: t(($) => $.environments.expires_in_minutes, { count: minutes }), soon: true };
+ const hours = Math.round(minutes / 60);
+ if (hours < 48) return { label: t(($) => $.environments.expires_in_hours, { count: hours }), soon: false };
+ return { label: t(($) => $.environments.expires_in_days, { count: Math.round(hours / 24) }), soon: false };
+}
+
diff --git a/packages/views/issues/components/issue-sidebar-add-row.test.tsx b/packages/views/issues/components/issue-sidebar-add-row.test.tsx
new file mode 100644
index 0000000000..91ef6c18c6
--- /dev/null
+++ b/packages/views/issues/components/issue-sidebar-add-row.test.tsx
@@ -0,0 +1,127 @@
+import { beforeEach, describe, expect, it, vi } from "vitest";
+import { fireEvent, renderHook, screen } from "@testing-library/react";
+import type { ReactNode } from "react";
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
+import type {
+ IssueEnvironmentsResponse,
+ IssuePullRequestsResponse,
+ IssueWakeup,
+ ListGitHubInstallationsResponse,
+ ListVCSConnectionsResponse,
+} from "@multica/core/types";
+import { githubInstallationsOptions, issuePullRequestsOptions } from "@multica/core/github";
+import { vcsConnectionsOptions } from "@multica/core/vcs/queries";
+import { issueEnvironmentsOptions } from "@multica/core/issues/queries";
+import { issueWakeupsOptions } from "@multica/core/issues";
+import { useIssueSidebarSectionsStore } from "@multica/core/issues/stores";
+import { renderWithI18n } from "../../test/i18n";
+import { IssueSidebarAddRow, useIssueSidebarAddables } from "./issue-sidebar-add-row";
+
+let repos: unknown[] = [{ url: "https://github.com/acme/app" }];
+vi.mock("@multica/core/paths", async (importOriginal) => ({
+ ...(await importOriginal<typeof import("@multica/core/paths")>()),
+ useCurrentWorkspace: () => ({ id: "ws-1", repos }),
+}));
+
+const declared = { environments: [], configs: [{ environments: [{ name: "web" }] }], pending_starts: [], failed_starts: [] };
+const noPullRequests = { pull_requests: [], auto_complete: { state: "none", pull_request_ids: [], issue_disabled: false, workspace_enabled: true } };
+
+function seed(overrides: { wakeups?: unknown; prs?: unknown; environments?: unknown; vcsConnections?: unknown[] } = {}) {
+ // Seeded and never stale, so the hook reads exactly what each section would.
+ const client = new QueryClient({ defaultOptions: { queries: { retry: false, staleTime: Infinity } } });
+ client.setQueryData(issueWakeupsOptions("ws-1", "issue-1").queryKey, (overrides.wakeups ?? []) as IssueWakeup[]);
+ client.setQueryData(issuePullRequestsOptions("issue-1").queryKey, (overrides.prs ?? noPullRequests) as IssuePullRequestsResponse);
+ client.setQueryData(githubInstallationsOptions("ws-1").queryKey, { installations: [] } as unknown as ListGitHubInstallationsResponse);
+ client.setQueryData(
+ vcsConnectionsOptions("ws-1").queryKey,
+ { connections: overrides.vcsConnections ?? [] } as unknown as ListVCSConnectionsResponse,
+ );
+ client.setQueryData(
+ issueEnvironmentsOptions("ws-1", "issue-1").queryKey,
+ (overrides.environments ?? declared) as IssueEnvironmentsResponse,
+ );
+ return function Wrapper({ children }: { children: ReactNode }) {
+ return <QueryClientProvider client={client}>{children}</QueryClientProvider>;
+ };
+}
+
+function addables(
+ props: Partial<Parameters<typeof useIssueSidebarAddables>[0]> = {},
+ data?: Parameters<typeof seed>[0],
+) {
+ return renderHook(
+ () => useIssueSidebarAddables({ issueId: "issue-1", closed: false, enabled: true, pullRequestsAvailable: true, ...props }),
+ { wrapper: seed(data) },
+ ).result.current;
+}
+
+beforeEach(() => {
+ repos = [{ url: "https://github.com/acme/app" }];
+ useIssueSidebarSectionsStore.setState({ hidden: [] });
+});
+
+describe("useIssueSidebarAddables", () => {
+ it("offers every empty section the reader can start", () => {
+ expect(addables()).toEqual(["wakeups", "pull_requests", "environments"]);
+ });
+
+ it("drops sections that already have content", () => {
+ expect(addables({}, { wakeups: [{ id: "wake" }], prs: { ...noPullRequests, pull_requests: [{ id: "pr" }] } })).toEqual(["environments"]);
+ });
+
+ it("offers nothing to a reader who cannot add, such as a guest", () => {
+ expect(addables({ enabled: false })).toEqual([]);
+ });
+
+ it("leaves out sections hidden in the sidebar settings", () => {
+ useIssueSidebarSectionsStore.setState({ hidden: ["pull_requests"] });
+ expect(addables()).toEqual(["wakeups", "environments"]);
+ });
+
+ it("offers no wakeup on an ended issue", () => {
+ expect(addables({ closed: true })).toEqual(["pull_requests", "environments"]);
+ });
+
+ it("offers pull requests only where the workspace has code and the sidebar shows them", () => {
+ expect(addables({ pullRequestsAvailable: false })).toEqual(["wakeups", "environments"]);
+ repos = [];
+ expect(addables()).toEqual(["wakeups", "environments"]);
+ });
+
+ it("offers pull requests to a workspace that only connects a self-hosted VCS", () => {
+ repos = [];
+ expect(addables({}, { vcsConnections: [{ id: "gitlab-1" }] })).toEqual(["wakeups", "pull_requests", "environments"]);
+ });
+
+ it("offers an environment only when a run declared one and nothing is starting", () => {
+ expect(addables({}, { environments: { ...declared, configs: [] } })).toEqual(["wakeups", "pull_requests"]);
+ expect(addables({}, { environments: { ...declared, pending_starts: [{ id: "cmd" }] } })).toEqual(["wakeups", "pull_requests"]);
+ });
+});
+
+describe("IssueSidebarAddRow", () => {
+ it("renders nothing with nothing to add", () => {
+ const { container } = renderWithI18n(<IssueSidebarAddRow items={[]} onPick={vi.fn()} />);
+ expect(container).toBeEmptyDOMElement();
+ });
+
+ it("opens a lone section directly", () => {
+ const onPick = vi.fn();
+ renderWithI18n(<IssueSidebarAddRow items={["pull_requests"]} onPick={onPick} />);
+ fireEvent.click(screen.getByRole("button", { name: "Add pull request" }));
+ expect(onPick).toHaveBeenCalledWith("pull_requests");
+ });
+
+ it("lets the reader pick among several", async () => {
+ const onPick = vi.fn();
+ renderWithI18n(<IssueSidebarAddRow items={["wakeups", "environments"]} onPick={onPick} />, { locale: "zh-Hans" });
+ fireEvent.click(screen.getByRole("button", { name: "添加唤醒或环境" }));
+ fireEvent.click(await screen.findByRole("menuitem", { name: "环境" }));
+ expect(onPick).toHaveBeenCalledWith("environments");
+ });
+
+ it("names all three in one sentence", () => {
+ renderWithI18n(<IssueSidebarAddRow items={["wakeups", "pull_requests", "environments"]} onPick={vi.fn()} />);
+ expect(screen.getByRole("button", { name: "Add wakeup, pull request, or environment" })).toBeInTheDocument();
+ });
+});
diff --git a/packages/views/issues/components/issue-sidebar-add-row.tsx b/packages/views/issues/components/issue-sidebar-add-row.tsx
new file mode 100644
index 0000000000..45cfc5e849
--- /dev/null
+++ b/packages/views/issues/components/issue-sidebar-add-row.tsx
@@ -0,0 +1,135 @@
+"use client";
+
+import { useQuery } from "@tanstack/react-query";
+import { Bell, GitPullRequest, Plus, Server, type IconComponent } from "@multica/ui/icons";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from "@multica/ui/components/ui/dropdown-menu";
+import { githubInstallationsOptions, issuePullRequestsOptions } from "@multica/core/github";
+import { issueEnvironmentsOptions } from "@multica/core/issues/queries";
+import { issueWakeupsOptions } from "@multica/core/issues";
+import { vcsConnectionsOptions } from "@multica/core/vcs/queries";
+import { useCurrentWorkspace } from "@multica/core/paths";
+import { useIssueSidebarSectionsStore } from "@multica/core/issues/stores";
+import { useT } from "../../i18n";
+
+/** Sections that hide while empty and are offered from the add row instead. */
+export type IssueSidebarAddable = "wakeups" | "pull_requests" | "environments";
+
+const ADDABLE_ORDER: readonly IssueSidebarAddable[] = ["wakeups", "pull_requests", "environments"];
+
+type AddRowLabel =
+ | IssueSidebarAddable
+ | "wakeups_pull_requests"
+ | "wakeups_environments"
+ | "pull_requests_environments"
+ | "all";
+
+const ADDABLE_ICON: Record<IssueSidebarAddable, IconComponent> = {
+ wakeups: Bell,
+ pull_requests: GitPullRequest,
+ environments: Server,
+};
+
+/**
+ * The empty sections this reader could start on this issue. Each one shares
+ * its section's query, so the answer matches what the section would render.
+ */
+export function useIssueSidebarAddables({
+ issueId,
+ closed,
+ enabled,
+ pullRequestsAvailable,
+}: {
+ issueId: string;
+ closed: boolean;
+ /** False for readers who cannot add anything, such as guests. */
+ enabled: boolean;
+ /** The workspace shows pull requests in the sidebar at all. */
+ pullRequestsAvailable: boolean;
+}): IssueSidebarAddable[] {
+ const workspace = useCurrentWorkspace();
+ const wsId = workspace?.id ?? "";
+ const hidden = useIssueSidebarSectionsStore((s) => s.hidden);
+ const wakeups = useQuery({ ...issueWakeupsOptions(wsId, issueId), enabled: enabled && !!wsId });
+ const prs = useQuery({ ...issuePullRequestsOptions(issueId), enabled: enabled && pullRequestsAvailable });
+ const installations = useQuery({ ...githubInstallationsOptions(wsId), enabled: enabled && pullRequestsAvailable && !!wsId });
+ const vcsConnections = useQuery({ ...vcsConnectionsOptions(wsId), enabled: enabled && pullRequestsAvailable && !!wsId });
+ const environments = useQuery({ ...issueEnvironmentsOptions(wsId, issueId), enabled: enabled && !!wsId });
+ if (!enabled) return [];
+
+ // A workspace with no repository to open a pull request against has none to
+ // link. Self-hosted GitLab / Gitea / Forgejo merge requests link by URL too.
+ const hostsCode =
+ (workspace?.repos?.length ?? 0) > 0 ||
+ (installations.data?.installations?.length ?? 0) > 0 ||
+ (vcsConnections.data?.connections?.length ?? 0) > 0;
+ const env = environments.data;
+ const can: Record<IssueSidebarAddable, boolean> = {
+ wakeups: !closed && wakeups.isSuccess && wakeups.data.length === 0,
+ pull_requests:
+ pullRequestsAvailable && hostsCode && prs.isSuccess && !!prs.data.auto_complete && prs.data.pull_requests.length === 0,
+ // Only a run that declared environments leaves something to start here.
+ environments:
+ environments.isSuccess &&
+ !!env &&
+ env.environments.length === 0 &&
+ (env.pending_starts ?? []).length === 0 &&
+ (env.failed_starts ?? []).length === 0 &&
+ (env.configs ?? []).some((config) => config.environments.length > 0),
+ };
+ return ADDABLE_ORDER.filter((id) => can[id] && !hidden.includes(id));
+}
+
+/**
+ * One quiet row after the last section that starts any of `items`. A single
+ * item opens its form directly; several open a menu to pick from.
+ */
+export function IssueSidebarAddRow({
+ items,
+ onPick,
+}: {
+ items: readonly IssueSidebarAddable[];
+ onPick: (item: IssueSidebarAddable) => void;
+}) {
+ const { t } = useT("issues");
+ if (items.length === 0) return null;
+ // Whole sentences per combination: languages inflect and space the list differently.
+ const key = items.length === ADDABLE_ORDER.length ? "all" : (items.join("_") as AddRowLabel);
+ const label = t(($) => $.detail.add_row[key]);
+ const rowClass =
+ "flex h-7 max-w-full items-center gap-2.5 rounded-md px-2 text-caption text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring data-popup-open:bg-accent/50 data-popup-open:text-foreground";
+ const content = (
+ <>
+ <Plus aria-hidden="true" className="size-3.5 shrink-0" />
+ <span className="truncate">{label}</span>
+ </>
+ );
+ return (
+ <div data-testid="issue-sidebar-add-row" className="px-2">
+ {items.length === 1 ? (
+ <button type="button" className={rowClass} onClick={() => onPick(items[0]!)}>
+ {content}
+ </button>
+ ) : (
+ <DropdownMenu>
+ <DropdownMenuTrigger render={<button type="button" className={rowClass} />}>{content}</DropdownMenuTrigger>
+ <DropdownMenuContent align="start" className="w-56">
+ {items.map((id) => {
+ const Icon = ADDABLE_ICON[id];
+ return (
+ <DropdownMenuItem key={id} onClick={() => onPick(id)}>
+ <Icon />
+ {t(($) => $.detail.add_row.menu[id])}
+ </DropdownMenuItem>
+ );
+ })}
+ </DropdownMenuContent>
+ </DropdownMenu>
+ )}
+ </div>
+ );
+}
diff --git a/packages/views/issues/components/issue-sidebar-footer.test.tsx b/packages/views/issues/components/issue-sidebar-footer.test.tsx
new file mode 100644
index 0000000000..496dcdab9f
--- /dev/null
+++ b/packages/views/issues/components/issue-sidebar-footer.test.tsx
@@ -0,0 +1,44 @@
+import { describe, expect, it, vi } from "vitest";
+import { fireEvent, screen } from "@testing-library/react";
+import type { Issue } from "@multica/core/types";
+import { renderWithI18n } from "../../test/i18n";
+import { IssueSidebarFooter } from "./issue-sidebar-footer";
+
+const names: Record<string, string> = { "agent-1": "Xeon", "user-1": "Jiayuan" };
+vi.mock("@multica/core/workspace/hooks", () => ({
+ useActorName: () => ({ getActorName: (_type: string, id: string) => names[id] ?? "Unknown" }),
+}));
+vi.mock("../../common/use-viewing-timezone", () => ({ useViewingTimezone: () => "Asia/Shanghai" }));
+vi.mock("../../agents/components/agent-profile-card", () => ({ AgentProfileCard: () => <div>Agent card</div> }));
+vi.mock("../../members/member-profile-card", () => ({ MemberProfileCard: () => <div>Member card</div> }));
+vi.mock("../../squads/components/squad-profile-card", () => ({ SquadProfileCard: () => <div>Squad card</div> }));
+
+const issue = (patch: Partial<Issue> = {}) =>
+ ({
+ creator_type: "agent",
+ creator_id: "agent-1",
+ requester_id: "user-1",
+ created_at: "2026-11-23T20:30:00Z",
+ updated_at: "2026-11-24T02:00:00Z",
+ ...patch,
+ }) as Issue;
+
+describe("IssueSidebarFooter", () => {
+ it("says who created the issue for whom, in the reader's own word order", () => {
+ renderWithI18n(<IssueSidebarFooter issue={issue()} />, { locale: "zh-Hans" });
+ expect(screen.getByTestId("issue-sidebar-footer")).toHaveTextContent("Xeon 代表 Jiayuan 创建于 11月24日");
+ });
+
+ it("leaves the requester out when a member created the issue", () => {
+ renderWithI18n(<IssueSidebarFooter issue={issue({ creator_type: "member", creator_id: "user-1" })} />);
+ expect(screen.getByTestId("issue-sidebar-footer")).toHaveTextContent(/^Created by Jiayuan · Nov 24$/);
+ });
+
+ it("dates the issue in the viewer's timezone and keeps the exact times in a tooltip", async () => {
+ renderWithI18n(<IssueSidebarFooter issue={issue()} />);
+ const date = screen.getByText("Nov 24");
+ fireEvent.focus(date);
+ expect(await screen.findByText(/^Created Nov 24, 2026, 4:30/)).toBeInTheDocument();
+ expect(screen.getByText(/^Updated Nov 24, 2026, 10:00/)).toBeInTheDocument();
+ });
+});
diff --git a/packages/views/issues/components/issue-sidebar-footer.tsx b/packages/views/issues/components/issue-sidebar-footer.tsx
new file mode 100644
index 0000000000..7c41a563e2
--- /dev/null
+++ b/packages/views/issues/components/issue-sidebar-footer.tsx
@@ -0,0 +1,82 @@
+"use client";
+
+import type { ReactNode } from "react";
+import type { Issue } from "@multica/core/types";
+import { useActorName } from "@multica/core/workspace/hooks";
+import { HoverCard, HoverCardContent, HoverCardTrigger } from "@multica/ui/components/ui/hover-card";
+import { Tooltip, TooltipContent, TooltipTrigger } from "@multica/ui/components/ui/tooltip";
+import { AgentProfileCard } from "../../agents/components/agent-profile-card";
+import { MemberProfileCard } from "../../members/member-profile-card";
+import { SquadProfileCard } from "../../squads/components/squad-profile-card";
+import { useViewingTimezone } from "../../common/use-viewing-timezone";
+import { useLocale, useT } from "../../i18n";
+
+// Placeholders the translated sentence is split on, so each language keeps its
+// own word order while names and the date render as interactive nodes.
+const slot = (name: string) => `\u2063${name}\u2063`;
+const SLOT_PATTERN = /\u2063(\w+)\u2063/;
+
+function fillSlots(sentence: string, nodes: Record<string, ReactNode>): ReactNode[] {
+ return sentence.split(SLOT_PATTERN).map((part, index) => (index % 2 === 1 ? <span key={index}>{nodes[part]}</span> : part));
+}
+
+const nameClass =
+ "cursor-default rounded-xs text-foreground focus-visible:outline-2 focus-visible:outline-ring";
+
+function ActorName({ type, id }: { type: string; id: string }) {
+ const { getActorName } = useActorName();
+ const name = getActorName(type, id);
+ const card =
+ type === "agent" ? <AgentProfileCard agentId={id} />
+ : type === "member" ? <MemberProfileCard userId={id} />
+ : type === "squad" ? <SquadProfileCard squadId={id} />
+ : null;
+ if (!card) return <span className="text-foreground">{name}</span>;
+ return (
+ <HoverCard>
+ <HoverCardTrigger render={<span />} tabIndex={0} className={nameClass}>
+ {name}
+ </HoverCardTrigger>
+ <HoverCardContent align="start" className="w-72">
+ {card}
+ </HoverCardContent>
+ </HoverCard>
+ );
+}
+
+/**
+ * Who created the issue and when, as one line under the sidebar's sections.
+ * The date's tooltip carries the exact time and the last update.
+ */
+export function IssueSidebarFooter({ issue }: { issue: Issue }) {
+ const { t } = useT("issues");
+ const locale = useLocale();
+ const viewTZ = useViewingTimezone();
+ const requesterId = issue.creator_type === "agent" ? issue.requester_id : null;
+ const format = (value: string, options: Intl.DateTimeFormatOptions) =>
+ new Intl.DateTimeFormat(locale, { ...options, timeZone: viewTZ }).format(new Date(value));
+ const exact = (value: string) => format(value, { dateStyle: "medium", timeStyle: "short" });
+ const date = (
+ <Tooltip>
+ <TooltipTrigger render={<span />} tabIndex={0} className={nameClass}>
+ {format(issue.created_at, { month: "short", day: "numeric" })}
+ </TooltipTrigger>
+ <TooltipContent className="flex-col items-start gap-0">
+ <span>{t(($) => $.detail.footer.created_at, { time: exact(issue.created_at) })}</span>
+ <span className="text-muted-foreground">{t(($) => $.detail.footer.updated_at, { time: exact(issue.updated_at) })}</span>
+ </TooltipContent>
+ </Tooltip>
+ );
+ const sentence = requesterId
+ ? t(($) => $.detail.footer.created_for, { creator: slot("creator"), requester: slot("requester"), date: slot("date") })
+ : t(($) => $.detail.footer.created, { creator: slot("creator"), date: slot("date") });
+ return (
+ <p data-testid="issue-sidebar-footer" className="px-4 text-caption text-muted-foreground">
+ {fillSlots(sentence, {
+ creator: <ActorName type={issue.creator_type} id={issue.creator_id} />,
+ requester: requesterId ? <ActorName type="member" id={requesterId} /> : null,
+ date,
+ })}
+ </p>
+ );
+}
diff --git a/packages/views/issues/components/issue-sidebar-section.test.tsx b/packages/views/issues/components/issue-sidebar-section.test.tsx
index 6c3f19118f..98bb9b55b0 100644
--- a/packages/views/issues/components/issue-sidebar-section.test.tsx
+++ b/packages/views/issues/components/issue-sidebar-section.test.tsx
@@ -2,7 +2,7 @@ import { useState } from "react";
import { fireEvent, render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { afterEach, describe, expect, it, vi } from "vitest";
-import { IssueSidebarCollapsible, IssueSidebarSectionHeader } from "./issue-sidebar-section";
+import { IssueSidebarCollapsible, IssueSidebarPropertyGrid, IssueSidebarSectionHeader } from "./issue-sidebar-section";
afterEach(() => {
vi.unstubAllGlobals();
@@ -34,7 +34,7 @@ describe("issue sidebar disclosure", () => {
</>;
}
render(<Example />);
- const disclosure = screen.getByRole("button", { name: "References 2" });
+ const disclosure = screen.getByRole("button", { name: "References" });
// The disclosure arrow trails the title text instead of leading it.
expect(screen.getByText("References").nextElementSibling).toHaveAttribute("aria-hidden", "true");
fireEvent.click(screen.getByRole("button", { name: "Add reference" }));
@@ -43,11 +43,33 @@ describe("issue sidebar disclosure", () => {
disclosure.focus();
await userEvent.keyboard(" ");
expect(disclosure).toHaveAttribute("aria-expanded", "false");
+ expect(disclosure).toHaveAccessibleName("References 2");
expect(screen.queryByText("Linked item")).not.toBeInTheDocument();
await userEvent.keyboard("{Enter}");
expect(screen.getByText("Linked item")).toBeVisible();
});
+ it("counts an open section only when its list is cut short", () => {
+ const { rerender } = render(<IssueSidebarSectionHeader title="Runs" count={9} open onOpenChange={vi.fn()} />);
+ expect(screen.getByRole("button", { name: "Runs" })).toBeInTheDocument();
+ rerender(<IssueSidebarSectionHeader title="Runs" count={9} countWhenOpen open onOpenChange={vi.fn()} />);
+ expect(screen.getByRole("button", { name: "Runs 9" })).toBeInTheDocument();
+ rerender(<IssueSidebarSectionHeader title="Runs" count={9} open={false} onOpenChange={vi.fn()} />);
+ expect(screen.getByRole("button", { name: "Runs 9" })).toBeInTheDocument();
+ });
+
+ it("sizes the property label column by the labels it is given, not the rows present", () => {
+ const { container } = render(
+ <IssueSidebarPropertyGrid sizerLabels={["Status", "Fecha de entrega"]}>
+ <div className="col-span-2">row</div>
+ </IssueSidebarPropertyGrid>,
+ );
+ const sizer = container.querySelector("[aria-hidden='true']");
+ expect([...sizer!.children].map((label) => label.getAttribute("data-label"))).toEqual(["Status", "Fecha de entrega"]);
+ expect(sizer!.textContent).toBe("");
+ expect(sizer).toHaveClass("invisible", "col-start-1", "h-0");
+ });
+
it("toggles IssueSidebarCollapsible content and honors reduced motion", () => {
vi.stubGlobal("matchMedia", vi.fn(() => ({
matches: true,
diff --git a/packages/views/issues/components/issue-sidebar-section.tsx b/packages/views/issues/components/issue-sidebar-section.tsx
index 954c65267a..5b59871660 100644
--- a/packages/views/issues/components/issue-sidebar-section.tsx
+++ b/packages/views/issues/components/issue-sidebar-section.tsx
@@ -12,22 +12,29 @@ import { cn } from "@multica/ui/lib/utils";
*
* Inset like a `PropRow` (`px-2` around an 8px hit-area padding) so the title
* starts on the same edge as the labels and rows of every section body under
- * it. The padding is 7px because `Button` adds a 1px transparent border.
+ * it. The padding is 7px because `Button` adds a 1px transparent border. The
+ * right inset puts the glyph of an `icon-xs` action, not its hit area, on the
+ * edge where row content ends.
+ *
+ * An open section lists what it counts, so the count only shows while it is
+ * collapsed, unless `countWhenOpen` says the open list is cut short.
*/
export function IssueSidebarSectionHeader({
- title, open, onOpenChange, count, actions, status, id, collapsible = true,
+ title, open, onOpenChange, count, countWhenOpen = false, actions, status, id, collapsible = true,
}: {
title: ReactNode;
open: boolean;
onOpenChange: (open: boolean) => void;
collapsible?: boolean;
count?: number;
+ countWhenOpen?: boolean;
actions?: ReactNode;
status?: ReactNode;
id?: string;
}) {
+ const showCount = count !== undefined && count > 0 && (!open || countWhenOpen);
return (
- <div data-slot="issue-sidebar-section-header" className="mb-1 flex min-w-0 items-center gap-1 px-2">
+ <div data-slot="issue-sidebar-section-header" className="mb-1 flex min-w-0 items-center gap-1 pr-2.5 pl-2">
{collapsible ? <Button
id={id}
type="button"
@@ -39,7 +46,7 @@ export function IssueSidebarSectionHeader({
>
<span className="truncate">{title}</span>
<ChevronRight aria-hidden="true" className={cn("!size-3 shrink-0 text-faint-foreground transition-transform duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none", open && "rotate-90")} />
- {count !== undefined && count > 0 && (
+ {showCount && (
<>
{" "}
<span data-slot="section-count" className="shrink-0 rounded-xs bg-muted px-1 text-micro font-medium tabular-nums text-muted-foreground">{count}</span>
@@ -77,12 +84,26 @@ export function IssueSidebarCollapsible({
);
}
-/** Shared spacing separates rendered sections without adding divider lines. */
export function IssueSidebarStack({ children, className }: { children: ReactNode; className?: string }) {
- return <div className={cn("flex flex-col gap-6 [overflow-anchor:none] [&>*]:flow-root", className)}>{children}</div>;
+ return <div className={cn("flex flex-col gap-4 [overflow-anchor:none] [&>*]:flow-root", className)}>{children}</div>;
}
-/** Fits labels to their content while reserving space for values and the hover gutter. */
-export function IssueSidebarPropertyGrid({ children }: { children: ReactNode }) {
- return <div className="grid grid-cols-[fit-content(min(44%,11rem))_minmax(0,1fr)] gap-x-2 gap-y-1 px-4">{children}</div>;
+/**
+ * Label column sized by `sizerLabels` rather than by the rows present, so
+ * values start on the same edge on every issue. Longer labels wrap.
+ */
+export function IssueSidebarPropertyGrid({ children, sizerLabels }: { children: ReactNode; sizerLabels?: readonly string[] }) {
+ const sized = !!sizerLabels?.length;
+ return (
+ // The sizer adds an empty last row; the negative margin takes back its gap.
+ <div className={cn("grid grid-cols-[fit-content(min(44%,11rem))_minmax(0,1fr)] gap-x-2 gap-y-1 px-4", sized && "-mb-1")}>
+ {children}
+ {sized && (
+ <div aria-hidden="true" className="invisible col-start-1 h-0 overflow-hidden text-label">
+ {/* Generated content keeps the labels out of the page's text. */}
+ {sizerLabels.map((label) => <div key={label} data-label={label} className="whitespace-nowrap before:content-[attr(data-label)]" />)}
+ </div>
+ )}
+ </div>
+ );
}
diff --git a/packages/views/issues/components/issue-sidebar-settings.test.tsx b/packages/views/issues/components/issue-sidebar-settings.test.tsx
index 568262040d..3ac35bdb50 100644
--- a/packages/views/issues/components/issue-sidebar-settings.test.tsx
+++ b/packages/views/issues/components/issue-sidebar-settings.test.tsx
@@ -44,13 +44,13 @@ describe("IssueSidebarSections", () => {
it("follows the saved order and leaves hidden sections out", () => {
act(() => {
useIssueSidebarSectionsStore.getState().setOrder(["execution_log", ...ISSUE_SIDEBAR_SECTIONS]);
- useIssueSidebarSectionsStore.getState().setHidden("details", true);
+ useIssueSidebarSectionsStore.getState().setHidden("deliverables", true);
useIssueSidebarSectionsStore.getState().setHidden("metadata", true);
});
renderSections();
expect(renderedOrder().slice(0, 2)).toEqual(["execution_log", "properties"]);
- expect(screen.queryByText("body:details")).toBeNull();
+ expect(screen.queryByText("body:deliverables")).toBeNull();
expect(screen.getByRole("button", { name: /2 sections hidden/ })).toBeInTheDocument();
});
@@ -63,13 +63,16 @@ describe("IssueSidebarSections", () => {
expect(within(dialog).getByText("Always shown")).toBeInTheDocument();
expect(within(dialog).getByRole("switch", { name: "Apps" }).closest("li")).toHaveTextContent("None on this issue");
- fireEvent.click(within(dialog).getByRole("switch", { name: "Details" }));
- expect(useIssueSidebarSectionsStore.getState().hidden).toEqual(["details"]);
- expect(screen.queryByText("body:details")).toBeNull();
+ expect(within(dialog).queryByRole("switch", { name: "Details" })).toBeNull();
+ expect(within(dialog).queryByRole("switch", { name: "Sub-issues" })).toBeNull();
+
+ fireEvent.click(within(dialog).getByRole("switch", { name: "Deliverables" }));
+ expect(useIssueSidebarSectionsStore.getState().hidden).toEqual(["deliverables"]);
+ expect(screen.queryByText("body:deliverables")).toBeNull();
fireEvent.click(within(dialog).getByRole("button", { name: /Reset/ }));
expect(useIssueSidebarSectionsStore.getState().hidden).toEqual([]);
- expect(screen.getByText("body:details")).toBeInTheDocument();
+ expect(screen.getByText("body:deliverables")).toBeInTheDocument();
});
it("opens settings from the hidden-sections hint", async () => {
@@ -82,6 +85,23 @@ describe("IssueSidebarSections", () => {
});
});
+describe("IssueSidebarSections extras", () => {
+ beforeEach(() => useIssueSidebarSectionsStore.getState().reset());
+
+ it("renders the add row after the sections and the footer last", () => {
+ render(
+ <I18nProvider resources={TEST_RESOURCES} locale="en">
+ <IssueSidebarSections sections={sections} available={available} addRow={<p>add-row</p>} footer={<p>footer</p>} />
+ </I18nProvider>,
+ );
+ const lastSection = screen.getByText("body:metadata");
+ const addRow = screen.getByText("add-row");
+ const footer = screen.getByText("footer");
+ expect(lastSection.compareDocumentPosition(addRow) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
+ expect(addRow.compareDocumentPosition(footer) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
+ });
+});
+
describe("letSidebarSettingsDragKeysThrough", () => {
const keyDownOn = (target: EventTarget) => {
const preventBaseUIHandler = vi.fn();
diff --git a/packages/views/issues/components/issue-sidebar-settings.tsx b/packages/views/issues/components/issue-sidebar-settings.tsx
index a847b27688..93165a094c 100644
--- a/packages/views/issues/components/issue-sidebar-settings.tsx
+++ b/packages/views/issues/components/issue-sidebar-settings.tsx
@@ -55,18 +55,20 @@ export function useIssueSidebarSectionLabels(): Record<IssueSidebarSection, stri
wakeups: t(($) => $.wakeups.title),
plugins: t(($) => $.plugins.panels),
parent: t(($) => $.detail.section_parent_issue),
- sub_issues: t(($) => $.detail.sub_issues_label),
duplicates: t(($) => $.duplicates.section_title),
pull_requests: t(($) => $.detail.section_pull_requests),
environments: t(($) => $.environments.section_title),
deliverables: t(($) => $.deliverables.section_title),
apps: t(($) => $.app_calls.section_title),
execution_log: t(($) => $.execution_log.section),
- details: t(($) => $.detail.section_details),
metadata: t(($) => $.detail.section_metadata),
};
}
+// A rule above every rendered section that follows another rendered one.
+const SECTION_DIVIDER =
+ "[[data-issue-sidebar-section]:not(:empty)~&]:before:mx-4 [[data-issue-sidebar-section]:not(:empty)~&]:before:mb-3.5 [[data-issue-sidebar-section]:not(:empty)~&]:before:block [[data-issue-sidebar-section]:not(:empty)~&]:before:h-px [[data-issue-sidebar-section]:not(:empty)~&]:before:bg-border [[data-issue-sidebar-section]:not(:empty)~&]:before:content-['']";
+
/**
* The issue sidebar's sections in the reader's order, minus the ones they
* hid. Each section sits in its own slot, which collapses while the section
@@ -75,9 +77,14 @@ export function useIssueSidebarSectionLabels(): Record<IssueSidebarSection, stri
export function IssueSidebarSections({
sections,
available,
+ addRow,
+ footer,
}: {
sections: Record<IssueSidebarSection, ReactNode>;
available: readonly IssueSidebarSection[];
+ /** Offers sections that are empty on this issue; rendered after the last section. */
+ addRow?: ReactNode;
+ footer?: ReactNode;
}) {
const { t } = useT("issues");
const order = useIssueSidebarSectionsStore(selectIssueSidebarOrder);
@@ -103,19 +110,20 @@ export function IssueSidebarSections({
variant="ghost"
size="icon-xs"
label={t(($) => $.detail.sidebar_settings.open)}
- className="absolute top-0.5 right-2 z-10 text-muted-foreground data-popup-open:bg-accent data-popup-open:text-foreground"
+ className="absolute top-0.5 right-2.5 z-10 text-muted-foreground data-popup-open:bg-accent data-popup-open:text-foreground"
>
<SlidersHorizontal />
</IconButton>
}
/>
{/* The first header to render shares its row with the settings button. */}
- <IssueSidebarStack className="[&>:nth-child(1_of_:not(:empty))>*>[data-slot=issue-sidebar-section-header]]:pr-9">
+ <IssueSidebarStack className="[&>:nth-child(1_of_:not(:empty))>*>[data-slot=issue-sidebar-section-header]]:pr-[38px]">
{visible.map((id) => (
- <div key={id} data-issue-sidebar-section={id} className="empty:hidden">
+ <div key={id} data-issue-sidebar-section={id} className={cn("empty:hidden", SECTION_DIVIDER)}>
{sections[id]}
</div>
))}
+ {addRow}
{hiddenCount > 0 && (
<div className="px-2">
<IssueSidebarSettings
@@ -128,7 +136,7 @@ export function IssueSidebarSections({
type="button"
className="flex h-7 max-w-full items-center gap-1.5 rounded-md px-2 text-caption text-muted-foreground transition-colors hover:bg-accent/50"
>
- <EyeOff className="size-3.5 shrink-0" />
+ <EyeOff className="mr-1 size-3.5 shrink-0" />
<span className="truncate">{t(($) => $.detail.sidebar_settings.hidden_count, { count: hiddenCount })}</span>
<span aria-hidden="true" className="text-faint-foreground">·</span>
<span className="shrink-0 font-medium text-foreground">{t(($) => $.detail.sidebar_settings.customize)}</span>
@@ -137,6 +145,7 @@ export function IssueSidebarSections({
/>
</div>
)}
+ {footer}
</IssueSidebarStack>
</div>
);
diff --git a/packages/views/issues/components/pull-request-list.test.tsx b/packages/views/issues/components/pull-request-list.test.tsx
index 697fe89e07..5b007a368f 100644
--- a/packages/views/issues/components/pull-request-list.test.tsx
+++ b/packages/views/issues/components/pull-request-list.test.tsx
@@ -1,5 +1,5 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
-import { fireEvent, render, screen, waitFor } from "@testing-library/react";
+import { fireEvent, render, screen, waitFor, within } from "@testing-library/react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { I18nProvider } from "@multica/core/i18n/react";
import type { GitHubPullRequest, PRAutoComplete } from "@multica/core/types";
@@ -350,12 +350,12 @@ describe("PullRequestList sidebar rows", () => {
expect(screen.queryByText(/^\+0/)).not.toBeInTheDocument();
});
- it("shortens the diff size to thousands", async () => {
+ it("leaves the diff size to the tooltip", async () => {
mockPRs = [makePR({ additions: 6743, deletions: 6, changed_files: 119 })];
renderList();
await waitForRender();
- expect(screen.getByText("+6.7k")).toBeInTheDocument();
- expect(screen.getByText("−6")).toBeInTheDocument();
+ expect(screen.getByTestId("pull-request-row")).not.toHaveTextContent("+6.7k");
+ expect(screen.queryByText("−6")).not.toBeInTheDocument();
});
// --- Collapse behaviour --------------------------------------------------
@@ -424,12 +424,21 @@ describe("PullRequestList auto-complete", () => {
});
it("falls back to Done on a backend that does not name the target", async () => {
- mockPRs = [makePR({ id: "b", number: 19 })];
+ mockPRs = [makePR({ id: "a", number: 12, state: "merged" }), makePR({ id: "b", number: 19 })];
mockAutoComplete = decision("waiting", ["b"], { target_status: undefined });
renderList();
expect(await screen.findByTestId("pr-auto-complete-line")).toHaveTextContent("Moves to Done when #19 merges");
});
+ it("says what merging a lone PR does on the PR's own row", async () => {
+ mockPRs = [makePR({ id: "b", number: 19 })];
+ mockAutoComplete = decision("waiting", ["b"], { target_status: "in_review" });
+ renderList();
+ const row = await screen.findByTestId("pull-request-row");
+ expect(within(row).getByTestId("pr-merge-target")).toHaveTextContent("On merge → In Review");
+ expect(screen.queryByTestId("pr-auto-complete-line")).toBeNull();
+ });
+
it("offers to remove a PR that closed without merging", async () => {
mockPRs = [makePR({ id: "a", number: 12, state: "merged" }), makePR({ id: "b", number: 19, state: "closed" })];
mockAutoComplete = decision("not_merged", ["b"]);
diff --git a/packages/views/issues/components/pull-request-list.tsx b/packages/views/issues/components/pull-request-list.tsx
index db2ff5f7bb..8a0b6d617d 100644
--- a/packages/views/issues/components/pull-request-list.tsx
+++ b/packages/views/issues/components/pull-request-list.tsx
@@ -22,7 +22,6 @@ import {
import {
issuePullRequestsOptions,
derivePullRequestVerdict,
- formatPullRequestDiffCount,
shouldShowPullRequestStats,
stripIssueKeyFromTitle,
useLinkIssuePullRequest,
@@ -98,11 +97,23 @@ export function PullRequestList({
// The repo name only tells rows apart when the PRs span repos; otherwise it
// spends the width the diff needs. The row tooltip keeps owner/repo#number.
const showRepo = new Set(prs.map((pr) => `${pr.repo_owner}/${pr.repo_name}`)).size > 1;
+ // A lone PR the merge is waiting on carries the outcome as its own last line.
+ const inlineWaiting =
+ autoComplete?.state === "waiting" &&
+ prs.length === 1 &&
+ autoComplete.pull_request_ids.includes(prs[0]!.id);
return (
<div className="space-y-1">
{expandedHead.map((pr) => (
- <PullRequestRow key={pr.id} pr={pr} identifier={identifier} showRepo={showRepo} actions={rowActions} />
+ <PullRequestRow
+ key={pr.id}
+ pr={pr}
+ identifier={identifier}
+ showRepo={showRepo}
+ actions={rowActions}
+ mergeTarget={inlineWaiting && autoComplete ? mergeTarget(autoComplete) : undefined}
+ />
))}
{useCollapse ? (
<div className="space-y-1">
@@ -122,7 +133,7 @@ export function PullRequestList({
</button>
</div>
) : null}
- {autoComplete ? (
+ {autoComplete && !inlineWaiting ? (
<AutoCompleteLine issueId={issueId} prs={prs} autoComplete={autoComplete} />
) : null}
</div>
@@ -230,6 +241,29 @@ function PullRequestRowMenu({ pr, actions }: { pr: GitHubPullRequest; actions: R
// its own word order and the status renders as a chip, not plain text.
const STATUS_SLOT = "\u2063status\u2063";
+function TargetSentence({ sentence, target }: { sentence: string; target: string }) {
+ const wsId = useWorkspaceId();
+ const catalog = useIssueStatuses(wsId);
+ const statusLabel = useStatusLabel(wsId);
+ const [before, after = ""] = sentence.split(STATUS_SLOT);
+ return (
+ <span>
+ {before}
+ <span className="inline-flex items-center gap-1 whitespace-nowrap align-middle font-medium text-foreground">
+ <StatusIcon
+ status={target}
+ category={catalog.categoryOf(target)}
+ color={catalog.colorOf(target)}
+ icon={catalog.iconOf(target)}
+ className="size-3"
+ />
+ {statusLabel(target)}
+ </span>
+ {after}
+ </span>
+ );
+}
+
/**
* One line under the PR list saying what "every linked PR merged → move the
* issue to the workspace's target status" will do for this issue, straight
@@ -247,9 +281,6 @@ function AutoCompleteLine({
autoComplete: PRAutoComplete;
}) {
const { t } = useT("issues");
- const wsId = useWorkspaceId();
- const catalog = useIssueStatuses(wsId);
- const statusLabel = useStatusLabel(wsId);
const unlink = useUnlinkPullRequest(issueId, autoComplete);
const setAutoComplete = useSetIssuePRAutoComplete(issueId);
const named = autoComplete.pull_request_ids
@@ -266,25 +297,7 @@ function AutoCompleteLine({
</button>
);
const target = mergeTarget(autoComplete);
- const withTarget = (sentence: string) => {
- const [before, after = ""] = sentence.split(STATUS_SLOT);
- return (
- <span>
- {before}
- <span className="inline-flex items-center gap-1 whitespace-nowrap align-middle font-medium text-foreground">
- <StatusIcon
- status={target}
- category={catalog.categoryOf(target)}
- color={catalog.colorOf(target)}
- icon={catalog.iconOf(target)}
- className="size-3"
- />
- {statusLabel(target)}
- </span>
- {after}
- </span>
- );
- };
+ const withTarget = (sentence: string) => <TargetSentence sentence={sentence} target={target} />;
let icon: React.ReactNode;
let body: React.ReactNode;
@@ -329,7 +342,7 @@ function AutoCompleteLine({
return (
<p
data-testid="pr-auto-complete-line"
- className="mx-2 mt-1 flex items-start gap-1.5 border-t border-border py-2 text-caption text-muted-foreground [&>svg]:mt-px [&>svg]:size-3.5 [&>svg]:shrink-0"
+ className="flex items-start gap-2.5 px-2 py-2 text-caption text-muted-foreground [&>svg]:mt-px [&>svg]:size-3.5 [&>svg]:shrink-0"
>
{icon}
<span className="min-w-0">{body}</span>
@@ -366,20 +379,23 @@ interface VerdictPillConfig {
/**
* One PR in the sidebar: the title, then `#number` (`repo#number` when the
- * list spans repos) with the diff size and one verdict pill aligned right, so
- * several PRs scan as a column. A failed PR also lists what failed. Owner,
- * author, the full title and exact counts live in the row's tooltip.
+ * list spans repos) with one verdict pill aligned right, so several PRs scan
+ * as a column. A failed PR also lists what failed. Owner, author, the full
+ * title and the diff size live in the row's tooltip.
*/
function PullRequestRow({
pr,
identifier,
showRepo,
actions,
+ mergeTarget: onMergeTarget,
}: {
pr: GitHubPullRequest;
identifier: string;
showRepo: boolean;
actions: RowActions | null;
+ /** The status merging this PR moves the issue to, said on the row's last line. */
+ mergeTarget?: string;
}) {
const { t } = useT("issues");
const timeAgo = useTimeAgo();
@@ -410,13 +426,6 @@ function PullRequestRow({
<span className="truncate">{timeAgo(pr.snapshot_fetched_at)}</span>
</span>
);
- } else if (showStats) {
- meta = (
- <span>
- <span className="text-emerald-600 dark:text-emerald-400">+{formatPullRequestDiffCount(pr.additions ?? 0)}</span>{" "}
- <span className="text-rose-600 dark:text-rose-400">−{formatPullRequestDiffCount(pr.deletions ?? 0)}</span>
- </span>
- );
}
// The row link and its menu are siblings: a button inside an anchor is
@@ -431,7 +440,7 @@ function PullRequestRow({
href={pr.html_url}
target="_blank"
rel="noreferrer noopener"
- className="flex items-start gap-2 rounded-md px-2 py-2"
+ className="flex items-start gap-2.5 rounded-md px-2 py-2"
/>
}
>
@@ -443,7 +452,7 @@ function PullRequestRow({
<div className="mt-1 flex items-center gap-2">
{/* The number and the pill never yield. Everything after the dot
is one unit: short of room, it wraps whole onto the clipped
- second line instead of being cut mid-number (+312 → +31). */}
+ second line instead of being cut mid-word. */}
<p className="flex h-lh min-w-0 flex-1 flex-wrap items-center gap-x-1.5 overflow-hidden whitespace-nowrap text-caption text-muted-foreground tabular-nums">
<span className="min-w-0 truncate">
{showRepo ? pr.repo_name : null}#{pr.number}
@@ -460,6 +469,11 @@ function PullRequestRow({
{pill ? <VerdictPill pill={pill} stale={stale} title={staleTitle} /> : null}
</div>
{verdict.kind === "failed" ? <PullRequestProblems verdict={verdict} stale={stale} /> : null}
+ {onMergeTarget ? (
+ <p data-testid="pr-merge-target" className="mt-1 truncate text-caption text-muted-foreground">
+ <TargetSentence sentence={t(($) => $.pr_automation.on_merge_to, { status: STATUS_SLOT })} target={onMergeTarget} />
+ </p>
+ ) : null}
</div>
</TooltipTrigger>
<TooltipContent side="left" align="start" className="flex-col items-start gap-0.5">
diff --git a/packages/views/issues/components/pull-requests-section.test.tsx b/packages/views/issues/components/pull-requests-section.test.tsx
index f0bd85c386..cc459dcd10 100644
--- a/packages/views/issues/components/pull-requests-section.test.tsx
+++ b/packages/views/issues/components/pull-requests-section.test.tsx
@@ -1,3 +1,4 @@
+import { useState } from "react";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
@@ -50,7 +51,10 @@ vi.mock("@multica/core/paths", async (importOriginal) => ({
import { PullRequestsSection } from "./pull-requests-section";
-function renderSection(cachedDecision?: PRAutoComplete) {
+function renderSection(
+ cachedDecision?: PRAutoComplete,
+ { reveal = true, onRevealEnd }: { reveal?: boolean; onRevealEnd?: () => void } = {},
+) {
const qc = new QueryClient({ defaultOptions: { queries: { retry: false } } });
if (cachedDecision) {
qc.setQueryData(["github", "pull-requests", "issue-1"], { pull_requests: [], auto_complete: cachedDecision });
@@ -58,7 +62,14 @@ function renderSection(cachedDecision?: PRAutoComplete) {
return render(
<QueryClientProvider client={qc}>
<I18nProvider resources={TEST_RESOURCES} locale="en">
- <PullRequestsSection issueId="issue-1" identifier="MUL-1" open onOpenChange={() => {}} />
+ <PullRequestsSection
+ issueId="issue-1"
+ identifier="MUL-1"
+ open
+ onOpenChange={() => {}}
+ reveal={reveal}
+ onRevealEnd={onRevealEnd}
+ />
</I18nProvider>
</QueryClientProvider>,
);
@@ -81,11 +92,41 @@ describe("PullRequestsSection (MUL-7429)", () => {
navigatePush.mockReset();
});
- it("keeps the empty title static and retains linking without redundant copy", async () => {
- renderSection();
- expect(await screen.findByRole("button", { name: "Link pull request" })).toBeVisible();
+ it("stays out of the sidebar while empty until the add row reveals it", async () => {
+ const { container } = renderSection(undefined, { reveal: false });
+ await waitFor(() => expect(container).toBeEmptyDOMElement());
+ });
+
+ it("opens the link form when revealed and ends the reveal when it closes", async () => {
+ const onRevealEnd = vi.fn();
+ renderSection(undefined, { onRevealEnd });
+ expect(await screen.findByRole("textbox", { name: "Link pull request" })).toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Pull requests" })).not.toBeInTheDocument();
expect(screen.queryByText(enIssues.detail.pull_requests_empty_title)).not.toBeInTheDocument();
+ fireEvent.keyDown(screen.getByRole("textbox", { name: "Link pull request" }), { key: "Escape" });
+ await waitFor(() => expect(onRevealEnd).toHaveBeenCalled());
+ });
+
+ it("leaves the sidebar when a reveal is cancelled with nothing linked", async () => {
+ const qc = new QueryClient({ defaultOptions: { queries: { retry: false } } });
+ mockAutoComplete = decision;
+ qc.setQueryData(["github", "pull-requests", "issue-1"], { pull_requests: [], auto_complete: decision });
+ function Revealed() {
+ const [reveal, setReveal] = useState(true);
+ return (
+ <PullRequestsSection issueId="issue-1" identifier="MUL-1" open onOpenChange={() => {}}
+ reveal={reveal} onRevealEnd={() => setReveal(false)} />
+ );
+ }
+ const { container } = render(
+ <QueryClientProvider client={qc}>
+ <I18nProvider resources={TEST_RESOURCES} locale="en">
+ <Revealed />
+ </I18nProvider>
+ </QueryClientProvider>,
+ );
+ fireEvent.keyDown(await screen.findByRole("textbox", { name: "Link pull request" }), { key: "Escape" });
+ await waitFor(() => expect(container).toBeEmptyDOMElement());
});
it("keeps a retry entry when loading fails with no cached PRs", async () => {
@@ -105,7 +146,6 @@ describe("PullRequestsSection (MUL-7429)", () => {
it("links a pasted PR URL", async () => {
apiMock.linkIssuePullRequest.mockResolvedValue({ pull_requests: [], auto_complete: decision });
renderSection();
- fireEvent.click(await screen.findByRole("button", { name: "Link pull request" }));
fireEvent.change(await screen.findByRole("textbox", { name: "Link pull request" }), {
target: { value: "https://github.com/acme/widget/pull/41" },
});
@@ -121,7 +161,6 @@ describe("PullRequestsSection (MUL-7429)", () => {
it("accepts a link pasted without a scheme", async () => {
apiMock.linkIssuePullRequest.mockResolvedValue({ pull_requests: [], auto_complete: decision });
renderSection();
- fireEvent.click(await screen.findByRole("button", { name: "Link pull request" }));
fireEvent.change(await screen.findByRole("textbox", { name: "Link pull request" }), {
target: { value: "github.com/acme/widget/pull/41/files" },
});
@@ -134,7 +173,6 @@ describe("PullRequestsSection (MUL-7429)", () => {
it("explains a PR Multica has not received", async () => {
apiMock.linkIssuePullRequest.mockRejectedValue(new ApiError("not found", 404, "Not Found"));
renderSection();
- fireEvent.click(await screen.findByRole("button", { name: "Link pull request" }));
fireEvent.change(await screen.findByRole("textbox", { name: "Link pull request" }), {
target: { value: "https://github.com/acme/widget/pull/999" },
});
@@ -170,7 +208,6 @@ describe("PullRequestsSection (MUL-7429)", () => {
it("drops the auto-link hint when the workspace does not auto-link PRs", async () => {
mockWorkspaceSettings = { github_auto_link_prs_enabled: false };
renderSection();
- fireEvent.click(await screen.findByRole("button", { name: "Link pull request" }));
await screen.findByRole("textbox", { name: "Link pull request" });
expect(screen.queryByText("PRs with MUL-1 in the title or branch name link automatically.")).toBeNull();
});
diff --git a/packages/views/issues/components/pull-requests-section.tsx b/packages/views/issues/components/pull-requests-section.tsx
index dff7c05336..89bcef52d2 100644
--- a/packages/views/issues/components/pull-requests-section.tsx
+++ b/packages/views/issues/components/pull-requests-section.tsx
@@ -28,6 +28,7 @@ import { Popover, PopoverContent, PopoverTrigger } from "@multica/ui/components/
import { useNavigation } from "../../navigation";
import { useT } from "../../i18n";
import { PullRequestList } from "./pull-request-list";
+import { useReopenOnReveal, useSidebarRevealMotion } from "./use-sidebar-reveal-motion";
/**
* The issue sidebar's Pull requests section: the linked PRs, what merging them
@@ -40,31 +41,47 @@ export function PullRequestsSection({
identifier,
open,
onOpenChange,
+ reveal = false,
+ onRevealEnd,
}: {
issueId: string;
identifier: string;
open: boolean;
onOpenChange: (open: boolean) => void;
+ /** Shows the section while empty with the link form open, until it closes. */
+ reveal?: boolean;
+ onRevealEnd?: () => void;
}) {
const { t } = useT("issues");
- const { data, isLoading, isError } = useQuery(issuePullRequestsOptions(issueId));
+ const { data, isError: lastFetchFailed, errorUpdateCount } = useQuery(issuePullRequestsOptions(issueId));
+ // A retry starts pending again; holding on to the failure keeps the retry
+ // entry mounted instead of the section blinking out mid-retry.
+ const isError = lastFetchFailed || (data === undefined && errorUpdateCount > 0);
// Older backends have no link / auto-complete endpoints; keep the header
// actions hidden until the server says it supports them.
const supported = !!data?.auto_complete;
const count = data?.pull_requests.length ?? 0;
+ const motion = useSidebarRevealMotion<HTMLDivElement>(reveal && supported, count > 0 || isError, onRevealEnd);
- if (!isLoading && !isError && count === 0 && !supported) return null;
+ // An empty section is offered by the sidebar's add row instead.
+ if (!motion.shown) return null;
return (
- <div>
+ <div ref={motion.ref}>
<IssueSidebarSectionHeader
- title={t(($) => $.detail.section_pull_requests)} open={open} onOpenChange={onOpenChange} count={count} collapsible={count > 0 || isLoading || isError}
+ title={t(($) => $.detail.section_pull_requests)} open={open} onOpenChange={onOpenChange} count={count} collapsible={count > 0 || isError}
actions={supported ? <>
- <LinkPullRequestPopover issueId={issueId} identifier={identifier} onLinked={() => onOpenChange(true)} />
+ <LinkPullRequestPopover
+ issueId={issueId}
+ identifier={identifier}
+ defaultOpen={reveal}
+ onLinked={() => onOpenChange(true)}
+ onClosed={() => reveal && motion.end()}
+ />
<AutoCompleteMenu issueId={issueId} disabled={data?.auto_complete?.issue_disabled ?? false} workspaceEnabled={data?.auto_complete?.workspace_enabled ?? true} />
</> : undefined}
/>
- <IssueSidebarCollapsible open={open && (count > 0 || isLoading || isError)}>
+ <IssueSidebarCollapsible open={open && (count > 0 || isError)}>
<div className="px-2">
<PullRequestList issueId={issueId} identifier={identifier} />
</div>
@@ -76,15 +93,24 @@ export function PullRequestsSection({
function LinkPullRequestPopover({
issueId,
identifier,
+ defaultOpen = false,
onLinked,
+ onClosed,
}: {
issueId: string;
identifier: string;
+ defaultOpen?: boolean;
onLinked: () => void;
+ onClosed?: () => void;
}) {
const { t } = useT("issues");
const { autoLinkPRs } = useGitHubSettings();
- const [open, setOpen] = useState(false);
+ const [open, setOpenState] = useState(defaultOpen);
+ useReopenOnReveal(defaultOpen, () => setOpenState(true));
+ const setOpen = (next: boolean) => {
+ setOpenState(next);
+ if (!next) onClosed?.();
+ };
const [url, setUrl] = useState("");
const link = useLinkIssuePullRequest(issueId);
const error = link.error
diff --git a/packages/views/issues/components/quick-actions-section.test.tsx b/packages/views/issues/components/quick-actions-section.test.tsx
index 1eee4796f4..81dbc85024 100644
--- a/packages/views/issues/components/quick-actions-section.test.tsx
+++ b/packages/views/issues/components/quick-actions-section.test.tsx
@@ -126,7 +126,7 @@ describe("QuickActionsSection", () => {
it("keeps the header free of create and settings buttons", () => {
renderWithI18n(<QuickActionsSection issueId="i-1" />);
- expect(screen.getByRole("button", { name: "Quick actions 1" })).toBeVisible();
+ expect(screen.getByRole("button", { name: "Quick actions" })).toBeVisible();
expect(screen.queryByRole("button", { name: "New quick action" })).not.toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Quick actions options" })).not.toBeInTheDocument();
});
diff --git a/packages/views/issues/components/quick-actions-section.tsx b/packages/views/issues/components/quick-actions-section.tsx
index ea1e718470..df575de463 100644
--- a/packages/views/issues/components/quick-actions-section.tsx
+++ b/packages/views/issues/components/quick-actions-section.tsx
@@ -78,7 +78,7 @@ export function QuickActionsSection({ issueId }: { issueId: string }) {
return (
<div>
- <IssueSidebarSectionHeader title={t(($) => $.detail.section_quick_actions)} count={actions.length} open={open} onOpenChange={setOpen} />
+ <IssueSidebarSectionHeader title={t(($) => $.detail.section_quick_actions)} count={actions.length} countWhenOpen={hiddenCount > 0} open={open} onOpenChange={setOpen} />
<IssueSidebarCollapsible open={open}>
<div className="space-y-0.5 px-2">
{isError && <button type="button" className="flex min-h-8 w-full items-center rounded-md px-2 py-1.5 text-left text-caption text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring" onClick={() => void refetch()}>
diff --git a/packages/views/issues/components/system-wakeup-chip.test.tsx b/packages/views/issues/components/system-wakeup-chip.test.tsx
new file mode 100644
index 0000000000..7ea8bc7e15
--- /dev/null
+++ b/packages/views/issues/components/system-wakeup-chip.test.tsx
@@ -0,0 +1,103 @@
+import { beforeEach, describe, expect, it, vi } from "vitest";
+import { fireEvent, screen, waitFor } from "@testing-library/react";
+import type { ReactNode } from "react";
+import type { SystemWakeup } from "@multica/core/types";
+import { renderWithI18n } from "../../test/i18n";
+import { SystemWakeupChips } from "./system-wakeup-chip";
+
+const updateSystem = vi.fn();
+let rules: SystemWakeup[] = [];
+vi.mock("./wakeup-condition-names", () => ({
+ useConditionNames: () => ({ status: (key: string) => key, label: () => undefined, property: () => undefined, actor: (_type: string, id: string) => id }),
+}));
+vi.mock("../../navigation", () => ({
+ AppLink: ({ href, children, ...props }: { href: string; children: ReactNode }) => (
+ <a href={href} {...props}>
+ {children}
+ </a>
+ ),
+}));
+vi.mock("@multica/core/paths", () => ({
+ useWorkspacePaths: () => ({ autopilots: () => "/acme/autopilots" }),
+}));
+vi.mock("@multica/core/issues", () => ({
+ issueSystemWakeupsOptions: () => ({ queryKey: ["system"] }),
+ useUpdateIssueSystemWakeup: () => ({ mutateAsync: updateSystem, isPending: false }),
+}));
+vi.mock("@tanstack/react-query", () => ({
+ useQuery: () => ({ data: rules }),
+}));
+vi.mock("../../common/use-viewing-timezone", () => ({
+ useViewingTimezone: () => "UTC",
+}));
+
+const childDone = (patch: Partial<SystemWakeup> = {}): SystemWakeup => ({
+ id: "rule", revision: 1, default_instruction: "Advance the next stage.", customized: false, paused_reason: null,
+ rule: "child_done", workspace_default: true, enabled: true, instruction: "", staged: false, stage: null, total: 3, remaining: 1,
+ waiting: ["MUL-7704"], target: { type: "agent", id: "a", name: "Emacs" }, blocked: "",
+ ...patch,
+});
+
+beforeEach(() => {
+ updateSystem.mockReset().mockResolvedValue(undefined);
+ rules = [];
+});
+
+describe("SystemWakeupChips", () => {
+ it("renders nothing without a system rule", () => {
+ const { container } = renderWithI18n(<SystemWakeupChips workspaceId="ws" issueId="issue" />);
+ expect(container).toBeEmptyDOMElement();
+ });
+
+ it("names who is woken and keeps the rule's detail in its popover", async () => {
+ rules = [childDone({ staged: true, stage: 1 })];
+ renderWithI18n(<SystemWakeupChips workspaceId="ws" issueId="issue" />, { locale: "zh-Hans" });
+ fireEvent.click(screen.getByRole("button", { name: "结束后唤醒 Emacs" }));
+ expect(await screen.findByText("当第 1 阶段的子任务全部结束时")).toBeVisible();
+ expect(screen.getByText("系统")).toBeVisible();
+ expect(screen.getByText(/2\/3 已结束/)).toHaveTextContent("还差 MUL-7704");
+ });
+
+ it("turns the rule off for this issue from the popover", async () => {
+ rules = [childDone()];
+ renderWithI18n(<SystemWakeupChips workspaceId="ws" issueId="issue" />);
+ fireEvent.click(screen.getByRole("button", { name: "Wakes Emacs when all finish" }));
+ fireEvent.click(await screen.findByRole("switch", { name: "Wake the assignee when sub-issues finish" }));
+ await waitFor(() => expect(updateSystem).toHaveBeenCalledWith({ rule: "child_done", enabled: false, instruction: "" }));
+ });
+
+ it("keeps a quiet chip for a turned-off rule so it can be turned back on", async () => {
+ rules = [childDone({ enabled: false, customized: true })];
+ renderWithI18n(<SystemWakeupChips workspaceId="ws" issueId="issue" />);
+ fireEvent.click(screen.getByRole("button", { name: "Sub-issue wakeup off" }));
+ fireEvent.click(await screen.findByRole("switch", { name: "Wake the assignee when sub-issues finish" }));
+ await waitFor(() => expect(updateSystem).toHaveBeenCalledWith({ rule: "child_done", enabled: true, instruction: "" }));
+ });
+
+ it("explains in the popover why a backlog issue wakes nobody yet", async () => {
+ rules = [childDone({ blocked: "backlog" })];
+ renderWithI18n(<SystemWakeupChips workspaceId="ws" issueId="issue" />);
+ fireEvent.click(screen.getByRole("button", { name: "Wakes Emacs when all finish" }));
+ expect(await screen.findByText("Issue is in backlog; no wakeup for now")).toBeVisible();
+ });
+
+ it("says a member assignee is notified instead of woken", () => {
+ rules = [childDone({ target: { type: "member", id: "u", name: "Jiayuan" }, blocked: "member_assignee" })];
+ renderWithI18n(<SystemWakeupChips workspaceId="ws" issueId="issue" />);
+ expect(screen.getByRole("button", { name: "Notifies Jiayuan when all finish" })).toBeVisible();
+ });
+
+ it("shows the default instruction and saves one for this issue", async () => {
+ rules = [childDone()];
+ renderWithI18n(<SystemWakeupChips workspaceId="ws" issueId="issue" />);
+ fireEvent.click(screen.getByRole("button", { name: "Wakes Emacs when all finish" }));
+ expect(await screen.findByText("Advance the next stage.")).toBeVisible();
+ expect(screen.getByRole("link", { name: "Change the default" })).toHaveAttribute("href", "/acme/autopilots?tab=wakeups");
+ fireEvent.click(screen.getByRole("button", { name: "Edit instruction" }));
+ const input = screen.getByLabelText("What to do when woken");
+ expect(input).toHaveAttribute("placeholder", "Advance the next stage.");
+ fireEvent.change(input, { target: { value: "Ask Jiayuan first" } });
+ fireEvent.submit(input.closest("form")!);
+ await waitFor(() => expect(updateSystem).toHaveBeenCalledWith({ rule: "child_done", enabled: true, instruction: "Ask Jiayuan first" }));
+ });
+});
diff --git a/packages/views/issues/components/system-wakeup-row.tsx b/packages/views/issues/components/system-wakeup-chip.tsx
similarity index 54%
rename from packages/views/issues/components/system-wakeup-row.tsx
rename to packages/views/issues/components/system-wakeup-chip.tsx
index 24d6920fea..6793e023b8 100644
--- a/packages/views/issues/components/system-wakeup-row.tsx
+++ b/packages/views/issues/components/system-wakeup-chip.tsx
@@ -1,9 +1,10 @@
"use client";
import { useId, useState } from "react";
-import { ListChecks, Pencil } from "@multica/ui/icons";
+import { useQuery } from "@tanstack/react-query";
+import { Bell, BellOff, Pencil } from "@multica/ui/icons";
import { toast } from "sonner";
-import { useUpdateIssueSystemWakeup } from "@multica/core/issues";
+import { issueSystemWakeupsOptions, useUpdateIssueSystemWakeup } from "@multica/core/issues";
import { useWorkspacePaths } from "@multica/core/paths";
import type { SystemWakeup } from "@multica/core/types";
import { Button } from "@multica/ui/components/ui/button";
@@ -17,6 +18,7 @@ import {
PopoverTrigger,
} from "@multica/ui/components/ui/popover";
import { TruncatedTooltip } from "@multica/ui/components/common/truncated-tooltip";
+import { cn } from "@multica/ui/lib/utils";
import { useT } from "../../i18n";
import { AppLink } from "../../navigation";
import { wakeupsHref } from "../../autopilots/components/wakeups-tab";
@@ -24,17 +26,36 @@ import { useWakeupText } from "./wakeup-presentation";
const MAX_INSTRUCTION_BYTES = 4000;
-/** The platform's child-done wakeup, shown beside the rules people created. */
-export function SystemWakeupRow({
+/**
+ * The platform's sub-issue wakeups, as chips beside the sub-issue heading.
+ * A turned-off rule keeps a quiet chip so it can be turned back on.
+ */
+export function SystemWakeupChips({
+ workspaceId,
+ issueId,
+}: {
+ workspaceId: string;
+ issueId: string;
+}) {
+ const { data: rules = [] } = useQuery(issueSystemWakeupsOptions(workspaceId, issueId));
+ if (rules.length === 0) return null;
+ return (
+ <>
+ {rules.map((rule) => (
+ <SystemWakeupChip key={rule.rule} rule={rule} workspaceId={workspaceId} issueId={issueId} />
+ ))}
+ </>
+ );
+}
+
+function SystemWakeupChip({
rule,
workspaceId,
issueId,
- onTurnedOff,
}: {
rule: SystemWakeup;
workspaceId: string;
issueId: string;
- onTurnedOff?: () => void;
}) {
const { t } = useT("issues");
const text = useWakeupText();
@@ -44,110 +65,101 @@ export function SystemWakeupRow({
rule.staged && rule.stage !== null
? t(($) => $.wakeups.system.title_stage, { stage: rule.stage })
: t(($) => $.wakeups.system.title_all);
- const blocked = {
- "": null,
- backlog: t(($) => $.wakeups.system.blocked_backlog),
- member_assignee: t(($) => $.wakeups.system.blocked_member),
- no_assignee: t(($) => $.wakeups.system.blocked_none),
- }[rule.blocked];
const paused = rule.paused_reason
? t(($) => $.wakeups.system.paused, {
reason: text.pausedReason({ paused_reason: rule.paused_reason, max_fires: null, fire_count: 0 }) ?? "",
})
: null;
- const target =
- rule.target?.type === "member"
- ? t(($) => $.wakeups.system.notify_member, { name: rule.target.name })
- : t(($) => $.wakeups.system.wake_assignee, { name: rule.target?.name ?? "" });
- const summary =
- paused ??
- (!rule.enabled
- ? t(($) => $.wakeups.system.turned_off)
- : rule.blocked && rule.blocked !== "member_assignee"
- ? blocked
- : [target, t(($) => $.wakeups.system.remaining, { count: rule.remaining })].join(" · "));
+ // Why an enabled rule will not wake anyone right now. A member assignee is
+ // already named on the chip ("Notifies …").
+ const blocked = rule.enabled && !paused
+ ? rule.blocked === "backlog"
+ ? t(($) => $.wakeups.system.blocked_backlog)
+ : rule.blocked === "no_assignee"
+ ? t(($) => $.wakeups.system.blocked_none)
+ : null
+ : null;
+ const label = !rule.enabled
+ ? t(($) => $.wakeups.system.chip_off)
+ : !rule.target
+ ? t(($) => $.wakeups.system.chip_assignee)
+ : rule.target.type === "member"
+ ? t(($) => $.wakeups.system.chip_notify, { name: rule.target.name })
+ : t(($) => $.wakeups.system.chip_wake, { name: rule.target.name });
const save = (input: { enabled: boolean; instruction: string }) =>
update.mutateAsync({ rule: rule.rule, ...input });
const toggle = (enabled: boolean) => {
- if (!enabled) onTurnedOff?.();
void save({ enabled, instruction: rule.instruction }).catch(() =>
toast.error(t(($) => $.wakeups.system.save_error)),
);
};
return (
- <div className="grid grid-cols-[minmax(0,1fr)_auto]" aria-busy={update.isPending}>
- <Popover>
- <PopoverTrigger
- render={
- <button
- type="button"
- className="col-span-2 col-start-1 row-start-1 grid min-w-0 grid-cols-subgrid rounded-md py-2 text-left text-label hover:bg-accent/50 focus-visible:outline-2 focus-visible:outline-ring"
- />
- }
- >
- <span className="flex min-h-7 min-w-0 items-center gap-2 pl-2 pr-1">
- <ListChecks className="mt-px size-3.5 shrink-0 text-muted-foreground" aria-hidden="true" />
- <span className="line-clamp-2 min-w-0 break-words">{title}</span>
- <SystemBadge />
- </span>
- <span className={`col-span-2 min-w-0 break-words pl-7.5 pr-2 text-caption ${paused ? "text-warning" : "text-muted-foreground"}`}>
- {summary}
- </span>
- </PopoverTrigger>
- <PopoverContent align="end" className="max-h-[70dvh] w-80 max-w-[calc(100vw-2rem)] overflow-y-auto" keepMounted>
- <div className="flex items-start gap-2">
- <PopoverTitle className="flex-1">{title}</PopoverTitle>
- <SystemBadge />
- </div>
- <dl className="grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-2 text-caption">
- <dt className="text-muted-foreground">{t(($) => $.wakeups.system.target_title)}</dt>
- <dd>
- {rule.target
- ? t(($) => $.wakeups.system.target_current, { name: rule.target.name })
- : t(($) => $.wakeups.system.target_none)}
- </dd>
- <dt className="text-muted-foreground">{t(($) => $.wakeups.system.progress_title)}</dt>
- <dd>
- {t(($) => $.wakeups.system.progress, { done: rule.total - rule.remaining, total: rule.total })}
- {rule.waiting.length > 0 &&
- ` · ${t(($) => $.wakeups.system.waiting_on, { ids: rule.waiting.join(", ") })}`}
- </dd>
- <dt className="text-muted-foreground">{t(($) => $.wakeups.system.skip_title)}</dt>
- <dd>{t(($) => $.wakeups.system.skip)}</dd>
- <dt className="text-muted-foreground">{t(($) => $.wakeups.source_title)}</dt>
- <dd>{t(($) => $.wakeups.system.source)}</dd>
- </dl>
- <InstructionEditor rule={rule} pending={update.isPending} onSave={save} />
- <div className="flex items-center gap-2 border-t border-border pt-2.5">
- <span className="flex-1 text-caption">{t(($) => $.wakeups.system.enable)}</span>
- <Switch
- checked={rule.enabled}
- disabled={update.isPending}
- aria-label={t(($) => $.wakeups.system.toggle)}
- onCheckedChange={toggle}
- />
- </div>
- <p className="text-caption text-muted-foreground">
- {rule.workspace_default ? t(($) => $.wakeups.system.default_on) : t(($) => $.wakeups.system.default_off)}{" "}
- <AppLink
- href={wakeupsHref(paths.autopilots())}
- className="rounded-xs font-medium text-brand hover:underline focus-visible:outline-2 focus-visible:outline-ring"
- >
- {t(($) => $.wakeups.system.default_change)}
- </AppLink>
- </p>
- </PopoverContent>
- </Popover>
- <div className="z-10 col-start-2 row-start-1 flex min-h-10 items-center self-start px-2">
- <Switch
- size="sm"
- checked={rule.enabled}
- disabled={update.isPending}
- aria-label={t(($) => $.wakeups.system.toggle)}
- onCheckedChange={toggle}
- />
- </div>
- </div>
+ <Popover>
+ <PopoverTrigger
+ render={
+ <button
+ type="button"
+ aria-busy={update.isPending}
+ className={cn(
+ "inline-flex h-6 min-w-0 shrink items-center gap-1 rounded-md px-1.5 text-caption transition-colors hover:bg-accent/50 focus-visible:outline-2 focus-visible:outline-ring data-popup-open:bg-accent",
+ paused ? "text-warning" : "text-muted-foreground",
+ )}
+ />
+ }
+ >
+ {rule.enabled ? (
+ <Bell className="size-3.5 shrink-0" aria-hidden="true" />
+ ) : (
+ <BellOff className="size-3.5 shrink-0 text-faint-foreground" aria-hidden="true" />
+ )}
+ <span className="truncate">{label}</span>
+ </PopoverTrigger>
+ <PopoverContent align="start" className="max-h-[70dvh] w-80 max-w-[calc(100vw-2rem)] overflow-y-auto" keepMounted>
+ <div className="flex items-start gap-2">
+ <PopoverTitle className="flex-1">{title}</PopoverTitle>
+ <SystemBadge />
+ </div>
+ {paused && <p className="break-words text-caption text-warning">{paused}</p>}
+ {blocked && <p className="break-words text-caption text-muted-foreground">{blocked}</p>}
+ <dl className="grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-2 text-caption">
+ <dt className="text-muted-foreground">{t(($) => $.wakeups.system.target_title)}</dt>
+ <dd>
+ {rule.target
+ ? t(($) => $.wakeups.system.target_current, { name: rule.target.name })
+ : t(($) => $.wakeups.system.target_none)}
+ </dd>
+ <dt className="text-muted-foreground">{t(($) => $.wakeups.system.progress_title)}</dt>
+ <dd>
+ {t(($) => $.wakeups.system.progress, { done: rule.total - rule.remaining, total: rule.total })}
+ {rule.waiting.length > 0 &&
+ ` · ${t(($) => $.wakeups.system.waiting_on, { ids: rule.waiting.join(", ") })}`}
+ </dd>
+ <dt className="text-muted-foreground">{t(($) => $.wakeups.system.skip_title)}</dt>
+ <dd>{t(($) => $.wakeups.system.skip)}</dd>
+ <dt className="text-muted-foreground">{t(($) => $.wakeups.source_title)}</dt>
+ <dd>{t(($) => $.wakeups.system.source)}</dd>
+ </dl>
+ <InstructionEditor rule={rule} pending={update.isPending} onSave={save} />
+ <div className="flex items-center gap-2 border-t border-border pt-2.5">
+ <span className="flex-1 text-caption">{t(($) => $.wakeups.system.enable)}</span>
+ <Switch
+ checked={rule.enabled}
+ disabled={update.isPending}
+ aria-label={t(($) => $.wakeups.system.toggle)}
+ onCheckedChange={toggle}
+ />
+ </div>
+ <p className="text-caption text-muted-foreground">
+ {rule.workspace_default ? t(($) => $.wakeups.system.default_on) : t(($) => $.wakeups.system.default_off)}{" "}
+ <AppLink
+ href={wakeupsHref(paths.autopilots())}
+ className="rounded-xs font-medium text-brand hover:underline focus-visible:outline-2 focus-visible:outline-ring"
+ >
+ {t(($) => $.wakeups.system.default_change)}
+ </AppLink>
+ </p>
+ </PopoverContent>
+ </Popover>
);
}
diff --git a/packages/views/issues/components/use-sidebar-reveal-motion.ts b/packages/views/issues/components/use-sidebar-reveal-motion.ts
new file mode 100644
index 0000000000..790e5d62f6
--- /dev/null
+++ b/packages/views/issues/components/use-sidebar-reveal-motion.ts
@@ -0,0 +1,76 @@
+import { useLayoutEffect, useRef, useState } from "react";
+import { prefersReducedMotion } from "@multica/core/appearance";
+import { UI_EASE_OUT_CSS, UI_MOTION_DURATION } from "@multica/ui/lib/motion";
+
+function fold(element: HTMLElement | null, open: boolean) {
+ const slot = element?.closest<HTMLElement>("[data-issue-sidebar-section]");
+ if (!slot?.animate || prefersReducedMotion()) return undefined;
+ const height = `${slot.getBoundingClientRect().height}px`;
+ const frames = [
+ { height: "0px", opacity: 0, overflow: "hidden" },
+ { height, opacity: 1, overflow: "hidden" },
+ ];
+ return slot.animate(open ? frames : frames.reverse(), {
+ duration: (open ? UI_MOTION_DURATION.fast : UI_MOTION_DURATION.micro) * 1000,
+ easing: UI_EASE_OUT_CSS,
+ // Held shut until the section unmounts, which cancels it.
+ fill: open ? "none" : "forwards",
+ });
+}
+
+/**
+ * Opens a revealed section's form again when the reader picks the section
+ * while it is still folding away: it stays mounted then, so its initial open
+ * state has already been used. `open` must set the caller's own state.
+ */
+export function useReopenOnReveal(reveal: boolean, open: () => void) {
+ const [revealed, setRevealed] = useState(reveal);
+ if (reveal !== revealed) {
+ setRevealed(reveal);
+ if (reveal) open();
+ }
+}
+
+/**
+ * Height motion for a section the add row reveals while it is empty. Its slot
+ * grows open with it, and when the reveal ends with the section still empty
+ * the slot folds shut before the section goes, so the rows below slide
+ * instead of jumping. Whether it is still empty is read on the render after
+ * the reveal ends: a create that just finished may land in that render.
+ */
+export function useSidebarRevealMotion<T extends HTMLElement>(
+ reveal: boolean,
+ hasContent: boolean,
+ onRevealEnd?: () => void,
+) {
+ const ref = useRef<T>(null);
+ const [leaving, setLeaving] = useState(false);
+ useLayoutEffect(() => {
+ if (!reveal) return;
+ const animation = fold(ref.current, true);
+ return () => animation?.cancel();
+ }, [reveal]);
+ const folding = leaving && !reveal && !hasContent;
+ useLayoutEffect(() => {
+ if (!leaving) return;
+ const animation = folding ? fold(ref.current, false) : undefined;
+ if (!animation) {
+ setLeaving(false);
+ return;
+ }
+ let current = true;
+ animation.finished.then(() => current && setLeaving(false), () => {});
+ return () => {
+ current = false;
+ animation.cancel();
+ };
+ }, [leaving, folding]);
+ return {
+ ref,
+ shown: hasContent || reveal || leaving,
+ end: () => {
+ setLeaving(true);
+ onRevealEnd?.();
+ },
+ };
+}
diff --git a/packages/views/issues/components/wakeup-create.test.tsx b/packages/views/issues/components/wakeup-create.test.tsx
index 8dad51ea40..46e2e4e1a0 100644
--- a/packages/views/issues/components/wakeup-create.test.tsx
+++ b/packages/views/issues/components/wakeup-create.test.tsx
@@ -52,6 +52,31 @@ beforeEach(() => {
});
afterEach(() => configureShortcutPlatform(null));
+describe("WakeupCreate", () => {
+ it("opens on mount when asked and reports closing", async () => {
+ const onOpenChange = vi.fn();
+ renderWithI18n(
+ <WakeupCreate workspaceId="ws" issueId="issue" defaultAgentId="emacs" defaultOpen onOpenChange={onOpenChange} />,
+ { locale: "zh-Hans" },
+ );
+ const form = await screen.findByRole("form", { name: "新建唤醒" });
+ fireEvent.keyDown(form, { key: "Escape" });
+ await waitFor(() => expect(onOpenChange).toHaveBeenCalledWith(false));
+ });
+
+ it("opens again when revealed again before it unmounts", async () => {
+ const view = (defaultOpen: boolean) => (
+ <WakeupCreate workspaceId="ws" issueId="issue" defaultAgentId="emacs" defaultOpen={defaultOpen} />
+ );
+ const { rerender } = renderWithI18n(view(true), { locale: "zh-Hans" });
+ fireEvent.keyDown(await screen.findByRole("form", { name: "新建唤醒" }), { key: "Escape" });
+ await waitFor(() => expect(screen.queryByRole("form", { name: "新建唤醒" })).not.toBeInTheDocument());
+ rerender(view(false));
+ rerender(view(true));
+ expect(await screen.findByRole("form", { name: "新建唤醒" })).toBeInTheDocument();
+ });
+});
+
describe("WakeupCreateForm", () => {
it("says a reply wait for the assignee joins the run a comment already starts", async () => {
await renderForm();
diff --git a/packages/views/issues/components/wakeup-create.tsx b/packages/views/issues/components/wakeup-create.tsx
index 8f3000ce91..87709c1449 100644
--- a/packages/views/issues/components/wakeup-create.tsx
+++ b/packages/views/issues/components/wakeup-create.tsx
@@ -59,6 +59,7 @@ import { PickerEmpty, PickerItem, PickerSection, PropertyPicker } from "./picker
import { IssuePickerModal } from "../../modals/issue-picker-modal";
import { useStatusLabel } from "../utils/status-label";
import { useWakeupText } from "./wakeup-presentation";
+import { useReopenOnReveal } from "./use-sidebar-reveal-motion";
import {
WAKEUP_EVENT_TYPES,
WAKEUP_MAX_FIRES,
@@ -86,14 +87,23 @@ export function WakeupCreate({
workspaceId,
issueId,
defaultAgentId,
+ defaultOpen = false,
+ onOpenChange,
}: {
workspaceId: string;
issueId: string;
defaultAgentId?: string;
+ defaultOpen?: boolean;
+ onOpenChange?: (open: boolean) => void;
}) {
const { t } = useT("issues");
- const [open, setOpen] = useState(false);
+ const [open, setOpenState] = useState(defaultOpen);
+ useReopenOnReveal(defaultOpen, () => setOpenState(true));
const busy = useRef(false);
+ const setOpen = (next: boolean) => {
+ setOpenState(next);
+ onOpenChange?.(next);
+ };
return (
<Popover
open={open}
diff --git a/packages/views/issues/components/wakeup-presentation.ts b/packages/views/issues/components/wakeup-presentation.ts
index 4bf4bf772d..c5fb8afb77 100644
--- a/packages/views/issues/components/wakeup-presentation.ts
+++ b/packages/views/issues/components/wakeup-presentation.ts
@@ -164,9 +164,18 @@ export function useWakeupText() {
w.mode === "once"
? t(($) => $.wakeups.once)
: t(($) => $.wakeups.continuous);
- const schedule = (w: WakeupPreview) => {
+ // `short` drops the "wake" verb where the surrounding list already says it.
+ const schedule = (w: WakeupPreview, short = false) => {
if (w.kind === "every") {
const seconds = w.interval_seconds ?? 0;
+ if (short)
+ return seconds === 3600
+ ? t(($) => $.wakeups.short.hourly)
+ : seconds % 3600 === 0
+ ? t(($) => $.wakeups.short.every_hours, { hours: seconds / 3600 })
+ : seconds % 60 === 0
+ ? t(($) => $.wakeups.every, { minutes: seconds / 60 })
+ : t(($) => $.wakeups.short.every_seconds, { seconds });
return seconds === 3600
? t(($) => $.wakeups.hourly)
: seconds % 3600 === 0
@@ -256,15 +265,20 @@ export function useWakeupText() {
const { key, values } = conditionParts(c);
return String(t(($) => $.wakeups.wait[key], values as Record<string, string | number>));
};
- const trigger = (w: WakeupPreview) => {
+ const trigger = (w: WakeupPreview, short = false) => {
if (w.condition) return condition(w.condition);
- if (w.kind === "every" || w.kind === "cron") return schedule(w);
- if (w.kind === "at")
+ if (w.kind === "every" || w.kind === "cron") return schedule(w, short);
+ if (w.kind === "at") {
+ if (short)
+ return w.next_fire_at
+ ? t(($) => $.wakeups.short.at_time, { time: time(w.next_fire_at) })
+ : t(($) => $.wakeups.short.scheduled_time);
return w.next_fire_at
? t(($) => $.wakeups.at_time, {
time: time(w.next_fire_at),
})
: t(($) => $.wakeups.scheduled_time);
+ }
const event = w.event_types[0] ?? "";
let label = eventCondition(event, w);
if (w.filter_task_id)
@@ -314,9 +328,10 @@ export function useWakeupText() {
: t(($) => $.wakeups.until_date, { date: date(w.expires_at) });
};
// The row's second line: who is woken, how often, and when the rule ends.
- const summary = (w: Omit<IssueWakeup, "instruction">, closed = false) =>
+ // `omitAgent` leaves out the agent when the reader can assume it.
+ const summary = (w: Omit<IssueWakeup, "instruction">, closed = false, omitAgent = false) =>
[
- t(($) => $.wakeups.wake_agent, { agent: w.agent_name }),
+ omitAgent ? null : t(($) => $.wakeups.wake_agent, { agent: w.agent_name }),
w.kind === "event" || w.kind === "at" ? frequency(w) : state(w, closed),
!w.enabled && (w.kind === "event" || w.kind === "at") ? state(w, closed) : null,
closed ? null : ending(w),
diff --git a/packages/views/issues/components/wakeups-section.test.tsx b/packages/views/issues/components/wakeups-section.test.tsx
index 4e2a706ce0..9ea0bf585b 100644
--- a/packages/views/issues/components/wakeups-section.test.tsx
+++ b/packages/views/issues/components/wakeups-section.test.tsx
@@ -1,19 +1,17 @@
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { fireEvent, screen, waitFor, within } from "@testing-library/react";
import type { ReactNode } from "react";
-import type { IssueWakeup, SystemWakeup } from "@multica/core/types";
+import type { IssueWakeup } from "@multica/core/types";
import { renderWithI18n } from "../../test/i18n";
import { WakeupsSection } from "./wakeups-section";
const mutate = vi.fn();
const enable = vi.fn();
-const updateSystem = vi.fn();
const trigger = vi.fn();
const remove = vi.fn();
let runs: unknown[] = [];
let empty = false;
-let systemError = false;
+let wakeupsError = false;
const refetch = vi.fn();
-let systemRules: SystemWakeup[] = [];
let pending = false;
let wakeup: IssueWakeup;
let status = "queued";
@@ -35,29 +33,25 @@ vi.mock("@multica/core/paths", () => ({
vi.mock("@multica/core/issues", () => ({
issueWakeupsOptions: () => ({ queryKey: ["wakeups"] }),
issueTasksOptions: () => ({ queryKey: ["tasks"] }),
- issueSystemWakeupsOptions: () => ({ queryKey: ["system"] }),
useDisableIssueWakeup: () => ({ mutate, isPending: false }),
useEnableIssueWakeup: () => ({ mutateAsync: enable, isPending: pending }),
useCreateIssueWakeup: () => ({ mutateAsync: vi.fn(), isPending: false }),
- useUpdateIssueSystemWakeup: () => ({ mutateAsync: updateSystem, isPending: false }),
useTriggerIssueWakeup: () => ({ mutate: trigger, isPending: false }),
useDeleteIssueWakeup: () => ({ mutate: remove, isPending: false }),
issueWakeupRunsOptions: () => ({ queryKey: ["runs"] }),
}));
vi.mock("@tanstack/react-query", () => ({
useQuery: ({ queryKey }: { queryKey: string[] }) => ({
- isError: queryKey[0] === "system" && systemError,
+ isError: queryKey[0] === "wakeups" && wakeupsError,
refetch,
data:
queryKey[0] === "wakeups"
- ? empty ? [] : [wakeup]
- : queryKey[0] === "system"
- ? systemRules
- : queryKey[0] === "tasks"
- ? [{ id: "task", status }]
- : queryKey[0] === "runs"
- ? runs
- : [],
+ ? empty || wakeupsError ? [] : [wakeup]
+ : queryKey[0] === "tasks"
+ ? [{ id: "task", status }]
+ : queryKey[0] === "runs"
+ ? runs
+ : [],
}),
}));
vi.mock("../../common/use-viewing-timezone", () => ({
@@ -66,6 +60,13 @@ vi.mock("../../common/use-viewing-timezone", () => ({
vi.mock("../../common/task-transcript", () => ({
TranscriptButton: () => <button>Transcript</button>,
}));
+vi.mock("./wakeup-create", () => ({
+ WakeupCreate: ({ defaultOpen, onOpenChange }: { defaultOpen?: boolean; onOpenChange?: (open: boolean) => void }) => (
+ <button type="button" data-default-open={defaultOpen ? "true" : "false"} onClick={() => onOpenChange?.(false)}>
+ New wakeup
+ </button>
+ ),
+}));
vi.mock("./wakeup-instruction-editor", () => ({
WakeupInstructionEditor: () => <button>Edit prompt</button>,
}));
@@ -75,10 +76,8 @@ beforeEach(() => {
remove.mockReset();
runs = [];
empty = false;
- systemError = false;
+ wakeupsError = false;
refetch.mockReset();
- updateSystem.mockReset().mockResolvedValue(undefined);
- systemRules = [];
enable.mockReset().mockResolvedValue(undefined);
pending = false;
status = "queued";
@@ -108,14 +107,34 @@ beforeEach(() => {
describe("Wakeups sidebar", () => {
it("keeps the header to the add action without a settings-only menu", () => {
renderWithI18n(<WakeupsSection issueId="issue" />);
- expect(screen.getByRole("button", { name: "Wakeups 1" })).toBeVisible();
+ expect(screen.getByRole("button", { name: "Wakeups" })).toBeVisible();
expect(screen.queryByRole("button", { name: "Wakeups options" })).not.toBeInTheDocument();
});
- it("shows an empty static title with creation available", () => {
- empty = true;
+ it("counts the current rules once the section is collapsed", () => {
renderWithI18n(<WakeupsSection issueId="issue" />);
+ fireEvent.click(screen.getByRole("button", { name: "Wakeups" }));
+ expect(screen.getByRole("button", { name: "Wakeups 1" })).toHaveAttribute("aria-expanded", "false");
+ });
+ it("stays out of the sidebar while empty until the add row reveals it", () => {
+ empty = true;
+ const { container } = renderWithI18n(<WakeupsSection issueId="issue" />);
+ expect(container).toBeEmptyDOMElement();
+ });
+ it("opens creation under a static title when revealed and ends the reveal when it closes", () => {
+ empty = true;
+ const onRevealEnd = vi.fn();
+ renderWithI18n(<WakeupsSection issueId="issue" reveal onRevealEnd={onRevealEnd} />);
expect(screen.getByText("Wakeups")).toBeVisible();
expect(screen.queryByRole("button", { name: "Wakeups" })).not.toBeInTheDocument();
+ const create = screen.getByRole("button", { name: "New wakeup" });
+ expect(create).toHaveAttribute("data-default-open", "true");
+ fireEvent.click(create);
+ expect(onRevealEnd).toHaveBeenCalled();
+ });
+ it("is not revealed on an ended issue, where nothing can be created", () => {
+ empty = true;
+ const { container } = renderWithI18n(<WakeupsSection issueId="issue" reveal closed />);
+ expect(container).toBeEmptyDOMElement();
});
it("keeps history accessible even without current rules", () => {
wakeup.enabled = false;
@@ -123,12 +142,15 @@ describe("Wakeups sidebar", () => {
renderWithI18n(<WakeupsSection issueId="issue" />);
expect(screen.getByRole("button", { name: "Wakeups" })).toHaveAttribute("aria-expanded", "true");
});
- it("shows retry when system rules fail instead of treating the section as empty", () => {
- empty = true;
- systemError = true;
+ it("shows retry when wakeups fail to load instead of hiding the section", () => {
+ wakeupsError = true;
renderWithI18n(<WakeupsSection issueId="issue" />);
fireEvent.click(screen.getByRole("button", { name: "Could not load wakeups. Retry" }));
- expect(refetch).toHaveBeenCalledTimes(2);
+ expect(refetch).toHaveBeenCalledTimes(1);
+ });
+ it("leaves the issue's own agent out of the row", () => {
+ renderWithI18n(<WakeupsSection issueId="issue" defaultAgentId="agent" />);
+ expect(screen.getByRole("button", { name: /Every hour/ })).not.toHaveTextContent("Emacs");
});
it("describes hourly schedules without exposing interval seconds", () => {
renderWithI18n(<WakeupsSection issueId="issue" />, { locale: "zh-Hans" });
@@ -160,7 +182,8 @@ describe("Wakeups sidebar", () => {
wakeup.next_fire_at = "2026-09-23T14:05:00Z";
renderWithI18n(<WakeupsSection issueId="issue" />);
const row = screen.getByRole("button", { name: /Wake Emacs/ });
- expect(row).toHaveTextContent("Wake at Today 10:05 PM");
+ expect(row).toHaveTextContent("Today 10:05 PM");
+ expect(row).not.toHaveTextContent("Wake at");
fireEvent.click(row);
await waitFor(() =>
expect(screen.getByText(/· Asia\/Shanghai$/)).toBeVisible(),
@@ -171,17 +194,18 @@ describe("Wakeups sidebar", () => {
wakeup.next_fire_at = "2026-09-23T17:00:00Z";
renderWithI18n(<WakeupsSection issueId="issue" />);
const row = screen.getByRole("button", { name: /Wake Emacs/ });
- expect(row).toHaveTextContent("Wake at Sep 24, 01:00 AM");
+ expect(row).toHaveTextContent("Sep 24, 01:00 AM");
expect(row).not.toHaveTextContent("Today");
});
});
- it("exposes the toggle and reveals the full prompt only on opening details", async () => {
+ it("keeps the toggle and the full prompt in details", async () => {
renderWithI18n(<WakeupsSection issueId="issue" />);
expect(screen.queryByText("Check CI")).not.toBeVisible();
- fireEvent.click(screen.getByRole("switch", { name: "Wakeup for Emacs" }));
- expect(mutate).toHaveBeenCalledWith("wake", expect.any(Object));
+ expect(screen.queryByRole("switch")).toBeNull();
fireEvent.click(screen.getByRole("button", { name: /Wake Emacs/ }));
await waitFor(() => expect(screen.getByText("Check CI")).toBeVisible());
+ fireEvent.click(screen.getByRole("switch", { name: "Wakeup for Emacs" }));
+ expect(mutate).toHaveBeenCalledWith("wake", expect.any(Object));
expect(screen.getByRole("button", { name: "Transcript" })).toBeVisible();
expect(screen.getByRole("button", { name: "Edit prompt" })).toBeVisible();
});
@@ -192,6 +216,7 @@ describe("Wakeups sidebar", () => {
wakeup.event_types = ["task.completed"];
renderWithI18n(<WakeupsSection issueId="issue" />);
expect(screen.queryByText(/Wakeup history/)).toBeNull();
+ fireEvent.click(screen.getByRole("button", { name: /Wake Emacs/ }));
fireEvent.click(screen.getByRole("button", { name: "Cancel this run" }));
expect(mutate).toHaveBeenCalled();
});
@@ -232,6 +257,7 @@ it("re-enables a manually disabled recurring configuration with its revision", a
status = "completed";
renderWithI18n(<WakeupsSection issueId="issue" />);
fireEvent.click(screen.getByRole("button", { name: "Wakeup history · 1" }));
+ fireEvent.click(screen.getByRole("button", { name: /Wake Emacs/ }));
const toggle = screen.getByRole("switch", { name: "Wakeup for Emacs" });
expect(toggle).not.toBeChecked();
fireEvent.click(toggle);
@@ -245,6 +271,7 @@ it("blocks re-enabling on terminal issues", () => {
status = "completed";
renderWithI18n(<WakeupsSection issueId="issue" closed />);
fireEvent.click(screen.getByRole("button", { name: "Wakeup history · 1" }));
+ fireEvent.click(screen.getByRole("button", { name: /Wake Emacs/ }));
expect(screen.getByRole("switch")).toHaveAttribute("aria-disabled", "true");
fireEvent.click(screen.getByRole("switch"));
expect(enable).not.toHaveBeenCalled();
@@ -260,6 +287,7 @@ it("requires a new future time for an expired one-shot", async () => {
status = "completed";
renderWithI18n(<WakeupsSection issueId="issue" />);
fireEvent.click(screen.getByRole("button", { name: "Wakeup history · 1" }));
+ fireEvent.click(screen.getByRole("button", { name: /Wake Emacs/ }));
expect(screen.queryByRole("switch")).toBeNull();
fireEvent.click(screen.getByRole("button", { name: "Set a new time" }));
const input = await screen.findByLabelText(/Time \(/);
@@ -287,6 +315,7 @@ it("uses explicit resubscribe for a completed one-shot event", async () => {
status = "completed";
renderWithI18n(<WakeupsSection issueId="issue" />);
fireEvent.click(screen.getByRole("button", { name: "Wakeup history · 1" }));
+ fireEvent.click(screen.getByRole("button", { name: /Wake Emacs/ }));
expect(screen.queryByRole("switch")).toBeNull();
fireEvent.click(screen.getByRole("button", { name: "Enable again" }));
await waitFor(() =>
@@ -300,6 +329,7 @@ it("uses explicit resubscribe for a completed one-shot event", async () => {
it("disables controls during a pending mutation", () => {
pending = true;
renderWithI18n(<WakeupsSection issueId="issue" />);
+ fireEvent.click(screen.getByRole("button", { name: /Wake Emacs/ }));
expect(screen.getByRole("switch")).toHaveAttribute("aria-disabled", "true");
fireEvent.click(screen.getByRole("switch"));
expect(enable).not.toHaveBeenCalled();
@@ -322,7 +352,7 @@ it("describes the source condition in Chinese, keeping instructions in details",
expect(screen.getByText(/监听范围/)).toHaveTextContent("当前任务");
});
-it("shows a disabled rule independently from its last successful execution", () => {
+it("shows a disabled rule without repeating its successful last run", () => {
wakeup.enabled = false;
wakeup.disabled_at = "2026-09-16T00:00:00Z";
status = "completed";
@@ -330,7 +360,7 @@ it("shows a disabled rule independently from its last successful execution", ()
fireEvent.click(screen.getByRole("button", { name: "Wakeup history · 1" }));
const row = screen.getByRole("button", { name: /Wake Emacs/ });
expect(row).toHaveTextContent("Turned off");
- expect(row).toHaveTextContent("Last run: Run succeeded");
+ expect(row).not.toHaveTextContent("Run succeeded");
});
it("keeps a failed one-shot triggered without calling the rule completed", () => {
@@ -412,65 +442,6 @@ describe("v2 sidebar", () => {
expect(screen.getByRole("button", { name: /Wake Emacs/ })).toHaveTextContent("Timed out");
});
- it("shows the child-done system rule and turns it off for this issue", async () => {
- systemRules = [{
- id: "rule", revision: 1, default_instruction: "Advance the next stage.", customized: false, paused_reason: null,
- rule: "child_done", workspace_default: true, enabled: true, instruction: "", staged: true, stage: 1, total: 2, remaining: 1,
- waiting: ["MUL-7704"], target: { type: "agent", id: "a", name: "Emacs" }, blocked: "",
- }];
- renderWithI18n(<WakeupsSection issueId="issue" />, { locale: "zh-Hans" });
- const row = screen.getByRole("button", { name: /当第 1 阶段的子任务全部结束时/ });
- expect(row).toHaveTextContent("系统");
- expect(row).toHaveTextContent("唤醒负责人 Emacs · 还差 1 个");
- expect(screen.getByRole("button", { name: /唤醒 2/ })).toBeVisible();
- fireEvent.click(screen.getAllByRole("switch", { name: "子任务结束时唤醒负责人" })[0]!);
- await waitFor(() => expect(updateSystem).toHaveBeenCalledWith({ rule: "child_done", enabled: false, instruction: "" }));
- });
-
- it("folds a turned-off system rule into history and turns it back on from there", async () => {
- empty = true;
- systemRules = [{
- id: "rule", revision: 1, default_instruction: "Advance the next stage.", customized: true, paused_reason: null,
- rule: "child_done", workspace_default: true, enabled: false, instruction: "", staged: false, stage: null, total: 2, remaining: 1,
- waiting: ["MUL-2"], target: { type: "agent", id: "a", name: "Emacs" }, blocked: "",
- }];
- renderWithI18n(<WakeupsSection issueId="issue" />);
- expect(screen.getByRole("button", { name: "Wakeups" })).toBeVisible();
- expect(screen.queryByRole("button", { name: /When all sub-issues finish/ })).toBeNull();
- fireEvent.click(screen.getByRole("button", { name: "Wakeup history · 1" }));
- const row = screen.getByRole("button", { name: /When all sub-issues finish/ });
- expect(row).toHaveTextContent("Turned off for this issue");
- fireEvent.click(screen.getAllByRole("switch", { name: "Wake the assignee when sub-issues finish" })[0]!);
- await waitFor(() => expect(updateSystem).toHaveBeenCalledWith({ rule: "child_done", enabled: true, instruction: "" }));
- });
-
- it("says a member assignee is notified instead of woken", () => {
- systemRules = [{
- id: "rule", revision: 1, default_instruction: "Advance the next stage.", customized: false, paused_reason: null,
- rule: "child_done", workspace_default: true, enabled: true, instruction: "", staged: false, stage: null, total: 3, remaining: 2,
- waiting: [], target: { type: "member", id: "u", name: "Jiayuan" }, blocked: "member_assignee",
- }];
- renderWithI18n(<WakeupsSection issueId="issue" />);
- expect(screen.getByRole("button", { name: /When all sub-issues finish/ })).toHaveTextContent("Notify Jiayuan in their inbox · 2 to go");
- });
-
- it("shows the default instruction and saves one for this issue", async () => {
- systemRules = [{
- id: "rule", revision: 1, default_instruction: "Advance the next stage.", customized: false, paused_reason: null,
- rule: "child_done", workspace_default: true, enabled: true, instruction: "", staged: false, stage: null, total: 1, remaining: 1,
- waiting: ["MUL-2"], target: { type: "agent", id: "a", name: "Emacs" }, blocked: "",
- }];
- renderWithI18n(<WakeupsSection issueId="issue" />);
- fireEvent.click(screen.getByRole("button", { name: /When all sub-issues finish/ }));
- expect(await screen.findByText("Advance the next stage.")).toBeVisible();
- expect(screen.getByRole("link", { name: "Change the default" })).toHaveAttribute("href", "/acme/autopilots?tab=wakeups");
- fireEvent.click(screen.getByRole("button", { name: "Edit instruction" }));
- const input = screen.getByLabelText("What to do when woken");
- expect(input).toHaveAttribute("placeholder", "Advance the next stage.");
- fireEvent.change(input, { target: { value: "Ask Jiayuan first" } });
- fireEvent.submit(input.closest("form")!);
- await waitFor(() => expect(updateSystem).toHaveBeenCalledWith({ rule: "child_done", enabled: true, instruction: "Ask Jiayuan first" }));
- });
});
describe("conditions, limits and history", () => {
@@ -517,7 +488,7 @@ describe("conditions, limits and history", () => {
it("wakes the agent now and deletes the rule after confirmation", async () => {
renderWithI18n(<WakeupsSection issueId="issue" />);
- fireEvent.click(screen.getByRole("button", { name: /Wake every hour/ }));
+ fireEvent.click(screen.getByRole("button", { name: /Every hour/ }));
fireEvent.click(await screen.findByRole("button", { name: "Wake now" }));
expect(trigger).toHaveBeenCalledWith("wake", expect.anything());
fireEvent.click(screen.getByRole("button", { name: "Delete" }));
@@ -529,7 +500,7 @@ describe("conditions, limits and history", () => {
it("offers neither action on an ended issue", async () => {
renderWithI18n(<WakeupsSection issueId="issue" closed />);
- fireEvent.click(screen.getByRole("button", { name: /Wake every hour/ }));
+ fireEvent.click(screen.getByRole("button", { name: /Every hour/ }));
await screen.findByRole("dialog");
expect(screen.queryByRole("button", { name: "Wake now" })).toBeNull();
expect(screen.queryByRole("button", { name: "Delete" })).toBeNull();
diff --git a/packages/views/issues/components/wakeups-section.tsx b/packages/views/issues/components/wakeups-section.tsx
index a98d3a2b05..656192b1c0 100644
--- a/packages/views/issues/components/wakeups-section.tsx
+++ b/packages/views/issues/components/wakeups-section.tsx
@@ -7,7 +7,6 @@ import { useQuery } from "@tanstack/react-query";
import { Bell, Clock3, ChevronRight, GitPullRequest, Link2, ListChecks, CircleDot, Play } from "@multica/ui/icons";
import { toast } from "sonner";
import {
- issueSystemWakeupsOptions,
issueWakeupRunsOptions,
issueWakeupsOptions,
useDeleteIssueWakeup,
@@ -16,7 +15,7 @@ import {
useTriggerIssueWakeup,
issueTasksOptions,
} from "@multica/core/issues";
-import type { AgentTask, IssueWakeup, SystemWakeup, WakeupCondition } from "@multica/core/types";
+import type { AgentTask, IssueWakeup, WakeupCondition } from "@multica/core/types";
import { useCurrentWorkspace } from "@multica/core/paths";
import {
Popover,
@@ -38,7 +37,7 @@ import {
import { WakeupInstructionEditor } from "./wakeup-instruction-editor";
import { WakeupControl } from "./wakeup-control";
import { WakeupCreate } from "./wakeup-create";
-import { SystemWakeupRow } from "./system-wakeup-row";
+import { useSidebarRevealMotion } from "./use-sidebar-reveal-motion";
import { TranscriptButton } from "../../common/task-transcript";
import { useViewingTimezone } from "../../common/use-viewing-timezone";
import { useLocale, useT } from "../../i18n";
@@ -154,6 +153,7 @@ function WakeupRow({
onDisable,
onEnable,
closed,
+ agentAssumed,
}: {
wakeup: IssueWakeup;
task?: AgentTask;
@@ -162,6 +162,8 @@ function WakeupRow({
onDisable: () => void;
closed: boolean;
onEnable: (input?: { at?: string; rearm?: boolean }) => Promise<void>;
+ /** The woken agent is the issue's own, so the row need not name it. */
+ agentAssumed: boolean;
}) {
const { t } = useT("issues");
const workspaceId = useCurrentWorkspace()?.id ?? "";
@@ -174,34 +176,33 @@ function WakeupRow({
const trigger = useTriggerIssueWakeup(workspaceId, wakeup.issue_id);
const paused = text.paused(wakeup);
const fires = text.fires(wakeup);
+ // A finished, successful run is the expected outcome and goes unsaid here.
+ const showRunState = !!status && (activeRun || status !== "completed");
return (
- <div
- className="grid grid-cols-[minmax(0,1fr)_auto]"
- aria-busy={pending}
- >
+ <div aria-busy={pending}>
<Popover open={detailOpen} onOpenChange={setDetailOpen}>
<PopoverTrigger
render={
<button
type="button"
- className="col-span-2 col-start-1 row-start-1 grid min-w-0 grid-cols-subgrid rounded-md py-2 text-left text-label hover:bg-accent/50 focus-visible:outline-2 focus-visible:outline-ring"
+ className="flex w-full min-w-0 flex-col rounded-md py-2 text-left text-label hover:bg-accent/50 focus-visible:outline-2 focus-visible:outline-ring"
/>
}
>
- <span className="flex min-h-7 min-w-0 items-center gap-2 pl-2 pr-1">
+ <span className="flex min-h-7 min-w-0 items-center gap-2.5 px-2">
<Icon
className="mt-px size-3.5 shrink-0 text-muted-foreground"
aria-hidden="true"
/>
<span className="line-clamp-2 min-w-0 break-words">
- {text.trigger(wakeup)}
+ {text.trigger(wakeup, true)}
</span>
</span>
- <span className="col-span-2 min-w-0 break-words pl-7.5 pr-2 text-caption">
- <span className="block text-muted-foreground">
- {text.summary(wakeup, closed)}
+ <span className="min-w-0 break-words pl-8 pr-2 text-caption">
+ <span className="block text-muted-foreground empty:hidden">
+ {text.summary(wakeup, closed, agentAssumed)}
</span>
- {status && (
+ {showRunState && (
<span className="block text-muted-foreground">
{t(
($) =>
@@ -324,9 +325,17 @@ function WakeupRow({
</div>
)}
{detailOpen && <WakeupHistory wakeup={wakeup} />}
- {!closed && (
- <div className="flex items-center gap-1 border-t border-border pt-2.5">
- {!wakeup.disabled_at && (
+ <div className="flex items-center gap-1 border-t border-border pt-2.5">
+ <WakeupControl
+ size="xs"
+ wakeup={wakeup}
+ task={task}
+ pending={pending}
+ closed={closed}
+ onDisable={onDisable}
+ onEnable={onEnable}
+ />
+ {!closed && !wakeup.disabled_at && (
<Button
variant="outline"
size="sm"
@@ -341,23 +350,11 @@ function WakeupRow({
<Play aria-hidden="true" />
{t(($) => $.wakeups.detail.wake_now)}
</Button>
- )}
- <DeleteWakeup wakeup={wakeup} onDeleted={() => setDetailOpen(false)} />
- </div>
- )}
+ )}
+ {!closed && <DeleteWakeup wakeup={wakeup} onDeleted={() => setDetailOpen(false)} />}
+ </div>
</PopoverContent>
</Popover>
- <div className="z-10 col-start-2 row-start-1 self-start">
- <WakeupControl
- size="sm"
- wakeup={wakeup}
- task={task}
- pending={pending}
- closed={closed}
- onDisable={onDisable}
- onEnable={onEnable}
- />
- </div>
</div>
);
}
@@ -366,11 +363,16 @@ export function WakeupsSection({
issueId,
closed = false,
defaultAgentId,
+ reveal = false,
+ onRevealEnd,
}: {
issueId: string;
closed?: boolean;
/** Preselected target for a new wakeup: the issue's agent assignee. */
defaultAgentId?: string;
+ /** Shows the section while empty with the create form open, until it closes. */
+ reveal?: boolean;
+ onRevealEnd?: () => void;
}) {
const { t } = useT("issues");
const workspaceId = useCurrentWorkspace()?.id ?? "";
@@ -378,33 +380,19 @@ export function WakeupsSection({
const [historyOpen, setHistoryOpen] = useState(false);
const {
data = [],
- isError: wakeupsError,
+ isError,
refetch,
} = useQuery(issueWakeupsOptions(workspaceId, issueId));
const { data: tasks = [] } = useQuery(issueTasksOptions(issueId));
- const { data: systemRules = [], isError: systemRulesError, refetch: refetchSystemRules } = useQuery(issueSystemWakeupsOptions(workspaceId, issueId));
- const isError = wakeupsError === true || systemRulesError === true;
- const hasContent = data.length > 0 || (!closed && systemRules.length > 0) || isError;
+ const hasContent = data.length > 0 || isError;
const text = useWakeupText();
const disable = useDisableIssueWakeup(workspaceId, issueId);
const enable = useEnableIssueWakeup(workspaceId, issueId);
- // Open issues always show the section so people can add a wakeup.
- if (closed && !hasContent) return null;
+ const motion = useSidebarRevealMotion<HTMLElement>(reveal && !closed, hasContent, onRevealEnd);
+ // An empty section is offered by the sidebar's add row instead.
+ if (!motion.shown) return null;
const current = data.filter((w) => isCurrentWakeup(w, wakeupRun(w, tasks)));
const history = data.filter((w) => !isCurrentWakeup(w, wakeupRun(w, tasks)));
- const visibleSystemRules = closed ? [] : systemRules;
- const currentSystemRules = visibleSystemRules.filter((rule) => rule.enabled);
- const offSystemRules = visibleSystemRules.filter((rule) => !rule.enabled);
- const historyCount = history.length + offSystemRules.length;
- const systemRow = (rule: SystemWakeup) => (
- <SystemWakeupRow
- key={rule.rule}
- rule={rule}
- workspaceId={workspaceId}
- issueId={issueId}
- onTurnedOff={() => setHistoryOpen(true)}
- />
- );
const row = (wakeup: IssueWakeup) => (
<WakeupRow
key={wakeup.id}
@@ -413,6 +401,7 @@ export function WakeupsSection({
sourceTask={tasks.find((task) => task.id === wakeup.filter_task_id)}
pending={disable.isPending || enable.isPending}
closed={closed}
+ agentAssumed={!!defaultAgentId && wakeup.agent_id === defaultAgentId}
onEnable={async (input = {}) => {
await enable.mutateAsync({
id: wakeup.id,
@@ -435,13 +424,21 @@ export function WakeupsSection({
/>
);
return (
- <section>
+ <section ref={motion.ref}>
<IssueSidebarSectionHeader
id={`issue-wakeups-${issueId}`}
title={t(($) => $.wakeups.title)} open={open} onOpenChange={setOpen}
- count={current.length + currentSystemRules.length}
+ count={current.length}
collapsible={hasContent}
- actions={!closed ? <WakeupCreate workspaceId={workspaceId} issueId={issueId} defaultAgentId={defaultAgentId} /> : undefined}
+ actions={!closed ? (
+ <WakeupCreate
+ workspaceId={workspaceId}
+ issueId={issueId}
+ defaultAgentId={defaultAgentId}
+ defaultOpen={reveal}
+ onOpenChange={(next) => !next && reveal && motion.end()}
+ />
+ ) : undefined}
/>
<IssueSidebarCollapsible open={open && hasContent}>
<div className="px-2">
@@ -449,7 +446,7 @@ export function WakeupsSection({
<button
type="button"
className="flex min-h-8 w-full items-center rounded-md px-2 py-1.5 text-left text-label text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring"
- onClick={() => { void refetch(); void refetchSystemRules(); }}
+ onClick={() => void refetch()}
>
{t(($) => $.wakeups.retry)}
</button>
@@ -459,24 +456,23 @@ export function WakeupsSection({
{t(($) => $.wakeups.closed_hint)}
</p>
)}
- {currentSystemRules.map(systemRow)}
{current.map(row)}
- {historyCount > 0 && (
+ {history.length > 0 && (
<>
<button
type="button"
aria-expanded={historyOpen}
onClick={() => setHistoryOpen(!historyOpen)}
- className="flex min-h-9 w-full items-center gap-1 rounded-md px-2 py-1 text-label text-muted-foreground transition-colors hover:bg-accent/50 focus-visible:outline-2 focus-visible:outline-ring"
+ className="flex min-h-9 w-full items-center gap-2.5 rounded-md px-2 py-1 text-label text-muted-foreground transition-colors hover:bg-accent/50 focus-visible:outline-2 focus-visible:outline-ring"
>
- <ChevronRight
- className={`size-3 transition-transform duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none ${historyOpen ? "rotate-90" : ""}`}
- aria-hidden="true"
- />
- {t(($) => $.wakeups.ended, { count: historyCount })}
+ <span className="flex size-3.5 shrink-0 items-center justify-center" aria-hidden="true">
+ <ChevronRight
+ className={`size-3 transition-transform duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none ${historyOpen ? "rotate-90" : ""}`}
+ />
+ </span>
+ {t(($) => $.wakeups.ended, { count: history.length })}
</button>
<IssueSidebarCollapsible open={historyOpen}>
- {offSystemRules.map(systemRow)}
{history.map(row)}
</IssueSidebarCollapsible>
</>
diff --git a/packages/views/locales/en/issues.json b/packages/views/locales/en/issues.json
index 3a174d214b..ea8a1ff07d 100644
--- a/packages/views/locales/en/issues.json
+++ b/packages/views/locales/en/issues.json
@@ -496,7 +496,6 @@
"section_parent_issue": "Parent issue",
"section_pull_requests": "Pull requests",
"section_metadata": "Metadata",
- "section_details": "Details",
"sidebar_settings": {
"open": "Customize sidebar",
"title": "Sidebar",
@@ -553,9 +552,6 @@
"prop_project": "Project",
"prop_labels": "Labels",
"add_property_action": "Add property",
- "prop_created_by": "Created by",
- "prop_created": "Created",
- "prop_updated": "Updated",
"activity_section": "Activity",
"subscribe": "Subscribe",
"unsubscribe": "Unsubscribe",
@@ -582,9 +578,6 @@
"quick_jump_label": "Quick navigation",
"description_nav_label": "Issue description",
"sub_issues_nav_progress": "{{done}}/{{total}} completed",
- "sub_issues_show_more_one": "Show {{count}} more",
- "sub_issues_show_more_other": "Show {{count}} more",
- "sub_issues_show_less": "Collapse",
"thread_nav_label": "Jump to comment thread",
"thread_nav_resolved_label": "{{title}} (resolved)",
"thread_nav_reply_label": "{{author}}: {{title}}",
@@ -611,7 +604,27 @@
"workdir_path_unavailable": "No local working directory yet — this issue hasn't been run by a local agent",
"pull_requests_empty_title": "No linked pull requests.",
"guest_readonly_note": "Guests can view and comment, but cannot change issue properties.",
- "open_issue_page": "Open issue page"
+ "open_issue_page": "Open issue page",
+ "add_row": {
+ "wakeups": "Add wakeup",
+ "pull_requests": "Add pull request",
+ "environments": "Add environment",
+ "wakeups_pull_requests": "Add wakeup or pull request",
+ "wakeups_environments": "Add wakeup or environment",
+ "pull_requests_environments": "Add pull request or environment",
+ "all": "Add wakeup, pull request, or environment",
+ "menu": {
+ "wakeups": "Wakeup",
+ "pull_requests": "Pull request",
+ "environments": "Environment"
+ }
+ },
+ "footer": {
+ "created": "Created by {{creator}} · {{date}}",
+ "created_for": "Created by {{creator}} for {{requester}} · {{date}}",
+ "created_at": "Created {{time}}",
+ "updated_at": "Updated {{time}}"
+ }
},
"timeline": {
"loading": "Loading...",
@@ -931,8 +944,6 @@
"open_timeline": "Open timeline",
"more_runs_one": "Show {{count}} more",
"more_runs_other": "Show {{count}} more",
- "strip_aria": "Cost per run — open the run timeline",
- "strip_no_usage": "No usage recorded",
"queued_count_one": "{{count}} queued",
"queued_count_other": "{{count}} queued"
},
@@ -1472,13 +1483,6 @@
"badge": "System",
"title_stage": "When stage {{stage}}'s sub-issues all finish",
"title_all": "When all sub-issues finish",
- "wake_assignee": "Wake assignee {{name}}",
- "remaining_one": "{{count}} to go",
- "remaining_other": "{{count}} to go",
- "blocked_backlog": "Issue is in backlog; no wakeup for now",
- "blocked_member": "Assignee is a member; they get an inbox notification",
- "blocked_none": "No agent assignee; nobody is woken",
- "turned_off": "Turned off for this issue",
"target_title": "Wakes",
"target_current": "Assignee (currently {{name}})",
"target_none": "The assignee: an agent or squad is woken, a member is notified",
@@ -1493,14 +1497,19 @@
"save_error": "Could not save the system rule.",
"default_on": "On by default in this workspace.",
"default_off": "Off by default in this workspace.",
- "notify_member": "Notify {{name}} in their inbox",
"instruction": "What to do when woken",
"instruction_edit": "Edit instruction",
"instruction_default": "Not set on this issue; uses the default:",
"instruction_placeholder": "Leave empty to use the default",
"instruction_invalid": "Instructions must be under 4,000 bytes.",
"paused": "Paused: {{reason}}",
- "default_change": "Change the default"
+ "default_change": "Change the default",
+ "chip_wake": "Wakes {{name}} when all finish",
+ "chip_notify": "Notifies {{name}} when all finish",
+ "chip_assignee": "Wakes the assignee when all finish",
+ "chip_off": "Sub-issue wakeup off",
+ "blocked_backlog": "Issue is in backlog; no wakeup for now",
+ "blocked_none": "No agent assignee; nobody is woken"
},
"cond": {
"status": "When this issue moves to {{status}}",
@@ -1575,7 +1584,14 @@
"rate": "more than 12 runs in an hour"
},
"upcoming_one": "{{count}} enabled wakeup rule",
- "upcoming_other": "{{count}} enabled wakeup rules"
+ "upcoming_other": "{{count}} enabled wakeup rules",
+ "short": {
+ "at_time": "{{time}}",
+ "scheduled_time": "At the scheduled time",
+ "hourly": "Every hour",
+ "every_hours": "Every {{hours}} hours",
+ "every_seconds": "Every {{seconds}} seconds"
+ }
},
"duplicates": {
"banner_prefix": "Duplicate of",
@@ -1611,7 +1627,8 @@
"not_merged_action": "Remove",
"all_merged_to": "All PRs merged. The next merged PR moves this issue to {{status}}.",
"issue_disabled": "PR merges won’t change this issue",
- "issue_disabled_action": "Turn on"
+ "issue_disabled_action": "Turn on",
+ "on_merge_to": "On merge → {{status}}"
},
"deliverables": {
"section_title": "Deliverables",
diff --git a/packages/views/locales/es/issues.json b/packages/views/locales/es/issues.json
index e040ee711b..5a7cefce86 100644
--- a/packages/views/locales/es/issues.json
+++ b/packages/views/locales/es/issues.json
@@ -468,7 +468,6 @@
"section_parent_issue": "Tarea principal",
"section_pull_requests": "Pull requests",
"section_metadata": "Metadatos",
- "section_details": "Detalles",
"sidebar_settings": {
"open": "Personalizar barra lateral",
"title": "Barra lateral",
@@ -522,9 +521,6 @@
"prop_project": "Proyecto",
"prop_labels": "Etiquetas",
"add_property_action": "Añadir propiedad",
- "prop_created_by": "Creada por",
- "prop_created": "Creada",
- "prop_updated": "Actualizada",
"activity_section": "Actividad",
"subscribe": "Suscribirse",
"unsubscribe": "Darse de baja",
@@ -584,9 +580,6 @@
"quick_jump_label": "Navegación rápida",
"description_nav_label": "Descripción de la tarea",
"sub_issues_nav_progress": "{{done}}/{{total}} completadas",
- "sub_issues_show_more_one": "Mostrar {{count}} más",
- "sub_issues_show_more_other": "Mostrar {{count}} más",
- "sub_issues_show_less": "Contraer",
"thread_nav_show_replies_one": "Mostrar {{count}} respuesta",
"thread_nav_show_replies_other": "Mostrar {{count}} respuestas",
"thread_nav_hide_replies": "Ocultar respuestas",
@@ -594,7 +587,27 @@
"load_retry": "Reintentar",
"not_found_title": "Tarea no encontrada",
"guest_readonly_note": "Los invitados pueden ver y comentar, pero no cambiar las propiedades de la tarea.",
- "open_issue_page": "Abrir la página de la tarea"
+ "open_issue_page": "Abrir la página de la tarea",
+ "add_row": {
+ "wakeups": "Añadir activación",
+ "pull_requests": "Añadir pull request",
+ "environments": "Añadir entorno",
+ "wakeups_pull_requests": "Añadir activación o pull request",
+ "wakeups_environments": "Añadir activación o entorno",
+ "pull_requests_environments": "Añadir pull request o entorno",
+ "all": "Añadir activación, pull request o entorno",
+ "menu": {
+ "wakeups": "Activación",
+ "pull_requests": "Pull request",
+ "environments": "Entorno"
+ }
+ },
+ "footer": {
+ "created": "Creada por {{creator}} · {{date}}",
+ "created_for": "Creada por {{creator}} en nombre de {{requester}} · {{date}}",
+ "created_at": "Creada: {{time}}",
+ "updated_at": "Actualizada: {{time}}"
+ }
},
"timeline": {
"loading": "Cargando...",
@@ -913,8 +926,6 @@
"open_timeline": "Abrir línea temporal",
"more_runs_one": "{{count}} más",
"more_runs_other": "{{count}} más",
- "strip_aria": "Coste acumulado a lo largo del tiempo; abre la línea temporal de ejecuciones",
- "strip_no_usage": "Sin uso registrado",
"jump_to_run": "Ir a la ejecución",
"queued_count_one": "{{count}} en cola",
"queued_count_other": "{{count}} en cola"
@@ -1386,13 +1397,6 @@
"badge": "Sistema",
"title_stage": "Cuando terminan todas las subtareas de la etapa {{stage}}",
"title_all": "Cuando terminan todas las subtareas",
- "wake_assignee": "Activar al asignado {{name}}",
- "remaining_one": "{{count}} pendientes",
- "remaining_other": "{{count}} pendientes",
- "blocked_backlog": "La tarea está en backlog; sin activación por ahora",
- "blocked_member": "El asignado es un miembro; recibe una notificación en la bandeja de entrada",
- "blocked_none": "No hay agente asignado; nadie se activa",
- "turned_off": "Desactivada para esta tarea",
"target_title": "Activa a",
"target_current": "Asignado (actualmente {{name}})",
"target_none": "El asignado: se activa a un agente o squad, o se notifica a un miembro",
@@ -1407,14 +1411,19 @@
"save_error": "No se ha podido guardar la regla del sistema.",
"default_on": "Activada por defecto en este espacio de trabajo.",
"default_off": "Desactivada por defecto en este espacio de trabajo.",
- "notify_member": "Notificar a {{name}} en su bandeja de entrada",
"instruction": "Qué hacer al activarse",
"instruction_edit": "Editar instrucción",
"instruction_default": "Sin definir en esta tarea; usa el valor por defecto:",
"instruction_placeholder": "Déjalo vacío para usar el valor por defecto",
"instruction_invalid": "Las instrucciones deben ocupar menos de 4000 bytes.",
"paused": "Pausada: {{reason}}",
- "default_change": "Cambiar el valor por defecto"
+ "default_change": "Cambiar el valor por defecto",
+ "chip_wake": "Activa a {{name}} al terminar",
+ "chip_notify": "Avisa a {{name}} al terminar",
+ "chip_assignee": "Activa al responsable al terminar",
+ "chip_off": "Activación al terminar desactivada",
+ "blocked_backlog": "La tarea está en backlog; sin activación por ahora",
+ "blocked_none": "No hay agente asignado; nadie se activa"
},
"cond": {
"status": "Cuando esta tarea pasa a {{status}}",
@@ -1489,7 +1498,14 @@
"rate": "más de 12 ejecuciones en una hora"
},
"upcoming_one": "{{count}} regla de activación activa",
- "upcoming_other": "{{count}} reglas de activación activadas"
+ "upcoming_other": "{{count}} reglas de activación activadas",
+ "short": {
+ "at_time": "{{time}}",
+ "scheduled_time": "A la hora programada",
+ "hourly": "Cada hora",
+ "every_hours": "Cada {{hours}} horas",
+ "every_seconds": "Cada {{seconds}} segundos"
+ }
},
"duplicates": {
"banner_prefix": "Duplicada de",
@@ -1525,7 +1541,8 @@
"unlinked_moved": "{{pr}} eliminado. Todos los PR restantes están fusionados, así que la tarea pasó a {{status}}.",
"waiting_to_one": "Pasa a {{status}} cuando {{prs}} se fusione",
"waiting_to_other": "Pasa a {{status}} cuando {{prs}} se fusionen",
- "all_merged_to": "Todos los PR fusionados. El próximo PR fusionado mueve esta tarea a {{status}}."
+ "all_merged_to": "Todos los PR fusionados. El próximo PR fusionado mueve esta tarea a {{status}}.",
+ "on_merge_to": "Al fusionar → {{status}}"
},
"working_filter_error": {
"title": "No se han podido cargar las tareas con agentes trabajando"
diff --git a/packages/views/locales/fr/issues.json b/packages/views/locales/fr/issues.json
index ebdab368d7..8ef5599160 100644
--- a/packages/views/locales/fr/issues.json
+++ b/packages/views/locales/fr/issues.json
@@ -496,7 +496,6 @@
"section_parent_issue": "Tâche parente",
"section_pull_requests": "Pull requests",
"section_metadata": "Métadonnées",
- "section_details": "Détails",
"sidebar_settings": {
"open": "Personnaliser la barre latérale",
"title": "Barre latérale",
@@ -553,9 +552,6 @@
"prop_project": "Projet",
"prop_labels": "Étiquettes",
"add_property_action": "Ajouter une propriété",
- "prop_created_by": "Créé par",
- "prop_created": "Création",
- "prop_updated": "Mise à jour",
"activity_section": "Activité",
"subscribe": "S'abonner",
"unsubscribe": "Se désabonner",
@@ -582,9 +578,6 @@
"quick_jump_label": "Navigation rapide",
"description_nav_label": "Description de la tâche",
"sub_issues_nav_progress": "{{done}}/{{total}} terminées",
- "sub_issues_show_more_one": "Afficher {{count}} de plus",
- "sub_issues_show_more_other": "Afficher {{count}} de plus",
- "sub_issues_show_less": "Réduire",
"thread_nav_label": "Aller au fil de commentaires",
"thread_nav_resolved_label": "{{title}} (résolu)",
"thread_nav_reply_label": "{{author}} : {{title}}",
@@ -611,7 +604,27 @@
"workdir_path_unavailable": "Aucun répertoire de travail local pour l'instant — cette tâche n'a pas encore été exécutée par un agent local",
"pull_requests_empty_title": "Aucune pull request associée.",
"guest_readonly_note": "Les invités peuvent consulter et commenter, mais pas modifier les propriétés de la tâche.",
- "open_issue_page": "Ouvrir la page de la tâche"
+ "open_issue_page": "Ouvrir la page de la tâche",
+ "add_row": {
+ "wakeups": "Ajouter un réveil",
+ "pull_requests": "Ajouter une pull request",
+ "environments": "Ajouter un environnement",
+ "wakeups_pull_requests": "Ajouter un réveil ou une pull request",
+ "wakeups_environments": "Ajouter un réveil ou un environnement",
+ "pull_requests_environments": "Ajouter une pull request ou un environnement",
+ "all": "Ajouter un réveil, une pull request ou un environnement",
+ "menu": {
+ "wakeups": "Réveil",
+ "pull_requests": "Pull request",
+ "environments": "Environnement"
+ }
+ },
+ "footer": {
+ "created": "Créée par {{creator}} · {{date}}",
+ "created_for": "Créée par {{creator}} au nom de {{requester}} · {{date}}",
+ "created_at": "Créée : {{time}}",
+ "updated_at": "Mise à jour : {{time}}"
+ }
},
"timeline": {
"loading": "Chargement...",
@@ -931,8 +944,6 @@
"open_timeline": "Ouvrir la chronologie",
"more_runs_one": "Afficher {{count}} de plus",
"more_runs_other": "Afficher {{count}} de plus",
- "strip_aria": "Coût par exécution — ouvrir la chronologie",
- "strip_no_usage": "Aucune consommation enregistrée",
"queued_count_one": "{{count}} en attente",
"queued_count_other": "{{count}} en attente"
},
@@ -1472,13 +1483,6 @@
"badge": "Système",
"title_stage": "Quand les sous-tâches de l’étape {{stage}} sont toutes terminées",
"title_all": "Quand toutes les sous-tâches sont terminées",
- "wake_assignee": "Réveiller le responsable {{name}}",
- "remaining_one": "encore {{count}}",
- "remaining_other": "encore {{count}}",
- "blocked_backlog": "Tâche en backlog ; pas de réveil pour l’instant",
- "blocked_member": "Responsable humain ; il reçoit une notification",
- "blocked_none": "Aucun agent responsable ; personne n’est réveillé",
- "turned_off": "Désactivé pour cette tâche",
"target_title": "Réveille",
"target_current": "Responsable (actuellement {{name}})",
"target_none": "Le responsable : un agent ou une équipe est réveillé, un humain est notifié",
@@ -1493,14 +1497,19 @@
"save_error": "Impossible d’enregistrer la règle système.",
"default_on": "Activé par défaut dans cet espace.",
"default_off": "Désactivé par défaut dans cet espace.",
- "notify_member": "Notifier {{name}} dans sa boîte de réception",
"instruction": "Que faire au réveil",
"instruction_edit": "Modifier l’instruction",
"instruction_default": "Non définie sur cette tâche ; instruction par défaut :",
"instruction_placeholder": "Laisser vide pour l’instruction par défaut",
"instruction_invalid": "Les instructions doivent faire moins de 4 000 octets.",
"paused": "En pause : {{reason}}",
- "default_change": "Modifier la valeur par défaut"
+ "default_change": "Modifier la valeur par défaut",
+ "chip_wake": "Réveille {{name}} à la fin",
+ "chip_notify": "Prévient {{name}} à la fin",
+ "chip_assignee": "Réveille le responsable à la fin",
+ "chip_off": "Réveil de fin désactivé",
+ "blocked_backlog": "Tâche en backlog ; pas de réveil pour l’instant",
+ "blocked_none": "Aucun agent responsable ; personne n’est réveillé"
},
"cond": {
"status": "Quand cette tâche passe à {{status}}",
@@ -1575,7 +1584,14 @@
"rate": "plus de 12 exécutions en une heure"
},
"upcoming_one": "{{count}} règle de réveil active",
- "upcoming_other": "{{count}} règles de réveil activées"
+ "upcoming_other": "{{count}} règles de réveil activées",
+ "short": {
+ "at_time": "{{time}}",
+ "scheduled_time": "À l’heure prévue",
+ "hourly": "Chaque heure",
+ "every_hours": "Toutes les {{hours}} heures",
+ "every_seconds": "Toutes les {{seconds}} secondes"
+ }
},
"duplicates": {
"banner_prefix": "Doublon de",
@@ -1611,7 +1627,8 @@
"not_merged_action": "Retirer",
"all_merged_to": "Toutes les PR sont fusionnées. La prochaine PR fusionnée fera passer la tâche à {{status}}.",
"issue_disabled": "Les fusions de PR ne changent pas cette tâche",
- "issue_disabled_action": "Réactiver"
+ "issue_disabled_action": "Réactiver",
+ "on_merge_to": "À la fusion → {{status}}"
},
"deliverables": {
"section_title": "Livrables",
diff --git a/packages/views/locales/ja/issues.json b/packages/views/locales/ja/issues.json
index 5bf0943b4e..7c665588d4 100644
--- a/packages/views/locales/ja/issues.json
+++ b/packages/views/locales/ja/issues.json
@@ -488,7 +488,6 @@
"section_parent_issue": "親タスク",
"section_pull_requests": "Pull requests",
"section_metadata": "メタデータ",
- "section_details": "詳細",
"sidebar_settings": {
"open": "サイドバーをカスタマイズ",
"title": "サイドバー",
@@ -543,9 +542,6 @@
"prop_project": "プロジェクト",
"prop_labels": "ラベル",
"add_property_action": "プロパティを追加",
- "prop_created_by": "作成者",
- "prop_created": "作成日",
- "prop_updated": "更新日",
"activity_section": "アクティビティ",
"subscribe": "購読",
"unsubscribe": "購読解除",
@@ -572,8 +568,6 @@
"quick_jump_label": "クイックナビゲーション",
"description_nav_label": "タスクの説明",
"sub_issues_nav_progress": "{{done}}/{{total}} 完了",
- "sub_issues_show_more_other": "さらに {{count}} 件表示",
- "sub_issues_show_less": "折りたたむ",
"thread_nav_label": "スレッドへ移動",
"thread_nav_resolved_label": "{{title}}(解決済み)",
"thread_nav_reply_label": "{{author}}:{{title}}",
@@ -599,7 +593,27 @@
"workdir_path_unavailable": "ローカル作業ディレクトリはまだありません — このタスクはローカルエージェントで実行されていません",
"pull_requests_empty_title": "関連する PR はありません。",
"guest_readonly_note": "ゲストは閲覧とコメントのみ可能で、タスクのプロパティは変更できません。",
- "open_issue_page": "タスクページで開く"
+ "open_issue_page": "タスクページで開く",
+ "add_row": {
+ "wakeups": "ウェイクアップを追加",
+ "pull_requests": "Pull request を追加",
+ "environments": "環境を追加",
+ "wakeups_pull_requests": "ウェイクアップまたは Pull request を追加",
+ "wakeups_environments": "ウェイクアップまたは環境を追加",
+ "pull_requests_environments": "Pull request または環境を追加",
+ "all": "ウェイクアップ、Pull request、環境を追加",
+ "menu": {
+ "wakeups": "ウェイクアップ",
+ "pull_requests": "Pull request",
+ "environments": "環境"
+ }
+ },
+ "footer": {
+ "created": "{{creator}} が {{date}} に作成",
+ "created_for": "{{creator}} が {{requester}} の代理で {{date}} に作成",
+ "created_at": "作成: {{time}}",
+ "updated_at": "更新: {{time}}"
+ }
},
"timeline": {
"loading": "読み込み中...",
@@ -891,8 +905,6 @@
"summary_runs_other": "{{count}} 回の実行",
"open_timeline": "タイムラインを開く",
"more_runs_other": "残り {{count}} 件を表示",
- "strip_aria": "実行ごとの費用 — 実行タイムラインを開く",
- "strip_no_usage": "使用量の記録なし",
"queued_count_other": "{{count}} 件待機中"
},
"runs_timeline": {
@@ -1410,12 +1422,6 @@
"badge": "システム",
"title_stage": "ステージ {{stage}} のサブタスクがすべて終わったとき",
"title_all": "サブタスクがすべて終わったとき",
- "wake_assignee": "担当者 {{name}} を起こす",
- "remaining_other": "残り {{count}} 件",
- "blocked_backlog": "バックログ中のため起こしません",
- "blocked_member": "担当者がメンバーのため、受信トレイに通知します",
- "blocked_none": "エージェントの担当者がいないため起こしません",
- "turned_off": "このタスクではオフ",
"target_title": "起こす対象",
"target_current": "担当者(現在 {{name}})",
"target_none": "担当者:エージェントやスクワッドは起こし、メンバーには通知します",
@@ -1430,14 +1436,19 @@
"save_error": "システムルールを保存できませんでした。",
"default_on": "ワークスペースでは既定でオン。",
"default_off": "ワークスペースでは既定でオフ。",
- "notify_member": "{{name}} に受信トレイで通知",
"instruction": "起きたあとにすること",
"instruction_edit": "指示を編集",
"instruction_default": "このタスクでは未設定のため、既定の指示を使います:",
"instruction_placeholder": "空欄のままなら既定の指示を使います",
"instruction_invalid": "指示は 4,000 バイト未満にしてください。",
"paused": "一時停止中:{{reason}}",
- "default_change": "既定値を変更"
+ "default_change": "既定値を変更",
+ "chip_wake": "完了後に {{name}} を起動",
+ "chip_notify": "完了後に {{name}} に通知",
+ "chip_assignee": "完了後に担当者を起動",
+ "chip_off": "完了後の起動はオフ",
+ "blocked_backlog": "バックログ中のため起こしません",
+ "blocked_none": "エージェントの担当者がいないため起こしません"
},
"cond": {
"status": "ステータスが{{status}}になったとき",
@@ -1510,7 +1521,14 @@
"loop": "別のルールと互いに起こし合っていました",
"rate": "1 時間に 12 回を超えて起動"
},
- "upcoming_other": "有効なルール {{count}} 件"
+ "upcoming_other": "有効なルール {{count}} 件",
+ "short": {
+ "at_time": "{{time}}",
+ "scheduled_time": "指定時刻",
+ "hourly": "毎時",
+ "every_hours": "{{hours}} 時間ごと",
+ "every_seconds": "{{seconds}} 秒ごと"
+ }
},
"duplicates": {
"banner_prefix": "重複元:",
@@ -1545,7 +1563,8 @@
"not_merged_action": "外す",
"all_merged_to": "PR はすべてマージ済みです。次に PR がマージされると {{status}} に変更します。",
"issue_disabled": "このタスクは PR マージでステータスを変えません",
- "issue_disabled_action": "再開"
+ "issue_disabled_action": "再開",
+ "on_merge_to": "マージ後 → {{status}}"
},
"deliverables": {
"section_title": "成果物",
diff --git a/packages/views/locales/ko/issues.json b/packages/views/locales/ko/issues.json
index 7de23ffeb4..181f7747d3 100644
--- a/packages/views/locales/ko/issues.json
+++ b/packages/views/locales/ko/issues.json
@@ -488,7 +488,6 @@
"section_parent_issue": "상위 태스크",
"section_pull_requests": "Pull requests",
"section_metadata": "메타데이터",
- "section_details": "세부 정보",
"sidebar_settings": {
"open": "사이드바 사용자 지정",
"title": "사이드바",
@@ -543,9 +542,6 @@
"prop_project": "프로젝트",
"prop_labels": "라벨",
"add_property_action": "속성 추가",
- "prop_created_by": "생성자",
- "prop_created": "생성일",
- "prop_updated": "수정일",
"activity_section": "활동",
"subscribe": "구독",
"unsubscribe": "구독 해제",
@@ -572,8 +568,6 @@
"quick_jump_label": "빠른 탐색",
"description_nav_label": "태스크 설명",
"sub_issues_nav_progress": "{{done}}/{{total}} 완료",
- "sub_issues_show_more_other": "{{count}}개 더 보기",
- "sub_issues_show_less": "접기",
"thread_nav_label": "스레드로 이동",
"thread_nav_resolved_label": "{{title}} (해결됨)",
"thread_nav_reply_label": "{{author}}: {{title}}",
@@ -599,7 +593,27 @@
"workdir_path_unavailable": "아직 로컬 작업 디렉터리가 없습니다 — 이 태스크는 아직 로컬 에이전트에서 실행되지 않았습니다",
"pull_requests_empty_title": "연결된 PR이 없습니다.",
"guest_readonly_note": "게스트는 보고 댓글을 남길 수 있지만 작업 속성은 바꿀 수 없습니다.",
- "open_issue_page": "태스크 페이지에서 열기"
+ "open_issue_page": "태스크 페이지에서 열기",
+ "add_row": {
+ "wakeups": "깨우기 추가",
+ "pull_requests": "Pull request 추가",
+ "environments": "환경 추가",
+ "wakeups_pull_requests": "깨우기 또는 Pull request 추가",
+ "wakeups_environments": "깨우기 또는 환경 추가",
+ "pull_requests_environments": "Pull request 또는 환경 추가",
+ "all": "깨우기, Pull request 또는 환경 추가",
+ "menu": {
+ "wakeups": "깨우기",
+ "pull_requests": "Pull request",
+ "environments": "환경"
+ }
+ },
+ "footer": {
+ "created": "{{creator}} 님이 {{date}}에 생성",
+ "created_for": "{{creator}} 님이 {{requester}} 님을 대신해 {{date}}에 생성",
+ "created_at": "생성: {{time}}",
+ "updated_at": "업데이트: {{time}}"
+ }
},
"timeline": {
"loading": "불러오는 중...",
@@ -891,8 +905,6 @@
"summary_runs_other": "실행 {{count}}회",
"open_timeline": "타임라인 열기",
"more_runs_other": "{{count}}개 더 보기",
- "strip_aria": "실행별 비용 — 실행 타임라인 열기",
- "strip_no_usage": "사용량 기록 없음",
"queued_count_other": "{{count}}개 대기 중"
},
"runs_timeline": {
@@ -1410,12 +1422,6 @@
"badge": "시스템",
"title_stage": "{{stage}}단계 하위 태스크가 모두 끝나면",
"title_all": "하위 태스크가 모두 끝나면",
- "wake_assignee": "담당자 {{name}} 깨우기",
- "remaining_other": "{{count}}개 남음",
- "blocked_backlog": "백로그 상태라 지금은 깨우지 않음",
- "blocked_member": "담당자가 멤버라 받은편지함으로 알립니다",
- "blocked_none": "에이전트 담당자가 없어 깨우지 않음",
- "turned_off": "이 태스크에서 꺼짐",
"target_title": "깨울 대상",
"target_current": "담당자 (현재 {{name}})",
"target_none": "담당자: 에이전트나 스쿼드는 깨우고, 멤버에게는 알립니다",
@@ -1430,14 +1436,19 @@
"save_error": "시스템 규칙을 저장할 수 없습니다.",
"default_on": "워크스페이스 기본값은 켜짐입니다.",
"default_off": "워크스페이스 기본값은 꺼짐입니다.",
- "notify_member": "받은편지함으로 {{name}}에게 알림",
"instruction": "깨운 뒤 할 일",
"instruction_edit": "지시 편집",
"instruction_default": "이 태스크에는 설정되지 않아 기본 지시를 사용합니다:",
"instruction_placeholder": "비워 두면 기본 지시를 사용합니다",
"instruction_invalid": "지침은 4,000바이트 미만이어야 합니다.",
"paused": "일시 중지됨: {{reason}}",
- "default_change": "기본값 변경"
+ "default_change": "기본값 변경",
+ "chip_wake": "모두 끝나면 {{name}} 깨우기",
+ "chip_notify": "모두 끝나면 {{name}}에게 알림",
+ "chip_assignee": "모두 끝나면 담당자 깨우기",
+ "chip_off": "완료 후 깨우기 꺼짐",
+ "blocked_backlog": "백로그 상태라 지금은 깨우지 않음",
+ "blocked_none": "에이전트 담당자가 없어 깨우지 않음"
},
"cond": {
"status": "상태가 {{status}}(으)로 바뀌면",
@@ -1510,7 +1521,14 @@
"loop": "다른 규칙과 서로 깨우고 있었습니다",
"rate": "1시간에 12회 넘게 실행됨"
},
- "upcoming_other": "활성 깨우기 규칙 {{count}}개"
+ "upcoming_other": "활성 깨우기 규칙 {{count}}개",
+ "short": {
+ "at_time": "{{time}}",
+ "scheduled_time": "지정 시간",
+ "hourly": "매시간",
+ "every_hours": "{{hours}}시간마다",
+ "every_seconds": "{{seconds}}초마다"
+ }
},
"duplicates": {
"banner_prefix": "중복 원본:",
@@ -1545,7 +1563,8 @@
"not_merged_action": "제거",
"all_merged_to": "PR이 모두 병합되었습니다. 다음 PR이 병합되면 {{status}}(으)로 변경합니다.",
"issue_disabled": "이 태스크는 PR 병합 시 상태를 바꾸지 않음",
- "issue_disabled_action": "다시 켜기"
+ "issue_disabled_action": "다시 켜기",
+ "on_merge_to": "병합 후 → {{status}}"
},
"deliverables": {
"section_title": "산출물",
diff --git a/packages/views/locales/ru/issues.json b/packages/views/locales/ru/issues.json
index 405f7b2de2..b44b577b3a 100644
--- a/packages/views/locales/ru/issues.json
+++ b/packages/views/locales/ru/issues.json
@@ -508,7 +508,6 @@
"section_parent_issue": "Родительская задача",
"section_pull_requests": "Pull request'ы",
"section_metadata": "Метаданные",
- "section_details": "Детали",
"sidebar_settings": {
"open": "Настроить боковую панель",
"title": "Боковая панель",
@@ -567,9 +566,6 @@
"prop_project": "Проект",
"prop_labels": "Метки",
"add_property_action": "Добавить свойство",
- "prop_created_by": "Создано",
- "prop_created": "Создано",
- "prop_updated": "Обновлено",
"activity_section": "Активность",
"subscribe": "Подписаться",
"unsubscribe": "Отписаться",
@@ -596,11 +592,6 @@
"quick_jump_label": "Быстрая навигация",
"description_nav_label": "Описание задачи",
"sub_issues_nav_progress": "Завершено: {{done}}/{{total}}",
- "sub_issues_show_more_one": "Показать ещё {{count}}",
- "sub_issues_show_more_few": "Показать ещё {{count}}",
- "sub_issues_show_more_many": "Показать ещё {{count}}",
- "sub_issues_show_more_other": "Показать ещё {{count}}",
- "sub_issues_show_less": "Свернуть",
"thread_nav_label": "Перейти к треду комментариев",
"thread_nav_resolved_label": "{{title}} (решено)",
"thread_nav_reply_label": "{{author}}: {{title}}",
@@ -634,7 +625,27 @@
"load_failed": "Не удалось загрузить задачу.",
"load_retry": "Повторить",
"guest_readonly_note": "Гости могут просматривать и комментировать, но не могут менять свойства задачи.",
- "open_issue_page": "Открыть страницу задачи"
+ "open_issue_page": "Открыть страницу задачи",
+ "add_row": {
+ "wakeups": "Добавить будильник",
+ "pull_requests": "Добавить pull request",
+ "environments": "Добавить окружение",
+ "wakeups_pull_requests": "Добавить будильник или pull request",
+ "wakeups_environments": "Добавить будильник или окружение",
+ "pull_requests_environments": "Добавить pull request или окружение",
+ "all": "Добавить будильник, pull request или окружение",
+ "menu": {
+ "wakeups": "Будильник",
+ "pull_requests": "Pull request",
+ "environments": "Окружение"
+ }
+ },
+ "footer": {
+ "created": "Автор: {{creator}} · {{date}}",
+ "created_for": "Автор: {{creator}} от имени {{requester}} · {{date}}",
+ "created_at": "Создана: {{time}}",
+ "updated_at": "Обновлена: {{time}}"
+ }
},
"timeline": {
"loading": "Загрузка...",
@@ -1004,8 +1015,6 @@
"open_timeline": "Открыть таймлайн",
"more_runs_one": "Показать ещё {{count}}",
"more_runs_other": "Показать ещё {{count}}",
- "strip_aria": "Стоимость каждого запуска — открыть хронологию запусков",
- "strip_no_usage": "Использование не зафиксировано",
"queued_count_one": "В очереди: {{count}}",
"queued_count_other": "В очереди: {{count}}",
"included_comments_few": "Включает {{count}} комментария",
@@ -1595,13 +1604,6 @@
"badge": "Системное",
"title_stage": "Когда все подзадачи этапа {{stage}} завершатся",
"title_all": "Когда все подзадачи завершатся",
- "wake_assignee": "Разбудить исполнителя {{name}}",
- "remaining_one": "Осталось: {{count}}",
- "remaining_other": "Осталось: {{count}}",
- "blocked_backlog": "Задача в бэклоге — пробуждение пока не сработает",
- "blocked_member": "Исполнитель — участник; он получит уведомление во входящих",
- "blocked_none": "Нет исполнителя-агента — будить некого",
- "turned_off": "Выключено для этой задачи",
"target_title": "Будит",
"target_current": "Исполнитель (сейчас {{name}})",
"target_none": "Исполнителя: агента или команду будит, участнику отправляет уведомление",
@@ -1616,16 +1618,19 @@
"save_error": "Не удалось сохранить системное правило.",
"default_on": "По умолчанию включено в этом рабочем пространстве.",
"default_off": "По умолчанию выключено в этом рабочем пространстве.",
- "notify_member": "Уведомить {{name}} во входящих",
"instruction": "Что делать при пробуждении",
"instruction_edit": "Изменить инструкцию",
"instruction_default": "Не задано для этой задачи; используется значение по умолчанию:",
"instruction_placeholder": "Оставьте пустым, чтобы использовать значение по умолчанию",
"instruction_invalid": "Размер инструкций должен быть меньше 4 000 байт.",
"paused": "Приостановлено: {{reason}}",
- "remaining_few": "Осталось: {{count}}",
- "remaining_many": "Осталось: {{count}}",
- "default_change": "Изменить значение по умолчанию"
+ "default_change": "Изменить значение по умолчанию",
+ "chip_wake": "Разбудит {{name}} по завершении",
+ "chip_notify": "Уведомит {{name}} по завершении",
+ "chip_assignee": "Разбудит исполнителя по завершении",
+ "chip_off": "Будильник по завершении выключен",
+ "blocked_backlog": "Задача в бэклоге — пробуждение пока не сработает",
+ "blocked_none": "Нет исполнителя-агента — будить некого"
},
"cond": {
"status": "Когда эта задача переходит в статус {{status}}",
@@ -1704,7 +1709,14 @@
"upcoming_one": "{{count}} активное правило пробуждения",
"upcoming_few": "{{count}} включённых правил будильника",
"upcoming_many": "{{count}} включённых правил будильника",
- "upcoming_other": "{{count}} включённых правил будильника"
+ "upcoming_other": "{{count}} включённых правил будильника",
+ "short": {
+ "at_time": "{{time}}",
+ "scheduled_time": "В назначенное время",
+ "hourly": "Каждый час",
+ "every_hours": "Каждые {{hours}} ч",
+ "every_seconds": "Каждые {{seconds}} с"
+ }
},
"duplicates": {
"banner_prefix": "Дубликат",
@@ -1742,7 +1754,8 @@
"issue_disabled": "Слияние PR не изменит эту задачу",
"issue_disabled_action": "Включить",
"waiting_to_few": "Переходит в статус {{status}}, когда {{prs}} будут смёржены",
- "waiting_to_many": "Переходит в статус {{status}}, когда {{prs}} будут смёржены"
+ "waiting_to_many": "Переходит в статус {{status}}, когда {{prs}} будут смёржены",
+ "on_merge_to": "После мёржа → {{status}}"
},
"deliverables": {
"section_title": "Результаты",
diff --git a/packages/views/locales/zh-Hans/issues.json b/packages/views/locales/zh-Hans/issues.json
index 232cd544b6..843b4e48f4 100644
--- a/packages/views/locales/zh-Hans/issues.json
+++ b/packages/views/locales/zh-Hans/issues.json
@@ -488,7 +488,6 @@
"section_parent_issue": "父任务",
"section_pull_requests": "Pull Request",
"section_metadata": "元数据",
- "section_details": "详情",
"sidebar_settings": {
"open": "自定义侧边栏",
"title": "侧边栏",
@@ -543,9 +542,6 @@
"prop_project": "项目",
"prop_labels": "标签",
"add_property_action": "添加属性",
- "prop_created_by": "创建者",
- "prop_created": "创建时间",
- "prop_updated": "更新时间",
"activity_section": "动态",
"subscribe": "订阅",
"unsubscribe": "取消订阅",
@@ -570,8 +566,6 @@
"quick_jump_label": "快捷跳转",
"description_nav_label": "任务描述",
"sub_issues_nav_progress": "已完成 {{done}}/{{total}}",
- "sub_issues_show_more_other": "再显示 {{count}} 条",
- "sub_issues_show_less": "收起",
"thread_nav_label": "快速跳转到讨论",
"thread_nav_resolved_label": "{{title}}(已解决)",
"thread_nav_reply_label": "{{author}}:{{title}}",
@@ -599,7 +593,27 @@
"subscription_update_failed": "无法更新订阅状态,请重试。",
"pull_requests_empty_title": "暂无关联 PR。",
"guest_readonly_note": "访客可以查看和评论,不能修改任务属性。",
- "open_issue_page": "在任务页打开"
+ "open_issue_page": "在任务页打开",
+ "add_row": {
+ "wakeups": "添加唤醒",
+ "pull_requests": "添加 Pull Request",
+ "environments": "添加环境",
+ "wakeups_pull_requests": "添加唤醒或 Pull Request",
+ "wakeups_environments": "添加唤醒或环境",
+ "pull_requests_environments": "添加 Pull Request 或环境",
+ "all": "添加唤醒、Pull Request 或环境",
+ "menu": {
+ "wakeups": "唤醒",
+ "pull_requests": "Pull Request",
+ "environments": "环境"
+ }
+ },
+ "footer": {
+ "created": "{{creator}} 创建于 {{date}}",
+ "created_for": "{{creator}} 代表 {{requester}} 创建于 {{date}}",
+ "created_at": "创建于 {{time}}",
+ "updated_at": "更新于 {{time}}"
+ }
},
"timeline": {
"loading": "加载中...",
@@ -891,8 +905,6 @@
"summary_runs_other": "{{count}} 次运行",
"open_timeline": "打开时间线",
"more_runs_other": "显示其余 {{count}} 次运行",
- "strip_aria": "每次运行的费用——打开运行时间线",
- "strip_no_usage": "没有用量记录",
"queued_count_other": "{{count}} 个排队中"
},
"runs_timeline": {
@@ -1410,12 +1422,6 @@
"badge": "系统",
"title_stage": "当第 {{stage}} 阶段的子任务全部结束时",
"title_all": "当子任务全部结束时",
- "wake_assignee": "唤醒负责人 {{name}}",
- "remaining_other": "还差 {{count}} 个",
- "blocked_backlog": "任务在待规划中,暂不唤醒",
- "blocked_member": "负责人是成员,会收到收件箱通知",
- "blocked_none": "没有智能体负责人,不会唤醒",
- "turned_off": "已在此任务上关闭",
"target_title": "唤醒",
"target_current": "负责人(当前 {{name}})",
"target_none": "负责人:智能体或小队会被唤醒,成员会收到通知",
@@ -1430,14 +1436,19 @@
"save_error": "无法保存系统规则。",
"default_on": "工作区默认开启。",
"default_off": "工作区默认关闭。",
- "notify_member": "通过收件箱通知 {{name}}",
"instruction": "唤醒后要做什么",
"instruction_edit": "编辑指令",
"instruction_default": "此任务未设置,使用默认指令:",
"instruction_placeholder": "留空则使用默认指令",
"instruction_invalid": "指令长度不能超过 4,000 字节。",
"paused": "已暂停:{{reason}}",
- "default_change": "修改默认值"
+ "default_change": "修改默认值",
+ "chip_wake": "结束后唤醒 {{name}}",
+ "chip_notify": "结束后通知 {{name}}",
+ "chip_assignee": "结束后唤醒负责人",
+ "chip_off": "结束后唤醒已关闭",
+ "blocked_backlog": "任务在待规划中,暂不唤醒",
+ "blocked_none": "没有智能体负责人,不会唤醒"
},
"cond": {
"status": "当状态变为{{status}}时",
@@ -1510,7 +1521,14 @@
"loop": "与其他唤醒规则互相触发",
"rate": "1 小时内触发超过 12 次"
},
- "upcoming_other": "已开启 {{count}} 条唤醒规则"
+ "upcoming_other": "已开启 {{count}} 条唤醒规则",
+ "short": {
+ "at_time": "{{time}}",
+ "scheduled_time": "指定时间",
+ "hourly": "每小时",
+ "every_hours": "每 {{hours}} 小时",
+ "every_seconds": "每 {{seconds}} 秒"
+ }
},
"duplicates": {
"banner_prefix": "重复于",
@@ -1545,7 +1563,8 @@
"not_merged_action": "移除",
"all_merged_to": "PR 均已合并。之后有新 PR 合并时会改为 {{status}}。",
"issue_disabled": "此任务合并后不改状态",
- "issue_disabled_action": "恢复"
+ "issue_disabled_action": "恢复",
+ "on_merge_to": "合并后 → {{status}}"
},
"deliverables": {
"section_title": "产物",
diff --git a/packages/views/locales/zh-Hant/issues.json b/packages/views/locales/zh-Hant/issues.json
index 894d8a706c..31a630a5e7 100644
--- a/packages/views/locales/zh-Hant/issues.json
+++ b/packages/views/locales/zh-Hant/issues.json
@@ -488,7 +488,6 @@
"section_parent_issue": "父任務",
"section_pull_requests": "Pull Request",
"section_metadata": "後設資料",
- "section_details": "詳情",
"sidebar_settings": {
"open": "自訂側邊欄",
"title": "側邊欄",
@@ -543,9 +542,6 @@
"prop_project": "專案",
"prop_labels": "標籤",
"add_property_action": "新增欄位",
- "prop_created_by": "建立者",
- "prop_created": "建立時間",
- "prop_updated": "更新時間",
"activity_section": "動態",
"subscribe": "訂閱",
"unsubscribe": "取消訂閱",
@@ -570,8 +566,6 @@
"quick_jump_label": "快捷跳轉",
"description_nav_label": "任務描述",
"sub_issues_nav_progress": "已完成 {{done}}/{{total}}",
- "sub_issues_show_more_other": "再顯示 {{count}} 筆",
- "sub_issues_show_less": "收合",
"thread_nav_label": "快速跳轉到討論",
"thread_nav_resolved_label": "{{title}}(已解決)",
"thread_nav_reply_label": "{{author}}:{{title}}",
@@ -599,7 +593,27 @@
"subscription_update_failed": "無法更新訂閱狀態,請重試。",
"pull_requests_empty_title": "暫無關聯 PR。",
"guest_readonly_note": "訪客可以查看和評論,不能修改任務屬性。",
- "open_issue_page": "在任務頁開啟"
+ "open_issue_page": "在任務頁開啟",
+ "add_row": {
+ "wakeups": "新增喚醒",
+ "pull_requests": "新增 Pull Request",
+ "environments": "新增環境",
+ "wakeups_pull_requests": "新增喚醒或 Pull Request",
+ "wakeups_environments": "新增喚醒或環境",
+ "pull_requests_environments": "新增 Pull Request 或環境",
+ "all": "新增喚醒、Pull Request 或環境",
+ "menu": {
+ "wakeups": "喚醒",
+ "pull_requests": "Pull Request",
+ "environments": "環境"
+ }
+ },
+ "footer": {
+ "created": "{{creator}} 建立於 {{date}}",
+ "created_for": "{{creator}} 代表 {{requester}} 建立於 {{date}}",
+ "created_at": "建立於 {{time}}",
+ "updated_at": "更新於 {{time}}"
+ }
},
"timeline": {
"loading": "載入中…",
@@ -891,8 +905,6 @@
"summary_runs_other": "{{count}} 次執行",
"open_timeline": "開啟時間線",
"more_runs_other": "顯示其餘 {{count}} 次執行",
- "strip_aria": "每次執行的費用——開啟執行時間線",
- "strip_no_usage": "沒有用量記錄",
"queued_count_other": "{{count}} 個排隊中"
},
"runs_timeline": {
@@ -1410,12 +1422,6 @@
"badge": "系統",
"title_stage": "當第 {{stage}} 階段的子任務全部結束時",
"title_all": "當子任務全部結束時",
- "wake_assignee": "喚醒負責人 {{name}}",
- "remaining_other": "還差 {{count}} 個",
- "blocked_backlog": "任務在待規劃中,暫不喚醒",
- "blocked_member": "負責人是成員,會收到收件箱通知",
- "blocked_none": "沒有 AI 代理負責人,不會喚醒",
- "turned_off": "已在此任務上關閉",
"target_title": "喚醒",
"target_current": "負責人(當前 {{name}})",
"target_none": "負責人:AI 代理或小隊會被喚醒,成員會收到通知",
@@ -1430,14 +1436,19 @@
"save_error": "無法儲存系統規則。",
"default_on": "工作區預設開啟。",
"default_off": "工作區預設關閉。",
- "notify_member": "透過收件箱通知 {{name}}",
"instruction": "喚醒後要做什麼",
"instruction_edit": "編輯指令",
"instruction_default": "此任務未設定,使用預設指令:",
"instruction_placeholder": "留空則使用預設指令",
"instruction_invalid": "指令長度不得超過 4,000 位元組。",
"paused": "已暫停:{{reason}}",
- "default_change": "修改預設值"
+ "default_change": "修改預設值",
+ "chip_wake": "結束後喚醒 {{name}}",
+ "chip_notify": "結束後通知 {{name}}",
+ "chip_assignee": "結束後喚醒負責人",
+ "chip_off": "結束後喚醒已關閉",
+ "blocked_backlog": "任務在待規劃中,暫不喚醒",
+ "blocked_none": "沒有 AI 代理負責人,不會喚醒"
},
"cond": {
"status": "當狀態變為{{status}}時",
@@ -1510,7 +1521,14 @@
"loop": "與其他喚醒規則互相觸發",
"rate": "1 小時內觸發超過 12 次"
},
- "upcoming_other": "已開啟 {{count}} 條喚醒規則"
+ "upcoming_other": "已開啟 {{count}} 條喚醒規則",
+ "short": {
+ "at_time": "{{time}}",
+ "scheduled_time": "指定時間",
+ "hourly": "每小時",
+ "every_hours": "每 {{hours}} 小時",
+ "every_seconds": "每 {{seconds}} 秒"
+ }
},
"duplicates": {
"banner_prefix": "重複於",
@@ -1545,7 +1563,8 @@
"not_merged_action": "移除",
"all_merged_to": "PR 均已合併。之後有新 PR 合併時會改為 {{status}}。",
"issue_disabled": "此任務合併後不改狀態",
- "issue_disabled_action": "恢復"
+ "issue_disabled_action": "恢復",
+ "on_merge_to": "合併後 → {{status}}"
},
"deliverables": {
"section_title": "產物",
diff --git a/packages/views/plugins/plugin-panel-section.test.tsx b/packages/views/plugins/plugin-panel-section.test.tsx
index ae59254e3a..7f2873d78b 100644
--- a/packages/views/plugins/plugin-panel-section.test.tsx
+++ b/packages/views/plugins/plugin-panel-section.test.tsx
@@ -97,7 +97,7 @@ describe("PluginPanelSection", () => {
it("keeps the section header free of settings-only menus", () => {
data.installed.plugins = [installation()];
render(<PluginPanelSection issueId="issue-1" />, { wrapper: Wrapper });
- expect(screen.getByRole("button", { name: "Plugins 1" })).toBeVisible();
+ expect(screen.getByRole("button", { name: "Plugins" })).toBeVisible();
expect(screen.queryByRole("button", { name: "Plugins options" })).not.toBeInTheDocument();
});