@deepseek-ai/dsh-experimental-client-ui-forge 0.2.3-alpha.3 → 0.2.3-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/README.i18n.yaml +10 -10
  2. package/README.md +16 -15
  3. package/README.zh.md +16 -15
  4. package/lib/client.js +18 -18
  5. package/lib/client.js.map +1 -1
  6. package/lib/index.js +67 -18
  7. package/lib/typert.host.js +89 -45
  8. package/lib/typert.remote-client.d.ts +7 -7
  9. package/lib/typert.remote-client.d.ts.map +1 -1
  10. package/lib/typert.remote-client.js +48 -36
  11. package/lib/types/client/BranchPicker.d.ts.map +1 -1
  12. package/lib/types/client/BranchPicker.js.map +1 -1
  13. package/lib/types/client/ChangeRequestCard.d.ts +10 -1
  14. package/lib/types/client/ChangeRequestCard.d.ts.map +1 -1
  15. package/lib/types/client/ChangeRequestCard.js.map +1 -1
  16. package/lib/types/client/ChangeRequestOverview.d.ts +16 -0
  17. package/lib/types/client/ChangeRequestOverview.d.ts.map +1 -1
  18. package/lib/types/client/ChangeRequestOverview.js.map +1 -1
  19. package/lib/types/client/ChangeRequestsSection.d.ts.map +1 -1
  20. package/lib/types/client/ChangeRequestsSection.js.map +1 -1
  21. package/lib/types/client/ChangeStatus.d.ts +41 -0
  22. package/lib/types/client/ChangeStatus.d.ts.map +1 -0
  23. package/lib/types/client/ChangeStatus.js.map +1 -0
  24. package/lib/types/client/ChangedFiles.d.ts.map +1 -1
  25. package/lib/types/client/ChangedFiles.js.map +1 -1
  26. package/lib/types/client/ChangesTab.d.ts +23 -8
  27. package/lib/types/client/ChangesTab.d.ts.map +1 -1
  28. package/lib/types/client/ChangesTab.js.map +1 -1
  29. package/lib/types/client/CommitMenu.d.ts +8 -5
  30. package/lib/types/client/CommitMenu.d.ts.map +1 -1
  31. package/lib/types/client/CommitMenu.js.map +1 -1
  32. package/lib/types/client/CopyCommandButton.d.ts +19 -0
  33. package/lib/types/client/CopyCommandButton.d.ts.map +1 -0
  34. package/lib/types/client/CopyCommandButton.js.map +1 -0
  35. package/lib/types/client/DiffFile.d.ts +20 -3
  36. package/lib/types/client/DiffFile.d.ts.map +1 -1
  37. package/lib/types/client/DiffFile.js.map +1 -1
  38. package/lib/types/client/EnvironmentRows.d.ts.map +1 -1
  39. package/lib/types/client/EnvironmentRows.js.map +1 -1
  40. package/lib/types/client/FileLabel.d.ts +5 -5
  41. package/lib/types/client/FileLabel.d.ts.map +1 -1
  42. package/lib/types/client/FileLabel.js.map +1 -1
  43. package/lib/types/client/HostSettings.d.ts.map +1 -1
  44. package/lib/types/client/HostSettings.js.map +1 -1
  45. package/lib/types/client/LensFilter.d.ts.map +1 -1
  46. package/lib/types/client/LensFilter.js.map +1 -1
  47. package/lib/types/client/ReviewComposer.d.ts.map +1 -1
  48. package/lib/types/client/ReviewComposer.js.map +1 -1
  49. package/lib/types/client/ReviewControls.d.ts.map +1 -1
  50. package/lib/types/client/ReviewControls.js.map +1 -1
  51. package/lib/types/client/ReviewThread.d.ts.map +1 -1
  52. package/lib/types/client/ReviewThread.js.map +1 -1
  53. package/lib/types/client/ReviewThreads.d.ts +17 -2
  54. package/lib/types/client/ReviewThreads.d.ts.map +1 -1
  55. package/lib/types/client/ReviewThreads.js.map +1 -1
  56. package/lib/types/client/SubmitReview.d.ts.map +1 -1
  57. package/lib/types/client/SubmitReview.js.map +1 -1
  58. package/lib/types/client/ThreadList.d.ts.map +1 -1
  59. package/lib/types/client/ThreadList.js.map +1 -1
  60. package/lib/types/client/ViewOptionsMenu.d.ts.map +1 -1
  61. package/lib/types/client/ViewOptionsMenu.js.map +1 -1
  62. package/lib/types/client/WorktreeNameDialog.d.ts.map +1 -1
  63. package/lib/types/client/WorktreeNameDialog.js.map +1 -1
  64. package/lib/types/client/WorktreeProgress.d.ts.map +1 -1
  65. package/lib/types/client/WorktreeProgress.js.map +1 -1
  66. package/lib/types/client/WorktreeSettings.d.ts.map +1 -1
  67. package/lib/types/client/WorktreeSettings.js.map +1 -1
  68. package/lib/types/client/WorktreeToggle.d.ts.map +1 -1
  69. package/lib/types/client/WorktreeToggle.js.map +1 -1
  70. package/lib/types/client/changes-store.d.ts +7 -4
  71. package/lib/types/client/changes-store.d.ts.map +1 -1
  72. package/lib/types/client/changes-store.js.map +1 -1
  73. package/lib/types/client/glyphs.d.ts +14 -1
  74. package/lib/types/client/glyphs.d.ts.map +1 -1
  75. package/lib/types/client/glyphs.js.map +1 -1
  76. package/lib/types/client/index.d.ts +1 -2
  77. package/lib/types/client/index.d.ts.map +1 -1
  78. package/lib/types/client/index.js.map +1 -1
  79. package/lib/types/client/locales.d.ts +5 -4
  80. package/lib/types/client/locales.d.ts.map +1 -1
  81. package/lib/types/client/locales.js.map +1 -1
  82. package/lib/types/client/minute-clock.d.ts +7 -0
  83. package/lib/types/client/minute-clock.d.ts.map +1 -0
  84. package/lib/types/client/minute-clock.js.map +1 -0
  85. package/lib/types/client/mount.d.ts.map +1 -1
  86. package/lib/types/client/mount.js.map +1 -1
  87. package/lib/types/client/review-page/ReviewActivity.d.ts.map +1 -1
  88. package/lib/types/client/review-page/ReviewActivity.js.map +1 -1
  89. package/lib/types/client/review-page/ReviewChat.d.ts.map +1 -1
  90. package/lib/types/client/review-page/ReviewChat.js.map +1 -1
  91. package/lib/types/client/review-page/ReviewDetail.d.ts +4 -1
  92. package/lib/types/client/review-page/ReviewDetail.d.ts.map +1 -1
  93. package/lib/types/client/review-page/ReviewDetail.js.map +1 -1
  94. package/lib/types/client/review-page/ReviewList.d.ts.map +1 -1
  95. package/lib/types/client/review-page/ReviewList.js.map +1 -1
  96. package/lib/types/client/review-page/ReviewPage.d.ts +2 -2
  97. package/lib/types/client/review-page/ReviewPage.d.ts.map +1 -1
  98. package/lib/types/client/review-page/ReviewPage.js.map +1 -1
  99. package/lib/types/client/review-page/ReviewStatus.d.ts +17 -13
  100. package/lib/types/client/review-page/ReviewStatus.d.ts.map +1 -1
  101. package/lib/types/client/review-page/ReviewStatus.js.map +1 -1
  102. package/lib/types/client/review-page/review-store.d.ts +1 -1
  103. package/lib/types/client/review-threads.d.ts +14 -7
  104. package/lib/types/client/review-threads.d.ts.map +1 -1
  105. package/lib/types/client/review-threads.js.map +1 -1
  106. package/lib/types/client/status.d.ts +0 -6
  107. package/lib/types/client/status.d.ts.map +1 -1
  108. package/lib/types/client/status.js.map +1 -1
  109. package/lib/types/client/thread-state.d.ts +2 -2
  110. package/lib/types/client/thread-state.d.ts.map +1 -1
  111. package/lib/types/client/thread-state.js.map +1 -1
  112. package/lib/types/client/toolbar-fold.d.ts +16 -6
  113. package/lib/types/client/toolbar-fold.d.ts.map +1 -1
  114. package/lib/types/client/toolbar-fold.js.map +1 -1
  115. package/lib/types/index.d.ts +25 -12
  116. package/lib/types/index.d.ts.map +1 -1
  117. package/lib/types/index.js.map +1 -1
  118. package/lib/types/panel.js.map +1 -1
  119. package/lib/types/types.d.ts +22 -5
  120. package/lib/types/types.d.ts.map +1 -1
  121. package/lib/types/worktree.js.map +1 -1
  122. package/package.json +60 -58
  123. package/src/client/BaseMenu.module.css +6 -3
  124. package/src/client/BranchPicker.tsx +28 -19
  125. package/src/client/ChangeRequestCard.tsx +71 -41
  126. package/src/client/ChangeRequestOverview.tsx +174 -74
  127. package/src/client/ChangeRequestsSection.tsx +33 -8
  128. package/src/client/ChangeStatus.module.css +70 -0
  129. package/src/client/ChangeStatus.tsx +104 -0
  130. package/src/client/ChangedFiles.tsx +20 -7
  131. package/src/client/ChangesTab.module.css +89 -20
  132. package/src/client/ChangesTab.tsx +332 -134
  133. package/src/client/CommitMenu.tsx +77 -38
  134. package/src/client/CopyCommandButton.tsx +25 -0
  135. package/src/client/DiffFile.tsx +83 -21
  136. package/src/client/EnvironmentRows.tsx +13 -11
  137. package/src/client/FileLabel.module.css +16 -18
  138. package/src/client/FileLabel.tsx +15 -31
  139. package/src/client/Forge.module.css +3 -10
  140. package/src/client/HostSettings.tsx +10 -8
  141. package/src/client/LensFilter.tsx +11 -9
  142. package/src/client/ReviewComposer.tsx +29 -17
  143. package/src/client/ReviewControls.tsx +8 -6
  144. package/src/client/ReviewThread.tsx +63 -21
  145. package/src/client/ReviewThreads.tsx +126 -34
  146. package/src/client/SubmitReview.tsx +5 -3
  147. package/src/client/ThreadList.module.css +4 -3
  148. package/src/client/ThreadList.tsx +5 -5
  149. package/src/client/ViewOptionsMenu.tsx +10 -8
  150. package/src/client/WorktreeNameDialog.tsx +15 -11
  151. package/src/client/WorktreeProgress.tsx +11 -9
  152. package/src/client/WorktreeSettings.tsx +4 -3
  153. package/src/client/WorktreeToggle.tsx +65 -35
  154. package/src/client/changes-store.ts +8 -5
  155. package/src/client/glyphs.tsx +23 -1
  156. package/src/client/index.ts +1 -2
  157. package/src/client/locales.ts +40 -32
  158. package/src/client/minute-clock.ts +19 -0
  159. package/src/client/mount.ts +66 -51
  160. package/src/client/review-page/ReviewActivity.tsx +5 -4
  161. package/src/client/review-page/ReviewChat.tsx +46 -17
  162. package/src/client/review-page/ReviewDetail.tsx +62 -31
  163. package/src/client/review-page/ReviewList.tsx +23 -18
  164. package/src/client/review-page/ReviewPage.module.css +81 -10
  165. package/src/client/review-page/ReviewPage.tsx +43 -35
  166. package/src/client/review-page/ReviewStatus.tsx +64 -39
  167. package/src/client/review-threads.ts +23 -11
  168. package/src/client/status.ts +0 -9
  169. package/src/client/thread-state.ts +8 -7
  170. package/src/client/toolbar-fold.ts +59 -14
  171. package/src/index.ts +78 -20
  172. package/src/panel.ts +1 -1
  173. package/src/types.ts +24 -5
  174. package/src/worktree.ts +1 -1
  175. package/lib/types/client/AttentionIndicator.d.ts +0 -22
  176. package/lib/types/client/AttentionIndicator.d.ts.map +0 -1
  177. package/lib/types/client/AttentionIndicator.js.map +0 -1
  178. package/src/client/AttentionIndicator.tsx +0 -37
