arco-workbench 0.1.3 → 0.1.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 (296) hide show
  1. package/CONTRIBUTING.md +1 -1
  2. package/README.md +5 -1
  3. package/client/dist/assets/{PhosphorBackdrop-CkVIGkeX.js → PhosphorBackdrop-CNumba2X.js} +1 -1
  4. package/client/dist/assets/{ThemedBackgroundShaderImpl-DHF7CnpE.js → ThemedBackgroundShaderImpl-DX5KyCt3.js} +1 -1
  5. package/client/dist/assets/{XtermView-SY0UcZUS.js → XtermView-DhS5g8Rt.js} +1 -1
  6. package/client/dist/assets/{galleryEditor-Ca4F8HiM.js → galleryEditor-fPb76Cjv.js} +1 -1
  7. package/client/dist/assets/index-CjkHb-_n.js +592 -0
  8. package/client/dist/assets/index-DIbh3ae5.css +1 -0
  9. package/client/dist/index.html +2 -2
  10. package/client/src/App.tsx +2 -0
  11. package/client/src/alerts/desktopAlerts.ts +13 -1
  12. package/client/src/brief/briefFacts.ts +22 -0
  13. package/client/src/brief/briefFromStore.ts +7 -2
  14. package/client/src/components/ArtifactMoveDialog.tsx +64 -0
  15. package/client/src/components/BriefControl.tsx +38 -47
  16. package/client/src/components/CatchMeUp.tsx +25 -25
  17. package/client/src/components/CheckpointActions.tsx +7 -4
  18. package/client/src/components/ClusterComposerButtons.tsx +6 -3
  19. package/client/src/components/ClusterPlanTab.tsx +15 -1
  20. package/client/src/components/ClusterRightPanel/AutoPickupControl.tsx +6 -2
  21. package/client/src/components/ClusterTab.tsx +33 -3
  22. package/client/src/components/ClusterTaskBoardTab.tsx +62 -8
  23. package/client/src/components/DialogShell.tsx +115 -0
  24. package/client/src/components/DocsUpdateDialog.tsx +16 -42
  25. package/client/src/components/ForwardMessages.tsx +28 -32
  26. package/client/src/components/GitDialog.tsx +52 -52
  27. package/client/src/components/GitOtherWork.tsx +4 -2
  28. package/client/src/components/HandoffDialog.tsx +19 -45
  29. package/client/src/components/Home/HomeView.tsx +36 -8
  30. package/client/src/components/Home/home.css +7 -0
  31. package/client/src/components/KeepButton.tsx +23 -0
  32. package/client/src/components/MdTuneupDialog.tsx +52 -51
  33. package/client/src/components/MemberCard.tsx +4 -1
  34. package/client/src/components/MemberPane.tsx +1 -1
  35. package/client/src/components/NotificationCenter.tsx +4 -3
  36. package/client/src/components/NotificationChannelsSettings.tsx +25 -7
  37. package/client/src/components/PlanCandidateBanner.tsx +111 -57
  38. package/client/src/components/PlanComposerDialog.tsx +55 -87
  39. package/client/src/components/ProjectStateNotice.tsx +60 -0
  40. package/client/src/components/PublicProjectBox.tsx +25 -0
  41. package/client/src/components/ResearchDialog.tsx +15 -24
  42. package/client/src/components/ReviewDialog.tsx +32 -57
  43. package/client/src/components/RightPanel/OutputsPanel.tsx +4 -0
  44. package/client/src/components/RightPanel/PlanTab.tsx +24 -2
  45. package/client/src/components/RightPanel/UsageTab.tsx +77 -1
  46. package/client/src/components/SkillEditorDialog.tsx +38 -73
  47. package/client/src/components/SpawnDialog.tsx +19 -41
  48. package/client/src/components/StorageWarnings.tsx +21 -0
  49. package/client/src/components/SystemHeader.tsx +2 -2
  50. package/client/src/components/TerminalInput.tsx +6 -2
  51. package/client/src/components/TidyComposer.tsx +24 -41
  52. package/client/src/components/TranscriptSendDialog.tsx +151 -202
  53. package/client/src/components/UtilityAgentPicker.tsx +4 -2
  54. package/client/src/components/WorkflowCreator/index.tsx +2 -0
  55. package/client/src/components/WorkflowView.tsx +4 -1
  56. package/client/src/components/clusterNeedsYou.ts +35 -3
  57. package/client/src/components/compare/CompareDialog.tsx +26 -2
  58. package/client/src/components/terminalInput/planDraft.ts +33 -4
  59. package/client/src/components/utilityResult.ts +5 -1
  60. package/client/src/explorer/ExplorerApp.tsx +5 -2
  61. package/client/src/explorer/PlansLens.tsx +60 -19
  62. package/client/src/explorer/StorageLens.tsx +275 -0
  63. package/client/src/explorer/launch.ts +3 -3
  64. package/client/src/explorer/plansGrouping.ts +15 -0
  65. package/client/src/help/content/cluster.tsx +42 -7
  66. package/client/src/help/content/composer.tsx +26 -6
  67. package/client/src/help/content/header.tsx +16 -14
  68. package/client/src/help/content/misc.tsx +141 -6
  69. package/client/src/help/content/rightPanel.tsx +16 -0
  70. package/client/src/help/content/settings.tsx +4 -4
  71. package/client/src/help/manualSections/actions.tsx +19 -4
  72. package/client/src/help/manualSections/clusters.tsx +29 -16
  73. package/client/src/help/manualSections/configuration.tsx +6 -4
  74. package/client/src/help/manualSections/maintenance.tsx +27 -5
  75. package/client/src/help/manualSections/plans.tsx +96 -2
  76. package/client/src/help/manualSections/powerFeatures.tsx +2 -2
  77. package/client/src/help/manualSections/reference.tsx +6 -0
  78. package/client/src/help/manualSections/workspace.tsx +9 -5
  79. package/client/src/stores/appStore.ts +10 -1
  80. package/client/src/stores/appStore.types.ts +2 -0
  81. package/client/src/stores/mdTuneupStore.ts +5 -4
  82. package/client/src/stores/memoryTrim.ts +18 -2
  83. package/client/src/stores/storageWarningStore.ts +18 -0
  84. package/client/src/utils/gitDialogMemory.ts +26 -0
  85. package/client/src/utils/historyEvents.ts +1 -0
  86. package/client/src/utils/homeModel.ts +19 -0
  87. package/client/src/utils/publicProject.ts +56 -0
  88. package/client/src/ws/handleServerMessage.ts +7 -2
  89. package/docs/ARCHITECTURE.md +1 -1
  90. package/docs/CHECKPOINTS.md +2 -0
  91. package/docs/CLIENT.md +29 -11
  92. package/docs/FEATURES.md +14 -11
  93. package/docs/GETTING_STARTED.md +7 -7
  94. package/docs/GLOSSARY.md +3 -3
  95. package/docs/GOTCHAS.md +3 -2
  96. package/docs/HTTP_API.md +31 -1
  97. package/docs/NOTIFICATIONS.md +13 -14
  98. package/docs/OPERATIONS.md +27 -1
  99. package/docs/OPERATOR_ACTIONS.md +1 -1
  100. package/docs/OUTPUTS.md +9 -0
  101. package/docs/PERSISTENCE.md +34 -4
  102. package/docs/PLAN_OR_BOARD.md +7 -0
  103. package/docs/PRIMITIVES.md +3 -3
  104. package/docs/PROTOCOL.md +14 -4
  105. package/docs/PROTOCOL_CLUSTER.md +3 -2
  106. package/docs/SERVICE_MODE.md +5 -1
  107. package/docs/SETTINGS.md +8 -6
  108. package/docs/STORAGE_PLAN.md +324 -0
  109. package/docs/TASK_LEDGER.md +5 -4
  110. package/native/linux-arm64/manifest.json +1 -1
  111. package/node_modules/@arco/shared/dist/index.d.ts +2 -0
  112. package/node_modules/@arco/shared/dist/index.js +2 -0
  113. package/node_modules/@arco/shared/dist/protocol/autoPickup.d.ts +1 -1
  114. package/node_modules/@arco/shared/dist/protocol/autoPickup.js +1 -1
  115. package/node_modules/@arco/shared/dist/protocol/checkpoints.d.ts +1 -0
  116. package/node_modules/@arco/shared/dist/protocol/clusters.d.ts +2 -1
  117. package/node_modules/@arco/shared/dist/protocol/index.d.ts +1 -0
  118. package/node_modules/@arco/shared/dist/protocol/index.js +1 -0
  119. package/node_modules/@arco/shared/dist/protocol/mdTuneup.d.ts +6 -0
  120. package/node_modules/@arco/shared/dist/protocol/notifications.d.ts +2 -1
  121. package/node_modules/@arco/shared/dist/protocol/notifications.js +3 -2
  122. package/node_modules/@arco/shared/dist/protocol/plans.d.ts +2 -0
  123. package/node_modules/@arco/shared/dist/protocol/serverMessages.d.ts +2 -1
  124. package/node_modules/@arco/shared/dist/protocol/storage.d.ts +21 -0
  125. package/node_modules/@arco/shared/dist/protocol/storage.js +3 -0
  126. package/node_modules/@arco/shared/dist/protocol/tasks.d.ts +3 -0
  127. package/node_modules/@arco/shared/dist/protocol/utilityAgent.d.ts +2 -2
  128. package/node_modules/@arco/shared/dist/protocol/utilityAgent.js +2 -2
  129. package/node_modules/@arco/shared/dist/publicGuardrails.d.ts +7 -0
  130. package/node_modules/@arco/shared/dist/publicGuardrails.js +47 -0
  131. package/node_modules/@arco/shared/dist/publicSafetyRules.d.ts +1 -0
  132. package/node_modules/@arco/shared/dist/publicSafetyRules.js +6 -0
  133. package/node_modules/@arco/shared/package.json +1 -1
  134. package/package.json +3 -2
  135. package/scripts/packaging/arco.mjs +17 -1
  136. package/scripts/packaging/services.mjs +35 -5
  137. package/scripts/packaging/storage.mjs +125 -0
  138. package/scripts/packaging/update.mjs +3 -3
  139. package/server/dist/artifactCopy.d.ts +26 -0
  140. package/server/dist/artifactCopy.js +398 -0
  141. package/server/dist/atomicFile.d.ts +1 -0
  142. package/server/dist/atomicFile.js +1 -1
  143. package/server/dist/attention.d.ts +1 -1
  144. package/server/dist/attention.js +10 -13
  145. package/server/dist/catchUp.d.ts +2 -0
  146. package/server/dist/catchUp.js +46 -23
  147. package/server/dist/clusterPeerOps.d.ts +2 -0
  148. package/server/dist/clusterPeerOps.js +2 -0
  149. package/server/dist/clusterSnapshots.js +22 -12
  150. package/server/dist/eventLog.d.ts +55 -0
  151. package/server/dist/eventLog.js +792 -0
  152. package/server/dist/explorerLaunch.d.ts +4 -1
  153. package/server/dist/explorerLaunch.js +3 -2
  154. package/server/dist/explorerPlans.d.ts +4 -0
  155. package/server/dist/explorerPlans.js +27 -2
  156. package/server/dist/http/clusterRoutes.js +2 -0
  157. package/server/dist/http/explorerRoutes.js +2 -1
  158. package/server/dist/http/publicProjectRoutes.d.ts +2 -0
  159. package/server/dist/http/publicProjectRoutes.js +68 -0
  160. package/server/dist/http/router.js +6 -0
  161. package/server/dist/http/storageRoutes.d.ts +2 -0
  162. package/server/dist/http/storageRoutes.js +254 -0
  163. package/server/dist/http/usageStatsRoutes.js +3 -12
  164. package/server/dist/index.js +4 -0
  165. package/server/dist/keepStore.d.ts +16 -0
  166. package/server/dist/keepStore.js +119 -0
  167. package/server/dist/management/clusterActivity.js +6 -20
  168. package/server/dist/management/initHubLink.js +10 -43
  169. package/server/dist/mcp/clusterMcpTools.js +8 -1
  170. package/server/dist/notifications.d.ts +3 -1
  171. package/server/dist/notifications.js +5 -4
  172. package/server/dist/outputStore.d.ts +1 -0
  173. package/server/dist/outputStore.js +1 -1
  174. package/server/dist/outputs.js +39 -8
  175. package/server/dist/planHistory.d.ts +3 -0
  176. package/server/dist/planHistory.js +60 -0
  177. package/server/dist/primitives/runMdTuneup.d.ts +5 -1
  178. package/server/dist/primitives/runMdTuneup.js +43 -2
  179. package/server/dist/project/taskLedger.d.ts +4 -0
  180. package/server/dist/project/taskLedger.js +19 -0
  181. package/server/dist/providers/claude-native/peerTools.js +4 -0
  182. package/server/dist/providers/claude-native/resumeSummary.js +30 -19
  183. package/server/dist/providers/index.js +8 -13
  184. package/server/dist/providers/localProviderQueue.d.ts +2 -0
  185. package/server/dist/providers/localProviderQueue.js +11 -0
  186. package/server/dist/publicProject.d.ts +54 -0
  187. package/server/dist/publicProject.js +135 -0
  188. package/server/dist/recall/index.js +22 -23
  189. package/server/dist/server/broadcast.d.ts +2 -1
  190. package/server/dist/server/broadcast.js +56 -1
  191. package/server/dist/smartPickupAdapters.d.ts +7 -0
  192. package/server/dist/smartPickupAdapters.js +172 -8
  193. package/server/dist/storageActions.d.ts +50 -0
  194. package/server/dist/storageActions.js +326 -0
  195. package/server/dist/storageArchive.d.ts +24 -0
  196. package/server/dist/storageArchive.js +358 -0
  197. package/server/dist/storageOverview.d.ts +47 -0
  198. package/server/dist/storageOverview.js +197 -0
  199. package/server/dist/storageReport.d.ts +48 -0
  200. package/server/dist/storageReport.js +185 -0
  201. package/server/dist/storageWarnings.d.ts +4 -0
  202. package/server/dist/storageWarnings.js +96 -0
  203. package/server/dist/workers/limits.js +4 -1
  204. package/server/dist/workflowStore.d.ts +2 -0
  205. package/server/dist/workflowStore.js +88 -72
  206. package/server/dist/workflows/purgeWorkflow.d.ts +1 -0
  207. package/server/dist/workflows/purgeWorkflow.js +15 -2
  208. package/server/dist/workflows/sessionDiscovery.js +5 -17
  209. package/server/dist/workflows/sessionIndex.js +22 -17
  210. package/server/dist/ws/taskLedgerHandlers.js +8 -3
  211. package/server/dist/ws/workflowHandlers.js +5 -4
  212. package/server/package.json +1 -1
  213. package/server/src/artifactCopy.ts +254 -0
  214. package/server/src/atomicFile.ts +1 -1
  215. package/server/src/attention.ts +9 -10
  216. package/server/src/catchUp.ts +37 -15
  217. package/server/src/clusterPeerOps.ts +5 -0
  218. package/server/src/clusterSnapshots.ts +20 -13
  219. package/server/src/eventLog.ts +571 -0
  220. package/server/src/explorerLaunch.ts +3 -2
  221. package/server/src/explorerPlans.ts +22 -2
  222. package/server/src/http/clusterRoutes.ts +4 -1
  223. package/server/src/http/explorerRoutes.ts +2 -1
  224. package/server/src/http/publicProjectRoutes.ts +54 -0
  225. package/server/src/http/router.ts +4 -0
  226. package/server/src/http/storageRoutes.ts +187 -0
  227. package/server/src/http/usageStatsRoutes.ts +3 -11
  228. package/server/src/index.ts +4 -0
  229. package/server/src/keepStore.ts +102 -0
  230. package/server/src/management/clusterActivity.ts +6 -16
  231. package/server/src/management/initHubLink.ts +10 -39
  232. package/server/src/mcp/clusterMcpTools.ts +8 -2
  233. package/server/src/notifications.ts +4 -3
  234. package/server/src/outputStore.ts +5 -2
  235. package/server/src/outputs.ts +30 -6
  236. package/server/src/planHistory.ts +48 -0
  237. package/server/src/primitives/runMdTuneup.ts +32 -2
  238. package/server/src/project/taskLedger.ts +20 -0
  239. package/server/src/providers/claude-native/peerTools.ts +4 -0
  240. package/server/src/providers/claude-native/resumeSummary.ts +32 -18
  241. package/server/src/providers/index.ts +2 -16
  242. package/server/src/providers/localProviderQueue.ts +13 -0
  243. package/server/src/publicProject.ts +142 -0
  244. package/server/src/recall/index.ts +4 -9
  245. package/server/src/server/broadcast.ts +53 -1
  246. package/server/src/smartPickupAdapters.ts +128 -5
  247. package/server/src/storageActions.ts +216 -0
  248. package/server/src/storageArchive.ts +277 -0
  249. package/server/src/storageOverview.ts +184 -0
  250. package/server/src/storageReport.ts +210 -0
  251. package/server/src/storageWarnings.ts +84 -0
  252. package/server/src/workers/limits.ts +4 -1
  253. package/server/src/workflowStore.ts +78 -61
  254. package/server/src/workflows/purgeWorkflow.ts +12 -3
  255. package/server/src/workflows/sessionDiscovery.ts +5 -13
  256. package/server/src/workflows/sessionIndex.ts +5 -9
  257. package/server/src/ws/taskLedgerHandlers.ts +8 -3
  258. package/server/src/ws/workflowHandlers.ts +5 -4
  259. package/shared/dist/index.d.ts +2 -0
  260. package/shared/dist/index.js +2 -0
  261. package/shared/dist/protocol/autoPickup.d.ts +1 -1
  262. package/shared/dist/protocol/autoPickup.js +1 -1
  263. package/shared/dist/protocol/checkpoints.d.ts +1 -0
  264. package/shared/dist/protocol/clusters.d.ts +2 -1
  265. package/shared/dist/protocol/index.d.ts +1 -0
  266. package/shared/dist/protocol/index.js +1 -0
  267. package/shared/dist/protocol/mdTuneup.d.ts +6 -0
  268. package/shared/dist/protocol/notifications.d.ts +2 -1
  269. package/shared/dist/protocol/notifications.js +3 -2
  270. package/shared/dist/protocol/plans.d.ts +2 -0
  271. package/shared/dist/protocol/serverMessages.d.ts +2 -1
  272. package/shared/dist/protocol/storage.d.ts +21 -0
  273. package/shared/dist/protocol/storage.js +3 -0
  274. package/shared/dist/protocol/tasks.d.ts +3 -0
  275. package/shared/dist/protocol/utilityAgent.d.ts +2 -2
  276. package/shared/dist/protocol/utilityAgent.js +2 -2
  277. package/shared/dist/publicGuardrails.d.ts +7 -0
  278. package/shared/dist/publicGuardrails.js +47 -0
  279. package/shared/dist/publicSafetyRules.d.ts +1 -0
  280. package/shared/dist/publicSafetyRules.js +6 -0
  281. package/shared/src/index.ts +3 -0
  282. package/shared/src/protocol/autoPickup.ts +1 -1
  283. package/shared/src/protocol/checkpoints.ts +4 -0
  284. package/shared/src/protocol/clusters.ts +6 -1
  285. package/shared/src/protocol/index.ts +1 -0
  286. package/shared/src/protocol/mdTuneup.ts +5 -0
  287. package/shared/src/protocol/notifications.ts +6 -2
  288. package/shared/src/protocol/plans.ts +2 -0
  289. package/shared/src/protocol/serverMessages.ts +2 -0
  290. package/shared/src/protocol/storage.ts +35 -0
  291. package/shared/src/protocol/tasks.ts +6 -0
  292. package/shared/src/protocol/utilityAgent.ts +2 -2
  293. package/shared/src/publicGuardrails.ts +50 -0
  294. package/shared/src/publicSafetyRules.ts +5 -0
  295. package/client/dist/assets/index-CcNtMA2y.js +0 -546
  296. package/client/dist/assets/index-Dl8tYsSp.css +0 -1
