@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,7 +1,8 @@
1
1
  "use client";
2
2
 
3
- import { useCallback, useId, useRef, useState } from "react";
3
+ import { useCallback, useId, useState } from "react";
4
4
  import { cn } from "@stigmer/theme";
5
+ import { DialogShell } from "../internal/DialogShell.js";
5
6
  import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
6
7
  import type { AgentInstance } from "@stigmer/protos/ai/stigmer/agentic/agentinstance/v1/api_pb";
7
8
  import type { ResourceRef } from "@stigmer/sdk";
@@ -39,7 +40,6 @@ export function CreateAgentInstanceDialog({
39
40
  agentId,
40
41
  onCreated,
41
42
  }: CreateAgentInstanceDialogProps) {
42
- const dialogRef = useRef<HTMLDialogElement>(null);
43
43
  const { create, isCreating, error, clearError } = useCreateAgentInstance();
44
44
 
45
45
  // Instance-scoped element ids (oss#593): a reusable component must not
@@ -65,11 +65,17 @@ export function CreateAgentInstanceDialog({
65
65
  }, [clearError]);
66
66
 
67
67
  const handleClose = useCallback(() => {
68
- dialogRef.current?.close();
69
68
  onOpenChange(false);
70
69
  resetForm();
71
70
  }, [onOpenChange, resetForm]);
72
71
 
72
+ const handleShellOpenChange = useCallback(
73
+ (nextOpen: boolean) => {
74
+ if (!nextOpen) handleClose();
75
+ },
76
+ [handleClose],
77
+ );
78
+
73
79
  const handleSubmit = useCallback(
74
80
  async (e: React.FormEvent) => {
75
81
  e.preventDefault();
@@ -93,30 +99,11 @@ export function CreateAgentInstanceDialog({
93
99
  [name, org, agentId, description, environmentRefs, visibility, create, onCreated, handleClose],
94
100
  );
95
101
 
96
- // Sync native dialog open state
97
- const prevOpenRef = useRef(false);
98
- if (open !== prevOpenRef.current) {
99
- prevOpenRef.current = open;
100
- if (open) {
101
- // Must defer showModal to after render
102
- requestAnimationFrame(() => {
103
- if (dialogRef.current && !dialogRef.current.open) {
104
- dialogRef.current.showModal();
105
- }
106
- });
107
- } else if (dialogRef.current?.open) {
108
- dialogRef.current.close();
109
- }
110
- }
111
-
112
102
  return (
113
- <dialog
114
- ref={dialogRef}
115
- onClose={handleClose}
116
- className={cn(
117
- "stg:fixed stg:inset-0 stg:m-auto stg:w-full stg:max-w-lg stg:rounded-xl stg:border stg:border-border stg:bg-popover stg:p-0 stg:shadow-xl",
118
- "stg:backdrop:bg-backdrop",
119
- )}
103
+ <DialogShell
104
+ open={open}
105
+ onOpenChange={handleShellOpenChange}
106
+ width="lg"
120
107
  aria-labelledby={titleId}
121
108
  >
122
109
  <form onSubmit={handleSubmit} className="stg:flex stg:flex-col">
@@ -255,7 +242,7 @@ export function CreateAgentInstanceDialog({
255
242
  </button>
256
243
  </div>
257
244
  </form>
258
- </dialog>
245
+ </DialogShell>
259
246
  );
260
247
  }
261
248
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { useCallback, useId, useState, type FormEvent } from "react";
4
4
  import { cn } from "@stigmer/theme";
5
+ import { UNSTYLED_FIELDSET } from "../internal/element-resets.js";
5
6
  import { getUserMessage } from "@stigmer/sdk";
6
7
  import type { ApiKey } from "@stigmer/protos/ai/stigmer/iam/apikey/v1/api_pb";
7
8
  import { useCreateApiKey } from "./useCreateApiKey.js";
@@ -122,7 +123,7 @@ export function CreateApiKeyForm({
122
123
  </div>
123
124
 
124
125
  {/* Expiry */}
125
- <fieldset className="stg:space-y-1.5">
126
+ <fieldset className={cn(UNSTYLED_FIELDSET, "stg:space-y-1.5")}>
126
127
  <legend className="stg:text-xs stg:font-medium stg:text-foreground">
127
128
  Expiration
128
129
  </legend>
@@ -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
 
6
7
  /** Props for {@link AttachmentImageLightbox}. */
7
8
  export interface AttachmentImageLightboxProps {
@@ -48,47 +49,23 @@ export function AttachmentImageLightbox({
48
49
  onClose,
49
50
  className,
50
51
  }: AttachmentImageLightboxProps) {
51
- const dialogRef = useRef<HTMLDialogElement>(null);
52
-
53
- useEffect(() => {
54
- const dialog = dialogRef.current;
55
- if (!dialog) return;
56
-
57
- if (open && !dialog.open) {
58
- dialog.showModal();
59
- } else if (!open && dialog.open) {
60
- dialog.close();
61
- }
62
- }, [open]);
63
-
64
- // Escape arrives as the native `cancel` event; intercept it so the
65
- // caller's `open` prop stays the single source of truth for visibility.
66
- const handleCancel = useCallback(
67
- (e: React.SyntheticEvent) => {
68
- e.preventDefault();
69
- onClose();
70
- },
71
- [onClose],
72
- );
73
-
74
- const handleBackdropClick = useCallback(
75
- (e: React.MouseEvent<HTMLDialogElement>) => {
76
- if (e.target === dialogRef.current) {
77
- onClose();
78
- }
52
+ const handleOpenChange = useCallback(
53
+ (nextOpen: boolean) => {
54
+ if (!nextOpen) onClose();
79
55
  },
80
56
  [onClose],
81
57
  );
82
58
 
83
59
  return (
84
- <dialog
85
- ref={dialogRef}
86
- onCancel={handleCancel}
87
- onClick={handleBackdropClick}
60
+ <DialogShell
61
+ open={open}
62
+ onOpenChange={handleOpenChange}
63
+ dismissOnBackdrop
88
64
  aria-label={`Preview ${filename}`}
65
+ // Lightbox outlier: viewport-relative sizing (not a width preset) and
66
+ // the background surface for image content.
89
67
  className={cn(
90
- "stg:fixed stg:inset-0 stg:m-auto stg:max-h-[85vh] stg:max-w-[85vw] stg:rounded-lg stg:border stg:border-border stg:bg-background stg:p-0 stg:text-foreground stg:shadow-lg stg:outline-none",
91
- "stg:backdrop:bg-backdrop",
68
+ "stg:w-auto stg:max-h-[85vh] stg:max-w-[85vw] stg:bg-background stg:text-foreground stg:outline-none",
92
69
  className,
93
70
  )}
94
71
  >
@@ -127,7 +104,7 @@ export function AttachmentImageLightbox({
127
104
  </div>
128
105
  </div>
129
106
  )}
130
- </dialog>
107
+ </DialogShell>
131
108
  );
132
109
  }
133
110
 
@@ -1,9 +1,11 @@
1
1
  "use client";
2
2
 
3
- import { useCallback, useId, useRef } from "react";
3
+ import { useCallback, useId } from "react";
4
4
  import { timestampDate } from "@bufbuild/protobuf/wkt";
5
5
  import { MessageSquare, User, X } from "lucide-react";
6
6
  import { cn } from "@stigmer/theme";
7
+ import { DialogShell } from "../internal/DialogShell.js";
8
+ import { UNSTYLED_LIST } from "../internal/element-resets.js";
7
9
  import { getUserMessage } from "@stigmer/sdk";
8
10
  import type { AgentChannel } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/api_pb";
9
11
  import type { Session } from "@stigmer/protos/ai/stigmer/agentic/session/v1/api_pb";
@@ -68,38 +70,18 @@ export function ChannelConversationsDialog({
68
70
  sessionHref,
69
71
  modal = true,
70
72
  }: ChannelConversationsDialogProps) {
71
- const dialogRef = useRef<HTMLDialogElement>(null);
72
73
  const titleId = useId();
73
74
 
74
75
  const handleClose = useCallback(() => {
75
- dialogRef.current?.close();
76
76
  onOpenChange(false);
77
77
  }, [onOpenChange]);
78
78
 
79
- // Sync native dialog open state (matches the SDK dialog convention).
80
- const prevOpenRef = useRef(false);
81
- if (modal && open !== prevOpenRef.current) {
82
- prevOpenRef.current = open;
83
- if (open) {
84
- requestAnimationFrame(() => {
85
- if (dialogRef.current && !dialogRef.current.open) {
86
- dialogRef.current.showModal();
87
- }
88
- });
89
- } else if (dialogRef.current?.open) {
90
- dialogRef.current.close();
91
- }
92
- }
93
-
94
79
  return (
95
- <dialog
96
- ref={dialogRef}
97
- open={modal ? undefined : open}
98
- onClose={handleClose}
99
- className={cn(
100
- "stg:w-full stg:max-w-lg stg:rounded-xl stg:border stg:border-border stg:bg-popover stg:p-0 stg:shadow-xl",
101
- modal ? "stg:fixed stg:inset-0 stg:m-auto stg:backdrop:bg-backdrop" : "stg:relative",
102
- )}
80
+ <DialogShell
81
+ open={open}
82
+ onOpenChange={onOpenChange}
83
+ modal={modal}
84
+ width="lg"
103
85
  aria-labelledby={titleId}
104
86
  >
105
87
  {/* Body mounts only while open so each opening fetches fresh. */}
@@ -111,7 +93,7 @@ export function ChannelConversationsDialog({
111
93
  onClose={handleClose}
112
94
  />
113
95
  )}
114
- </dialog>
96
+ </DialogShell>
115
97
  );
116
98
  }
117
99
 
@@ -172,7 +154,7 @@ function ChannelConversationsDialogBody({
172
154
  description="When someone messages this channel, the sessions serving them appear here."
173
155
  />
174
156
  ) : (
175
- <ul className="stg:space-y-1">
157
+ <ul className={cn(UNSTYLED_LIST, "stg:space-y-1")}>
176
158
  {sessions.map((session) => (
177
159
  <ConversationRow
178
160
  key={session.metadata?.id}
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
 
3
- import { useCallback, useId, useRef, useState } from "react";
3
+ import { useCallback, useId, useState } from "react";
4
4
  import { cn } from "@stigmer/theme";
5
+ import { DialogShell } from "../internal/DialogShell.js";
5
6
  import { getUserMessage, type ResourceRef } from "@stigmer/sdk";
6
7
  import type { Agent } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
7
8
  import type { AgentChannel } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/api_pb";
@@ -51,8 +52,6 @@ export function ChannelCredentialsDialog({
51
52
  onSaved,
52
53
  modal = true,
53
54
  }: ChannelCredentialsDialogProps) {
54
- const dialogRef = useRef<HTMLDialogElement>(null);
55
-
56
55
  // Instance-scoped title id (oss#593): a reusable component must not
57
56
  // hardcode DOM ids — hosts legitimately mount this dialog more than once
58
57
  // per page (e.g. zone-cached detail pages), and duplicate ids break the
@@ -60,34 +59,15 @@ export function ChannelCredentialsDialog({
60
59
  const titleId = useId();
61
60
 
62
61
  const handleClose = useCallback(() => {
63
- dialogRef.current?.close();
64
62
  onOpenChange(false);
65
63
  }, [onOpenChange]);
66
64
 
67
- // Sync native dialog open state (matches the SDK dialog convention).
68
- const prevOpenRef = useRef(false);
69
- if (modal && open !== prevOpenRef.current) {
70
- prevOpenRef.current = open;
71
- if (open) {
72
- requestAnimationFrame(() => {
73
- if (dialogRef.current && !dialogRef.current.open) {
74
- dialogRef.current.showModal();
75
- }
76
- });
77
- } else if (dialogRef.current?.open) {
78
- dialogRef.current.close();
79
- }
80
- }
81
-
82
65
  return (
83
- <dialog
84
- ref={dialogRef}
85
- open={modal ? undefined : open}
86
- onClose={handleClose}
87
- className={cn(
88
- "stg:w-full stg:max-w-md stg:rounded-xl stg:border stg:border-border stg:bg-popover stg:p-0 stg:shadow-xl",
89
- modal ? "stg:fixed stg:inset-0 stg:m-auto stg:backdrop:bg-backdrop" : "stg:relative",
90
- )}
66
+ <DialogShell
67
+ open={open}
68
+ onOpenChange={onOpenChange}
69
+ modal={modal}
70
+ width="md"
91
71
  aria-labelledby={titleId}
92
72
  >
93
73
  {/* Body mounts only while open so its draft resets per session —
@@ -101,7 +81,7 @@ export function ChannelCredentialsDialog({
101
81
  titleId={titleId}
102
82
  />
103
83
  )}
104
- </dialog>
84
+ </DialogShell>
105
85
  );
106
86
  }
107
87
 
@@ -1,8 +1,10 @@
1
1
  "use client";
2
2
 
3
- import { useCallback, useId, useRef, type ReactNode } from "react";
3
+ import { useCallback, useId, type ReactNode } from "react";
4
4
  import { ExternalLink, LayoutTemplate, X } from "lucide-react";
5
5
  import { cn } from "@stigmer/theme";
6
+ import { DialogShell } from "../internal/DialogShell.js";
7
+ import { UNSTYLED_LIST } from "../internal/element-resets.js";
6
8
  import { getUserMessage } from "@stigmer/sdk";
7
9
  import type { AgentChannel } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/api_pb";
8
10
  import type { ChannelTemplate } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/message_io_pb";
@@ -89,40 +91,20 @@ export function ChannelTemplatesDialog({
89
91
  onEditYaml,
90
92
  modal = true,
91
93
  }: ChannelTemplatesDialogProps) {
92
- const dialogRef = useRef<HTMLDialogElement>(null);
93
94
  const titleId = useId();
94
95
 
95
96
  const handleClose = useCallback(() => {
96
- dialogRef.current?.close();
97
97
  onOpenChange(false);
98
98
  }, [onOpenChange]);
99
99
 
100
- // Sync native dialog open state (matches the SDK dialog convention).
101
- const prevOpenRef = useRef(false);
102
- if (modal && open !== prevOpenRef.current) {
103
- prevOpenRef.current = open;
104
- if (open) {
105
- requestAnimationFrame(() => {
106
- if (dialogRef.current && !dialogRef.current.open) {
107
- dialogRef.current.showModal();
108
- }
109
- });
110
- } else if (dialogRef.current?.open) {
111
- dialogRef.current.close();
112
- }
113
- }
114
-
115
100
  return (
116
- <dialog
117
- ref={dialogRef}
118
- open={modal ? undefined : open}
119
- onClose={handleClose}
120
- className={cn(
121
- // Wider than the conversations dialog on purpose: template
122
- // bodies are the content, and a narrow column shreds them.
123
- "stg:w-full stg:max-w-2xl stg:rounded-xl stg:border stg:border-border stg:bg-popover stg:p-0 stg:shadow-xl",
124
- modal ? "stg:fixed stg:inset-0 stg:m-auto stg:backdrop:bg-backdrop" : "stg:relative",
125
- )}
101
+ <DialogShell
102
+ open={open}
103
+ onOpenChange={onOpenChange}
104
+ modal={modal}
105
+ // Wider than the conversations dialog on purpose: template
106
+ // bodies are the content, and a narrow column shreds them.
107
+ width="2xl"
126
108
  aria-labelledby={titleId}
127
109
  >
128
110
  {/* Body mounts only while open so each opening fetches fresh —
@@ -135,7 +117,7 @@ export function ChannelTemplatesDialog({
135
117
  onClose={handleClose}
136
118
  />
137
119
  )}
138
- </dialog>
120
+ </DialogShell>
139
121
  );
140
122
  }
141
123
 
@@ -316,7 +298,7 @@ function ChannelTemplatesList({
316
298
  </p>
317
299
  <WhatsAppManagerLink label="Manage in WhatsApp Manager" />
318
300
  </div>
319
- <ul className="stg:space-y-2">
301
+ <ul className={cn(UNSTYLED_LIST, "stg:space-y-2")}>
320
302
  {templates.map((template) => (
321
303
  <TemplateRow
322
304
  key={`${template.name}\u0000${template.language}`}
@@ -1,7 +1,9 @@
1
1
  "use client";
2
2
 
3
- import { useCallback, useId, useMemo, useRef, useState } from "react";
3
+ import { useCallback, useId, useMemo, useState } from "react";
4
4
  import { cn } from "@stigmer/theme";
5
+ import { DialogShell } from "../internal/DialogShell.js";
6
+ import { UNSTYLED_LIST } from "../internal/element-resets.js";
5
7
  import { getErrorReason, type ResourceRef } from "@stigmer/sdk";
6
8
  import type { Agent } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
7
9
  import type { AgentChannel } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/api_pb";
@@ -89,8 +91,6 @@ export function ConnectSlackDialog({
89
91
  modal = true,
90
92
  channelAppsHref,
91
93
  }: ConnectSlackDialogProps) {
92
- const dialogRef = useRef<HTMLDialogElement>(null);
93
-
94
94
  // Instance-scoped title id (oss#593): a reusable component must not
95
95
  // hardcode DOM ids — hosts legitimately mount this dialog more than once
96
96
  // per page (e.g. zone-cached detail pages), and duplicate ids break the
@@ -98,36 +98,15 @@ export function ConnectSlackDialog({
98
98
  const titleId = useId();
99
99
 
100
100
  const handleClose = useCallback(() => {
101
- dialogRef.current?.close();
102
101
  onOpenChange(false);
103
102
  }, [onOpenChange]);
104
103
 
105
- // Sync native dialog open state (matches the SDK dialog convention).
106
- // Non-modal hosts pass `open` as a plain attribute instead — the dialog
107
- // renders in-flow with no top layer to manage.
108
- const prevOpenRef = useRef(false);
109
- if (modal && open !== prevOpenRef.current) {
110
- prevOpenRef.current = open;
111
- if (open) {
112
- requestAnimationFrame(() => {
113
- if (dialogRef.current && !dialogRef.current.open) {
114
- dialogRef.current.showModal();
115
- }
116
- });
117
- } else if (dialogRef.current?.open) {
118
- dialogRef.current.close();
119
- }
120
- }
121
-
122
104
  return (
123
- <dialog
124
- ref={dialogRef}
125
- open={modal ? undefined : open}
126
- onClose={handleClose}
127
- className={cn(
128
- "stg:w-full stg:max-w-md stg:rounded-xl stg:border stg:border-border stg:bg-popover stg:p-0 stg:shadow-xl",
129
- modal ? "stg:fixed stg:inset-0 stg:m-auto stg:backdrop:bg-backdrop" : "stg:relative",
130
- )}
105
+ <DialogShell
106
+ open={open}
107
+ onOpenChange={onOpenChange}
108
+ modal={modal}
109
+ width="md"
131
110
  aria-labelledby={titleId}
132
111
  >
133
112
  {/* Body mounts only while open so its flow state resets per
@@ -142,7 +121,7 @@ export function ConnectSlackDialog({
142
121
  channelAppsHref={channelAppsHref}
143
122
  />
144
123
  )}
145
- </dialog>
124
+ </DialogShell>
146
125
  );
147
126
  }
148
127
 
@@ -549,7 +528,7 @@ function FlowProgress({
549
528
 
550
529
  return (
551
530
  <div className="stg:space-y-3" aria-live="polite">
552
- <ul className="stg:space-y-2">
531
+ <ul className={cn(UNSTYLED_LIST, "stg:space-y-2")}>
553
532
  {FLOW_STEPS.map((step, i) => {
554
533
  const isActive = i === activeIndex;
555
534
  const isDone = activeIndex > i;
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
 
3
- import { useCallback, useId, useMemo, useRef, useState } from "react";
3
+ import { useCallback, useId, useMemo, useState } from "react";
4
4
  import { cn } from "@stigmer/theme";
5
+ import { DialogShell } from "../internal/DialogShell.js";
5
6
  import { getErrorReason, type ResourceRef } from "@stigmer/sdk";
6
7
  import type { Agent } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
7
8
  import type { AgentChannel } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/api_pb";
@@ -100,8 +101,6 @@ export function ConnectWhatsAppDialog({
100
101
  modal = true,
101
102
  channelAppsHref,
102
103
  }: ConnectWhatsAppDialogProps) {
103
- const dialogRef = useRef<HTMLDialogElement>(null);
104
-
105
104
  // Instance-scoped title id (oss#593): a reusable component must not
106
105
  // hardcode DOM ids — hosts legitimately mount this dialog more than once
107
106
  // per page (e.g. zone-cached detail pages), and duplicate ids break the
@@ -109,36 +108,15 @@ export function ConnectWhatsAppDialog({
109
108
  const titleId = useId();
110
109
 
111
110
  const handleClose = useCallback(() => {
112
- dialogRef.current?.close();
113
111
  onOpenChange(false);
114
112
  }, [onOpenChange]);
115
113
 
116
- // Sync native dialog open state (matches the SDK dialog convention).
117
- // Non-modal hosts pass `open` as a plain attribute instead — the dialog
118
- // renders in-flow with no top layer to manage.
119
- const prevOpenRef = useRef(false);
120
- if (modal && open !== prevOpenRef.current) {
121
- prevOpenRef.current = open;
122
- if (open) {
123
- requestAnimationFrame(() => {
124
- if (dialogRef.current && !dialogRef.current.open) {
125
- dialogRef.current.showModal();
126
- }
127
- });
128
- } else if (dialogRef.current?.open) {
129
- dialogRef.current.close();
130
- }
131
- }
132
-
133
114
  return (
134
- <dialog
135
- ref={dialogRef}
136
- open={modal ? undefined : open}
137
- onClose={handleClose}
138
- className={cn(
139
- "stg:w-full stg:max-w-md stg:rounded-xl stg:border stg:border-border stg:bg-popover stg:p-0 stg:shadow-xl",
140
- modal ? "stg:fixed stg:inset-0 stg:m-auto stg:backdrop:bg-backdrop" : "stg:relative",
141
- )}
115
+ <DialogShell
116
+ open={open}
117
+ onOpenChange={onOpenChange}
118
+ modal={modal}
119
+ width="md"
142
120
  aria-labelledby={titleId}
143
121
  >
144
122
  {/* Body mounts only while open so its flow state resets per
@@ -153,7 +131,7 @@ export function ConnectWhatsAppDialog({
153
131
  titleId={titleId}
154
132
  />
155
133
  )}
156
- </dialog>
134
+ </DialogShell>
157
135
  );
158
136
  }
159
137
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  import type { ReactNode } from "react";
4
4
  import { cn } from "@stigmer/theme";
5
+ import { UNSTYLED_FIELDSET } from "../../internal/element-resets.js";
5
6
  import type { ResourceRef } from "@stigmer/sdk";
6
7
  import type { ChannelApp } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/api_pb";
7
8
 
@@ -67,7 +68,7 @@ export function ServingAppSection({
67
68
  }
68
69
 
69
70
  return (
70
- <fieldset>
71
+ <fieldset className={UNSTYLED_FIELDSET}>
71
72
  <legend className="stg:mb-1.5 stg:block stg:text-xs stg:font-medium stg:text-foreground">
72
73
  Connect as
73
74
  </legend>
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { type FormEvent, useCallback, useId, useMemo, useState } from "react";
4
4
  import { cn } from "@stigmer/theme";
5
+ import { UNSTYLED_FIELDSET } from "../internal/element-resets.js";
5
6
  import { getUserMessage } from "@stigmer/sdk";
6
7
  import type { ChannelApp } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/api_pb";
7
8
  import {
@@ -286,7 +287,7 @@ function ProviderPicker({
286
287
  }) {
287
288
  const groupName = useId();
288
289
  return (
289
- <fieldset>
290
+ <fieldset className={UNSTYLED_FIELDSET}>
290
291
  <legend className="stg:mb-1.5 stg:block stg:text-xs stg:font-medium stg:text-foreground">
291
292
  Provider
292
293
  </legend>