@stigmer/react 3.12.2 → 3.12.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 (429) hide show
  1. package/access/ManageAccessDialog.d.ts.map +1 -1
  2. package/access/ManageAccessDialog.js +3 -19
  3. package/access/ManageAccessDialog.js.map +1 -1
  4. package/agent/steps/IdentityStep.d.ts.map +1 -1
  5. package/agent/steps/IdentityStep.js +2 -1
  6. package/agent/steps/IdentityStep.js.map +1 -1
  7. package/agent-instance/AgentInstanceDetailPanel.d.ts.map +1 -1
  8. package/agent-instance/AgentInstanceDetailPanel.js +2 -1
  9. package/agent-instance/AgentInstanceDetailPanel.js.map +1 -1
  10. package/agent-instance/CreateAgentInstanceDialog.d.ts.map +1 -1
  11. package/agent-instance/CreateAgentInstanceDialog.js +7 -20
  12. package/agent-instance/CreateAgentInstanceDialog.js.map +1 -1
  13. package/api-key/CreateApiKeyForm.d.ts.map +1 -1
  14. package/api-key/CreateApiKeyForm.js +2 -1
  15. package/api-key/CreateApiKeyForm.js.map +1 -1
  16. package/attachment/AttachmentImageLightbox.d.ts.map +1 -1
  17. package/attachment/AttachmentImageLightbox.js +8 -23
  18. package/attachment/AttachmentImageLightbox.js.map +1 -1
  19. package/channel/ChannelConversationsDialog.d.ts.map +1 -1
  20. package/channel/ChannelConversationsDialog.js +5 -20
  21. package/channel/ChannelConversationsDialog.js.map +1 -1
  22. package/channel/ChannelCredentialsDialog.d.ts.map +1 -1
  23. package/channel/ChannelCredentialsDialog.js +3 -19
  24. package/channel/ChannelCredentialsDialog.js.map +1 -1
  25. package/channel/ChannelTemplatesDialog.d.ts.map +1 -1
  26. package/channel/ChannelTemplatesDialog.js +6 -21
  27. package/channel/ChannelTemplatesDialog.js.map +1 -1
  28. package/channel/ConnectSlackDialog.d.ts.map +1 -1
  29. package/channel/ConnectSlackDialog.js +5 -22
  30. package/channel/ConnectSlackDialog.js.map +1 -1
  31. package/channel/ConnectWhatsAppDialog.d.ts.map +1 -1
  32. package/channel/ConnectWhatsAppDialog.js +3 -21
  33. package/channel/ConnectWhatsAppDialog.js.map +1 -1
  34. package/channel/connect/ServingAppSection.d.ts.map +1 -1
  35. package/channel/connect/ServingAppSection.js +2 -1
  36. package/channel/connect/ServingAppSection.js.map +1 -1
  37. package/channel-app/CreateChannelAppForm.d.ts.map +1 -1
  38. package/channel-app/CreateChannelAppForm.js +2 -1
  39. package/channel-app/CreateChannelAppForm.js.map +1 -1
  40. package/conversation/ConversationAttentionBanner.d.ts +23 -6
  41. package/conversation/ConversationAttentionBanner.d.ts.map +1 -1
  42. package/conversation/ConversationAttentionBanner.js +25 -10
  43. package/conversation/ConversationAttentionBanner.js.map +1 -1
  44. package/conversation/ConversationListPane.d.ts.map +1 -1
  45. package/conversation/ConversationListPane.js +26 -6
  46. package/conversation/ConversationListPane.js.map +1 -1
  47. package/conversation/ConversationTimelineView.d.ts.map +1 -1
  48. package/conversation/ConversationTimelineView.js +2 -1
  49. package/conversation/ConversationTimelineView.js.map +1 -1
  50. package/conversation/ConversationsWorkbench.d.ts.map +1 -1
  51. package/conversation/ConversationsWorkbench.js +1 -1
  52. package/conversation/ConversationsWorkbench.js.map +1 -1
  53. package/cursor-accounts/CursorAccountsConsole.d.ts.map +1 -1
  54. package/cursor-accounts/CursorAccountsConsole.js +2 -1
  55. package/cursor-accounts/CursorAccountsConsole.js.map +1 -1
  56. package/cursor-accounts/MemberKeysPanel.d.ts.map +1 -1
  57. package/cursor-accounts/MemberKeysPanel.js +2 -1
  58. package/cursor-accounts/MemberKeysPanel.js.map +1 -1
  59. package/dashboard/DashboardFailedRuns.d.ts.map +1 -1
  60. package/dashboard/DashboardFailedRuns.js +2 -1
  61. package/dashboard/DashboardFailedRuns.js.map +1 -1
  62. package/dependency-graph/DependencyGraph.d.ts.map +1 -1
  63. package/dependency-graph/DependencyGraph.js +2 -1
  64. package/dependency-graph/DependencyGraph.js.map +1 -1
  65. package/dependency-graph/DependencyTreeNode.d.ts.map +1 -1
  66. package/dependency-graph/DependencyTreeNode.js +2 -1
  67. package/dependency-graph/DependencyTreeNode.js.map +1 -1
  68. package/environment/EnvironmentPicker.d.ts.map +1 -1
  69. package/environment/EnvironmentPicker.js +2 -1
  70. package/environment/EnvironmentPicker.js.map +1 -1
  71. package/error/SecretFlowErrorGuide.d.ts.map +1 -1
  72. package/error/SecretFlowErrorGuide.js +2 -1
  73. package/error/SecretFlowErrorGuide.js.map +1 -1
  74. package/execution/ApprovalCard.d.ts.map +1 -1
  75. package/execution/ApprovalCard.js +13 -3
  76. package/execution/ApprovalCard.js.map +1 -1
  77. package/execution/ArtifactContentBody.d.ts.map +1 -1
  78. package/execution/ArtifactContentBody.js +2 -1
  79. package/execution/ArtifactContentBody.js.map +1 -1
  80. package/execution/ArtifactPreviewModal.d.ts.map +1 -1
  81. package/execution/ArtifactPreviewModal.js +11 -17
  82. package/execution/ArtifactPreviewModal.js.map +1 -1
  83. package/execution/ArtifactsWidget.d.ts.map +1 -1
  84. package/execution/ArtifactsWidget.js +2 -1
  85. package/execution/ArtifactsWidget.js.map +1 -1
  86. package/execution/FileChangeProgressBar.d.ts.map +1 -1
  87. package/execution/FileChangeProgressBar.js +2 -1
  88. package/execution/FileChangeProgressBar.js.map +1 -1
  89. package/execution/TodoList.d.ts.map +1 -1
  90. package/execution/TodoList.js +2 -1
  91. package/execution/TodoList.js.map +1 -1
  92. package/execution/ToolCallItem.d.ts +3 -1
  93. package/execution/ToolCallItem.d.ts.map +1 -1
  94. package/execution/ToolCallItem.js +19 -7
  95. package/execution/ToolCallItem.js.map +1 -1
  96. package/execution/WriteBacksWidget.d.ts.map +1 -1
  97. package/execution/WriteBacksWidget.js +2 -1
  98. package/execution/WriteBacksWidget.js.map +1 -1
  99. package/execution/index.d.ts +1 -1
  100. package/execution/index.d.ts.map +1 -1
  101. package/execution/index.js +1 -1
  102. package/execution/index.js.map +1 -1
  103. package/execution/tool-categories.d.ts +37 -3
  104. package/execution/tool-categories.d.ts.map +1 -1
  105. package/execution/tool-categories.js +74 -2
  106. package/execution/tool-categories.js.map +1 -1
  107. package/execution/tool-presenter.d.ts +15 -0
  108. package/execution/tool-presenter.d.ts.map +1 -1
  109. package/execution/tool-presenter.js +7 -2
  110. package/execution/tool-presenter.js.map +1 -1
  111. package/iam-policy/PeopleWithAccess.d.ts.map +1 -1
  112. package/iam-policy/PeopleWithAccess.js +2 -1
  113. package/iam-policy/PeopleWithAccess.js.map +1 -1
  114. package/iam-policy/PrincipalPicker.d.ts.map +1 -1
  115. package/iam-policy/PrincipalPicker.js +2 -1
  116. package/iam-policy/PrincipalPicker.js.map +1 -1
  117. package/iam-policy/RoleSelector.d.ts.map +1 -1
  118. package/iam-policy/RoleSelector.js +2 -1
  119. package/iam-policy/RoleSelector.js.map +1 -1
  120. package/identity-provider/CreateIdentityProviderForm.d.ts.map +1 -1
  121. package/identity-provider/CreateIdentityProviderForm.js +2 -1
  122. package/identity-provider/CreateIdentityProviderForm.js.map +1 -1
  123. package/identity-provider/IdentityProviderDetailPanel.d.ts.map +1 -1
  124. package/identity-provider/IdentityProviderDetailPanel.js +2 -1
  125. package/identity-provider/IdentityProviderDetailPanel.js.map +1 -1
  126. package/identity-provider/IdentityProviderWizard.d.ts.map +1 -1
  127. package/identity-provider/IdentityProviderWizard.js +2 -1
  128. package/identity-provider/IdentityProviderWizard.js.map +1 -1
  129. package/index.d.ts +4 -2
  130. package/index.d.ts.map +1 -1
  131. package/index.js +4 -1
  132. package/index.js.map +1 -1
  133. package/internal/DialogShell.d.ts +77 -0
  134. package/internal/DialogShell.d.ts.map +1 -0
  135. package/internal/DialogShell.js +77 -0
  136. package/internal/DialogShell.js.map +1 -0
  137. package/internal/element-resets.d.ts +17 -0
  138. package/internal/element-resets.d.ts.map +1 -0
  139. package/internal/element-resets.js +32 -0
  140. package/internal/element-resets.js.map +1 -0
  141. package/internal/file-tree/FileTreeNode.d.ts.map +1 -1
  142. package/internal/file-tree/FileTreeNode.js +2 -1
  143. package/internal/file-tree/FileTreeNode.js.map +1 -1
  144. package/internal/markdown-components.d.ts +7 -0
  145. package/internal/markdown-components.d.ts.map +1 -1
  146. package/internal/markdown-components.js +15 -5
  147. package/internal/markdown-components.js.map +1 -1
  148. package/invitation/InvitationManager.d.ts.map +1 -1
  149. package/invitation/InvitationManager.js +2 -1
  150. package/invitation/InvitationManager.js.map +1 -1
  151. package/manifest/ApplyManifestDialog.d.ts.map +1 -1
  152. package/manifest/ApplyManifestDialog.js +8 -17
  153. package/manifest/ApplyManifestDialog.js.map +1 -1
  154. package/manifest/EditResourceYamlDialog.d.ts.map +1 -1
  155. package/manifest/EditResourceYamlDialog.js +3 -19
  156. package/manifest/EditResourceYamlDialog.js.map +1 -1
  157. package/mcp-server/McpServerConnectDialog.d.ts.map +1 -1
  158. package/mcp-server/McpServerConnectDialog.js +8 -20
  159. package/mcp-server/McpServerConnectDialog.js.map +1 -1
  160. package/mcp-server/McpServerDetailView.d.ts.map +1 -1
  161. package/mcp-server/McpServerDetailView.js +4 -15
  162. package/mcp-server/McpServerDetailView.js.map +1 -1
  163. package/mcp-server/steps/IdentityTransportStep.d.ts.map +1 -1
  164. package/mcp-server/steps/IdentityTransportStep.js +2 -1
  165. package/mcp-server/steps/IdentityTransportStep.js.map +1 -1
  166. package/package.json +4 -4
  167. package/platform-client/CreatePlatformClientForm.d.ts.map +1 -1
  168. package/platform-client/CreatePlatformClientForm.js +2 -1
  169. package/platform-client/CreatePlatformClientForm.js.map +1 -1
  170. package/platform-client/PlatformClientDetailPanel.d.ts.map +1 -1
  171. package/platform-client/PlatformClientDetailPanel.js +2 -1
  172. package/platform-client/PlatformClientDetailPanel.js.map +1 -1
  173. package/pricing-governance/BaselineEditor.d.ts.map +1 -1
  174. package/pricing-governance/BaselineEditor.js +2 -1
  175. package/pricing-governance/BaselineEditor.js.map +1 -1
  176. package/pricing-governance/PricingGovernanceConsole.d.ts.map +1 -1
  177. package/pricing-governance/PricingGovernanceConsole.js +2 -1
  178. package/pricing-governance/PricingGovernanceConsole.js.map +1 -1
  179. package/provider-standing/ProviderStandingAccessNotice.d.ts +11 -0
  180. package/provider-standing/ProviderStandingAccessNotice.d.ts.map +1 -0
  181. package/provider-standing/ProviderStandingAccessNotice.js +14 -0
  182. package/provider-standing/ProviderStandingAccessNotice.js.map +1 -0
  183. package/provider-standing/ProviderStandingConsole.d.ts +24 -0
  184. package/provider-standing/ProviderStandingConsole.d.ts.map +1 -0
  185. package/provider-standing/ProviderStandingConsole.js +98 -0
  186. package/provider-standing/ProviderStandingConsole.js.map +1 -0
  187. package/provider-standing/index.d.ts +6 -0
  188. package/provider-standing/index.d.ts.map +1 -0
  189. package/provider-standing/index.js +6 -0
  190. package/provider-standing/index.js.map +1 -0
  191. package/provider-standing/useProviderStanding.d.ts +34 -0
  192. package/provider-standing/useProviderStanding.d.ts.map +1 -0
  193. package/provider-standing/useProviderStanding.js +26 -0
  194. package/provider-standing/useProviderStanding.js.map +1 -0
  195. package/provider.d.ts +12 -0
  196. package/provider.d.ts.map +1 -1
  197. package/provider.js +12 -0
  198. package/provider.js.map +1 -1
  199. package/resource-creation/StepIndicator.d.ts.map +1 -1
  200. package/resource-creation/StepIndicator.js +2 -1
  201. package/resource-creation/StepIndicator.js.map +1 -1
  202. package/resource-detail/ConfirmDialog.d.ts +2 -3
  203. package/resource-detail/ConfirmDialog.d.ts.map +1 -1
  204. package/resource-detail/ConfirmDialog.js +8 -20
  205. package/resource-detail/ConfirmDialog.js.map +1 -1
  206. package/schedule/ScheduleDetailView.d.ts.map +1 -1
  207. package/schedule/ScheduleDetailView.js +3 -2
  208. package/schedule/ScheduleDetailView.js.map +1 -1
  209. package/schedule/ScheduleRunsTable.d.ts.map +1 -1
  210. package/schedule/ScheduleRunsTable.js +2 -1
  211. package/schedule/ScheduleRunsTable.js.map +1 -1
  212. package/session/facets/ArtifactsTab.d.ts.map +1 -1
  213. package/session/facets/ArtifactsTab.js +2 -1
  214. package/session/facets/ArtifactsTab.js.map +1 -1
  215. package/session/facets/ChangesTab.d.ts.map +1 -1
  216. package/session/facets/ChangesTab.js +2 -1
  217. package/session/facets/ChangesTab.js.map +1 -1
  218. package/session/facets/UsageTab.d.ts +10 -3
  219. package/session/facets/UsageTab.d.ts.map +1 -1
  220. package/session/facets/UsageTab.js +42 -6
  221. package/session/facets/UsageTab.js.map +1 -1
  222. package/session/index.d.ts +1 -1
  223. package/session/index.d.ts.map +1 -1
  224. package/session/index.js.map +1 -1
  225. package/session/useSessionUsage.d.ts +25 -0
  226. package/session/useSessionUsage.d.ts.map +1 -1
  227. package/session/useSessionUsage.js +11 -0
  228. package/session/useSessionUsage.js.map +1 -1
  229. package/settings/settings-nav.d.ts.map +1 -1
  230. package/settings/settings-nav.js +7 -1
  231. package/settings/settings-nav.js.map +1 -1
  232. package/settings/useSettingsNavGroups.d.ts.map +1 -1
  233. package/settings/useSettingsNavGroups.js +4 -1
  234. package/settings/useSettingsNavGroups.js.map +1 -1
  235. package/sharing/ShareAgentDialog.d.ts.map +1 -1
  236. package/sharing/ShareAgentDialog.js +4 -21
  237. package/sharing/ShareAgentDialog.js.map +1 -1
  238. package/sidebar/WorkspaceSidebar.d.ts.map +1 -1
  239. package/sidebar/WorkspaceSidebar.js +2 -1
  240. package/sidebar/WorkspaceSidebar.js.map +1 -1
  241. package/skill/SkillDiffDialog.d.ts.map +1 -1
  242. package/skill/SkillDiffDialog.js +5 -21
  243. package/skill/SkillDiffDialog.js.map +1 -1
  244. package/skill/SkillFileBrowser.d.ts.map +1 -1
  245. package/skill/SkillFileBrowser.js +2 -1
  246. package/skill/SkillFileBrowser.js.map +1 -1
  247. package/skill/internal/fetchAndUnpackArtifact.d.ts +1 -1
  248. package/skill/internal/fetchAndUnpackArtifact.d.ts.map +1 -1
  249. package/skill/internal/fetchAndUnpackArtifact.js +47 -3
  250. package/skill/internal/fetchAndUnpackArtifact.js.map +1 -1
  251. package/skill/useSkillDiff.d.ts.map +1 -1
  252. package/skill/useSkillDiff.js +7 -1
  253. package/skill/useSkillDiff.js.map +1 -1
  254. package/skill/useSkillUpload.d.ts.map +1 -1
  255. package/skill/useSkillUpload.js +22 -4
  256. package/skill/useSkillUpload.js.map +1 -1
  257. package/src/__tests__/bare-host-resets.layout.test.tsx +184 -0
  258. package/src/access/ManageAccessDialog.tsx +7 -27
  259. package/src/agent/steps/IdentityStep.tsx +2 -1
  260. package/src/agent-instance/AgentInstanceDetailPanel.tsx +2 -1
  261. package/src/agent-instance/CreateAgentInstanceDialog.tsx +14 -27
  262. package/src/api-key/CreateApiKeyForm.tsx +2 -1
  263. package/src/attachment/AttachmentImageLightbox.tsx +13 -36
  264. package/src/channel/ChannelConversationsDialog.tsx +10 -28
  265. package/src/channel/ChannelCredentialsDialog.tsx +8 -28
  266. package/src/channel/ChannelTemplatesDialog.tsx +12 -30
  267. package/src/channel/ConnectSlackDialog.tsx +10 -31
  268. package/src/channel/ConnectWhatsAppDialog.tsx +8 -30
  269. package/src/channel/connect/ServingAppSection.tsx +2 -1
  270. package/src/channel-app/CreateChannelAppForm.tsx +2 -1
  271. package/src/conversation/ConversationAttentionBanner.tsx +64 -19
  272. package/src/conversation/ConversationListPane.tsx +39 -17
  273. package/src/conversation/ConversationTimelineView.tsx +2 -1
  274. package/src/conversation/ConversationsWorkbench.tsx +1 -0
  275. package/src/conversation/__tests__/ConversationAttentionBanner.test.tsx +76 -2
  276. package/src/conversation/__tests__/ConversationListPane.test.tsx +15 -4
  277. package/src/cursor-accounts/CursorAccountsConsole.tsx +2 -1
  278. package/src/cursor-accounts/MemberKeysPanel.tsx +2 -1
  279. package/src/dashboard/DashboardFailedRuns.tsx +2 -1
  280. package/src/dependency-graph/DependencyGraph.tsx +2 -1
  281. package/src/dependency-graph/DependencyTreeNode.tsx +2 -1
  282. package/src/environment/EnvironmentPicker.tsx +2 -1
  283. package/src/error/SecretFlowErrorGuide.tsx +3 -2
  284. package/src/execution/ApprovalCard.tsx +23 -2
  285. package/src/execution/ArtifactContentBody.tsx +2 -1
  286. package/src/execution/ArtifactPreviewModal.tsx +15 -27
  287. package/src/execution/ArtifactsWidget.tsx +2 -1
  288. package/src/execution/FileChangeProgressBar.tsx +2 -1
  289. package/src/execution/TodoList.tsx +2 -1
  290. package/src/execution/ToolCallItem.tsx +19 -8
  291. package/src/execution/WriteBacksWidget.tsx +2 -1
  292. package/src/execution/__tests__/intent-title.test.tsx +221 -0
  293. package/src/execution/index.ts +3 -0
  294. package/src/execution/tool-categories.ts +103 -5
  295. package/src/execution/tool-presenter.ts +22 -1
  296. package/src/iam-policy/PeopleWithAccess.tsx +2 -1
  297. package/src/iam-policy/PrincipalPicker.tsx +2 -0
  298. package/src/iam-policy/RoleSelector.tsx +2 -1
  299. package/src/identity-provider/CreateIdentityProviderForm.tsx +2 -1
  300. package/src/identity-provider/IdentityProviderDetailPanel.tsx +2 -1
  301. package/src/identity-provider/IdentityProviderWizard.tsx +2 -1
  302. package/src/index.ts +16 -0
  303. package/src/internal/DialogShell.tsx +169 -0
  304. package/src/internal/__tests__/DialogShell.test.tsx +223 -0
  305. package/src/internal/element-resets.ts +33 -0
  306. package/src/internal/file-tree/FileTreeNode.tsx +2 -1
  307. package/src/internal/markdown-components.tsx +15 -5
  308. package/src/invitation/InvitationManager.tsx +3 -2
  309. package/src/manifest/ApplyManifestDialog.tsx +10 -27
  310. package/src/manifest/EditResourceYamlDialog.tsx +4 -31
  311. package/src/mcp-server/McpServerConnectDialog.tsx +15 -29
  312. package/src/mcp-server/McpServerDetailView.tsx +12 -24
  313. package/src/mcp-server/steps/IdentityTransportStep.tsx +3 -2
  314. package/src/platform-client/CreatePlatformClientForm.tsx +4 -3
  315. package/src/platform-client/PlatformClientDetailPanel.tsx +4 -3
  316. package/src/pricing-governance/BaselineEditor.tsx +3 -2
  317. package/src/pricing-governance/PricingGovernanceConsole.tsx +2 -1
  318. package/src/provider-standing/ProviderStandingAccessNotice.tsx +36 -0
  319. package/src/provider-standing/ProviderStandingConsole.tsx +216 -0
  320. package/src/provider-standing/__tests__/ProviderStandingConsole.test.tsx +143 -0
  321. package/src/provider-standing/index.ts +8 -0
  322. package/src/provider-standing/useProviderStanding.ts +50 -0
  323. package/src/provider.tsx +12 -0
  324. package/src/resource-creation/StepIndicator.tsx +2 -1
  325. package/src/resource-detail/ConfirmDialog.tsx +9 -30
  326. package/src/schedule/ScheduleDetailView.tsx +3 -2
  327. package/src/schedule/ScheduleRunsTable.tsx +2 -1
  328. package/src/session/__tests__/UsageTab.test.tsx +136 -0
  329. package/src/session/__tests__/useSessionUsage.test.ts +19 -0
  330. package/src/session/facets/ArtifactsTab.tsx +2 -1
  331. package/src/session/facets/ChangesTab.tsx +2 -1
  332. package/src/session/facets/UsageTab.tsx +98 -6
  333. package/src/session/index.ts +1 -0
  334. package/src/session/useSessionUsage.ts +37 -0
  335. package/src/settings/__tests__/useSettingsNavGroups.test.tsx +11 -1
  336. package/src/settings/settings-nav.ts +7 -0
  337. package/src/settings/useSettingsNavGroups.ts +8 -1
  338. package/src/sharing/ShareAgentDialog.tsx +9 -30
  339. package/src/sidebar/WorkspaceSidebar.tsx +2 -1
  340. package/src/skill/SkillDiffDialog.tsx +13 -36
  341. package/src/skill/SkillFileBrowser.tsx +2 -1
  342. package/src/skill/__tests__/SkillFileBrowser.test.tsx +10 -2
  343. package/src/skill/__tests__/fetchAndUnpackArtifact.test.ts +90 -0
  344. package/src/skill/__tests__/useSkillUpload.test.ts +69 -0
  345. package/src/skill/internal/fetchAndUnpackArtifact.ts +54 -4
  346. package/src/skill/useSkillDiff.ts +7 -1
  347. package/src/skill/useSkillUpload.ts +25 -6
  348. package/src/workflow/FailedRunsWidget.tsx +2 -1
  349. package/src/workflow/PendingApprovalsWidget.tsx +2 -1
  350. package/src/workflow/ViewYamlDialog.tsx +18 -37
  351. package/src/workflow/WorkflowArchitectDialog.tsx +11 -43
  352. package/src/workflow/WorkflowExplainDialog.tsx +11 -37
  353. package/src/workflow/WorkflowGraphFullscreenDialog.tsx +14 -26
  354. package/src/workflow/WorkflowRunDialog.tsx +21 -48
  355. package/src/workflow/execution-comparison/ExecutionComparisonPicker.tsx +14 -31
  356. package/src/workflow/facets/WorkflowArtifactsTab.tsx +2 -1
  357. package/src/workflow/facets/WorkflowUsageTab.tsx +2 -1
  358. package/src/workflow/inspector/WorkflowSummaryPanel.tsx +2 -1
  359. package/src/workflow/inspector/tabs/BranchesTab.tsx +2 -1
  360. package/src/workflow/inspector/tabs/IterationTab.tsx +2 -1
  361. package/src/workflow/instance/CreateWorkflowInstanceDialog.tsx +14 -27
  362. package/src/workflow/instance/WorkflowInstanceDetailPanel.tsx +2 -1
  363. package/src/workflow/templates/WorkflowTemplatePreview.tsx +18 -28
  364. package/src/workspace/ExplorerTree.tsx +2 -1
  365. package/src/workspace/WorkspaceContentSearch.tsx +2 -1
  366. package/src/workspace/WorkspaceFileSearch.tsx +2 -1
  367. package/src/workspace/WorkspaceSummary.tsx +2 -1
  368. package/styles.css +1 -1
  369. package/workflow/FailedRunsWidget.d.ts.map +1 -1
  370. package/workflow/FailedRunsWidget.js +2 -1
  371. package/workflow/FailedRunsWidget.js.map +1 -1
  372. package/workflow/PendingApprovalsWidget.d.ts.map +1 -1
  373. package/workflow/PendingApprovalsWidget.js +2 -1
  374. package/workflow/PendingApprovalsWidget.js.map +1 -1
  375. package/workflow/ViewYamlDialog.d.ts.map +1 -1
  376. package/workflow/ViewYamlDialog.js +10 -29
  377. package/workflow/ViewYamlDialog.js.map +1 -1
  378. package/workflow/WorkflowArchitectDialog.d.ts.map +1 -1
  379. package/workflow/WorkflowArchitectDialog.js +5 -24
  380. package/workflow/WorkflowArchitectDialog.js.map +1 -1
  381. package/workflow/WorkflowExplainDialog.d.ts.map +1 -1
  382. package/workflow/WorkflowExplainDialog.js +5 -21
  383. package/workflow/WorkflowExplainDialog.js.map +1 -1
  384. package/workflow/WorkflowGraphFullscreenDialog.d.ts.map +1 -1
  385. package/workflow/WorkflowGraphFullscreenDialog.js +11 -17
  386. package/workflow/WorkflowGraphFullscreenDialog.js.map +1 -1
  387. package/workflow/WorkflowRunDialog.d.ts.map +1 -1
  388. package/workflow/WorkflowRunDialog.js +13 -29
  389. package/workflow/WorkflowRunDialog.js.map +1 -1
  390. package/workflow/execution-comparison/ExecutionComparisonPicker.d.ts.map +1 -1
  391. package/workflow/execution-comparison/ExecutionComparisonPicker.js +8 -26
  392. package/workflow/execution-comparison/ExecutionComparisonPicker.js.map +1 -1
  393. package/workflow/facets/WorkflowArtifactsTab.d.ts.map +1 -1
  394. package/workflow/facets/WorkflowArtifactsTab.js +2 -1
  395. package/workflow/facets/WorkflowArtifactsTab.js.map +1 -1
  396. package/workflow/facets/WorkflowUsageTab.d.ts.map +1 -1
  397. package/workflow/facets/WorkflowUsageTab.js +2 -1
  398. package/workflow/facets/WorkflowUsageTab.js.map +1 -1
  399. package/workflow/inspector/WorkflowSummaryPanel.d.ts.map +1 -1
  400. package/workflow/inspector/WorkflowSummaryPanel.js +2 -1
  401. package/workflow/inspector/WorkflowSummaryPanel.js.map +1 -1
  402. package/workflow/inspector/tabs/BranchesTab.d.ts.map +1 -1
  403. package/workflow/inspector/tabs/BranchesTab.js +2 -1
  404. package/workflow/inspector/tabs/BranchesTab.js.map +1 -1
  405. package/workflow/inspector/tabs/IterationTab.d.ts.map +1 -1
  406. package/workflow/inspector/tabs/IterationTab.js +2 -1
  407. package/workflow/inspector/tabs/IterationTab.js.map +1 -1
  408. package/workflow/instance/CreateWorkflowInstanceDialog.d.ts.map +1 -1
  409. package/workflow/instance/CreateWorkflowInstanceDialog.js +7 -20
  410. package/workflow/instance/CreateWorkflowInstanceDialog.js.map +1 -1
  411. package/workflow/instance/WorkflowInstanceDetailPanel.d.ts.map +1 -1
  412. package/workflow/instance/WorkflowInstanceDetailPanel.js +2 -1
  413. package/workflow/instance/WorkflowInstanceDetailPanel.js.map +1 -1
  414. package/workflow/templates/WorkflowTemplatePreview.d.ts +1 -1
  415. package/workflow/templates/WorkflowTemplatePreview.d.ts.map +1 -1
  416. package/workflow/templates/WorkflowTemplatePreview.js +10 -22
  417. package/workflow/templates/WorkflowTemplatePreview.js.map +1 -1
  418. package/workspace/ExplorerTree.d.ts.map +1 -1
  419. package/workspace/ExplorerTree.js +2 -1
  420. package/workspace/ExplorerTree.js.map +1 -1
  421. package/workspace/WorkspaceContentSearch.d.ts.map +1 -1
  422. package/workspace/WorkspaceContentSearch.js +2 -1
  423. package/workspace/WorkspaceContentSearch.js.map +1 -1
  424. package/workspace/WorkspaceFileSearch.d.ts.map +1 -1
  425. package/workspace/WorkspaceFileSearch.js +2 -1
  426. package/workspace/WorkspaceFileSearch.js.map +1 -1
  427. package/workspace/WorkspaceSummary.d.ts.map +1 -1
  428. package/workspace/WorkspaceSummary.js +2 -1
  429. package/workspace/WorkspaceSummary.js.map +1 -1