@@ -5,6 +5,7 @@ import { useAppStore } from '../stores/appStore';
5
5
  import { useStartupStore } from '../stores/startupStore';
6
6
  import { clusterBriefFacts, workerBriefFacts } from '../brief/briefFromStore';
7
7
  import { useUsableUtilityAgent } from './UtilityAgentPicker';
8
+ import { DialogShell } from './DialogShell';
8
9
 
9
10
  const STILL_WORKING_MS = 4000;
10
11
  const menuItemStyle: CSSProperties = { padding: '7px 12px', background: 'transparent', border: 'none', borderBottom: '1px solid var(--color-border-hairline)', color: 'var(--color-fg)', cursor: 'pointer', fontSize: '10px', letterSpacing: '1px', textAlign: 'left', whiteSpace: 'nowrap' };
@@ -53,13 +54,6 @@ export function BriefControl({ scope, targetId, label, title, 'data-help': helpI
53
54
  return () => { document.removeEventListener('click', onDoc); window.removeEventListener('keydown', onKey); };
54
55
  }, [menuOpen]);
55
56
 
56
- useEffect(() => {
57
- if (phase === 'closed') return;
58
- const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') { if (timer.current) clearTimeout(timer.current); setPhase('closed'); setResult(null); } };
59
- window.addEventListener('keydown', onKey);
60
- return () => window.removeEventListener('keydown', onKey);
61
- }, [phase === 'closed']);
62
-
63
57
  const run = async (runScope: UtilityBriefScope = active.scope, runTarget: string = active.targetId) => {
64
58
  setActive({ scope: runScope, targetId: runTarget });
65
59
  setMenuOpen(false);
@@ -126,48 +120,45 @@ export function BriefControl({ scope, targetId, label, title, 'data-help': helpI
126
120
  </div>
127
121
  )}
128
122
  {phase !== 'closed' && (
129
- <div
130
- role="dialog"
131
- aria-label={dialogLabel}
132
- data-testid="brief-panel"
133
- onClick={(e) => e.stopPropagation()}
134
- onKeyDown={(e) => { if (e.key !== 'Escape') e.stopPropagation(); }}
135
- style={{ position: 'fixed', inset: 0, zIndex: 1200, background: 'rgba(0,0,0,0.5)', display: 'flex', alignItems: 'center', justifyContent: 'center', padding: '12px' }}
123
+ <DialogShell
124
+ title={dialogLabel}
125
+ ariaLabel={dialogLabel}
126
+ testId="brief-panel"
127
+ onClose={close}
128
+ closeTestId="brief-close"
129
+ width={560}
130
+ zIndex={1200}
131
+ actions={<>
132
+ {(phase === 'running' || phase === 'slow') && <button type="button" data-testid="brief-cancel" onClick={cancel}>CANCEL</button>}
133
+ {phase === 'done' && agent && <button type="button" data-testid="brief-again" onClick={() => void run()}>BRIEF AGAIN</button>}
134
+ </>}
136
135
  >
137
- <div style={{ width: 'min(calc(92vw / var(--ui-scale, 1)), 560px)', maxHeight: 'calc(86vh / var(--ui-scale, 1))', overflowY: 'auto', background: 'var(--color-bg-dialog)', border: '1px solid var(--color-border-hairline)', padding: '14px', display: 'flex', flexDirection: 'column', gap: '10px', fontSize: '12px' }}>
138
- <div className="display-font" style={{ letterSpacing: '1px', fontSize: '11px', color: 'var(--color-fg-muted)' }}>{dialogLabel}</div>
139
- {phase === 'done' && !agent && (
140
- <div data-testid="brief-not-set" style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
141
- <p style={{ margin: 0 }}>{saved ? 'The chosen utility agent is not connected or enabled right now.' : 'A utility agent must be chosen before BRIEF can run.'}</p>
142
- <button type="button" data-testid="brief-open-setting" onClick={openSetting} style={{ alignSelf: 'flex-start' }}>OPEN UTILITY AGENT SETTING</button>
143
- </div>
144
- )}
145
- {phase === 'running' && <p role="status" style={{ margin: 0 }}>Asking the utility agent.</p>}
146
- {phase === 'slow' && <p role="status" data-testid="brief-slow" style={{ margin: 0 }}>Still working. A cold start can take a while; CANCEL stops it.</p>}
147
- {phase === 'done' && agent && result && (
148
- <div role="status" data-testid="brief-result" style={{ display: 'flex', flexDirection: 'column', gap: '6px' }}>
149
- {result.status === 'ok'
150
- ? <p style={{ margin: 0, whiteSpace: 'pre-wrap', wordBreak: 'break-word' }}>{result.text}</p>
151
- : <p style={{ margin: 0 }}>{describeUtilityFailure(result)}</p>}
152
- {result.agent && <div style={{ color: 'var(--color-fg-muted)', fontSize: '10px' }}>{result.status === 'ok' && result.text?.trim() ? `Answered by ${result.agent.provider} / ${result.agent.model} in ${(result.elapsedMs / 1000).toFixed(1)}s. This is a reading of the facts below, not an instruction.` : utilityAttribution(result)}</div>}
153
- {result.truncated && <div style={{ color: 'var(--color-fg-muted)', fontSize: '10px' }}>Some facts were shortened to fit the input limit.</div>}
154
- </div>
155
- )}
156
- {phase !== 'running' && phase !== 'slow' && agent && shownFacts.length > 0 && (
157
- <details data-testid="brief-facts">
158
- <summary style={{ cursor: 'pointer' }}>FACTS USED ({shownFacts.length})</summary>
159
- <ul style={{ margin: '6px 0 0', paddingLeft: '16px', fontFamily: 'var(--font-code)', fontSize: '11px', wordBreak: 'break-word' }}>
160
- {shownFacts.map((f, i) => <li key={`${f.label}-${i}`}><strong>{f.label}:</strong> {f.value}</li>)}
161
- </ul>
162
- </details>
163
- )}
164
- <div style={{ display: 'flex', gap: '8px', justifyContent: 'flex-end' }}>
165
- {(phase === 'running' || phase === 'slow') && <button type="button" data-testid="brief-cancel" onClick={cancel}>CANCEL</button>}
166
- {phase === 'done' && agent && <button type="button" data-testid="brief-again" onClick={() => void run()}>BRIEF AGAIN</button>}
167
- <button type="button" data-testid="brief-close" onClick={close}>CLOSE</button>
136
+ {phase === 'done' && !agent && (
137
+ <div data-testid="brief-not-set" style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
138
+ <p style={{ margin: 0 }}>{saved ? 'The chosen utility agent is not connected or enabled right now.' : 'A utility agent must be chosen before BRIEF can run.'}</p>
139
+ <button type="button" data-testid="brief-open-setting" onClick={openSetting} style={{ alignSelf: 'flex-start' }}>OPEN UTILITY AGENT SETTING</button>
168
140
  </div>
169
- </div>
170
- </div>
141
+ )}
142
+ {phase === 'running' && <p role="status" style={{ margin: 0 }}>Asking the utility agent.</p>}
143
+ {phase === 'slow' && <p role="status" data-testid="brief-slow" style={{ margin: 0 }}>Still working. A cold start can take a while; CANCEL stops it.</p>}
144
+ {phase === 'done' && agent && result && (
145
+ <div role="status" data-testid="brief-result" style={{ display: 'flex', flexDirection: 'column', gap: '6px' }}>
146
+ {result.status === 'ok'
147
+ ? <p style={{ margin: 0, whiteSpace: 'pre-wrap', wordBreak: 'break-word' }}>{result.text}</p>
148
+ : <p style={{ margin: 0 }}>{describeUtilityFailure(result)}</p>}
149
+ {result.agent && <div style={{ color: 'var(--color-fg-muted)', fontSize: '10px' }}>{result.status === 'ok' && result.text?.trim() ? `Answered by ${result.agent.provider} / ${result.agent.model} in ${(result.elapsedMs / 1000).toFixed(1)}s. This is a reading of the facts below, not an instruction.` : utilityAttribution(result)}</div>}
150
+ {result.truncated && <div style={{ color: 'var(--color-fg-muted)', fontSize: '10px' }}>Some facts were shortened to fit the input limit.</div>}
151
+ </div>
152
+ )}
153
+ {phase !== 'running' && phase !== 'slow' && agent && shownFacts.length > 0 && (
154
+ <details data-testid="brief-facts">
155
+ <summary style={{ cursor: 'pointer' }}>FACTS USED ({shownFacts.length})</summary>
156
+ <ul style={{ margin: '6px 0 0', paddingLeft: '16px', fontFamily: 'var(--font-code)', fontSize: '11px', wordBreak: 'break-word' }}>
157
+ {shownFacts.map((f, i) => <li key={`${f.label}-${i}`}><strong>{f.label}:</strong> {f.value}</li>)}
158
+ </ul>
159
+ </details>
160
+ )}
161
+ </DialogShell>
171
162
  )}
172
163
  </>
173
164
  );