@@ -80,7 +80,6 @@ export const zh = {
80
80
  'review.recheck': '在 {forge} 查看',
81
81
  'review.confirmRetry': '已核对,允许重新提交',
82
82
  'tab.title': '变更请求',
83
- 'header.attention': '本会话的变更请求需要处理',
84
83
  'checkout.worktree': '工作树',
85
84
  'checkout.worktreeFrom': '工作树 · 基于 {base}',
86
85
  'checkout.project': '项目目录',
@@ -107,6 +106,7 @@ export const zh = {
107
106
  'stream.failed': '无法加载变更请求面板',
108
107
  'change.number': '#{number}',
109
108
  'change.stateAria': '变更请求状态:{state}',
109
+ 'change.status': '状态',
110
110
  'change.state.open': '打开',
111
111
  'change.state.blocked': '需要处理',
112
112
  'change.state.draft': '草稿',
@@ -249,7 +249,6 @@ export const zh = {
249
249
  'diff.scopeNote.unstaged': '与暂存区比较,包含未跟踪的文件',
250
250
  'diff.scopeNote.staged': '暂存区与 HEAD 比较',
251
251
  'diff.base.aria': '基准分支:{base}',
252
- 'diff.base.uncommitted': '包含未提交的修改',
253
252
  'diff.base.search': '搜索分支',
254
253
  'diff.base.loading': '正在读取分支…',
255
254
  'diff.base.empty': '没有匹配的分支',
@@ -322,6 +321,7 @@ export const zh = {
322
321
  'commits.missing': '所选的提交已不在其中',
323
322
  'commits.notLinear': '这些提交不在同一条提交链上',
324
323
  'commits.showAll': '查看全部提交',
324
+ 'commits.threadCommit': '讨论所在的提交',
325
325
  'diff.noMatchingFiles': '没有匹配的文件',
326
326
  'diff.refresh': '刷新变更',
327
327
  'diff.expandAll': '全部展开',
@@ -492,8 +492,8 @@ export const zh = {
492
492
  'toast.commandCopied': '已复制命令',
493
493
  'toast.expandFailed': '无法显示未变更的行:{message}',
494
494
  'toast.expandStale': '文件在读取变更后又有修改,刷新后再展开',
495
- 'toast.prompted': '已发送:{text}',
496
- 'toast.promptFailed': '无法发送消息',
495
+ 'toast.promptFailed': '输入框暂时无法添加这条请求,请稍后重试',
496
+ 'toast.commitGone': '找不到这条讨论所在的提交 {commit}',
497
497
  'thread.list': '讨论',
498
498
  'thread.listAria': '讨论列表,共 {count} 个',
499
499
  'thread.close': '关闭讨论列表',
@@ -511,6 +511,7 @@ export const zh = {
511
511
  'thread.onCommit': '在 {commit} 上',
512
512
  'thread.originally': '原在 {range}',
513
513
  'thread.outdatedTag': '已过期',
514
+ 'thread.lostTag': '已失效',
514
515
  'thread.elsewhereTag': '不在所选提交中',
515
516
  'thread.author': '作者',
516
517
  'thread.bot': 'bot',
@@ -761,7 +762,6 @@ export const en: Record<ForgePanelKey, string> = {
761
762
  'review.recheck': 'View on {forge}',
762
763
  'review.confirmRetry': 'Checked; allow resubmission',
763
764
  'tab.title': 'Change requests',
764
- 'header.attention': 'Change requests of this Session need attention',
765
765
  'checkout.worktree': 'Worktree',
766
766
  'checkout.worktreeFrom': 'Worktree · from {base}',
767
767
  'checkout.project': 'Project directory',
@@ -788,6 +788,7 @@ export const en: Record<ForgePanelKey, string> = {
788
788
  'stream.failed': 'The change request panel could not load',
789
789
  'change.number': '#{number}',
790
790
  'change.stateAria': 'Change request state: {state}',
791
+ 'change.status': 'Status',
791
792
  'change.state.open': 'Open',
792
793
  'change.state.blocked': 'Needs attention',
793
794
  'change.state.draft': 'Draft',
@@ -930,7 +931,6 @@ export const en: Record<ForgePanelKey, string> = {
930
931
  'diff.scopeNote.unstaged': 'Compared with the index, including untracked files',
931
932
  'diff.scopeNote.staged': 'The index compared with HEAD',
932
933
  'diff.base.aria': 'Base branch: {base}',
933
- 'diff.base.uncommitted': 'Including uncommitted changes',
934
934
  'diff.base.search': 'Search branches',
935
935
  'diff.base.loading': 'Reading branches…',
936
936
  'diff.base.empty': 'No matching branches',
@@ -1003,6 +1003,7 @@ export const en: Record<ForgePanelKey, string> = {
1003
1003
  'commits.missing': 'The selected commits are no longer included',
1004
1004
  'commits.notLinear': 'These commits are not on one line of history',
1005
1005
  'commits.showAll': 'Show all commits',
1006
+ 'commits.threadCommit': 'Commit of the thread',
1006
1007
  'diff.noMatchingFiles': 'No matching files',
1007
1008
  'diff.refresh': 'Refresh changes',
1008
1009
  'diff.expandAll': 'Expand all files',
@@ -1173,8 +1174,8 @@ export const en: Record<ForgePanelKey, string> = {
1173
1174
  'toast.commandCopied': 'Command copied',
1174
1175
  'toast.expandFailed': 'Unchanged lines could not be shown: {message}',
1175
1176
  'toast.expandStale': 'The file changed after its changes were read; refresh before expanding',
1176
- 'toast.prompted': 'Sent: {text}',
1177
- 'toast.promptFailed': 'The message could not be sent',
1177
+ 'toast.promptFailed': 'The input cannot accept the request yet. Try again shortly.',
1178
+ 'toast.commitGone': 'The commit of this thread, {commit}, could not be found',
1178
1179
  'thread.list': 'Threads',
1179
1180
  'thread.listAria': 'Review threads, {count} in total',
1180
1181
  'thread.close': 'Close the thread list',
@@ -1192,6 +1193,7 @@ export const en: Record<ForgePanelKey, string> = {
1192
1193
  'thread.onCommit': 'on {commit}',
1193
1194
  'thread.originally': 'Originally {range}',
1194
1195
  'thread.outdatedTag': 'Outdated',
1196
+ 'thread.lostTag': 'Commit missing',
1195
1197
  'thread.elsewhereTag': 'Not in the chosen commits',
1196
1198
  'thread.author': 'Author',
1197
1199
  'thread.bot': 'bot',
@@ -1452,7 +1454,6 @@ export const ja: Record<ForgePanelKey, string> = {
1452
1454
  'fold.less': '折りたたむ',
1453
1455
  'fold.name': '{label}(変更リクエスト)',
1454
1456
  'tab.title': '変更リクエスト',
1455
- 'header.attention': 'このセッションの変更リクエストに対応が必要です',
1456
1457
  'checkout.worktree': 'ワークツリー',
1457
1458
  'checkout.worktreeFrom': 'ワークツリー · 基点 {base}',
1458
1459
  'checkout.project': 'プロジェクトディレクトリ',
@@ -1479,6 +1480,7 @@ export const ja: Record<ForgePanelKey, string> = {
1479
1480
  'stream.failed': '変更リクエストパネルを読み込めませんでした',
1480
1481
  'change.number': '#{number}',
1481
1482
  'change.stateAria': '変更リクエストの状態:{state}',
1483
+ 'change.status': 'ステータス',
1482
1484
  'change.state.open': 'オープン',
1483
1485
  'change.state.blocked': '対応が必要',
1484
1486
  'change.state.draft': '下書き',
@@ -1615,7 +1617,6 @@ export const ja: Record<ForgePanelKey, string> = {
1615
1617
  'diff.scopeNote.unstaged': 'インデックスと比較、未追跡ファイルを含む',
1616
1618
  'diff.scopeNote.staged': 'インデックスと HEAD を比較',
1617
1619
  'diff.base.aria': '基準ブランチ:{base}',
1618
- 'diff.base.uncommitted': '未コミットの変更を含む',
1619
1620
  'diff.base.search': 'ブランチを検索',
1620
1621
  'diff.base.loading': 'ブランチを読み取り中…',
1621
1622
  'diff.base.empty': '一致するブランチがありません',
@@ -1688,6 +1689,7 @@ export const ja: Record<ForgePanelKey, string> = {
1688
1689
  'commits.missing': '選択したコミットは含まれなくなりました',
1689
1690
  'commits.notLinear': 'これらのコミットは 1 本の履歴上にありません',
1690
1691
  'commits.showAll': 'すべてのコミットを表示',
1692
+ 'commits.threadCommit': 'スレッドのコミット',
1691
1693
  'diff.noMatchingFiles': '一致するファイルがありません',
1692
1694
  'diff.refresh': '変更を更新',
1693
1695
  'diff.expandAll': 'すべてのファイルを展開',
@@ -1858,8 +1860,8 @@ export const ja: Record<ForgePanelKey, string> = {
1858
1860
  'toast.commandCopied': 'コマンドをコピーしました',
1859
1861
  'toast.expandFailed': '未変更の行を表示できませんでした:{message}',
1860
1862
  'toast.expandStale': '変更の読み取り後にファイルが更新されています。更新してから展開してください',
1861
- 'toast.prompted': '送信しました:{text}',
1862
- 'toast.promptFailed': 'メッセージを送信できませんでした',
1863
+ 'toast.promptFailed': '入力欄にリクエストを追加できません。後でもう一度お試しください。',
1864
+ 'toast.commitGone': 'このスレッドのコミット {commit} が見つかりません',
1863
1865
  'thread.list': 'スレッド',
1864
1866
  'thread.listAria': 'レビュースレッド(全 {count} 件)',
1865
1867
  'thread.close': 'スレッド一覧を閉じる',
@@ -1877,6 +1879,7 @@ export const ja: Record<ForgePanelKey, string> = {
1877
1879
  'thread.onCommit': '{commit} 上',
1878
1880
  'thread.originally': '元の位置 {range}',
1879
1881
  'thread.outdatedTag': '古い',
1882
+ 'thread.lostTag': 'コミットなし',
1880
1883
  'thread.elsewhereTag': '選択したコミットにない',
1881
1884
  'thread.author': '作成者',
1882
1885
  'thread.bot': 'bot',
@@ -2130,7 +2133,6 @@ export const es: Record<ForgePanelKey, string> = {
2130
2133
  'fold.less': 'Mostrar menos',
2131
2134
  'fold.name': '{label} (solicitudes de cambio)',
2132
2135
  'tab.title': 'Solicitudes de cambio',
2133
- 'header.attention': 'Las solicitudes de cambio de esta sesión requieren atención',
2134
2136
  'checkout.worktree': 'Árbol de trabajo',
2135
2137
  'checkout.worktreeFrom': 'Árbol de trabajo · desde {base}',
2136
2138
  'checkout.project': 'Directorio del proyecto',
@@ -2157,6 +2159,7 @@ export const es: Record<ForgePanelKey, string> = {
2157
2159
  'stream.failed': 'No se pudo cargar el panel de solicitudes de cambio',
2158
2160
  'change.number': '#{number}',
2159
2161
  'change.stateAria': 'Estado de la solicitud: {state}',
2162
+ 'change.status': 'Estado',
2160
2163
  'change.state.open': 'Abierta',
2161
2164
  'change.state.blocked': 'Requiere atención',
2162
2165
  'change.state.draft': 'Borrador',
@@ -2293,7 +2296,6 @@ export const es: Record<ForgePanelKey, string> = {
2293
2296
  'diff.scopeNote.unstaged': 'Comparado con el índice, incluidos los archivos sin seguimiento',
2294
2297
  'diff.scopeNote.staged': 'Índice comparado con HEAD',
2295
2298
  'diff.base.aria': 'Rama base: {base}',
2296
- 'diff.base.uncommitted': 'Incluye los cambios sin confirmar',
2297
2299
  'diff.base.search': 'Buscar ramas',
2298
2300
  'diff.base.loading': 'Leyendo ramas…',
2299
2301
  'diff.base.empty': 'No hay ramas coincidentes',
@@ -2366,6 +2368,7 @@ export const es: Record<ForgePanelKey, string> = {
2366
2368
  'commits.missing': 'Los commits seleccionados ya no están incluidos',
2367
2369
  'commits.notLinear': 'Estos commits no están en una misma línea del historial',
2368
2370
  'commits.showAll': 'Ver todos los commits',
2371
+ 'commits.threadCommit': 'Commit del hilo',
2369
2372
  'diff.noMatchingFiles': 'No hay archivos coincidentes',
2370
2373
  'diff.refresh': 'Actualizar cambios',
2371
2374
  'diff.expandAll': 'Expandir todos los archivos',
@@ -2536,8 +2539,8 @@ export const es: Record<ForgePanelKey, string> = {
2536
2539
  'toast.commandCopied': 'Comando copiado',
2537
2540
  'toast.expandFailed': 'No se pudieron mostrar las líneas sin cambios: {message}',
2538
2541
  'toast.expandStale': 'El archivo cambió después de leer sus cambios; actualiza antes de expandir',
2539
- 'toast.prompted': 'Enviado: {text}',
2540
- 'toast.promptFailed': 'No se pudo enviar el mensaje',
2542
+ 'toast.promptFailed': 'No se puede añadir la solicitud. Inténtalo más tarde.',
2543
+ 'toast.commitGone': 'No se encontró el commit de este hilo, {commit}',
2541
2544
  'thread.list': 'Hilos',
2542
2545
  'thread.listAria': 'Hilos de revisión, {count} en total',
2543
2546
  'thread.close': 'Cerrar la lista de hilos',
@@ -2555,6 +2558,7 @@ export const es: Record<ForgePanelKey, string> = {
2555
2558
  'thread.onCommit': 'en {commit}',
2556
2559
  'thread.originally': 'Originalmente {range}',
2557
2560
  'thread.outdatedTag': 'Desactualizado',
2561
+ 'thread.lostTag': 'Sin commit',
2558
2562
  'thread.elsewhereTag': 'No está en los commits elegidos',
2559
2563
  'thread.author': 'Autor',
2560
2564
  'thread.bot': 'bot',
@@ -2808,7 +2812,6 @@ export const fr: Record<ForgePanelKey, string> = {
2808
2812
  'fold.less': 'Afficher moins',
2809
2813
  'fold.name': '{label} (demandes de modification)',
2810
2814
  'tab.title': 'Demandes de modification',
2811
- 'header.attention': 'Les demandes de modification de cette session nécessitent une intervention',
2812
2815
  'checkout.worktree': 'Arbre de travail',
2813
2816
  'checkout.worktreeFrom': 'Arbre de travail · depuis {base}',
2814
2817
  'checkout.project': 'Dossier du projet',
@@ -2835,6 +2838,7 @@ export const fr: Record<ForgePanelKey, string> = {
2835
2838
  'stream.failed': 'Impossible de charger le panneau des demandes de modification',
2836
2839
  'change.number': '#{number}',
2837
2840
  'change.stateAria': 'État de la demande : {state}',
2841
+ 'change.status': 'État',
2838
2842
  'change.state.open': 'Ouverte',
2839
2843
  'change.state.blocked': 'Intervention requise',
2840
2844
  'change.state.draft': 'Brouillon',
@@ -2971,7 +2975,6 @@ export const fr: Record<ForgePanelKey, string> = {
2971
2975
  'diff.scopeNote.unstaged': 'Comparaison avec l’index, fichiers non suivis inclus',
2972
2976
  'diff.scopeNote.staged': 'Comparaison de l’index avec HEAD',
2973
2977
  'diff.base.aria': 'Branche de base : {base}',
2974
- 'diff.base.uncommitted': 'Modifications non commitées incluses',
2975
2978
  'diff.base.search': 'Rechercher des branches',
2976
2979
  'diff.base.loading': 'Lecture des branches…',
2977
2980
  'diff.base.empty': 'Aucune branche correspondante',
@@ -3044,6 +3047,7 @@ export const fr: Record<ForgePanelKey, string> = {
3044
3047
  'commits.missing': 'Les commits sélectionnés ne sont plus inclus',
3045
3048
  'commits.notLinear': 'Ces commits ne sont pas sur une même ligne d’historique',
3046
3049
  'commits.showAll': 'Afficher tous les commits',
3050
+ 'commits.threadCommit': 'Commit du fil',
3047
3051
  'diff.noMatchingFiles': 'Aucun fichier correspondant',
3048
3052
  'diff.refresh': 'Actualiser les modifications',
3049
3053
  'diff.expandAll': 'Développer tous les fichiers',
@@ -3214,8 +3218,8 @@ export const fr: Record<ForgePanelKey, string> = {
3214
3218
  'toast.commandCopied': 'Commande copiée',
3215
3219
  'toast.expandFailed': 'Impossible d’afficher les lignes inchangées : {message}',
3216
3220
  'toast.expandStale': 'Le fichier a changé depuis la lecture des modifications ; actualisez avant de développer',
3217
- 'toast.prompted': 'Envoyé : {text}',
3218
- 'toast.promptFailed': 'Impossible d’envoyer le message',
3221
+ 'toast.promptFailed': 'Impossible d’ajouter la demande. Réessayez plus tard.',
3222
+ 'toast.commitGone': 'Le commit de ce fil, {commit}, est introuvable',
3219
3223
  'thread.list': 'Fils',
3220
3224
  'thread.listAria': 'Fils de revue, {count} au total',
3221
3225
  'thread.close': 'Fermer la liste des fils',
@@ -3233,6 +3237,7 @@ export const fr: Record<ForgePanelKey, string> = {
3233
3237
  'thread.onCommit': 'sur {commit}',
3234
3238
  'thread.originally': 'À l’origine {range}',
3235
3239
  'thread.outdatedTag': 'Obsolète',
3240
+ 'thread.lostTag': 'Commit introuvable',
3236
3241
  'thread.elsewhereTag': 'Hors des commits choisis',
3237
3242
  'thread.author': 'Auteur',
3238
3243
  'thread.bot': 'bot',
@@ -3486,7 +3491,6 @@ export const de: Record<ForgePanelKey, string> = {
3486
3491
  'fold.less': 'Weniger anzeigen',
3487
3492
  'fold.name': '{label} (Änderungsanfragen)',
3488
3493
  'tab.title': 'Änderungsanfragen',
3489
- 'header.attention': 'Änderungsanfragen dieser Sitzung erfordern Aufmerksamkeit',
3490
3494
  'checkout.worktree': 'Arbeitsbaum',
3491
3495
  'checkout.worktreeFrom': 'Arbeitsbaum · aus {base}',
3492
3496
  'checkout.project': 'Projektverzeichnis',
@@ -3513,6 +3517,7 @@ export const de: Record<ForgePanelKey, string> = {
3513
3517
  'stream.failed': 'Das Panel für Änderungsanfragen konnte nicht geladen werden',
3514
3518
  'change.number': '#{number}',
3515
3519
  'change.stateAria': 'Status der Änderungsanfrage: {state}',
3520
+ 'change.status': 'Status',
3516
3521
  'change.state.open': 'Offen',
3517
3522
  'change.state.blocked': 'Aufmerksamkeit erforderlich',
3518
3523
  'change.state.draft': 'Entwurf',
@@ -3649,7 +3654,6 @@ export const de: Record<ForgePanelKey, string> = {
3649
3654
  'diff.scopeNote.unstaged': 'Vergleich mit dem Index, einschließlich nicht verfolgter Dateien',
3650
3655
  'diff.scopeNote.staged': 'Vergleich des Index mit HEAD',
3651
3656
  'diff.base.aria': 'Basis-Branch: {base}',
3652
- 'diff.base.uncommitted': 'Einschließlich nicht committeter Änderungen',
3653
3657
  'diff.base.search': 'Branches suchen',
3654
3658
  'diff.base.loading': 'Branches werden gelesen…',
3655
3659
  'diff.base.empty': 'Keine passenden Branches',
@@ -3722,6 +3726,7 @@ export const de: Record<ForgePanelKey, string> = {
3722
3726
  'commits.missing': 'Die gewählten Commits sind nicht mehr enthalten',
3723
3727
  'commits.notLinear': 'Diese Commits liegen nicht auf einer Verlaufslinie',
3724
3728
  'commits.showAll': 'Alle Commits anzeigen',
3729
+ 'commits.threadCommit': 'Commit des Threads',
3725
3730
  'diff.noMatchingFiles': 'Keine passenden Dateien',
3726
3731
  'diff.refresh': 'Änderungen aktualisieren',
3727
3732
  'diff.expandAll': 'Alle Dateien aufklappen',
@@ -3892,8 +3897,8 @@ export const de: Record<ForgePanelKey, string> = {
3892
3897
  'toast.commandCopied': 'Befehl kopiert',
3893
3898
  'toast.expandFailed': 'Unveränderte Zeilen konnten nicht angezeigt werden: {message}',
3894
3899
  'toast.expandStale': 'Die Datei wurde nach dem Lesen der Änderungen verändert; vor dem Aufklappen aktualisieren',
3895
- 'toast.prompted': 'Gesendet: {text}',
3896
- 'toast.promptFailed': 'Nachricht konnte nicht gesendet werden',
3900
+ 'toast.promptFailed': 'Die Anfrage kann noch nicht eingefügt werden. Versuche es später erneut.',
3901
+ 'toast.commitGone': 'Der Commit dieses Threads, {commit}, wurde nicht gefunden',
3897
3902
  'thread.list': 'Threads',
3898
3903
  'thread.listAria': 'Review-Threads, insgesamt {count}',
3899
3904
  'thread.close': 'Threadliste schließen',
@@ -3911,6 +3916,7 @@ export const de: Record<ForgePanelKey, string> = {
3911
3916
  'thread.onCommit': 'auf {commit}',
3912
3917
  'thread.originally': 'Ursprünglich {range}',
3913
3918
  'thread.outdatedTag': 'Veraltet',
3919
+ 'thread.lostTag': 'Commit fehlt',
3914
3920
  'thread.elsewhereTag': 'Nicht in den gewählten Commits',
3915
3921
  'thread.author': 'Autor',
3916
3922
  'thread.bot': 'Bot',
@@ -4164,7 +4170,6 @@ export const ru: Record<ForgePanelKey, string> = {
4164
4170
  'fold.less': 'Свернуть',
4165
4171
  'fold.name': '{label} (запросы на изменение)',
4166
4172
  'tab.title': 'Запросы на изменение',
4167
- 'header.attention': 'Запросы на изменение этого сеанса требуют внимания',
4168
4173
  'checkout.worktree': 'Рабочее дерево',
4169
4174
  'checkout.worktreeFrom': 'Рабочее дерево · на основе {base}',
4170
4175
  'checkout.project': 'Каталог проекта',
@@ -4191,6 +4196,7 @@ export const ru: Record<ForgePanelKey, string> = {
4191
4196
  'stream.failed': 'Не удалось загрузить панель запросов на изменение',
4192
4197
  'change.number': '#{number}',
4193
4198
  'change.stateAria': 'Состояние запроса: {state}',
4199
+ 'change.status': 'Статус',
4194
4200
  'change.state.open': 'Открыт',
4195
4201
  'change.state.blocked': 'Требует внимания',
4196
4202
  'change.state.draft': 'Черновик',
@@ -4327,7 +4333,6 @@ export const ru: Record<ForgePanelKey, string> = {
4327
4333
  'diff.scopeNote.unstaged': 'Сравнение с индексом, включая неотслеживаемые файлы',
4328
4334
  'diff.scopeNote.staged': 'Сравнение индекса с HEAD',
4329
4335
  'diff.base.aria': 'Базовая ветка: {base}',
4330
- 'diff.base.uncommitted': 'Включая изменения без коммита',
4331
4336
  'diff.base.search': 'Поиск веток',
4332
4337
  'diff.base.loading': 'Чтение веток…',
4333
4338
  'diff.base.empty': 'Нет подходящих веток',
@@ -4400,6 +4405,7 @@ export const ru: Record<ForgePanelKey, string> = {
4400
4405
  'commits.missing': 'Выбранные коммиты больше не входят в список',
4401
4406
  'commits.notLinear': 'Эти коммиты не лежат на одной линии истории',
4402
4407
  'commits.showAll': 'Показать все коммиты',
4408
+ 'commits.threadCommit': 'Коммит обсуждения',
4403
4409
  'diff.noMatchingFiles': 'Нет подходящих файлов',
4404
4410
  'diff.refresh': 'Обновить изменения',
4405
4411
  'diff.expandAll': 'Развернуть все файлы',
@@ -4570,8 +4576,8 @@ export const ru: Record<ForgePanelKey, string> = {
4570
4576
  'toast.commandCopied': 'Команда скопирована',
4571
4577
  'toast.expandFailed': 'Не удалось показать неизменённые строки: {message}',
4572
4578
  'toast.expandStale': 'Файл изменился после чтения изменений; обновите перед разворачиванием',
4573
- 'toast.prompted': 'Отправлено: {text}',
4574
- 'toast.promptFailed': 'Не удалось отправить сообщение',
4579
+ 'toast.promptFailed': 'Не удалось добавить запрос. Повторите попытку позже.',
4580
+ 'toast.commitGone': 'Коммит этого обсуждения, {commit}, не найден',
4575
4581
  'thread.list': 'Обсуждения',
4576
4582
  'thread.listAria': 'Обсуждения ревью, всего {count}',
4577
4583
  'thread.close': 'Закрыть список обсуждений',
@@ -4589,6 +4595,7 @@ export const ru: Record<ForgePanelKey, string> = {
4589
4595
  'thread.onCommit': 'в {commit}',
4590
4596
  'thread.originally': 'Изначально {range}',
4591
4597
  'thread.outdatedTag': 'Устарело',
4598
+ 'thread.lostTag': 'Коммит не найден',
4592
4599
  'thread.elsewhereTag': 'Нет в выбранных коммитах',
4593
4600
  'thread.author': 'Автор',
4594
4601
  'thread.bot': 'бот',
@@ -4842,7 +4849,6 @@ export const pt: Record<ForgePanelKey, string> = {
4842
4849
  'fold.less': 'Mostrar menos',
4843
4850
  'fold.name': '{label} (solicitações de alteração)',
4844
4851
  'tab.title': 'Solicitações de alteração',
4845
- 'header.attention': 'As solicitações de alteração desta sessão precisam de atenção',
4846
4852
  'checkout.worktree': 'Árvore de trabalho',
4847
4853
  'checkout.worktreeFrom': 'Árvore de trabalho · a partir de {base}',
4848
4854
  'checkout.project': 'Diretório do projeto',
@@ -4869,6 +4875,7 @@ export const pt: Record<ForgePanelKey, string> = {
4869
4875
  'stream.failed': 'Não foi possível carregar o painel de solicitações de alteração',
4870
4876
  'change.number': '#{number}',
4871
4877
  'change.stateAria': 'Status da solicitação: {state}',
4878
+ 'change.status': 'Status',
4872
4879
  'change.state.open': 'Aberta',
4873
4880
  'change.state.blocked': 'Precisa de atenção',
4874
4881
  'change.state.draft': 'Rascunho',
@@ -5005,7 +5012,6 @@ export const pt: Record<ForgePanelKey, string> = {
5005
5012
  'diff.scopeNote.unstaged': 'Comparação com o índice, incluindo arquivos não rastreados',
5006
5013
  'diff.scopeNote.staged': 'Comparação do índice com HEAD',
5007
5014
  'diff.base.aria': 'Branch base: {base}',
5008
- 'diff.base.uncommitted': 'Incluindo alterações sem commit',
5009
5015
  'diff.base.search': 'Pesquisar branches',
5010
5016
  'diff.base.loading': 'Lendo branches…',
5011
5017
  'diff.base.empty': 'Nenhuma branch correspondente',
@@ -5078,6 +5084,7 @@ export const pt: Record<ForgePanelKey, string> = {
5078
5084
  'commits.missing': 'Os commits selecionados não estão mais incluídos',
5079
5085
  'commits.notLinear': 'Esses commits não estão em uma mesma linha do histórico',
5080
5086
  'commits.showAll': 'Ver todos os commits',
5087
+ 'commits.threadCommit': 'Commit da discussão',
5081
5088
  'diff.noMatchingFiles': 'Nenhum arquivo correspondente',
5082
5089
  'diff.refresh': 'Atualizar alterações',
5083
5090
  'diff.expandAll': 'Expandir todos os arquivos',
@@ -5248,8 +5255,8 @@ export const pt: Record<ForgePanelKey, string> = {
5248
5255
  'toast.commandCopied': 'Comando copiado',
5249
5256
  'toast.expandFailed': 'Não foi possível mostrar as linhas sem alterações: {message}',
5250
5257
  'toast.expandStale': 'O arquivo mudou após a leitura das alterações; atualize antes de expandir',
5251
- 'toast.prompted': 'Enviado: {text}',
5252
- 'toast.promptFailed': 'Não foi possível enviar a mensagem',
5258
+ 'toast.promptFailed': 'Não foi possível adicionar a solicitação. Tente novamente mais tarde.',
5259
+ 'toast.commitGone': 'O commit desta discussão, {commit}, não foi encontrado',
5253
5260
  'thread.list': 'Discussões',
5254
5261
  'thread.listAria': 'Discussões de revisão, {count} no total',
5255
5262
  'thread.close': 'Fechar a lista de discussões',
@@ -5267,6 +5274,7 @@ export const pt: Record<ForgePanelKey, string> = {
5267
5274
  'thread.onCommit': 'em {commit}',
5268
5275
  'thread.originally': 'Originalmente {range}',
5269
5276
  'thread.outdatedTag': 'Desatualizada',
5277
+ 'thread.lostTag': 'Commit ausente',
5270
5278
  'thread.elsewhereTag': 'Fora dos commits escolhidos',
5271
5279
  'thread.author': 'Autor',
5272
5280
  'thread.bot': 'bot',
@@ -0,0 +1,19 @@
1
+ /** The time that relative times such as "5 minutes ago" are counted from, read again as they change. */
2
+
3
+ import { useEffect, useState } from 'react'
4
+
5
+ /** Relative times name minutes at their finest. */
6
+ const MINUTE_MS = 60_000
7
+
8
+ /**
9
+ * Read the current time when the component mounts and once a minute while it stays mounted.
10
+ * @returns epoch milliseconds of the latest reading.
11
+ */
12
+ export function useMinuteClock(): number {
13
+ const [now, setNow] = useState(() => Date.now())
14
+ useEffect(() => {
15
+ const timer = setInterval(() => { setNow(Date.now()) }, MINUTE_MS)
16
+ return () => { clearInterval(timer) }
17
+ }, [])
18
+ return now
19
+ }
@@ -31,7 +31,6 @@ import { ViewedFiles } from './viewed-files.ts'
31
31
  import { formatReviewComment, reviewQuoteSummary, type ReviewSelection } from './review.ts'
32
32
  import { formatThreadQuote, threadQuoteSummary } from './review-threads.ts'
33
33
  import { ActionToast } from './ActionToast.tsx'
34
- import { AttentionIndicator, type AttentionIndicatorInjected } from './AttentionIndicator.tsx'
35
34
  import { CHANGES_ID, CHANGES_KIND, changesAddress, changesDefinition, parseChangesAddress, type ChangesSource } from './changes-address.ts'
36
35
  import {
37
36
  ChangeRequestsActions, ChangeRequestsSection, type ChangeRequestsActionsInjected, type ChangeRequestsSectionInjected,
@@ -120,6 +119,19 @@ function registerUi(ctx: Context): void {
120
119
  const notices = createNoticeSource()
121
120
  const lifetime = new AbortController()
122
121
  ctx.effect(() => () => { lifetime.abort() })
122
+ /**
123
+ * Wait for a scheduled cleanup to finish and report a failure; `retained` restores the plain
124
+ * single-Session notice only when that notice announced the cleanup.
125
+ */
126
+ const followCleanup = (sessionId: SessionId, revision: number, announced: boolean): void => {
127
+ void ctx.remote.forgePanel.worktreeCleanup(sessionId, revision).then((completed) => {
128
+ if (lifetime.signal.aborted || !completed.ok || completed.value === null) return
129
+ if (completed.value.status === 'failed') ctx.emit('workspace/archive-followup-failed', sessionId, t('toast.archiveCleanupFailed'))
130
+ else if (announced && completed.value.status === 'retained') ctx.emit('workspace/archive-followup-settled', sessionId)
131
+ }).catch((error: unknown) => {
132
+ if (!lifetime.signal.aborted) console.warn('archive worktree cleanup result unavailable:', error)
133
+ })
134
+ }
123
135
  ctx.on('workspace/archive-notice', async (sessionId, next) => {
124
136
  const fallback = await next()
125
137
  const result = await ctx.remote.forgePanel.worktreeCleanup(sessionId, null)
@@ -127,15 +139,22 @@ function registerUi(ctx: Context): void {
127
139
  const { revision, status } = result.value
128
140
  if (status === 'failed') return { text: t('toast.archiveCleanupFailed'), tone: 'warning' }
129
141
  if (status !== 'scheduled') return fallback
130
- void ctx.remote.forgePanel.worktreeCleanup(sessionId, revision).then((completed) => {
131
- if (lifetime.signal.aborted || !completed.ok || completed.value === null) return
132
- if (completed.value.status === 'failed') ctx.emit('workspace/archive-followup-failed', sessionId, t('toast.archiveCleanupFailed'))
133
- else if (completed.value.status === 'retained') ctx.emit('workspace/archive-followup-settled', sessionId)
134
- }).catch((error: unknown) => {
135
- if (!lifetime.signal.aborted) console.warn('archive worktree cleanup result unavailable:', error)
136
- })
142
+ followCleanup(sessionId, revision, true)
137
143
  return { text: t('toast.archiveCleanupScheduled'), tone: 'success' }
138
144
  })
145
+ // A Workspace archive announces only its count, so cleanup reports just failures, per Session.
146
+ ctx.on('workspace/sessions-archived', (sessionIds) => {
147
+ for (const sessionId of sessionIds) {
148
+ ctx.remote.forgePanel.worktreeCleanup(sessionId, null).then((result) => {
149
+ if (lifetime.signal.aborted || !result.ok || result.value === null) return
150
+ const { revision, status } = result.value
151
+ if (status === 'failed') ctx.emit('workspace/archive-followup-failed', sessionId, t('toast.archiveCleanupFailed'))
152
+ else if (status === 'scheduled') followCleanup(sessionId, revision, false)
153
+ }).catch((error: unknown) => {
154
+ if (!lifetime.signal.aborted) console.warn('archive worktree cleanup state unavailable:', error)
155
+ })
156
+ }
157
+ })
139
158
  /**
140
159
  * Follow a Session's panel only after its own history connection opened: the Host resolves the `follow` argument
141
160
  * by resuming the Session's Agent, which would otherwise read the Session log a second time beside that opening.
@@ -246,18 +265,20 @@ function registerUi(ctx: Context): void {
246
265
  }
247
266
  const copyText = (text: string): void => { copy(text, 'toast.copied') }
248
267
  const copyPath = (path: string): void => { copy(path, 'toast.pathCopied') }
249
- /** Send the request for a change request to the Session as a message from the user. */
268
+ /**
269
+ * Put the request for a change request into the Session's main input, after any draft there, and hand the input the
270
+ * keyboard; the user sends it. The text arriving under the caret is the feedback, so only a failure is reported.
271
+ */
250
272
  const createChangeRequest = (sessionId: SessionId): void => {
251
- const text = t('changes.local.prompt')
252
- const conversation = ctx.sessions.scope(sessionId)?.get('conversation')
253
- if (conversation === undefined) {
273
+ const scope = ctx.sessions.scope(sessionId)
274
+ const binding = ctx.sessions.binding(sessionId)
275
+ const conversation = scope?.get('conversation')
276
+ if (scope === undefined || binding === undefined || conversation === undefined
277
+ || conversation.input.requestDraftInitialization(binding, { prompt: t('changes.local.prompt'), whenDraftExists: 'append' }) !== 'applied') {
254
278
  notices.report('toast.promptFailed')
255
279
  return
256
280
  }
257
- void conversation.send(text).then(
258
- () => { notices.report('toast.prompted', { tone: 'success', params: { text } }) },
259
- () => { notices.report('toast.promptFailed') },
260
- )
281
+ conversation.input.for(scope).focus()
261
282
  }
262
283
  /** Insert one quote into the Session's main input, numbering it after the quotes of the same heading already there. */
263
284
  const quoteInInput = (sessionId: SessionId, heading: RegExp, quote: (index: number) => string, summary: QuoteSummary): boolean => {
@@ -316,17 +337,39 @@ function registerUi(ctx: Context): void {
316
337
  const openChanges = (sessionId: SessionId, source: ChangesSource): void => {
317
338
  ctx.sidebarRight.openResourceIn(sessionId, changesAddress({ sessionId, source }))
318
339
  }
340
+ /** The actions the status rows of a Session's change request run, on its card and in its changes view. */
341
+ const statusActions = (sessionId: SessionId): ChangesTabInjected['changeActions'] => ({
342
+ readChecks: async (url, headSha, signal) => {
343
+ const result = await ctx.remote.forgePanel.changeRequestChecks(sessionId, url, headSha, signal)
344
+ if (!result.ok) throw new Error(result.error.message)
345
+ return result.value
346
+ },
347
+ rerunChecks: async (entry, request) => {
348
+ reportAction(entry, await ctx.remote.forgePanel.rerunChecks(sessionId, entry.url, request),
349
+ { done: 'toast.rerunRequested', stale: 'toast.rerunStale', failed: 'toast.rerunFailed' })
350
+ },
351
+ requestReviews: async (entry, reviewers) => {
352
+ reportAction(entry, await ctx.remote.forgePanel.requestReviews(sessionId, entry.url, reviewers),
353
+ { done: 'toast.reviewRequested', failed: 'toast.reviewRequestFailed' },
354
+ { login: reviewers.map(reviewer => reviewer.login).join(', ') })
355
+ },
356
+ reviewerCandidates: async (url, query, signal) => {
357
+ const result = await ctx.remote.forgePanel.reviewerCandidates(sessionId, url, query, signal)
358
+ if (!result.ok) throw new Error(result.error.message)
359
+ return result.value
360
+ },
361
+ updateBranch: async (entry, request) => {
362
+ reportAction(entry, await ctx.remote.forgePanel.updateBranch(sessionId, entry.url, request.method, request.headSha),
363
+ { done: 'toast.branchUpdated', stale: 'toast.branchUpdateStale', failed: 'toast.branchUpdateFailed' })
364
+ },
365
+ })
319
366
  const sectionFace = (sessionId: SessionId): ChangeRequestsSectionInjected => {
320
367
  const store = storesOf(sessionId)
321
368
  return {
322
369
  hooks: { panel: store.panel.hooks.panel, locale },
323
370
  refresh: refreshOf(sessionId),
324
371
  remove: (entry) => { remove(sessionId, entry) },
325
- readChecks: async (url, headSha, signal) => {
326
- const result = await ctx.remote.forgePanel.changeRequestChecks(sessionId, url, headSha, signal)
327
- if (!result.ok) throw new Error(result.error.message)
328
- return result.value
329
- },
372
+ ...statusActions(sessionId),
330
373
  markReady: async (entry) => {
331
374
  reportAction(entry, await ctx.remote.forgePanel.markReady(sessionId, entry.url),
332
375
  { done: 'toast.markedReady', failed: 'toast.markReadyFailed' })
@@ -339,24 +382,6 @@ function registerUi(ctx: Context): void {
339
382
  reportAction(entry, await ctx.remote.forgePanel.setAutoMerge(sessionId, entry.url, request),
340
383
  { done: request.enabled ? 'toast.autoMergeEnabled' : 'toast.autoMergeCancelled', stale: 'toast.autoMergeStale', failed: 'toast.autoMergeFailed' })
341
384
  },
342
- rerunChecks: async (entry, request) => {
343
- reportAction(entry, await ctx.remote.forgePanel.rerunChecks(sessionId, entry.url, request),
344
- { done: 'toast.rerunRequested', stale: 'toast.rerunStale', failed: 'toast.rerunFailed' })
345
- },
346
- requestReviews: async (entry, reviewers) => {
347
- reportAction(entry, await ctx.remote.forgePanel.requestReviews(sessionId, entry.url, reviewers),
348
- { done: 'toast.reviewRequested', failed: 'toast.reviewRequestFailed' },
349
- { login: reviewers.map(reviewer => reviewer.login).join(', ') })
350
- },
351
- reviewerCandidates: async (url, query, signal) => {
352
- const result = await ctx.remote.forgePanel.reviewerCandidates(sessionId, url, query, signal)
353
- if (!result.ok) throw new Error(result.error.message)
354
- return result.value
355
- },
356
- updateBranch: async (entry, request) => {
357
- reportAction(entry, await ctx.remote.forgePanel.updateBranch(sessionId, entry.url, request.method, request.headSha),
358
- { done: 'toast.branchUpdated', stale: 'toast.branchUpdateStale', failed: 'toast.branchUpdateFailed' })
359
- },
360
385
  openLink,
361
386
  copyText,
362
387
  viewChanges: (entry) => { openChanges(sessionId, { kind: 'change', url: entry.url }) },
@@ -383,9 +408,6 @@ function registerUi(ctx: Context): void {
383
408
  hooks: { panel: storesOf(sessionId).panel.hooks.panel },
384
409
  reconnect: storesOf(sessionId).panel.reconnect,
385
410
  })
386
- const attentionFace = (sessionId: SessionId): AttentionIndicatorInjected => ({
387
- hooks: { panel: storesOf(sessionId).panel.hooks.panel },
388
- })
389
411
  const changesFace = (sessionId: SessionId): ChangesTabInjected => {
390
412
  const store = storesOf(sessionId)
391
413
  return {
@@ -393,7 +415,8 @@ function registerUi(ctx: Context): void {
393
415
  panel: visibility => visibility === 'visible' ? store.panel.hooks.panel : undefined,
394
416
  annotations: address => annotationsOf(store, address),
395
417
  },
396
- hooks: { lenses: changes.lenses, extensions: extensionSource.observable },
418
+ hooks: { lenses: changes.lenses, extensions: extensionSource.observable, locale },
419
+ changeActions: statusActions(sessionId),
397
420
  changesLens: (request, signal) => ctx.remote.forgePanel.changesLens(sessionId, request, signal),
398
421
  reconnect: store.panel.reconnect,
399
422
  localDiff: (scope, signal) => ctx.remote.forgePanel.localDiff(sessionId, scope, signal),
@@ -506,14 +529,6 @@ function registerUi(ctx: Context): void {
506
529
  name: 'conversation.session.panel.environment.row', id: 'forge.connection', order: 40, locale: NS, inject: connectionFace,
507
530
  }, ConnectionRow)
508
531
  })
509
- ctx.slots.inject('conversation.session.panel.indicator', () => ctx.slots.register({
510
- name: 'conversation.session.panel.indicator',
511
- id: 'forge.attention',
512
- // Paints above running dots: what needs attention outranks what merely runs.
513
- order: 100,
514
- locale: NS,
515
- inject: attentionFace,
516
- }, AttentionIndicator))
517
532
  ctx.effect(() => ctx.sidebarRightTabs.register(changesDefinition(t)), 'forge-panel: changes tab')
518
533
  ctx.slots.inject('sidebar.right.pane.tab', () => ctx.slots.register({
519
534
  name: 'sidebar.right.pane.tab', key: CHANGES_ID, locale: NS, store: createChangesStore(), inject: changesFace,
@@ -3,7 +3,7 @@
3
3
  * oldest first, and the field that adds a comment.
4
4
  */
5
5
 
6
- import { useEffect, useMemo, useRef, useState, type ReactNode } from 'react'
6
+ import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from 'react'
7
7
  import clsx from 'clsx'
8
8
  import {
9
9
  Button, IconBranchOutlineRegular, IconCheckCircleOutlineRegular, IconChevronDownOutlineRegular, IconClockOutlineRegular,
@@ -319,7 +319,7 @@ function Composer({ url, forge, comment, onPosted, t }: {
319
319
  element?.style.setProperty('height', `${element.scrollHeight}px`)
320
320
  }, [text])
321
321
  // One comment is sent at a time; the field stays focused and read-only meanwhile.
322
- const post = async (): Promise<void> => {
322
+ const post = useCallback(async (): Promise<void> => {
323
323
  if (busy || text.trim() === '') return
324
324
  setBusy(true)
325
325
  setError(null)
@@ -333,7 +333,8 @@ function Composer({ url, forge, comment, onPosted, t }: {
333
333
  } else {
334
334
  setError(t('reviewPage.activity.commentFailed', { message: result.error.message }))
335
335
  }
336
- }
336
+ }, [busy, comment, forge, onPosted, t, text, url])
337
+ const send = useCallback((): void => { void post() }, [post])
337
338
  return (
338
339
  <div className={css.activityCompose}>
339
340
  <div className={css.activityComposer} aria-busy={busy}>
@@ -351,7 +352,7 @@ function Composer({ url, forge, comment, onPosted, t }: {
351
352
  </span>
352
353
  <span className={css.activityComposerKeys} aria-hidden="true"><ShortcutKeys keys={keys} /></span>
353
354
  <Button size="sm" variant="primary" className={css.activitySend} disabled={busy || text.trim() === ''}
354
- onClick={() => { void post() }}>
355
+ onClick={send}>
355
356
  {t(busy ? 'reviewPage.activity.commenting' : 'reviewPage.activity.comment')}
356
357
  </Button>
357
358
  </div>