@@ -1,6 +1,6 @@
1
1
  import { create } from "@bufbuild/protobuf";
2
2
  import { GetArtifactRequestSchema } from "@stigmer/protos/ai/stigmer/agentic/skill/v1/io_pb";
3
- import type { Stigmer } from "@stigmer/sdk";
3
+ import { isUnimplemented, type Stigmer } from "@stigmer/sdk";
4
4
  import type { SkillFileEntry } from "../useSkillUpload.js";
5
5
 
6
6
  /** Unpacked artifact: file entries for browsing + content map for reading. */
@@ -20,11 +20,10 @@ export async function fetchAndUnpackArtifact(
20
20
  stigmer: Stigmer,
21
21
  artifactStorageKey: string,
22
22
  ): Promise<UnpackedArtifact> {
23
- const request = create(GetArtifactRequestSchema, { artifactStorageKey });
24
- const response = await stigmer.skill.getArtifact(request);
23
+ const artifact = await fetchArtifactBytes(stigmer, artifactStorageKey);
25
24
 
26
25
  const { unzipSync, strFromU8 } = await import("fflate");
27
- const unzipped = unzipSync(response.artifact);
26
+ const unzipped = unzipSync(artifact);
28
27
 
29
28
  const entries = Object.entries(unzipped);
30
29
  const files: SkillFileEntry[] = entries.map(([path, data]) => ({
@@ -49,3 +48,54 @@ export async function fetchAndUnpackArtifact(
49
48
 
50
49
  return { files, contentMap };
51
50
  }
51
+
52
+ /**
53
+ * Fetch the artifact ZIP bytes, URL-first (the transfer lane, stigmer#675):
54
+ * the bytes ride HTTP, so any valid skill (up to the 100MB limit) is
55
+ * fetchable — the unary `getArtifact` RPC is capped at the server's 10MB
56
+ * gRPC message limit.
57
+ *
58
+ * Fallbacks to the unary lane, deliberately wider than the runner's
59
+ * mint-Unimplemented-only contract because this code runs in a browser:
60
+ *
61
+ * - `Unimplemented` from the mint — a pre-transfer-lane server (the code
62
+ * clients key their fallback on, same as every other lane client).
63
+ * - A failed HTTP fetch of the minted URL — in a browser this is how a
64
+ * missing bucket CORS policy surfaces (an opaque `TypeError`,
65
+ * indistinguishable from a network failure). The unary lane was the
66
+ * status quo and still serves everything under the message cap, so
67
+ * degrading beats breaking the console; the warn keeps it observable.
68
+ */
69
+ async function fetchArtifactBytes(
70
+ stigmer: Stigmer,
71
+ artifactStorageKey: string,
72
+ ): Promise<Uint8Array> {
73
+ const request = create(GetArtifactRequestSchema, { artifactStorageKey });
74
+
75
+ let minted;
76
+ try {
77
+ minted = await stigmer.skill.getArtifactDownloadUrl(request);
78
+ } catch (err) {
79
+ if (isUnimplemented(err)) {
80
+ const response = await stigmer.skill.getArtifact(request);
81
+ return response.artifact;
82
+ }
83
+ throw err;
84
+ }
85
+
86
+ try {
87
+ const doFetch = stigmer.fetch ?? globalThis.fetch;
88
+ const resp = await doFetch(minted.url);
89
+ if (!resp.ok) {
90
+ throw new Error(`artifact download failed with HTTP ${resp.status}`);
91
+ }
92
+ return new Uint8Array(await resp.arrayBuffer());
93
+ } catch (err) {
94
+ console.warn(
95
+ "[stigmer] skill artifact download URL fetch failed (bucket CORS not provisioned for this origin?) — falling back to the unary lane",
96
+ err,
97
+ );
98
+ const response = await stigmer.skill.getArtifact(request);
99
+ return response.artifact;
100
+ }
101
+ }
@@ -21,7 +21,13 @@ export interface UseSkillDiffReturn {
21
21
  readonly error: Error | null;
22
22
  }
23
23
 
24
- /** Maximum artifact size (10 MB) to prevent excessive memory usage. */
24
+ /**
25
+ * Maximum COMBINED unpacked text of both artifacts (10 MB) — a browser
26
+ * memory guard on holding and diffing two extracted file trees, NOT a
27
+ * transport limit. The transfer lane (stigmer#675) removed the download
28
+ * cap, so arbitrarily large valid skills can be *fetched*; what stays
29
+ * bounded is what this hook is willing to diff in tab memory.
30
+ */
25
31
  const MAX_ARTIFACT_BYTES = 10 * 1024 * 1024;
26
32
 
27
33
  // ---------------------------------------------------------------------------
@@ -129,10 +129,16 @@ export function useSkillUpload(): UseSkillUploadReturn {
129
129
  if (abortRef.current !== callId) return;
130
130
 
131
131
  const entries = Object.entries(unzipped);
132
- const skillMdEntry = findSkillMd(entries);
132
+ const skillMdEntry = findRootSkillMd(entries);
133
133
 
134
134
  if (!skillMdEntry) {
135
- setValidationError("ZIP must contain a SKILL.md file at the root level");
135
+ const nestedPath = findNestedSkillMd(entries);
136
+ setValidationError(
137
+ nestedPath
138
+ ? `Found ${nestedPath} — SKILL.md must be at the archive root. ` +
139
+ "Zip the skill folder's contents, not the folder itself."
140
+ : "ZIP must contain a SKILL.md file at the root level",
141
+ );
136
142
  return;
137
143
  }
138
144
 
@@ -207,12 +213,25 @@ function isZip(bytes: Uint8Array): boolean {
207
213
  );
208
214
  }
209
215
 
210
- function findSkillMd(
216
+ /**
217
+ * The layout contract is root-only on both editions (DD-018, #452): the
218
+ * server rejects an archive whose only SKILL.md is nested, so the preview
219
+ * must too — accepting it here converts a clear pre-upload error into a
220
+ * confusing post-upload rejection (issue #684).
221
+ */
222
+ function findRootSkillMd(
211
223
  entries: [string, Uint8Array][],
212
224
  ): [string, Uint8Array] | undefined {
213
- return entries.find(
214
- ([path]) => path === "SKILL.md" || path.match(/^[^/]+\/SKILL\.md$/),
215
- );
225
+ return entries.find(([path]) => path === "SKILL.md");
226
+ }
227
+
228
+ /**
229
+ * Detect the "zipped the folder instead of its contents" mistake so the
230
+ * error can say what to do. Any-depth suffix match, mirroring the server's
231
+ * nested-occurrence detection (skill/storage/zip_extractor.go).
232
+ */
233
+ function findNestedSkillMd(entries: [string, Uint8Array][]): string | undefined {
234
+ return entries.find(([path]) => path.endsWith("/SKILL.md"))?.[0];
216
235
  }
217
236
 
218
237
  function parseFrontmatter(content: string): Record<string, unknown> | null {
@@ -4,6 +4,7 @@ import { memo } from "react";
4
4
  import type { WorkflowExecution } from "@stigmer/protos/ai/stigmer/agentic/workflowexecution/v1/api_pb";
5
5
  import { timestampDate } from "@bufbuild/protobuf/wkt";
6
6
  import { cn } from "@stigmer/theme";
7
+ import { UNSTYLED_LIST } from "../internal/element-resets.js";
7
8
  import { formatRelativeTime } from "../activity/format-relative-time.js";
8
9
 
9
10
  export interface FailedRunsWidgetProps {
@@ -54,7 +55,7 @@ export const FailedRunsWidget = memo(function FailedRunsWidget({
54
55
  No recent failures
55
56
  </p>
56
57
  ) : (
57
- <ul className="stg:space-y-2" role="list">
58
+ <ul className={cn(UNSTYLED_LIST, "stg:space-y-2")} role="list">
58
59
  {executions.map((exec) => {
59
60
  const id = exec.metadata?.id;
60
61
  const name =
@@ -4,6 +4,7 @@ import { memo } from "react";
4
4
  import type { PendingApproval } from "@stigmer/protos/ai/stigmer/agentic/workflowexecution/v1/io_pb";
5
5
  import { timestampDate } from "@bufbuild/protobuf/wkt";
6
6
  import { cn } from "@stigmer/theme";
7
+ import { UNSTYLED_LIST } from "../internal/element-resets.js";
7
8
  import { formatRelativeTime } from "../activity/format-relative-time.js";
8
9
 
9
10
  export interface PendingApprovalsWidgetProps {
@@ -65,7 +66,7 @@ export const PendingApprovalsWidget = memo(function PendingApprovalsWidget({
65
66
  No approvals pending
66
67
  </p>
67
68
  ) : (
68
- <ul className="stg:space-y-2" role="list">
69
+ <ul className={cn(UNSTYLED_LIST, "stg:space-y-2")} role="list">
69
70
  {approvals.map((approval) => {
70
71
  const requestedAt = approval.requestedAt
71
72
  ? timestampDate(approval.requestedAt)
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
 
3
- import { memo, useCallback, useEffect, useRef } from "react";
4
- import { cn } from "@stigmer/theme";
3
+ import { memo, useCallback } from "react";
5
4
  import type { WorkflowGraphModel } from "./workflow-graph-model.js";
6
5
  import { taskToYaml } from "./inspector/task-to-yaml.js";
6
+ import { DialogShell } from "../internal/DialogShell.js";
7
7
  import { useCopyFeedback } from "../internal/useCopyFeedback.js";
8
8
 
9
9
  /** Props for {@link ViewYamlDialog}. */
@@ -32,7 +32,6 @@ export const ViewYamlDialog = memo(function ViewYamlDialog({
32
32
  graph,
33
33
  onClose,
34
34
  }: ViewYamlDialogProps) {
35
- const dialogRef = useRef<HTMLDialogElement>(null);
36
35
  const { copy, copied } = useCopyFeedback();
37
36
 
38
37
  const node = nodeId && graph
@@ -41,45 +40,27 @@ export const ViewYamlDialog = memo(function ViewYamlDialog({
41
40
 
42
41
  const yaml = node ? taskToYaml(node) : "";
43
42
 
44
- useEffect(() => {
45
- const dialog = dialogRef.current;
46
- if (!dialog) return;
47
- if (nodeId && node) {
48
- if (!dialog.open) dialog.showModal();
49
- } else {
50
- if (dialog.open) dialog.close();
51
- }
52
- }, [nodeId, node]);
53
-
54
- useEffect(() => {
55
- const dialog = dialogRef.current;
56
- if (!dialog) return;
57
- const handleClose = () => onClose();
58
- dialog.addEventListener("close", handleClose);
59
- return () => dialog.removeEventListener("close", handleClose);
60
- }, [onClose]);
43
+ const handleOpenChange = useCallback(
44
+ (open: boolean) => {
45
+ if (!open) onClose();
46
+ },
47
+ [onClose],
48
+ );
61
49
 
62
50
  const handleCopy = useCallback(() => {
63
51
  void copy(yaml);
64
52
  }, [copy, yaml]);
65
53
 
66
- const handleBackdropClick = useCallback(
67
- (e: React.MouseEvent<HTMLDialogElement>) => {
68
- if (e.target === dialogRef.current) {
69
- onClose();
70
- }
71
- },
72
- [onClose],
73
- );
74
-
75
54
  return (
76
- <dialog
77
- ref={dialogRef}
78
- className={cn(
79
- "stgm stg:m-auto stg:max-h-[80vh] stg:w-full stg:max-w-lg stg:rounded-lg stg:border stg:border-[var(--stgm-border,#e5e5e5)] stg:bg-[var(--stgm-background,#fff)] stg:p-0 stg:shadow-xl",
80
- "stg:backdrop:bg-backdrop",
81
- )}
82
- onClick={handleBackdropClick}
55
+ <DialogShell
56
+ open={Boolean(nodeId && node)}
57
+ onOpenChange={handleOpenChange}
58
+ width="lg"
59
+ dismissOnBackdrop
60
+ // `stgm` re-establishes the theme scope (this dialog renders from the
61
+ // workflow canvas); the var-fallback styling of the body predates the
62
+ // token utilities and stays untouched here.
63
+ className="stgm stg:max-h-[80vh] stg:bg-[var(--stgm-background,#fff)] stg:border-[var(--stgm-border,#e5e5e5)]"
83
64
  aria-label={node ? `YAML for ${node.taskName}` : "View YAML"}
84
65
  >
85
66
  {node && (
@@ -121,7 +102,7 @@ export const ViewYamlDialog = memo(function ViewYamlDialog({
121
102
  </div>
122
103
  </div>
123
104
  )}
124
- </dialog>
105
+ </DialogShell>
125
106
  );
126
107
  });
127
108
 
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
 
3
- import { useCallback, useEffect, useId, useRef, useState } from "react";
3
+ import { useCallback, useEffect, useId, useState } from "react";
4
4
  import { cn } from "@stigmer/theme";
5
+ import { DialogShell } from "../internal/DialogShell.js";
5
6
  import {
6
7
  useWorkflowArchitectFlow,
7
8
  type ArchitectPhase,
@@ -64,8 +65,6 @@ export function WorkflowArchitectDialog({
64
65
  onSuccess,
65
66
  onError,
66
67
  }: WorkflowArchitectDialogProps) {
67
- const dialogRef = useRef<HTMLDialogElement>(null);
68
-
69
68
  const handleSuccess = useCallback(
70
69
  (successOrg: string, slug: string) => {
71
70
  onOpenChange(false);
@@ -80,54 +79,23 @@ export function WorkflowArchitectDialog({
80
79
  onError,
81
80
  });
82
81
 
82
+ // Each opening starts from a clean prompt.
83
83
  useEffect(() => {
84
- const dialog = dialogRef.current;
85
- if (!dialog) return;
86
- if (open && !dialog.open) {
87
- flow.reset();
88
- dialog.showModal();
89
- } else if (!open && dialog.open) {
90
- dialog.close();
91
- }
84
+ if (open) flow.reset();
92
85
  }, [open, flow.reset]);
93
86
 
94
- const handleDialogCancel = useCallback(
95
- (e: React.SyntheticEvent) => {
96
- e.preventDefault();
97
- onOpenChange(false);
98
- },
99
- [onOpenChange],
100
- );
101
-
102
- const handleBackdropClick = useCallback(
103
- (e: React.MouseEvent<HTMLDialogElement>) => {
104
- if (e.target === dialogRef.current) {
105
- onOpenChange(false);
106
- }
107
- },
108
- [onOpenChange],
109
- );
110
-
111
- const isWorking =
112
- flow.phase === "starting" ||
113
- flow.phase === "streaming" ||
114
- flow.phase === "applying";
115
-
116
87
  return (
117
- <dialog
118
- ref={dialogRef}
119
- onCancel={handleDialogCancel}
120
- onClick={handleBackdropClick}
121
- className={cn(
122
- "stg:fixed stg:inset-0 stg:z-50 stg:m-auto stg:w-full stg:max-w-3xl stg:rounded-lg stg:border stg:border-border stg:bg-popover stg:p-0 stg:text-popover-foreground stg:shadow-lg",
123
- "stg:backdrop:bg-backdrop",
124
- "stg:open:animate-in stg:open:fade-in-0 stg:open:zoom-in-95",
125
- )}
88
+ <DialogShell
89
+ open={open}
90
+ onOpenChange={onOpenChange}
91
+ width="3xl"
92
+ dismissOnBackdrop
93
+ aria-label="Workflow Architect"
126
94
  >
127
95
  <div className="stg:flex stg:flex-col">
128
96
  <DialogPhase flow={flow} onClose={() => onOpenChange(false)} />
129
97
  </div>
130
- </dialog>
98
+ </DialogShell>
131
99
  );
132
100
  }
133
101
 
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
 
3
- import { useCallback, useEffect, useRef } from "react";
3
+ import { useCallback, useEffect } from "react";
4
4
  import { cn } from "@stigmer/theme";
5
+ import { DialogShell } from "../internal/DialogShell.js";
5
6
  import { useExplainWorkflowFlow, type ExplainPhase } from "./useExplainWorkflowFlow.js";
6
7
  import { MessageThread } from "../execution/MessageThread.js";
7
8
  import { SpinnerIcon } from "../internal/SpinnerIcon.js";
@@ -36,8 +37,6 @@ export function WorkflowExplainDialog({
36
37
  org,
37
38
  currentYaml,
38
39
  }: WorkflowExplainDialogProps) {
39
- const dialogRef = useRef<HTMLDialogElement>(null);
40
-
41
40
  const flow = useExplainWorkflowFlow({
42
41
  org,
43
42
  currentYaml,
@@ -46,36 +45,14 @@ export function WorkflowExplainDialog({
46
45
  },
47
46
  });
48
47
 
49
- // Show/hide dialog
48
+ // Each opening starts a fresh explanation.
50
49
  useEffect(() => {
51
- const dialog = dialogRef.current;
52
- if (!dialog) return;
53
- if (open && !dialog.open) {
50
+ if (open) {
54
51
  flow.reset();
55
- dialog.showModal();
56
52
  flow.explain();
57
- } else if (!open && dialog.open) {
58
- dialog.close();
59
53
  }
60
54
  }, [open, flow.reset, flow.explain]);
61
55
 
62
- const handleDialogCancel = useCallback(
63
- (e: React.SyntheticEvent) => {
64
- e.preventDefault();
65
- onOpenChange(false);
66
- },
67
- [onOpenChange],
68
- );
69
-
70
- const handleBackdropClick = useCallback(
71
- (e: React.MouseEvent<HTMLDialogElement>) => {
72
- if (e.target === dialogRef.current) {
73
- onOpenChange(false);
74
- }
75
- },
76
- [onOpenChange],
77
- );
78
-
79
56
  const { copy, copied } = useCopyFeedback();
80
57
  const handleCopy = useCallback(() => {
81
58
  if (flow.explanation) {
@@ -84,15 +61,12 @@ export function WorkflowExplainDialog({
84
61
  }, [copy, flow.explanation]);
85
62
 
86
63
  return (
87
- <dialog
88
- ref={dialogRef}
89
- onCancel={handleDialogCancel}
90
- onClick={handleBackdropClick}
91
- className={cn(
92
- "stg:fixed stg:inset-0 stg:z-50 stg:m-auto stg:w-full stg:max-w-2xl stg:rounded-lg stg:border stg:border-border stg:bg-popover stg:p-0 stg:text-popover-foreground stg:shadow-lg",
93
- "stg:backdrop:bg-backdrop",
94
- "stg:open:animate-in stg:open:fade-in-0 stg:open:zoom-in-95",
95
- )}
64
+ <DialogShell
65
+ open={open}
66
+ onOpenChange={onOpenChange}
67
+ width="2xl"
68
+ dismissOnBackdrop
69
+ aria-label="Workflow Explanation"
96
70
  >
97
71
  <div className="stg:flex stg:flex-col">
98
72
  {/* Header */}
@@ -206,7 +180,7 @@ export function WorkflowExplainDialog({
206
180
  </div>
207
181
  </div>
208
182
  </div>
209
- </dialog>
183
+ </DialogShell>
210
184
  );
211
185
  }
212
186
 
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
 
3
- import { useCallback, useEffect, useRef } from "react";
3
+ import { useCallback } from "react";
4
4
  import { cn } from "@stigmer/theme";
5
+ import { DialogShell } from "../internal/DialogShell.js";
5
6
  import type { Workflow } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/api_pb";
6
7
  import { WorkflowOverviewGraph } from "./WorkflowOverviewGraph.js";
7
8
 
@@ -38,23 +39,9 @@ export function WorkflowGraphFullscreenDialog({
38
39
  onClose,
39
40
  onOpenInEditor,
40
41
  }: WorkflowGraphFullscreenDialogProps) {
41
- const dialogRef = useRef<HTMLDialogElement>(null);
42
-
43
- useEffect(() => {
44
- const dialog = dialogRef.current;
45
- if (!dialog) return;
46
-
47
- if (open && !dialog.open) {
48
- dialog.showModal();
49
- } else if (!open && dialog.open) {
50
- dialog.close();
51
- }
52
- }, [open]);
53
-
54
- const handleCancel = useCallback(
55
- (e: React.SyntheticEvent) => {
56
- e.preventDefault();
57
- onClose();
42
+ const handleOpenChange = useCallback(
43
+ (nextOpen: boolean) => {
44
+ if (!nextOpen) onClose();
58
45
  },
59
46
  [onClose],
60
47
  );
@@ -62,14 +49,15 @@ export function WorkflowGraphFullscreenDialog({
62
49
  const workflowName = workflow?.metadata?.name || "Task Flow";
63
50
 
64
51
  return (
65
- <dialog
66
- ref={dialogRef}
67
- onCancel={handleCancel}
52
+ <DialogShell
53
+ open={open}
54
+ onOpenChange={handleOpenChange}
68
55
  aria-label={`${workflowName} — full view`}
69
- className={cn(
70
- "stg:fixed stg:inset-0 stg:z-50 stg:m-auto stg:h-[90vh] stg:w-[95vw] stg:rounded-lg stg:border stg:border-border stg:bg-background stg:p-0 stg:text-foreground stg:shadow-2xl stg:outline-none",
71
- "stg:[&::backdrop]:bg-black/60",
72
- )}
56
+ // Near-full-viewport outlier: free-form sizing and the background
57
+ // surface for the graph canvas. The previously hardcoded ::backdrop
58
+ // color (bg-black/60 — it predated and escaped the #652 fence via the
59
+ // arbitrary-variant spelling) now rides the shell's token backdrop.
60
+ className="stg:h-[90vh] stg:w-[95vw] stg:max-w-none stg:bg-background stg:text-foreground stg:outline-none"
73
61
  >
74
62
  {open && (
75
63
  <div className="stg:flex stg:h-full stg:flex-col">
@@ -101,7 +89,7 @@ export function WorkflowGraphFullscreenDialog({
101
89
  </div>
102
90
  </div>
103
91
  )}
104
- </dialog>
92
+ </DialogShell>
105
93
  );
106
94
  }
107
95
 
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
 
3
- import { useCallback, useEffect, useRef } from "react";
3
+ import { useCallback, useEffect } from "react";
4
4
  import { cn } from "@stigmer/theme";
5
+ import { DialogShell } from "../internal/DialogShell.js";
5
6
  import type { Workflow } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/api_pb";
6
7
  import type { WorkflowInstance } from "@stigmer/protos/ai/stigmer/agentic/workflowinstance/v1/api_pb";
7
8
  import { useRunWorkflowFlow } from "./useRunWorkflowFlow.js";
@@ -82,8 +83,6 @@ export function WorkflowRunDialog({
82
83
  onSuccess,
83
84
  onError,
84
85
  }: WorkflowRunDialogProps) {
85
- const dialogRef = useRef<HTMLDialogElement>(null);
86
-
87
86
  const handleSuccess = useCallback(
88
87
  (executionId: string) => {
89
88
  onOpenChange(false);
@@ -100,25 +99,19 @@ export function WorkflowRunDialog({
100
99
  onError,
101
100
  });
102
101
 
103
- // Sync open state with the native dialog
102
+ // Each opening starts from a clean form.
104
103
  useEffect(() => {
105
- const dialog = dialogRef.current;
106
- if (!dialog) return;
107
- if (open && !dialog.open) {
108
- flow.reset();
109
- // Preselection must follow reset (reset clears the selection back to
110
- // the server-resolved default). Guarded against stale ids: an instance
111
- // deleted between the caller capturing the id and this open falls back
112
- // to the default option instead of a <select> value with no option.
113
- if (
114
- initialInstanceId &&
115
- instances.some((i) => i.metadata?.id === initialInstanceId)
116
- ) {
117
- flow.setSelectedInstanceId(initialInstanceId);
118
- }
119
- dialog.showModal();
120
- } else if (!open && dialog.open) {
121
- dialog.close();
104
+ if (!open) return;
105
+ flow.reset();
106
+ // Preselection must follow reset (reset clears the selection back to
107
+ // the server-resolved default). Guarded against stale ids: an instance
108
+ // deleted between the caller capturing the id and this open falls back
109
+ // to the default option instead of a <select> value with no option.
110
+ if (
111
+ initialInstanceId &&
112
+ instances.some((i) => i.metadata?.id === initialInstanceId)
113
+ ) {
114
+ flow.setSelectedInstanceId(initialInstanceId);
122
115
  }
123
116
  }, [
124
117
  open,
@@ -128,36 +121,16 @@ export function WorkflowRunDialog({
128
121
  instances,
129
122
  ]);
130
123
 
131
- const handleDialogCancel = useCallback(
132
- (e: React.SyntheticEvent) => {
133
- e.preventDefault();
134
- onOpenChange(false);
135
- },
136
- [onOpenChange],
137
- );
138
-
139
- const handleBackdropClick = useCallback(
140
- (e: React.MouseEvent<HTMLDialogElement>) => {
141
- if (e.target === dialogRef.current) {
142
- onOpenChange(false);
143
- }
144
- },
145
- [onOpenChange],
146
- );
147
-
148
124
  const workflowName =
149
125
  workflow.metadata?.name || workflow.metadata?.slug || "Workflow";
150
126
 
151
127
  return (
152
- <dialog
153
- ref={dialogRef}
154
- onCancel={handleDialogCancel}
155
- onClick={handleBackdropClick}
156
- className={cn(
157
- "stg:fixed stg:inset-0 stg:z-50 stg:m-auto stg:w-full stg:max-w-lg stg:rounded-lg stg:border stg:border-border stg:bg-popover stg:p-0 stg:text-popover-foreground stg:shadow-lg",
158
- "stg:backdrop:bg-backdrop",
159
- "stg:open:animate-in stg:open:fade-in-0 stg:open:zoom-in-95",
160
- )}
128
+ <DialogShell
129
+ open={open}
130
+ onOpenChange={onOpenChange}
131
+ width="lg"
132
+ dismissOnBackdrop
133
+ aria-label={`Run ${workflowName}`}
161
134
  >
162
135
  <div className="stg:flex stg:flex-col">
163
136
  {/* Header */}
@@ -231,7 +204,7 @@ export function WorkflowRunDialog({
231
204
  </button>
232
205
  </div>
233
206
  </div>
234
- </dialog>
207
+ </DialogShell>
235
208
  );
236
209
  }
237
210