@@ -3,6 +3,7 @@ import { useEffect, useRef, useState } from 'react';
3
3
  import type { UtilityJobResult } from '@arco/shared';
4
4
  import { useAppStore } from '../stores/appStore';
5
5
  import { useStartupStore } from '../stores/startupStore';
6
+ import { DialogShell } from './DialogShell';
6
7
 
7
8
  type Scope = { kind: 'workflow' | 'cluster'; id: string };
8
9
  type Result = UtilityJobResult & { from: number; to: number; empty?: boolean };
@@ -40,7 +41,6 @@ export function CatchMeUp({ scope }: { scope: Scope | null }) {
40
41
  const cancel = () => { const id = active.current; if (id) void fetch('/api/utility-agent/cancel', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ jobId: id }) }).catch(() => undefined); };
41
42
  const close = () => { cancel(); active.current = ''; setRunning(false); setOpen(false); };
42
43
  useEffect(() => { setOpen(false); setResult(null); setError(''); return () => { cancel(); active.current = ''; }; }, [scope?.id, scope?.kind]);
43
- useEffect(() => { if (!open) return; const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') close(); }; document.addEventListener('keydown', onKey); return () => document.removeEventListener('keydown', onKey); }, [open]);
44
44
  const run = async () => {
45
45
  if (!scope || running) return;
46
46
  const jobId = `catch-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`; active.current = jobId;
@@ -59,29 +59,29 @@ export function CatchMeUp({ scope }: { scope: Scope | null }) {
59
59
  if (!scope) return null;
60
60
  return <div data-help="utility.catch-up" style={{ alignSelf: 'center', flexShrink: 0 }}>
61
61
  <button type="button" className="display-font" data-help="utility.catch-up" onClick={() => { setOpen(true); setResult(null); setError(''); }}>CATCH ME UP</button>
62
- {open && <div role="dialog" aria-modal="true" aria-label="Catch me up" onKeyDown={(e) => { if (e.key === 'Escape') { e.stopPropagation(); close(); } }} style={{ position: 'fixed', inset: 0, zIndex: 2000, background: 'rgba(0,0,0,.65)', display: 'grid', placeItems: 'center', padding: '12px' }}>
63
- <div style={{ background: 'var(--color-bg-dialog)', border: '1px solid var(--color-border-hairline)', padding: '16px', width: 'min(680px, 100%)', maxHeight: 'calc(85vh / var(--ui-scale, 1))', overflow: 'auto', overflowWrap: 'anywhere', display: 'grid', gap: '10px' }}>
64
- <h2>Catch me up</h2>
65
- {!agent ? <p>No utility agent is chosen. <button type="button" className="display-font" data-help="utility.catch-up" onClick={() => { close(); useStartupStore.getState().setSettingsSection('utility-agent'); useAppStore.getState().setShowSettings(true); }}>OPEN UTILITY AGENT SETTINGS</button></p>
66
- : <><p style={{ margin: 0, color: 'var(--color-fg-muted)' }}>{typeof from === 'number'
67
- ? <>Since {new Date(from).toLocaleString()} until the request starts. Activity is sent to {agent.provider.toUpperCase()} / {agent.model}.</>
68
- : <>No previous visit is recorded for this browser. Summarize covers this tab from its start, or the last 24 hours if older. Activity is sent to {agent.provider.toUpperCase()} / {agent.model}.</>}</p>
69
- {!running && <button type="button" className="display-font" data-help="utility.catch-up" onClick={() => void run()}>SUMMARIZE</button>}
70
- {running && <p role="status">{slow ? 'Still working. A cold start can take a while.' : 'Collecting and summarizing activity.'} <button type="button" className="display-font" data-help="utility.catch-up" onClick={cancel}>CANCEL</button></p>}</>}
71
- {error && <p role="alert">{error}</p>}
72
- {result && <div role="status">
73
- {result.empty
74
- ? <p>Nothing has happened in this tab yet.</p>
75
- : <>
76
- <p>Requested range: {new Date(result.from).toLocaleString()} - {new Date(result.to).toLocaleString()}</p>
77
- {result.status === 'ok' ? <><p>{result.text}</p><p>Answered by {result.agent?.provider.toUpperCase()} / {result.agent?.model}.</p></>
78
- : <p>{describeUtilityFailure(result)} {utilityAttribution(result)}</p>}
79
- {result.truncated && <p>Older or lengthy activity was omitted from the facts.</p>}
80
- <details><summary>Facts used ({result.facts.length})</summary><ul>{result.facts.map((fact, i) => <li key={i}><strong>{fact.label}:</strong> {fact.value}</li>)}</ul></details>
81
- </>}
82
- </div>}
83
- <button type="button" className="display-font" data-help="utility.catch-up" onClick={close}>CLOSE</button>
84
- </div>
85
- </div>}
62
+ {open && <DialogShell title="Catch me up" onClose={close} dataHelp="utility.catch-up"
63
+ status={(running || error) ? <>
64
+ {running && <p role="status" style={{ margin: 0 }}>{slow ? 'Still working. A cold start can take a while.' : 'Collecting and summarizing activity.'} <button type="button" className="display-font" data-help="utility.catch-up" onClick={cancel}>CANCEL</button></p>}
65
+ {error && <p role="alert" style={{ margin: 0 }}>{error}</p>}
66
+ </> : undefined}
67
+ actions={<>
68
+ {agent && !running && <button type="button" className="display-font" data-help="utility.catch-up" onClick={() => void run()}>SUMMARIZE</button>}
69
+ </>}>
70
+ {!agent ? <p style={{ margin: 0 }}>No utility agent is chosen. <button type="button" className="display-font" data-help="utility.catch-up" onClick={() => { close(); useStartupStore.getState().setSettingsSection('utility-agent'); useAppStore.getState().setShowSettings(true); }}>OPEN UTILITY AGENT SETTINGS</button></p>
71
+ : <p style={{ margin: 0, color: 'var(--color-fg-muted)' }}>{typeof from === 'number'
72
+ ? <>Since {new Date(from).toLocaleString()} until the request starts. Activity is sent to {agent.provider.toUpperCase()} / {agent.model}.</>
73
+ : <>No previous visit is recorded for this browser. Summarize covers this tab from its start, or the last 24 hours if older. Activity is sent to {agent.provider.toUpperCase()} / {agent.model}.</>}</p>}
74
+ {result && <div role="status" style={{ display: 'grid', gap: '8px' }}>
75
+ {result.empty
76
+ ? <p style={{ margin: 0 }}>Nothing has happened in this tab yet.</p>
77
+ : <>
78
+ <p style={{ margin: 0 }}>Requested range: {new Date(result.from).toLocaleString()} - {new Date(result.to).toLocaleString()}</p>
79
+ {result.status === 'ok' ? <><p style={{ margin: 0 }}>{result.text}</p><p style={{ margin: 0 }}>Answered by {result.agent?.provider.toUpperCase()} / {result.agent?.model}.</p></>
80
+ : <p style={{ margin: 0 }}>{describeUtilityFailure(result)} {utilityAttribution(result)}</p>}
81
+ {result.truncated && <p style={{ margin: 0 }}>Older or lengthy activity was omitted from the facts.</p>}
82
+ <details><summary>Facts used ({result.facts.length})</summary><ul>{result.facts.map((fact, i) => <li key={i}><strong>{fact.label}:</strong> {fact.value}</li>)}</ul></details>
83
+ </>}
84
+ </div>}
85
+ </DialogShell>}
86
86
  </div>;
87
87
  }
@@ -32,10 +32,12 @@ export function CheckpointActions({ entry, workflowId, cwd, busy, turn }: Props)
32
32
 
33
33
  const ref = entry.checkpointRef;
34
34
  const seq = entry.checkpointSeq;
35
+ // A turn whose checkpoint was restored shows as undone; a second undo cannot run.
36
+ const undone = useAppStore((s) => turn != null && seq != null && (s.jobs[workflowId]?.historyEvents ?? []).some((e) => e.reverted && e.revertedCheckpointSeq === seq));
35
37
  const fileLabel = entry.summary ?? '';
36
38
 
37
39
  const doRevert = () => {
38
- if (wsSendRaw == null || seq == null) return;
40
+ if (wsSendRaw == null || seq == null || undone) return;
39
41
  setSubmitting(true);
40
42
  // Server takes the safety snapshot FIRST, then restores; it broadcasts
41
43
  // checkpoint_created (safety) + checkpoint_reverted (or an error) back.
@@ -55,13 +57,14 @@ export function CheckpointActions({ entry, workflowId, cwd, busy, turn }: Props)
55
57
  {turn ? turn.otherWriters ? 'VIEW DIFF' : `Changed ${turn.fileCount} ${turn.fileCount === 1 ? 'file' : 'files'} (+${turn.added} -${turn.removed}${turn.binaryFiles ? `, ${turn.binaryFiles} binary` : ''})` : 'VIEW DIFF VS NOW'}
56
58
  </ActionBtn>
57
59
  {!turn?.otherWriters && <ActionBtn
58
- disabled={seq == null || busy || submitting}
60
+ disabled={seq == null || busy || submitting || undone}
59
61
  onClick={() => setConfirmOpen(true)}
60
- title={busy ? 'Cancel the in-flight turn before reverting' : undefined}
62
+ title={undone ? 'This turn has already been undone' : busy ? 'Cancel the in-flight turn before reverting' : undefined}
61
63
  dataHelp={turn ? 'chat.turn-changes' : 'rightpanel.history.checkpoint'}
62
64
  >
63
65
  {turn ? 'UNDO THIS TURN' : 'REVERT TO HERE'}
64
66
  </ActionBtn>}
67
+ {undone && <span data-testid="turn-undone" className="display-font" style={{ color: 'var(--color-accent-secondary)', fontSize: '10px', letterSpacing: '1.5px' }}>Undone</span>}
65
68
 
66
69
  {turn?.otherWriters && <span style={{ color: 'var(--color-fg-muted)', fontSize: '11px' }}>{turn.fileCount} {turn.fileCount === 1 ? 'file' : 'files'} changed in this folder during this turn (other agents were also working here).</span>}
67
70
  {turn && <span style={{ color: 'var(--color-fg-muted)', fontSize: '11px' }}>{turn.paths.join(', ')}{turn.pathsTruncated ? ' ...' : ''}{turn.skippedLargeFiles ? ` (at least ${turn.skippedLargeFiles} large ${turn.skippedLargeFiles === 1 ? 'file' : 'files'} skipped)` : ''}</span>}
@@ -117,7 +120,7 @@ export function CheckpointActions({ entry, workflowId, cwd, busy, turn }: Props)
117
120
  }}
118
121
  >
119
122
  <div className="display-font glow-text-cyan" style={{ fontSize: '12px', letterSpacing: '1px' }}>
120
- {turn ? 'DIFF: TURN CHANGES' : `DIFF: CHECKPOINT ${seq} VS NOW`}
123
+ {turn ? (undone ? 'DIFF: UNDONE TURN CHANGES' : 'DIFF: TURN CHANGES') : `DIFF: CHECKPOINT ${seq} VS NOW`}
121
124
  </div>
122
125
  <ActionBtn onClick={() => setDiffOpen(false)}>CLOSE</ActionBtn>
123
126
  </div>
@@ -10,14 +10,17 @@ export interface ClusterComposerControls {
10
10
  onChooseRecipients: () => void;
11
11
  pendingTotal: number;
12
12
  pendingMembers: number;
13
+ // Members nudged that have not started their turn yet.
14
+ nudgedCount?: number;
13
15
  onNudge: () => void;
14
16
  }
15
17
 
16
18
  export function ClusterComposerButtons({ controls }: { controls: ClusterComposerControls }) {
17
- const { recipientLabel, onChooseRecipients, pendingTotal, pendingMembers, onNudge } = controls;
19
+ const { recipientLabel, onChooseRecipients, pendingTotal, pendingMembers, nudgedCount = 0, onNudge } = controls;
18
20
  const nudgeLabel = pendingTotal > 0
19
21
  ? `NUDGE: ${pendingTotal} pending ${pendingTotal === 1 ? 'message' : 'messages'} across ${pendingMembers} ${pendingMembers === 1 ? 'member' : 'members'}`
20
22
  : 'NUDGE: no pending messages';
23
+ const nudgedNote = nudgedCount > 0 ? `${nudgedCount} ${nudgedCount === 1 ? 'member was' : 'members were'} nudged and ${nudgedCount === 1 ? 'has' : 'have'} not started yet. ` : '';
21
24
  return (
22
25
  <>
23
26
  <button
@@ -37,7 +40,7 @@ export function ClusterComposerButtons({ controls }: { controls: ClusterComposer
37
40
  className="display-font"
38
41
  data-help="cluster.broadcast.nudge"
39
42
  data-testid="cluster-nudge"
40
- aria-label={nudgeLabel}
43
+ aria-label={`${nudgedNote}${nudgeLabel}`}
41
44
  title="Remind selected members to check their mail. Active members pick it up when able; idle members start a turn."
42
45
  onClick={onNudge}
43
46
  style={{
@@ -47,7 +50,7 @@ export function ClusterComposerButtons({ controls }: { controls: ClusterComposer
47
50
  border: pendingTotal > 0 ? '1px solid var(--color-warning)' : '1px solid var(--color-accent-secondary-dim, var(--color-accent-secondary))',
48
51
  }}
49
52
  >
50
- NUDGE{pendingTotal > 0 ? ` ${pendingTotal}` : ''}
53
+ {nudgedCount > 0 ? `NUDGED ${nudgedCount}` : `NUDGE${pendingTotal > 0 ? ` ${pendingTotal}` : ''}`}
51
54
  </button>
52
55
  </>
53
56
  );
@@ -29,7 +29,7 @@ import type {
29
29
  PlanSummary,
30
30
  PlanFull,
31
31
  } from '@arco/shared';
32
- import { ROLE_PRESETS } from '@arco/shared';
32
+ import { ROLE_PRESETS, hasGuardrails, insertGuardrails } from '@arco/shared';
33
33
  import { useAppStore } from '../stores/appStore';
34
34
  import { PlanBodyRenderer, CHECKBOX_RE } from './PlanBodyRenderer';
35
35
  import { PlanRefsSection, PlanRefChips } from './plans/PlanRefsSection';
@@ -455,6 +455,20 @@ export function ClusterPlanTab({ cluster, onSetPlan, onAttachPlan, onClearPlan,
455
455
  EDIT
456
456
  </button>
457
457
  )}
458
+ {onSetPlan && (mode === 'edit' || remoteBody) && (
459
+ <span data-help="plan.insert-guardrails" style={{ display: 'inline-flex' }}>
460
+ <button
461
+ data-testid="cluster-plan-insert-guardrails"
462
+ disabled={hasGuardrails(mode === 'edit' ? draft : remoteBody)}
463
+ title={hasGuardrails(mode === 'edit' ? draft : remoteBody) ? 'Already in this plan' : 'Insert a Privacy and public safety section as an unsaved edit'}
464
+ onClick={() => { setDraft(insertGuardrails(mode === 'edit' ? draft : remoteBody)); setMode('edit'); }}
465
+ className="display-font"
466
+ style={headerBtn}
467
+ >
468
+ INSERT GUARDRAILS
469
+ </button>
470
+ </span>
471
+ )}
458
472
  {onClearPlan && cluster.plan && (
459
473
  <button
460
474
  onClick={handleClear}
@@ -25,7 +25,7 @@ import { useAppStore } from '../../stores/appStore';
25
25
  import { useStartupStore } from '../../stores/startupStore';
26
26
  import { modelsForProvider, useModelCatalogs } from '../../utils/modelCatalog';
27
27
 
28
- const PROVIDER_NAMES: Record<SmartPickupEvaluatorProvider, string> = { claude: 'Claude', codex: 'Codex', cursor: 'Cursor', ollama: 'Ollama' };
28
+ const PROVIDER_NAMES: Record<SmartPickupEvaluatorProvider, string> = { claude: 'Claude', codex: 'Codex', cursor: 'Cursor', ollama: 'Ollama', lmstudio: 'LM Studio', llamacpp: 'llama.cpp', strata: 'Strata', deepseek: 'DeepSeek (Xolotl)' };
29
29
 
30
30
  const MODE_HELP: Record<AutoPickupMode, string> = {
31
31
  off: 'No automatic worker turns. MAIL ALERTS and NUDGE stay available.',
@@ -42,7 +42,11 @@ function describeDecision(state: ClusterAutoPickupState): string | null {
42
42
  const d = state.lastDecision;
43
43
  if (!d) return null;
44
44
  const when = new Date(d.at).toLocaleTimeString();
45
- const what = d.action ? `answered ${d.action}` : d.reason.replace(/_/g, ' ');
45
+ const unloaded = /^evaluator_error:model_not_loaded_(lmstudio|llamacpp|strata|deepseek)$/.exec(d.reason);
46
+ const names = { lmstudio: 'LM Studio', llamacpp: 'llama.cpp', strata: 'Strata', deepseek: 'DeepSeek' } as const;
47
+ const what = d.action ? `answered ${d.action}` : unloaded
48
+ ? `model not loaded in ${names[unloaded[1] as keyof typeof names]}; load it or choose another`
49
+ : d.reason.replace(/_/g, ' ');
46
50
  return `${when}: ${what}${d.action ? ` (${d.reason.replace(/_/g, ' ')}), ${d.outcome}` : ''}`;
47
51
  }
48
52
 
@@ -17,6 +17,8 @@
17
17
 
18
18
  import type { SpawnMemberIdentity } from '@arco/shared';
19
19
  import { useEffect, useRef, useState } from 'react';
20
+
21
+ const NUDGED_MS = 120_000;
20
22
  import { buildClusterNudge } from '../utils/clusterNudge';
21
23
  import { onVoiceDialog } from '../voice/dialogs';
22
24
  import { useAppStore, type ClusterCardLayout } from '../stores/appStore';
@@ -28,6 +30,9 @@ import { NeedsYouBadge } from './NeedsYouBadge';
28
30
  import { ClusterRightPanel } from './ClusterRightPanel';
29
31
  import { clusterDisplayName } from './TabBar';
30
32
  import { beginPlanReview } from './terminalInput/planDraft';
33
+ import { PublicProjectBox } from './PublicProjectBox';
34
+ import { ProjectStateNotice } from './ProjectStateNotice';
35
+ import { effectivePublic } from '../utils/publicProject';
31
36
  import type { ClusterMemberProvider, ProviderName, ModelName, EffortLevel, WorkflowConfig, ReviewContextRef, MemberTier, ClusterEfficiencyLevel, ClusterProgressMode, ClusterTaskBoardMode, LedgerTaskStatus } from '@arco/shared';
32
37
  import { presetForText } from '@arco/shared';
33
38
  import type { ClusterDispatcherSettingsPatch, ClusterMemberPrimaryUpdate, ClusterSwarmCreateRequest } from './ClusterRightPanel/types';
@@ -598,6 +603,28 @@ export function ClusterTab({
598
603
  // dispatching. Idle+mailbox-depth-positive members are visually flagged
599
604
  // ("has mail") so the operator can pick the ones that actually need
600
605
  // waking, but no member is auto-checked.
606
+ // Members nudged and not yet started: their mail mark and the composer NUDGE
607
+ // read "Nudged" until the member starts its turn (or two minutes pass).
608
+ const [nudgedAt, setNudgedAt] = useState<Record<string, number>>({});
609
+ const startedKey = cluster.members.map((m) => `${m.workflowId}:${m.status === 'busy' || jobs[m.workflowId]?.busy === true ? 1 : 0}`).join('|');
610
+ useEffect(() => {
611
+ const now = Date.now();
612
+ setNudgedAt((prev) => {
613
+ const next: Record<string, number> = {};
614
+ for (const m of cluster.members) {
615
+ const at = prev[m.workflowId];
616
+ if (at && now - at < NUDGED_MS && !(m.status === 'busy' || jobs[m.workflowId]?.busy === true)) next[m.workflowId] = at;
617
+ }
618
+ return Object.keys(next).length === Object.keys(prev).length ? prev : next;
619
+ });
620
+ }, [startedKey]);
621
+ useEffect(() => {
622
+ const live = Object.values(nudgedAt);
623
+ if (!live.length) return;
624
+ const timer = setTimeout(() => setNudgedAt((prev) => Object.fromEntries(Object.entries(prev).filter(([, at]) => Date.now() - at < NUDGED_MS))), Math.max(1000, NUDGED_MS - (Date.now() - Math.min(...live)) + 50));
625
+ return () => clearTimeout(timer);
626
+ }, [nudgedAt]);
627
+ const nudgedCount = Object.keys(nudgedAt).length;
601
628
  const openNudgeModal = () => {
602
629
  setNudgeSelection(new Set());
603
630
  };
@@ -618,7 +645,7 @@ export function ClusterTab({
618
645
  undefined,
619
646
  'steer',
620
647
  );
621
- if (result !== false) sent++;
648
+ if (result !== false) { sent++; setNudgedAt((prev) => ({ ...prev, [member.workflowId]: Date.now() })); }
622
649
  }
623
650
  if (sent === 0 || !toast) return sent;
624
651
  setToasts((prev) => [...prev, {
@@ -792,16 +819,18 @@ export function ClusterTab({
792
819
  <NeedsYouBadge clusterId={clusterId} />
793
820
  </div>
794
821
 
822
+ {directorMember && <ProjectStateNotice cwd={jobs[directorMember.workflowId]?.config.workingDirectory ?? ''} skip={directorMember.accessMode === 'isolated'} />}
795
823
  {!cluster.plan && !planHintHidden && <div data-help="cluster.no-plan-hint" style={{ display: 'flex', flexWrap: 'wrap', alignItems: 'center', gap: '7px', padding: '5px 8px', color: 'var(--color-fg-muted)', fontSize: '11px' }}>
796
824
  <span>No plan yet: a plan keeps every worker on the same list.</span>
797
825
  {!directorMember && <span>Set a director in <button type="button" data-testid="plan-line-members" onClick={() => setMembersTabRequest((value) => value + 1)} style={{ background: 'none', border: 'none', padding: 0, color: 'var(--color-accent-secondary)', textDecoration: 'underline', cursor: 'pointer', font: 'inherit' }}>Members</button> to request a draft.</span>}
798
826
  <button type="button" disabled={!directorMember} title={directorMember ? 'Ask the director for a reviewable draft' : 'Set a director in Members first'} onClick={() => {
799
827
  if (!directorMember) return;
800
828
  const id = directorMember.workflowId;
801
- const started = beginPlanReview(id, (prompt) => onSendToMember(id, prompt, undefined, undefined, 'plan-review'), '', true);
829
+ const started = beginPlanReview(id, (prompt) => onSendToMember(id, prompt, undefined, undefined, 'plan-review'), '', true, effectivePublic(jobs[id]?.config.workingDirectory ?? ''));
802
830
  if (started) setClusterFocusedMember(clusterId, id);
803
831
  else useAppStore.getState().pushNotification('error', 'The director must be idle and ready before drafting a plan.');
804
832
  }}>DRAFT A PLAN</button>
833
+ {directorMember && <PublicProjectBox cwd={jobs[directorMember.workflowId]?.config.workingDirectory ?? ''} testId="cluster-public-project" />}
805
834
  <button type="button" disabled={!onAttachClusterPlan} onClick={() => setPlanTabRequest((value) => value + 1)}>ATTACH EXISTING</button>
806
835
  <button type="button" onClick={() => { setPlanHintHidden(true); try { localStorage.setItem(`arco.clusterPlanHint.${clusterId}`, '1'); } catch { /* no-op */ } }}>NOT NOW</button>
807
836
  </div>}
@@ -826,6 +855,7 @@ export function ClusterTab({
826
855
  role={m.role}
827
856
  pendingMail={pendingByMember[cluster.members.indexOf(m)]}
828
857
  onNudge={() => nudgeMembers(new Set([m.workflowId]), false)}
858
+ nudged={nudgedAt[m.workflowId] !== undefined}
829
859
  newReply={directorNewReply && m.workflowId === directorMember?.workflowId}
830
860
  focused={focusedMemberId === m.workflowId}
831
861
  onClick={() => setClusterFocusedMember(clusterId, m.workflowId)}
@@ -902,7 +932,7 @@ export function ClusterTab({
902
932
  onSend={(content, attachments, kind, primitive) =>
903
933
  sendFromComposer(focusedMember.workflowId, content, attachments, kind, primitive)
904
934
  }
905
- clusterControls={{ clusterId, recipientLabel, placeholder: composerPlaceholder, onChooseRecipients: openRecipients, pendingTotal, pendingMembers, onNudge: openNudgeModal }}
935
+ clusterControls={{ clusterId, recipientLabel, placeholder: composerPlaceholder, onChooseRecipients: openRecipients, pendingTotal, pendingMembers, nudgedCount, onNudge: openNudgeModal }}
906
936
  onAttachPlan={onAttachPlanToMember ? (planId) => onAttachPlanToMember(focusedMember.workflowId, planId) : undefined}
907
937
  onAttachToCluster={onSetClusterPlan ? (body) => onSetClusterPlan(clusterId, body) : undefined}
908
938
  onCancel={() => onCancelMember(focusedMember.workflowId)}
@@ -27,6 +27,11 @@ import { BOARD_COLUMNS, groupByStatus, taskGraphSummary, taskShowWorkflowId } fr
27
27
 
28
28
  import {
29
29
  filterVisibleBoardTasks,
30
+ readBoardShowDone,
31
+ BOARD_SHOW_DONE_KEY,
32
+ releaseLabels,
33
+ releaseSummary,
34
+ NO_RELEASE,
30
35
  namedCommitsForTask,
31
36
  reviewTasksWithMetSignoff,
32
37
  splitRecentAndOlderReview,
@@ -210,9 +215,17 @@ export function ClusterTaskBoardTab({
210
215
  const tasks = (useAppStore((s) => (ledgerKey ? s.taskLedger[ledgerKey] : undefined)) ?? []) as WorktreeAwareLedgerTask[];
211
216
  // Done and archived tasks are hidden unless the operator asks for them; the
212
217
  // filter runs before grouping so column counts match what is drawn.
213
- const [showDone, setShowDone] = useState(false);
218
+ // On by default so finished work stays visible; the choice is remembered once changed.
219
+ const [showDone, setShowDoneState] = useState(() => readBoardShowDone());
220
+ const setShowDone = (next: boolean | ((v: boolean) => boolean)) => setShowDoneState((v) => { const value = typeof next === 'function' ? next(v) : next; try { localStorage.setItem(BOARD_SHOW_DONE_KEY, value ? '1' : '0'); } catch { /* storage unavailable */ } return value; });
214
221
  const [olderOpen, setOlderOpen] = useState(false);
215
- const grouped = groupByStatus(filterVisibleBoardTasks(tasks, { showDone }));
222
+ const [releaseFilter, setReleaseFilter] = useState<string | null>(null);
223
+ const labels = releaseLabels(tasks);
224
+ // A label that no longer exists (all its tasks changed) falls back to every task.
225
+ const activeRelease = releaseFilter === NO_RELEASE ? NO_RELEASE : releaseFilter && labels.includes(releaseFilter) ? releaseFilter : null;
226
+ const visibleTasks = filterVisibleBoardTasks(tasks, { showDone, release: activeRelease });
227
+ const summary = activeRelease && activeRelease !== NO_RELEASE ? releaseSummary(tasks, activeRelease) : null;
228
+ const grouped = groupByStatus(visibleTasks);
216
229
  const { recent: recentReview, older: olderReview } = splitRecentAndOlderReview(grouped.review);
217
230
  // Bulk accept only touches review cards the operator can see: recent ones,
218
231
  // plus older ones while that row is expanded.
@@ -313,7 +326,7 @@ export function ClusterTaskBoardTab({
313
326
  // through the dedicated status controls, never these field edits.
314
327
  const editTask = (
315
328
  taskId: string,
316
- patch: { title?: string; notes?: string; priority?: number; parentIds?: string[] },
329
+ patch: { title?: string; notes?: string; priority?: number; parentIds?: string[]; release?: string },
317
330
  ) => {
318
331
  if (!taskShowReader || !wsSendRaw) return;
319
332
  wsSendRaw({
@@ -549,7 +562,7 @@ export function ClusterTaskBoardTab({
549
562
  >
550
563
  <div style={{ display: 'flex', flexDirection: 'column', gap: '3px', minWidth: 0 }}>
551
564
  <div className="display-font" style={{ fontSize: '10px', letterSpacing: '1px', color: 'var(--color-fg-muted)' }}>
552
- {tasks.length} TASK{tasks.length === 1 ? '' : 'S'}
565
+ {visibleTasks.length} TASK{visibleTasks.length === 1 ? '' : 'S'}{tasks.length > visibleTasks.length ? ` (${tasks.length - visibleTasks.length} DONE HIDDEN)` : ''}
553
566
  </div>
554
567
  <div style={{ fontSize: '10px', lineHeight: 1.4, color: 'var(--color-fg-muted)', fontFamily: 'var(--font-body)' }}>
555
568
  Who is doing what right now. Your part: accept finished work and answer blocked tasks.
@@ -575,6 +588,26 @@ export function ClusterTaskBoardTab({
575
588
  >
576
589
  SHOW DONE {showDone ? 'ON' : 'OFF'}
577
590
  </button>
591
+ {labels.length > 0 && (
592
+ <select
593
+ data-help="cluster.board-release-filter"
594
+ aria-label="Release filter"
595
+ value={activeRelease ?? ''}
596
+ onChange={(e) => setReleaseFilter(e.target.value === '' ? null : e.target.value)}
597
+ className="display-font"
598
+ style={{ border: '1px solid var(--color-border-hairline)', background: 'transparent', color: 'var(--color-fg-muted)', fontSize: '9px', letterSpacing: '0.8px', padding: '3px 6px' }}
599
+ title="Show only the tasks labeled for one release."
600
+ >
601
+ <option value="">ALL RELEASES</option>
602
+ {labels.map((label) => <option key={label} value={label}>{label}</option>)}
603
+ <option value={NO_RELEASE}>NO RELEASE</option>
604
+ </select>
605
+ )}
606
+ {summary && (
607
+ <span data-help="cluster.board-release-summary" data-testid="release-summary" className="display-font" style={{ fontSize: '9px', letterSpacing: '0.8px', color: summary.left === 0 ? 'var(--color-accent-primary)' : 'var(--color-fg-muted)' }}>
608
+ {activeRelease}: {summary.total} IN, {summary.accepted} ACCEPTED, {summary.left} LEFT{summary.left === 0 && summary.total > 0 ? ' - READY TO RELEASE' : ''}
609
+ </span>
610
+ )}
578
611
  <button
579
612
  type="button"
580
613
  data-help="cluster.board-automation-toggle"
@@ -1682,7 +1715,7 @@ function TaskDetailDrawer({
1682
1715
  nameFor: (workflowId: string) => string;
1683
1716
  allTasks: WorktreeAwareLedgerTask[];
1684
1717
  canEdit: boolean;
1685
- onEditTask: (taskId: string, patch: { title?: string; notes?: string; priority?: number; parentIds?: string[] }) => void;
1718
+ onEditTask: (taskId: string, patch: { title?: string; notes?: string; priority?: number; parentIds?: string[]; release?: string }) => void;
1686
1719
  onDeleteTask: (taskId: string) => void;
1687
1720
  onUpdateTaskStatus?: (workflowId: string, taskId: string, status: LedgerTaskStatus, boardKey?: string) => void;
1688
1721
  onReassignTask?: (workflowId: string, taskId: string, assigneeWorkflowId: string | null, boardKey?: string) => void;
@@ -1699,6 +1732,7 @@ function TaskDetailDrawer({
1699
1732
  const [titleDraft, setTitleDraft] = useState(task.title);
1700
1733
  const [notesDraft, setNotesDraft] = useState(task.notes ?? '');
1701
1734
  const [priorityDraft, setPriorityDraft] = useState(String(task.priority));
1735
+ const [releaseDraft, setReleaseDraft] = useState(task.release ?? '');
1702
1736
  const [addParentId, setAddParentId] = useState('');
1703
1737
  const [now, setNow] = useState(Date.now());
1704
1738
 
@@ -1708,8 +1742,9 @@ function TaskDetailDrawer({
1708
1742
  setTitleDraft(task.title);
1709
1743
  setNotesDraft(task.notes ?? '');
1710
1744
  setPriorityDraft(String(task.priority));
1745
+ setReleaseDraft(task.release ?? '');
1711
1746
  setAddParentId('');
1712
- }, [task.assignee, task.id, task.status, task.title, task.notes, task.priority]);
1747
+ }, [task.assignee, task.id, task.status, task.title, task.notes, task.priority, task.release]);
1713
1748
 
1714
1749
  useEffect(() => {
1715
1750
  const id = window.setInterval(() => setNow(Date.now()), 15_000);
@@ -1741,14 +1776,16 @@ function TaskDetailDrawer({
1741
1776
  const fieldsDirty =
1742
1777
  titleDraft.trim() !== task.title ||
1743
1778
  notesDraft !== (task.notes ?? '') ||
1744
- (Number.isFinite(priorityNum) && priorityNum !== task.priority);
1779
+ (Number.isFinite(priorityNum) && priorityNum !== task.priority) ||
1780
+ releaseDraft.trim() !== (task.release ?? '');
1745
1781
  const saveFields = () => {
1746
1782
  if (!canEdit || !fieldsDirty) return;
1747
- const patch: { title?: string; notes?: string; priority?: number } = {};
1783
+ const patch: { title?: string; notes?: string; priority?: number; release?: string } = {};
1748
1784
  const t = titleDraft.trim();
1749
1785
  if (t && t !== task.title) patch.title = t;
1750
1786
  if (notesDraft !== (task.notes ?? '')) patch.notes = notesDraft;
1751
1787
  if (Number.isFinite(priorityNum) && priorityNum !== task.priority) patch.priority = priorityNum;
1788
+ if (releaseDraft.trim() !== (task.release ?? '')) patch.release = releaseDraft.trim();
1752
1789
  if (Object.keys(patch).length === 0) return;
1753
1790
  onEditTask(task.id, patch);
1754
1791
  };
@@ -1921,6 +1958,17 @@ function TaskDetailDrawer({
1921
1958
  onChange={(e) => setPriorityDraft(e.target.value)}
1922
1959
  style={{ ...editInputStyle, width: '80px' }}
1923
1960
  />
1961
+ <label style={editLabelStyle}>RELEASE</label>
1962
+ <input
1963
+ type="text"
1964
+ aria-label="Release label"
1965
+ data-help="cluster.task-release"
1966
+ value={releaseDraft}
1967
+ maxLength={24}
1968
+ placeholder="e.g. 0.1.4"
1969
+ onChange={(e) => setReleaseDraft(e.target.value)}
1970
+ style={{ ...editInputStyle, width: '110px' }}
1971
+ />
1924
1972
  </div>
1925
1973
  <div style={{ display: 'flex', gap: '6px' }}>
1926
1974
  <button
@@ -2008,6 +2056,7 @@ function TaskDetailDrawer({
2008
2056
  <FieldGrid>
2009
2057
  <Field label="Assignee" value={task.assignee ? `@${nameFor(task.assignee)} (${shortId(task.assignee)})` : 'UNCLAIMED'} />
2010
2058
  <Field label="Priority" value={String(task.priority)} />
2059
+ {task.release && <Field label="Release" value={task.release} />}
2011
2060
  <Field label="Review" value={task.reviewRequired ? 'required' : 'not required'} />
2012
2061
  <Field label="Goal mode" value={task.goalMode ? `on${task.goalMaxTurns ? ` · ${task.goalMaxTurns} turns` : ''}` : 'off'} />
2013
2062
  <Field label="Worktree required" value={task.worktreeRequired ? 'yes' : 'no'} />
@@ -2692,6 +2741,11 @@ function BoardCard({
2692
2741
  WT
2693
2742
  </span>
2694
2743
  )}
2744
+ {t.release && (
2745
+ <span className="display-font" data-testid="card-release" title={`Release ${t.release}`} style={{ fontSize: '9px', letterSpacing: '0.5px', color: 'var(--color-fg-muted)', border: '1px solid var(--color-border-hairline)', padding: '1px 5px' }}>
2746
+ {t.release}
2747
+ </span>
2748
+ )}
2695
2749
  {(t.parentIds?.length ?? 0) > 0 && (
2696
2750
  <span style={{ fontSize: '9px', color: 'var(--color-fg-muted)' }} title={`${t.parentIds.length} parent task${t.parentIds.length === 1 ? '' : 's'}`}>
2697
2751
  P {t.parentIds.length}