@fluidgrids/fe-sdk 0.0.0-stage → 2026.1203.7

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 (323) hide show
  1. package/README.md +564 -2
  2. package/dist/ActivityOptionsFields-C2u-hY2U.js +142 -0
  3. package/dist/AiStudioPage-B_hNTj-_.js +1137 -0
  4. package/dist/ApprovalInboxPage-ClITra3n.js +1312 -0
  5. package/dist/ChoiceSelect-LkK-uS9J.js +65 -0
  6. package/dist/ConfirmActionDialog-DHWTDRbp.js +31 -0
  7. package/dist/ConnectionFormDialog-C0kDgcrZ.js +153 -0
  8. package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
  9. package/dist/DataSinkDashboardPage-b4ezeqa6.js +278 -0
  10. package/dist/DataTablesPage-C1d9YGHz.js +5575 -0
  11. package/dist/DateTimeField-B1qR4ruo.js +51 -0
  12. package/dist/Disclosure-BNKij7-v.js +45 -0
  13. package/dist/ElementLibraryPage-8jNO6YmE.js +2256 -0
  14. package/dist/ElementLibrarySequenceDocument-B-W8SPzn.js +3979 -0
  15. package/dist/EnsureThemeProvider-BvlNjAd0.js +24 -0
  16. package/dist/EntityTagBadge-1OlP6p0c.js +25 -0
  17. package/dist/EntityTagPicker-BBrU5cE0.js +137 -0
  18. package/dist/ExecuteStepDocument-B4j1mdRT.js +189 -0
  19. package/dist/ExecutionDetailDocument-D6QuM-kp.js +875 -0
  20. package/dist/ExecutionDetailPage-D4CBtFdo.js +12217 -0
  21. package/dist/ExecutionDetailPage-DvQ667OE.d.ts +10 -0
  22. package/dist/ExecutionStatusBadge-BsDVor9t.js +221 -0
  23. package/dist/ExecutionsListDocument-Dan7ZiqB.js +459 -0
  24. package/dist/ExecutionsListPage-B3XT8ITL.js +4307 -0
  25. package/dist/FailureTriagePanel-DOJMaJ0n.js +1285 -0
  26. package/dist/FileDownloadUrlDocument-CVOYKcL5.js +92 -0
  27. package/dist/FluidGridsDocsLink-bX0Hnhxr.js +66 -0
  28. package/dist/FluidGridsMark-CE2blT7K.js +74 -0
  29. package/dist/HeldLoadRegion-BtTxbvOW.js +34 -0
  30. package/dist/HistoryPage-BLoRpJ1R.d.ts +6 -0
  31. package/dist/HistoryPage-BSBISXoj.js +2835 -0
  32. package/dist/Icon-BtQ0HXLh.js +160 -0
  33. package/dist/InsightsPage-D7ybj8N9.js +11245 -0
  34. package/dist/IsolationSetting-vy911E8b.js +1153 -0
  35. package/dist/LibraryParts-DOeNgR8A.js +413 -0
  36. package/dist/ManagedAiPolicyAuthority-BxwJ3ptd.js +40 -0
  37. package/dist/ManagedAiPolicyAuthority-DM3t3wNr.d.ts +18 -0
  38. package/dist/ManagedAiPolicyAuthorityContext-CNkxIOZ1.js +10 -0
  39. package/dist/McpTriggerServers-BCPCAOWB.js +459 -0
  40. package/dist/MissingNodesInstallModal-rO_SEDrC.js +224 -0
  41. package/dist/NavigationV2Provider-DCDt35eG.js +17 -0
  42. package/dist/NodeSchemaIntrospectionDocument-C1vAIcHd.js +95 -0
  43. package/dist/NodesPage-DEbnz9iU.d.ts +6 -0
  44. package/dist/NodesPage-O7KeeKtd.js +653 -0
  45. package/dist/OfflineIcon-TwMKYWjA.js +207 -0
  46. package/dist/OpenTemplateAsCodeButton-BhWJWIF3.js +94 -0
  47. package/dist/PaidTemplateConfirm-_G3ag6S4.js +28 -0
  48. package/dist/PublishCustomNodeAction-CIySbK4c.js +134 -0
  49. package/dist/RecordTaskDialog-BkpCDvhR.js +2078 -0
  50. package/dist/RunActionsMenu-DodOgIQm.js +59 -0
  51. package/dist/RunnerStatusPill-C1v967iq.js +24 -0
  52. package/dist/RunnersPage-dB0RSdY_.js +1929 -0
  53. package/dist/SandboxRuntimeExhaustedNotice-BFOIF93C.js +120 -0
  54. package/dist/SchedulesPage-DPWr1yvf.js +1607 -0
  55. package/dist/SearchBox-BGtYjvfs.js +49 -0
  56. package/dist/SequenceEditor-CFiHeHkR.js +497 -0
  57. package/dist/SettingsPage-0CQBNPZV.js +8695 -0
  58. package/dist/StewardPages-DAJhepen.js +47 -0
  59. package/dist/StewardRunImportPanel-Kva2DO0u.js +2844 -0
  60. package/dist/StoreTemplateCardCompact-CHn5kP7A.js +2166 -0
  61. package/dist/TagFilterSelect-CyA8QrS7.js +42 -0
  62. package/dist/TaskQueuesPage-DdnDCyat.js +3571 -0
  63. package/dist/TechnicalDetails-B0Oi4aZw.js +19 -0
  64. package/dist/TemplateConfigurationModal-CdvCYJLM.js +332 -0
  65. package/dist/TemplateDetailPanel-CbiKciuB.js +222 -0
  66. package/dist/TemplatePreview-cx7-NOeG.js +868 -0
  67. package/dist/TemplatesPage-BG3H-6v6.d.ts +10 -0
  68. package/dist/TemplatesPage-BVQpGYIV.js +3251 -0
  69. package/dist/TerminateExecutionDocument-B_HKNVrN.js +581 -0
  70. package/dist/TranslationBridge-Bd4aJKMs.d.ts +11 -0
  71. package/dist/TranslationBridge-Da-TPgQm.js +68 -0
  72. package/dist/TriggerWorkflowDocument-D9Km2Vv2.js +460 -0
  73. package/dist/UiSequencePickerSequenceDocument-BSYnSDV7.js +607 -0
  74. package/dist/UiStepScreenshot-Qh4QMyUp.js +146 -0
  75. package/dist/UsageTimeSeriesDocument-DcInx9-z.js +177 -0
  76. package/dist/VariablesPage-ChfGuW22.js +2243 -0
  77. package/dist/VersionDiffDialog-Bd2AeUwf.js +1702 -0
  78. package/dist/VersionLifecycleBar-BBeWVtz-.js +143 -0
  79. package/dist/WebhookDeliveriesPage-D66bua0j.js +1563 -0
  80. package/dist/WorkflowBuilder-B6wQD1TK.js +539 -0
  81. package/dist/WorkflowBuilder-DR4ku8Tr.js +1611 -0
  82. package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
  83. package/dist/WorkflowEmbed-BXfFGy0i.js +708 -0
  84. package/dist/WorkflowEmbed-Cbqe1s1z.d.ts +6 -0
  85. package/dist/WorkflowPinnedDataDocument-BODT5omd.js +782 -0
  86. package/dist/WorkflowProposalCard-BruukdeF.js +96 -0
  87. package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
  88. package/dist/WorkflowSearchRedirect-C7zJ2MKH.js +40 -0
  89. package/dist/WorkflowSettingsDrawer-MVU1BKfY.d.ts +18 -0
  90. package/dist/WorkflowSettingsDrawer-gazs97WR.js +196 -0
  91. package/dist/WorkflowShareDialog-e8jJtLjU.js +469 -0
  92. package/dist/WorkflowVersionsDocument-DRVOp8Uj.js +3213 -0
  93. package/dist/WorkflowsList--hR2_8gf.js +4593 -0
  94. package/dist/WorkflowsList-CcNDQge5.d.ts +6 -0
  95. package/dist/WorkflowsListPageDocument-CnzcQm_o.js +934 -0
  96. package/dist/addonCatalog-CbZS4deh.js +58 -0
  97. package/dist/addonCatalog-sjlonAmR.d.ts +15 -0
  98. package/dist/addons.d.ts +3 -0
  99. package/dist/addons.js +4 -0
  100. package/dist/agent-form-Bfvm32j1.js +83 -0
  101. package/dist/agent-tools.d.ts +3 -0
  102. package/dist/agent-tools.js +5 -0
  103. package/dist/agentTools-CyL7DLOF.js +320 -0
  104. package/dist/ai-usage-BrxDgvdR.js +240 -0
  105. package/dist/aiCreditsBridge-BuE92tKo.js +49 -0
  106. package/dist/api-BKq-nIOZ.js +2286 -0
  107. package/dist/api-Ol7I8NxE.js +8289 -0
  108. package/dist/apollo-type-policies.d.ts +11 -0
  109. package/dist/apollo-type-policies.js +64 -0
  110. package/dist/askAboutBridge-ByYsQams.js +106 -0
  111. package/dist/askQuestions-Cmx7VnMm.js +742 -0
  112. package/dist/assert-rules-lfYEMc99.js +318 -0
  113. package/dist/assistant.d.ts +94 -0
  114. package/dist/assistant.js +99 -0
  115. package/dist/attach-node-helpers-HDKQOtrD.js +32 -0
  116. package/dist/badge-CXfPhoMH.js +26 -0
  117. package/dist/basil.generated-BK-EHbwN.js +10 -0
  118. package/dist/browser-steps-DMpS5TyB.js +533 -0
  119. package/dist/builderTimings-pvGnK1m-.js +510 -0
  120. package/dist/button-DG7y_FVJ.js +48 -0
  121. package/dist/canvasNoteTools-BxuP_AYO.js +137 -0
  122. package/dist/card-Bomy_1UG.js +44 -0
  123. package/dist/catalogGrid-BOrfMgi-.js +41 -0
  124. package/dist/channel-CPyQ1NR1.js +212 -0
  125. package/dist/chips-CvNrYJZa.js +27 -0
  126. package/dist/client-holder-C0M5Cfwl.js +68 -0
  127. package/dist/cn-QqidFIgr.js +10 -0
  128. package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
  129. package/dist/code-editor-field-x_JrY8KR.js +113 -0
  130. package/dist/codec-client-DPuD6mw7.js +515 -0
  131. package/dist/conditionBuilder-DwfEF0Q-.js +1144 -0
  132. package/dist/config-DO68jw5k.js +322 -0
  133. package/dist/constants-DgbVc24O.d.ts +296 -0
  134. package/dist/constants-DlRnHBfQ.js +217 -0
  135. package/dist/convert-browser-action-pfecelF7.js +347 -0
  136. package/dist/convert-dialog-B_o22NiJ.js +382 -0
  137. package/dist/create-workflow-first-Azg3JUdX.js +120 -0
  138. package/dist/definition-canvas-Bsda-rDT.js +31 -0
  139. package/dist/dialog-BVd152GS.js +94 -0
  140. package/dist/durable-nodes-BXyYCLxT.js +91 -0
  141. package/dist/duration-CDb7-mT_.js +33 -0
  142. package/dist/edge-mapper-wEAdGVU2.js +4477 -0
  143. package/dist/element-library-DkSlg_VE.js +727 -0
  144. package/dist/entities-I_0kio3q.js +38 -0
  145. package/dist/error-advice-QLr5NCm7.js +65 -0
  146. package/dist/errors-ClKb5sEt.js +188 -0
  147. package/dist/executions.d.ts +3 -0
  148. package/dist/executions.js +5 -0
  149. package/dist/feature-flags-B2qetXKd.js +385 -0
  150. package/dist/field-label-DPZRmE_B.js +153 -0
  151. package/dist/firstWorkflow-C_h0KMB2.js +133 -0
  152. package/dist/flags.d.ts +3 -0
  153. package/dist/flags.js +4 -0
  154. package/dist/flow-builder-DIvLOhz0.js +28038 -0
  155. package/dist/flow-store-holder-CUN7Terz.js +52 -0
  156. package/dist/fluent.generated-CA_e6-4l.js +14 -0
  157. package/dist/fluidgridsEvents-bbEQbwU6.js +175 -0
  158. package/dist/fluidgridsTheme-DUhvOgoy.js +297 -0
  159. package/dist/global-client-BQPuFrFa.js +433 -0
  160. package/dist/global-operations-BG6YgxrM.js +136 -0
  161. package/dist/graphql-types-UTYtujY9.js +21358 -0
  162. package/dist/history.d.ts +3 -0
  163. package/dist/history.js +4 -0
  164. package/dist/index-AoJAa5vU.d.ts +164958 -0
  165. package/dist/index-DEMT3iAM.d.ts +120 -0
  166. package/dist/index-ROZzNGyY.d.ts +76 -0
  167. package/dist/index.d.ts +20 -0
  168. package/dist/index.js +8123 -0
  169. package/dist/ion.generated-mbajjcAg.js +10 -0
  170. package/dist/label-Lzb8ZXf_.js +29 -0
  171. package/dist/labels-rXd9gYQz.js +1236 -0
  172. package/dist/liveCanvas-D5ytXDp8.js +103 -0
  173. package/dist/logos.generated-X6_0kjVR.js +21 -0
  174. package/dist/logs-panel-Cw0DkG0l.js +468 -0
  175. package/dist/lucide.generated-B6NVd3GT.js +29 -0
  176. package/dist/marksStore-a9oIMMot.js +175 -0
  177. package/dist/mcp-trigger-D0nRdvq5.js +307 -0
  178. package/dist/mdi.generated-D1BV74d6.js +292 -0
  179. package/dist/menus-CU3hDGYl.js +160 -0
  180. package/dist/mynaui.generated-DMWr5cXz.js +66 -0
  181. package/dist/navigation-v2.d.ts +3 -0
  182. package/dist/navigation-v2.js +5 -0
  183. package/dist/node-detail-view-Cgm5H1P-.js +1372 -0
  184. package/dist/node-editor-tab-body-CZ0fVuVP.js +187 -0
  185. package/dist/node-operation-selection-CdV3KI_V.js +3534 -0
  186. package/dist/node-registry-refresh-s3okf83X.js +27 -0
  187. package/dist/node-role-TMbnkmeP.js +132 -0
  188. package/dist/node-type-icon-BZa8n4iG.js +33 -0
  189. package/dist/nodes.d.ts +3 -0
  190. package/dist/nodes.js +4 -0
  191. package/dist/notesKey-5EaREBGA.js +12 -0
  192. package/dist/observability.d.ts +3 -0
  193. package/dist/observability.js +5 -0
  194. package/dist/offset-pages-zghoClB3.js +55 -0
  195. package/dist/operations-BBmT9ToP.js +663 -0
  196. package/dist/operations-WxRJWeqO.js +3133 -0
  197. package/dist/output-files-Ba8bu5lv.js +196 -0
  198. package/dist/page-operation-DrWuhd6Y.js +129 -0
  199. package/dist/page-twins.d.ts +13 -0
  200. package/dist/page-twins.js +186 -0
  201. package/dist/pageControlSpecs-DZJ9K37m.js +134 -0
  202. package/dist/pageControlsBridge-0pX9s-3k.js +54 -0
  203. package/dist/pageControlsBridge-DAuT3w7L.d.ts +36 -0
  204. package/dist/panels-PfBBAToE.js +346 -0
  205. package/dist/parts-B7fBcw-B.js +346 -0
  206. package/dist/popover-Dms9Vz3j.js +3389 -0
  207. package/dist/preloadable-lazy-Pp47mqQ9.js +65 -0
  208. package/dist/proactive.d.ts +66 -0
  209. package/dist/proactive.js +237 -0
  210. package/dist/quick-config-panel-DFd77xho.js +451 -0
  211. package/dist/quota-DeA_CJ2e.js +175 -0
  212. package/dist/quota.d.ts +3 -0
  213. package/dist/quota.js +4 -0
  214. package/dist/read-only-context-Dt9N9SIG.js +18 -0
  215. package/dist/relative-time-Dxt8ZIIu.js +55 -0
  216. package/dist/results-CwK_yDxK.js +325 -0
  217. package/dist/rolldown-runtime-hDbaFkMy.js +18 -0
  218. package/dist/route-data.d.ts +12 -0
  219. package/dist/route-data.js +69 -0
  220. package/dist/route-match-C-0_EnAt.d.ts +5 -0
  221. package/dist/route-match-DMkUICYV.js +41 -0
  222. package/dist/route-preload-C4DlGoCd.js +120 -0
  223. package/dist/run-display-UjLAoYqQ.js +81 -0
  224. package/dist/run-history-arGiHzGU.js +285 -0
  225. package/dist/run-list-links-DJn4Mf1T.js +98 -0
  226. package/dist/run-mode-USmM0-Uo.js +82 -0
  227. package/dist/run-parity-CWXqEJqM.js +144 -0
  228. package/dist/runsQuota-B6SyTbne.js +100 -0
  229. package/dist/runsQuota-DsniKiSg.d.ts +20 -0
  230. package/dist/safe-expression-Cw7-SCsm.js +1251 -0
  231. package/dist/save-status-store-C7nEYpfb.js +631 -0
  232. package/dist/schedule-panel-B4GYXzXQ.js +13774 -0
  233. package/dist/schedule-rules-ggVKRkBH.js +358 -0
  234. package/dist/secrets-Re_wSiE3.js +153 -0
  235. package/dist/settings.d.ts +4 -0
  236. package/dist/settings.js +6 -0
  237. package/dist/shared-DAWGGMSM.js +177 -0
  238. package/dist/sidebar-node-editor-6eSSgCzc.js +178 -0
  239. package/dist/solar.generated-CGYuUQAC.js +10 -0
  240. package/dist/stableTabbedDialog-BBhrfXGe.js +20 -0
  241. package/dist/start-url-CT6Yz96K.js +24 -0
  242. package/dist/status-CessxGpm.js +55 -0
  243. package/dist/store-icon-OctYp5zP.js +155 -0
  244. package/dist/styles-WGmTnZ2n.js +26 -0
  245. package/dist/styles.css +139 -0
  246. package/dist/svg-spinners.generated-CIPT7IhM.js +10 -0
  247. package/dist/template-code-CzN6JWNV.js +191 -0
  248. package/dist/template-graph-DLF9dygU.js +20 -0
  249. package/dist/template-preview-DcIIKOOL.js +32 -0
  250. package/dist/template-price-CdUHZRMF.js +40 -0
  251. package/dist/templates.d.ts +3 -0
  252. package/dist/templates.js +5 -0
  253. package/dist/theme-provider-CntfC4_i.js +23 -0
  254. package/dist/transient-DgZfhDfN.js +57 -0
  255. package/dist/typed-calls-C5tO03wq.js +26 -0
  256. package/dist/ui-script-By74Guk3.js +1094 -0
  257. package/dist/ui-script-editor-CqPu2bCN.js +2447 -0
  258. package/dist/ui-step-fix-8uM2_Hft.js +67 -0
  259. package/dist/ui-step-fix-store-CcO1FdRx.js +19 -0
  260. package/dist/ui-step-run-context-o7bLE6KP.js +46 -0
  261. package/dist/ui-target-editor-D2JhB_lD.js +673 -0
  262. package/dist/uiMarkTools-CSznnO1i.js +1054 -0
  263. package/dist/upgradePrompt-BAFBKKW5.js +72 -0
  264. package/dist/use-bare-node-registry-O6mKJO_n.js +11498 -0
  265. package/dist/use-browser-available-hj8wc3Kb.js +241 -0
  266. package/dist/use-edge-mapper-schemas-Bonofxow.js +496 -0
  267. package/dist/use-extension-bridge-B9ZreOkQ.js +608 -0
  268. package/dist/use-mobile-BTqCUjzS.js +27 -0
  269. package/dist/use-sdk-query-C697xZVv.js +116 -0
  270. package/dist/use-workflow-code-editor-CFoRFrZ5.js +753 -0
  271. package/dist/useActionParam-B2tU2BlY.js +85 -0
  272. package/dist/useAgentTokenStream-Bko_J0d0.js +4217 -0
  273. package/dist/useBrowserClients-3v95-gSh.js +103 -0
  274. package/dist/useCodeWorkflowInsights-w0tz9Ap_.js +600 -0
  275. package/dist/useConnections-DsgEJs05.js +439 -0
  276. package/dist/useDebouncedValue-BFekcv6n.js +18 -0
  277. package/dist/useDurableParity-8fnMZmBc.js +1787 -0
  278. package/dist/useEntityTags-D0spL6Ut.js +460 -0
  279. package/dist/useExecutions-2u5nGJJk.js +681 -0
  280. package/dist/useFluidGridsAnalytics-VM8lAi2x.js +238 -0
  281. package/dist/useGlobalStoreClient-BTdhkA2I.js +24 -0
  282. package/dist/useHumanRequests-zlYDp3l1.js +221 -0
  283. package/dist/useNavigationV2-C2WeqN7d.js +29 -0
  284. package/dist/useNavigationV2-DANUmg12.d.ts +9 -0
  285. package/dist/useObservability-BRlQ0tOA.js +285 -0
  286. package/dist/useRequestedProposal-B7uPXfZB.js +51 -0
  287. package/dist/useRunHistory-CXCMUPyf.js +2759 -0
  288. package/dist/useRunLive-D0JvVZT2.js +1060 -0
  289. package/dist/useRunnerList-Dbi59i1K.js +446 -0
  290. package/dist/useRunners-URUc5quU.js +173 -0
  291. package/dist/useRunsPage-DG656UCK.js +2709 -0
  292. package/dist/useVariables-BIelxcWr.js +463 -0
  293. package/dist/useVersionHistoryData-CTjqVw7l.js +292 -0
  294. package/dist/useWorkflowCodeExport-pqxyLHD1.js +522 -0
  295. package/dist/useWorkflowListExport-hcZNvTaB.js +232 -0
  296. package/dist/useWorkflowOrganization-CpBbOrs7.js +1772 -0
  297. package/dist/useWorkflowProposal-BH0VdNMA.js +3280 -0
  298. package/dist/useWorkflows-Cvg-Z_IE.js +1606 -0
  299. package/dist/utils-fvBb5qOD.js +89 -0
  300. package/dist/webhook-deliveries-AvQujaZy.js +99 -0
  301. package/dist/workflow-builder-CJygVkVv.d.ts +2 -0
  302. package/dist/workflow-builder.d.ts +3 -0
  303. package/dist/workflow-builder.js +8 -0
  304. package/dist/workflow-code-transfer-Bsy0JKAZ.js +323 -0
  305. package/dist/workflow-embed.d.ts +3 -0
  306. package/dist/workflow-embed.js +4 -0
  307. package/dist/workflow-git-sync--K9ZsPDC.js +263 -0
  308. package/dist/workflow-host.d.ts +6 -0
  309. package/dist/workflow-host.js +11 -0
  310. package/dist/workflow-pages-D-7ByLTB.d.ts +68 -0
  311. package/dist/workflow-pages.d.ts +3 -0
  312. package/dist/workflow-pages.js +115 -0
  313. package/dist/workflow-preview-canvas-CO8yzdE3.js +848 -0
  314. package/dist/workflow-preview.d.ts +65 -0
  315. package/dist/workflow-preview.js +4 -0
  316. package/dist/workflow-route.d.ts +33 -0
  317. package/dist/workflow-route.js +4 -0
  318. package/dist/workflow-save-state-D0l-DkLf.js +767 -0
  319. package/dist/workflow-transfer-CQnQC-ke.js +104 -0
  320. package/dist/workflowRouteData-BkfVOc-O.js +169 -0
  321. package/dist/workflows-list.d.ts +10 -0
  322. package/dist/workflows-list.js +5 -0
  323. package/package.json +320 -4
@@ -0,0 +1,1372 @@
1
+ "use client";
2
+ import { t as Icon } from "./Icon-BtQ0HXLh.js";
3
+ import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
4
+ import { U as useFlowStore, c as diagnosticsByPath, h as sourceLanguageOf, l as interfaceFields, o as childRunIdOf, p as readCodeWorkflowState, r as CODE_WORKFLOW_NODE_TYPE, u as interfaceHandlers } from "./node-operation-selection-CdV3KI_V.js";
5
+ import { Mn as clearCodeWorkflowDefinitionCache, Pn as useCodeWorkflowInterface, R as nodeSubtitle, U as useNodeConfig, _n as starterPinnedOutput, cn as useNodeExecution, er as getNodeDetail, mn as fieldsFromValue, pt as latestNodeLog, st as FieldTree, vt as useGuardedNavigate, z as nodeTitle } from "./use-bare-node-registry-O6mKJO_n.js";
6
+ import { E as NDV_Z_INDEX } from "./browser-steps-DMpS5TyB.js";
7
+ import { a as TabButton, c as FailedStepAiBanner, i as ReadOnlyFieldset, n as SchedulePanel, o as NodeSettingsPanel, r as NodeExecutionActions, s as NodeParamsForm, t as SCHEDULE_NODE_TYPE } from "./schedule-panel-B4GYXzXQ.js";
8
+ import { t as UiStepRunBoundary } from "./ui-step-run-context-o7bLE6KP.js";
9
+ import { a as fetchFileDownloadUrl, c as readTextUpTo, i as csvPreviewRows, n as TEXT_PREVIEW_MAX_BYTES, o as filePreviewKind, r as collectOutputFiles, s as formatFileSize, t as DOWNLOAD_URL_LIFETIME_SECONDS } from "./output-files-Ba8bu5lv.js";
10
+ import { n as useMediaQuery } from "./use-mobile-BTqCUjzS.js";
11
+ import { i as asPinnedNodeData, r as TableView, t as JsonView } from "./logs-panel-Cw0DkG0l.js";
12
+ import { Ot as useUnpinNodeDataMutation, Wt as useWorkflowPinnedDataQuery, it as usePinNodeDataMutation, ln as NodeStatesDocument } from "./operations-WxRJWeqO.js";
13
+ import { d as useDurableFunctionNodesEnabled, g as usePhaseCFlags } from "./feature-flags-B2qetXKd.js";
14
+ import { s as useFluidGridsPermission, t as FLUIDGRIDS_PERMISSIONS } from "./constants-DlRnHBfQ.js";
15
+ import { t as CodeEditorField } from "./code-editor-field-x_JrY8KR.js";
16
+ import { n as useWorkflowCodeEditor } from "./use-workflow-code-editor-CFoRFrZ5.js";
17
+ import { n as SignalRunDialog, s as RunHistoryView, t as useRunHistory } from "./useRunHistory-CXCMUPyf.js";
18
+ import { S as declaredSignals } from "./askQuestions-Cmx7VnMm.js";
19
+ import { r as getFluidGridsClientSafe } from "./client-holder-C0M5Cfwl.js";
20
+ import { s as throwIfResultError } from "./errors-ClKb5sEt.js";
21
+ import { s as isAgentNodeType } from "./agent-form-Bfvm32j1.js";
22
+ import { n as agentTracePath } from "./ai-usage-BrxDgvdR.js";
23
+ import { d as isSandboxRuntimeExhausted } from "./quota-DeA_CJ2e.js";
24
+ import { t as SandboxRuntimeExhaustedNotice } from "./SandboxRuntimeExhaustedNotice-BFOIF93C.js";
25
+ import { useEffect, useMemo, useRef, useState } from "react";
26
+ import { useNavigate } from "react-router";
27
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
28
+ import { Download, File, FileCode, FileImage, FileSpreadsheet, FileText } from "lucide-react";
29
+ import { cn } from "@burdenoff/fe-libs/utils";
30
+ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, EmptyState, Skeleton, ThemedSelect } from "@burdenoff/fe-libs/ui";
31
+ import { Button as Button$1 } from "@burdenoff/fe-libs/button";
32
+
33
+ // src/builder/components/ndv/output-files.tsx
34
+ /**
35
+ * The files in a node's output (BOFF-7652): one row per stored file with its
36
+ * name, size and a download link, and a preview for images, PDFs, CSV and
37
+ * other text. The download URL is minted per file when the row is shown and
38
+ * is short-lived; the file stays in the run owner's Files library.
39
+ */
40
+ /** A link is renewed this long before it expires, so the one shown always works. */
41
+ const LINK_RENEWAL_MARGIN_MS = 3e5;
42
+ /** A renewal that fails is tried again after this, while the current link still works. */
43
+ const LINK_RETRY_MS = 3e4;
44
+ const KIND_ICONS = {
45
+ image: FileImage,
46
+ pdf: FileText,
47
+ csv: FileSpreadsheet,
48
+ text: FileCode
49
+ };
50
+ function OutputFiles({ output }) {
51
+ const tr = useTr();
52
+ const files = useMemo(() => collectOutputFiles(output), [output]);
53
+ if (files.length === 0) return null;
54
+ return /* @__PURE__ */ jsxs("section", {
55
+ className: "mx-2 mb-2 rounded-md border border-border bg-muted/30",
56
+ "data-testid": "ndv-output-files",
57
+ children: [/* @__PURE__ */ jsx("h4", {
58
+ className: "px-3 pt-2 text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground",
59
+ children: tr("fluidgrids.builder.outputFiles.title", "Files")
60
+ }), /* @__PURE__ */ jsx("ul", {
61
+ className: "divide-y divide-border",
62
+ children: files.map((entry) => /* @__PURE__ */ jsx(OutputFileRow, { entry }, entry.file.fileId))
63
+ })]
64
+ });
65
+ }
66
+ function OutputFileRow({ entry }) {
67
+ const tr = useTr();
68
+ const { file, path } = entry;
69
+ const kind = filePreviewKind(file);
70
+ const [link, setLink] = useState({ status: "loading" });
71
+ const [previewOpen, setPreviewOpen] = useState(false);
72
+ const [linkGeneration, setLinkGeneration] = useState(0);
73
+ const linkExpiresAt = useRef(0);
74
+ const KindIcon = kind ? KIND_ICONS[kind] : File;
75
+ useEffect(() => {
76
+ let active = true;
77
+ let renewal;
78
+ const renewIn = (ms) => {
79
+ renewal = setTimeout(() => setLinkGeneration((generation) => generation + 1), ms);
80
+ };
81
+ fetchFileDownloadUrl(file.fileId).then((url) => {
82
+ if (!active) return;
83
+ linkExpiresAt.current = Date.now() + DOWNLOAD_URL_LIFETIME_SECONDS * 1e3;
84
+ setLink({
85
+ status: "ready",
86
+ url
87
+ });
88
+ renewIn(DOWNLOAD_URL_LIFETIME_SECONDS * 1e3 - LINK_RENEWAL_MARGIN_MS);
89
+ }, () => {
90
+ if (!active) return;
91
+ if (Date.now() + LINK_RETRY_MS < linkExpiresAt.current) renewIn(LINK_RETRY_MS);
92
+ else setLink({ status: "error" });
93
+ });
94
+ return () => {
95
+ active = false;
96
+ clearTimeout(renewal);
97
+ };
98
+ }, [file.fileId, linkGeneration]);
99
+ return /* @__PURE__ */ jsxs("li", {
100
+ className: "px-3 py-2",
101
+ "data-testid": "ndv-output-file",
102
+ children: [/* @__PURE__ */ jsxs("div", {
103
+ className: "flex items-center gap-2",
104
+ children: [
105
+ /* @__PURE__ */ jsx(KindIcon, {
106
+ className: "size-4 shrink-0 text-muted-foreground",
107
+ "aria-hidden": true
108
+ }),
109
+ /* @__PURE__ */ jsxs("div", {
110
+ className: "min-w-0 flex-1",
111
+ children: [/* @__PURE__ */ jsx("p", {
112
+ className: "truncate text-xs font-medium text-foreground",
113
+ title: file.name,
114
+ children: file.name || file.fileId
115
+ }), /* @__PURE__ */ jsx("p", {
116
+ className: "truncate text-[10px] text-muted-foreground",
117
+ children: [
118
+ formatFileSize(file.size),
119
+ file.mimeType,
120
+ path
121
+ ].filter(Boolean).join(" · ")
122
+ })]
123
+ }),
124
+ kind && link.status === "ready" && /* @__PURE__ */ jsx("button", {
125
+ type: "button",
126
+ onClick: () => setPreviewOpen((open) => !open),
127
+ "aria-expanded": previewOpen,
128
+ className: cn("rounded px-1.5 py-0.5 text-[11px] font-medium transition-colors", previewOpen ? "bg-primary/10 text-primary" : "text-muted-foreground hover:text-foreground"),
129
+ "data-testid": "ndv-output-file-preview-toggle",
130
+ children: previewOpen ? tr("fluidgrids.builder.outputFiles.hidePreview", "Hide preview") : tr("fluidgrids.builder.outputFiles.preview", "Preview")
131
+ }),
132
+ link.status === "ready" ? /* @__PURE__ */ jsxs("a", {
133
+ href: link.url,
134
+ target: "_blank",
135
+ rel: "noopener noreferrer",
136
+ download: file.name || void 0,
137
+ className: "inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[11px] font-medium text-primary hover:bg-primary/10",
138
+ "data-testid": "ndv-output-file-download",
139
+ children: [/* @__PURE__ */ jsx(Download, {
140
+ className: "size-3.5",
141
+ "aria-hidden": true
142
+ }), tr("fluidgrids.builder.outputFiles.download", "Download")]
143
+ }) : /* @__PURE__ */ jsx("span", {
144
+ className: cn("text-[11px]", link.status === "error" ? "text-destructive" : "text-muted-foreground"),
145
+ "data-testid": "ndv-output-file-link-status",
146
+ children: link.status === "error" ? tr("fluidgrids.builder.outputFiles.linkFailed", "Could not get a download link") : tr("fluidgrids.builder.outputFiles.loading", "Loading…")
147
+ })
148
+ ]
149
+ }), previewOpen && kind && link.status === "ready" && /* @__PURE__ */ jsx(FilePreview, {
150
+ kind,
151
+ url: link.url,
152
+ file
153
+ })]
154
+ });
155
+ }
156
+ function FilePreview({ kind, url, file }) {
157
+ const tr = useTr();
158
+ if (kind === "image") return /* @__PURE__ */ jsx("img", {
159
+ src: url,
160
+ alt: file.name,
161
+ loading: "lazy",
162
+ className: "mt-2 max-h-80 max-w-full rounded border border-border object-contain",
163
+ "data-testid": "ndv-output-file-image"
164
+ });
165
+ if (kind === "pdf") return /* @__PURE__ */ jsx("object", {
166
+ data: url,
167
+ type: "application/pdf",
168
+ "aria-label": file.name,
169
+ className: "mt-2 h-96 w-full rounded border border-border",
170
+ "data-testid": "ndv-output-file-pdf",
171
+ children: /* @__PURE__ */ jsx("p", {
172
+ className: "p-3 text-xs text-muted-foreground",
173
+ children: tr("fluidgrids.builder.outputFiles.pdfUnavailable", "This browser cannot show the PDF here; download it instead.")
174
+ })
175
+ });
176
+ return /* @__PURE__ */ jsx(TextPreview, {
177
+ url,
178
+ csv: kind === "csv"
179
+ });
180
+ }
181
+ function TextPreview({ url, csv }) {
182
+ const tr = useTr();
183
+ const [state, setState] = useState({ status: "loading" });
184
+ useEffect(() => {
185
+ const controller = new AbortController();
186
+ setState({ status: "loading" });
187
+ fetch(url, { signal: controller.signal }).then((response) => {
188
+ if (!response.ok) throw new Error(`HTTP ${response.status}`);
189
+ return readTextUpTo(response, TEXT_PREVIEW_MAX_BYTES);
190
+ }).then((text) => setState(text === null ? { status: "tooLarge" } : {
191
+ status: "ready",
192
+ text
193
+ }), () => {
194
+ if (!controller.signal.aborted) setState({ status: "error" });
195
+ });
196
+ return () => controller.abort();
197
+ }, [url]);
198
+ if (state.status === "loading") return /* @__PURE__ */ jsx("p", {
199
+ className: "mt-2 text-[11px] text-muted-foreground",
200
+ children: tr("fluidgrids.builder.outputFiles.loading", "Loading…")
201
+ });
202
+ if (state.status === "tooLarge") return /* @__PURE__ */ jsx("p", {
203
+ className: "mt-2 text-[11px] text-muted-foreground",
204
+ "data-testid": "ndv-output-file-preview-too-large",
205
+ children: tr("fluidgrids.builder.outputFiles.previewTooLarge", "Too large to preview here; download it instead.")
206
+ });
207
+ if (state.status === "error") return /* @__PURE__ */ jsx("p", {
208
+ className: "mt-2 text-[11px] text-destructive",
209
+ "data-testid": "ndv-output-file-preview-error",
210
+ children: tr("fluidgrids.builder.outputFiles.previewFailed", "Could not load the preview")
211
+ });
212
+ if (csv) {
213
+ const [header = [], ...body] = csvPreviewRows(state.text);
214
+ return /* @__PURE__ */ jsx("div", {
215
+ className: "mt-2 max-h-80 overflow-auto rounded border border-border",
216
+ children: /* @__PURE__ */ jsxs("table", {
217
+ className: "w-full border-collapse text-[11px]",
218
+ "data-testid": "ndv-output-file-csv",
219
+ children: [/* @__PURE__ */ jsx("thead", {
220
+ className: "sticky top-0 bg-muted",
221
+ children: /* @__PURE__ */ jsx("tr", { children: header.map((cell, index) => /* @__PURE__ */ jsx("th", {
222
+ className: "border-b border-border px-2 py-1 text-left font-semibold text-foreground",
223
+ children: cell
224
+ }, index)) })
225
+ }), /* @__PURE__ */ jsx("tbody", { children: body.map((row, rowIndex) => /* @__PURE__ */ jsx("tr", {
226
+ className: "odd:bg-muted/20",
227
+ children: row.map((cell, index) => /* @__PURE__ */ jsx("td", {
228
+ className: "max-w-[16rem] truncate border-b border-border px-2 py-1 text-muted-foreground",
229
+ children: cell
230
+ }, index))
231
+ }, rowIndex)) })]
232
+ })
233
+ });
234
+ }
235
+ return /* @__PURE__ */ jsx("pre", {
236
+ className: "mt-2 max-h-80 overflow-auto whitespace-pre-wrap break-words rounded border border-border bg-background p-2 text-[11px] leading-relaxed text-foreground",
237
+ "data-testid": "ndv-output-file-text",
238
+ children: state.text
239
+ });
240
+ }
241
+
242
+ // src/builder/components/code-workflow/code-workflow-source-editor.tsx
243
+ /**
244
+ * The code-workflow node's Source tab (BOFF-9905, spec code-first 07 §5):
245
+ * the version's tier-2 project in CodeMirror, with Check and Save running the
246
+ * managed build. Type errors from the build are underlined in the file they
247
+ * name and listed below the editor.
248
+ */
249
+ /** One stable empty set, so the editor re-applies diagnostics only after a build. */
250
+ const NO_DIAGNOSTICS = [];
251
+ function editorLanguage(path) {
252
+ const language = sourceLanguageOf(path);
253
+ if (language === "python") return "python";
254
+ if (language === "typescript") return "typescript";
255
+ return "javascript";
256
+ }
257
+ /** A file in the source tree; its changed mark and problem count are read out. */
258
+ function SourceFileButton({ path, selected, dirty, problems, onSelect }) {
259
+ const tr = useTr();
260
+ return /* @__PURE__ */ jsxs("button", {
261
+ type: "button",
262
+ onClick: onSelect,
263
+ "aria-current": selected ? "true" : void 0,
264
+ className: cn("flex w-full items-center gap-1 px-2 py-1.5 text-left font-mono text-xs", selected ? "bg-primary/10 text-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground"),
265
+ title: path,
266
+ children: [
267
+ /* @__PURE__ */ jsx("span", {
268
+ className: "min-w-0 flex-1 truncate",
269
+ children: path
270
+ }),
271
+ dirty && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
272
+ "aria-hidden": "true",
273
+ children: "•"
274
+ }), /* @__PURE__ */ jsx("span", {
275
+ className: "sr-only",
276
+ children: tr("fluidgrids.builder.codeWorkflow.source.fileChanged", "changed")
277
+ })] }),
278
+ problems > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
279
+ "aria-hidden": "true",
280
+ className: "text-destructive",
281
+ children: problems
282
+ }), /* @__PURE__ */ jsx("span", {
283
+ className: "sr-only",
284
+ children: tr("fluidgrids.builder.codeWorkflow.source.fileProblems", "{{count}} problem(s)", { count: problems })
285
+ })] })
286
+ ]
287
+ });
288
+ }
289
+ /** The description of the version a save creates. */
290
+ function VersionDescriptionInput({ value, onChange }) {
291
+ const tr = useTr();
292
+ return /* @__PURE__ */ jsx("input", {
293
+ type: "text",
294
+ value,
295
+ onChange: (e) => onChange(e.target.value),
296
+ placeholder: tr("fluidgrids.builder.codeWorkflow.source.descriptionPlaceholder", "What changed (optional)"),
297
+ "aria-label": tr("fluidgrids.builder.codeWorkflow.source.descriptionLabel", "Version description"),
298
+ className: "min-w-48 flex-1 rounded-md border border-input bg-background px-3 py-1.5 text-sm text-foreground",
299
+ "data-testid": "code-workflow-save-description"
300
+ });
301
+ }
302
+ function CodeWorkflowSourceEditor({ workflowKey, version, enabled, canEdit, onSaved }) {
303
+ const tr = useTr();
304
+ const navigate = useNavigate();
305
+ const [description, setDescription] = useState("");
306
+ const { pythonDurableFunctions } = usePhaseCFlags();
307
+ const editor = useWorkflowCodeEditor({
308
+ workflowKey,
309
+ version,
310
+ enabled,
311
+ canEdit,
312
+ pythonEnabled: pythonDurableFunctions,
313
+ onSaved: (savedVersion) => {
314
+ onSaved?.(savedVersion);
315
+ navigate(`../workflow/${encodeURIComponent(workflowKey)}/${encodeURIComponent(savedVersion)}`);
316
+ }
317
+ });
318
+ const byPath = useMemo(() => diagnosticsByPath(editor.diagnostics), [editor.diagnostics]);
319
+ const selected = editor.selectedPath;
320
+ const selectedEditable = selected ? editor.isEditable(selected) : false;
321
+ if (editor.loading && !editor.source) return /* @__PURE__ */ jsxs("div", {
322
+ className: "space-y-2 p-4",
323
+ "aria-busy": "true",
324
+ children: [/* @__PURE__ */ jsx("div", { className: "h-6 w-1/3 animate-pulse rounded bg-muted" }), /* @__PURE__ */ jsx("div", { className: "h-64 animate-pulse rounded bg-muted" })]
325
+ });
326
+ if (editor.loadError) return /* @__PURE__ */ jsxs("div", {
327
+ role: "alert",
328
+ className: "space-y-2 p-4 text-sm text-destructive",
329
+ children: [/* @__PURE__ */ jsxs("p", { children: [
330
+ tr("fluidgrids.builder.codeWorkflow.source.loadError", "Could not load the source:"),
331
+ " ",
332
+ editor.loadError
333
+ ] }), /* @__PURE__ */ jsx(Button$1, {
334
+ variant: "outline",
335
+ size: "sm",
336
+ onClick: () => void editor.reload(),
337
+ children: tr("fluidgrids.builder.codeWorkflow.source.retry", "Try again")
338
+ })]
339
+ });
340
+ if (!editor.source) return /* @__PURE__ */ jsx("p", {
341
+ className: "p-4 text-sm text-muted-foreground",
342
+ children: tr("fluidgrids.builder.codeWorkflow.source.none", "This version has no code bundle. Push the project with fluidgrids push to attach one.")
343
+ });
344
+ const readOnlyNote = editor.readOnlyReason === "python" ? tr("fluidgrids.builder.codeWorkflow.source.pythonReadOnly", "Python projects are read-only in the browser. Edit them locally and run fluidgrids push.") : editor.readOnlyReason === "lease" ? tr("fluidgrids.builder.codeWorkflow.source.leaseReadOnly", "Someone else is editing this workflow. The source is read-only until they finish.") : editor.readOnlyReason === "permission" ? tr("fluidgrids.builder.codeWorkflow.source.permissionReadOnly", "You can read this source but not change it.") : null;
345
+ const result = editor.lastBuild;
346
+ return /* @__PURE__ */ jsxs("div", {
347
+ className: "flex min-h-0 flex-1 flex-col gap-3 p-4",
348
+ "data-testid": "code-workflow-source",
349
+ children: [
350
+ /* @__PURE__ */ jsxs("div", {
351
+ className: "flex flex-wrap items-center gap-2 text-xs text-muted-foreground",
352
+ children: [
353
+ /* @__PURE__ */ jsx(Icon, {
354
+ icon: "mdi:package-variant-closed",
355
+ className: "size-4"
356
+ }),
357
+ /* @__PURE__ */ jsx("code", {
358
+ className: "truncate font-mono",
359
+ title: editor.source.buildId,
360
+ children: editor.source.buildId
361
+ }),
362
+ editor.changed.length > 0 && /* @__PURE__ */ jsx("span", {
363
+ className: "rounded bg-primary/10 px-1.5 py-0.5 text-primary",
364
+ children: tr("fluidgrids.builder.codeWorkflow.source.changed", "{{count}} changed", { count: editor.changed.length })
365
+ })
366
+ ]
367
+ }),
368
+ readOnlyNote && /* @__PURE__ */ jsx("p", {
369
+ className: "rounded-md border border-border bg-muted px-3 py-2 text-xs text-muted-foreground",
370
+ "data-testid": "code-workflow-source-readonly",
371
+ children: readOnlyNote
372
+ }),
373
+ editor.rebuildSdk && /* @__PURE__ */ jsx("p", {
374
+ className: "rounded-md border border-border bg-muted px-3 py-2 text-xs text-muted-foreground",
375
+ "data-testid": "code-workflow-rebuild-sdk",
376
+ children: tr("fluidgrids.builder.codeWorkflow.source.rebuildSdk", "Saving will rebuild with SDK {{to}}; this version was built with {{from}}.", {
377
+ to: editor.rebuildSdk.to,
378
+ from: editor.rebuildSdk.from
379
+ })
380
+ }),
381
+ /* @__PURE__ */ jsxs("div", {
382
+ className: "flex min-h-80 flex-1 flex-col gap-3 sm:min-h-48 sm:flex-row",
383
+ "data-testid": "code-workflow-source-body",
384
+ children: [/* @__PURE__ */ jsx("nav", {
385
+ "aria-label": tr("fluidgrids.builder.codeWorkflow.source.files", "Files"),
386
+ className: "max-h-32 w-full shrink-0 overflow-auto rounded-md border border-border sm:max-h-none sm:w-48",
387
+ children: editor.source.files.map((file) => {
388
+ const problems = byPath.get(file.path)?.length ?? 0;
389
+ const dirty = editor.changed.some((c) => c.path === file.path);
390
+ return /* @__PURE__ */ jsx(SourceFileButton, {
391
+ path: file.path,
392
+ selected: file.path === selected,
393
+ dirty,
394
+ problems,
395
+ onSelect: () => editor.select(file.path)
396
+ }, file.path);
397
+ })
398
+ }), /* @__PURE__ */ jsx("div", {
399
+ className: "relative min-h-40 min-w-0 flex-1",
400
+ children: selected && /* @__PURE__ */ jsx(CodeEditorField, {
401
+ value: editor.contents[selected] ?? "",
402
+ language: editorLanguage(selected),
403
+ label: selected,
404
+ readOnly: !selectedEditable,
405
+ onChange: (value) => editor.setContent(selected, value),
406
+ diagnostics: byPath.get(selected) ?? NO_DIAGNOSTICS,
407
+ fill: true,
408
+ className: "absolute inset-0",
409
+ "data-testid": "code-workflow-source-editor"
410
+ }, selected)
411
+ })]
412
+ }),
413
+ (editor.buildError || result) && /* @__PURE__ */ jsxs("div", {
414
+ "data-testid": "code-workflow-build-result",
415
+ className: cn("shrink-0 rounded-md border px-3 py-2 text-xs", editor.buildError || result && !result.success ? "border-destructive/40 bg-destructive/5 text-destructive" : "border-border bg-muted text-foreground"),
416
+ children: [editor.buildError ? /* @__PURE__ */ jsx("p", { children: editor.buildError }) : result?.success ? /* @__PURE__ */ jsx("p", { children: result.version ? tr("fluidgrids.builder.codeWorkflow.source.saved", "Saved as {{version}} ({{buildId}}).", {
417
+ version: result.version,
418
+ buildId: result.buildId ?? ""
419
+ }) : tr("fluidgrids.builder.codeWorkflow.source.checked", "No problems found. Build {{buildId}}.", { buildId: result.buildId ?? "" }) }) : /* @__PURE__ */ jsx("p", { children: tr("fluidgrids.builder.codeWorkflow.source.failed", "The build found {{count}} problem(s).", { count: result?.diagnostics.length ?? 0 }) }), result && result.diagnostics.length > 0 && /* @__PURE__ */ jsx("ul", {
420
+ className: "mt-1 max-h-40 space-y-0.5 overflow-auto font-mono",
421
+ children: result.diagnostics.map((d, index) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("button", {
422
+ type: "button",
423
+ className: "text-left hover:underline",
424
+ onClick: () => d.path && editor.select(d.path.replace(/^\.\//, "")),
425
+ children: [
426
+ d.path ?? "",
427
+ d.line ? `:${d.line}` : "",
428
+ d.column ? `:${d.column}` : "",
429
+ " ",
430
+ d.severity,
431
+ d.code ? ` ${d.code}` : "",
432
+ ": ",
433
+ d.message
434
+ ]
435
+ }) }, `${d.path ?? ""}:${d.line ?? 0}:${index}`))
436
+ })]
437
+ }),
438
+ !editor.readOnlyReason && /* @__PURE__ */ jsxs("div", {
439
+ className: "flex shrink-0 flex-wrap items-center gap-2",
440
+ "data-testid": "code-workflow-source-actions",
441
+ children: [
442
+ /* @__PURE__ */ jsx(VersionDescriptionInput, {
443
+ value: description,
444
+ onChange: setDescription
445
+ }),
446
+ /* @__PURE__ */ jsxs(Button$1, {
447
+ variant: "outline",
448
+ size: "sm",
449
+ onClick: () => void editor.check(),
450
+ disabled: editor.building !== null,
451
+ "data-testid": "code-workflow-check",
452
+ children: [/* @__PURE__ */ jsx(Icon, {
453
+ icon: "mdi:check-decagram-outline",
454
+ className: "mr-1 size-4"
455
+ }), editor.building === "check" ? tr("fluidgrids.builder.codeWorkflow.source.checking", "Checking...") : tr("fluidgrids.builder.codeWorkflow.source.check", "Check")]
456
+ }),
457
+ /* @__PURE__ */ jsxs(Button$1, {
458
+ size: "sm",
459
+ onClick: () => void editor.save(description.trim() || void 0),
460
+ disabled: editor.building !== null || editor.changed.length === 0,
461
+ "data-testid": "code-workflow-save",
462
+ children: [/* @__PURE__ */ jsx(Icon, {
463
+ icon: "mdi:content-save-outline",
464
+ className: "mr-1 size-4"
465
+ }), editor.building === "save" ? tr("fluidgrids.builder.codeWorkflow.source.saving", "Saving...") : tr("fluidgrids.builder.codeWorkflow.source.save", "Save as new version")]
466
+ })
467
+ ]
468
+ })
469
+ ]
470
+ });
471
+ }
472
+
473
+ // src/builder/components/code-workflow/code-workflow-interface.tsx
474
+ /**
475
+ * The code-workflow node's Interface tab (BOFF-9905, spec code-first 01 §4
476
+ * and 05 §9): the function's inputs and outputs, and the signals, queries and
477
+ * updates it declares. *Send signal* signals the child run the node started
478
+ * in the builder's current run. Custom queries and updates are Phase C, so
479
+ * they are listed without actions.
480
+ */
481
+ function FieldsTable({ title, schema }) {
482
+ const tr = useTr();
483
+ const fields = interfaceFields(schema);
484
+ return /* @__PURE__ */ jsxs("section", {
485
+ className: "space-y-1",
486
+ children: [/* @__PURE__ */ jsx("h4", {
487
+ className: "text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground",
488
+ children: title
489
+ }), fields.length === 0 ? /* @__PURE__ */ jsx("p", {
490
+ className: "text-xs text-muted-foreground",
491
+ children: tr("fluidgrids.builder.codeWorkflow.interface.noFields", "Not declared")
492
+ }) : /* @__PURE__ */ jsx("ul", {
493
+ className: "divide-y divide-border rounded-md border border-border",
494
+ children: fields.map((field) => /* @__PURE__ */ jsxs("li", {
495
+ className: "flex items-baseline gap-2 px-2 py-1 text-xs",
496
+ children: [
497
+ /* @__PURE__ */ jsxs("code", {
498
+ className: "font-mono text-foreground",
499
+ children: [field.name, field.required ? "" : "?"]
500
+ }),
501
+ /* @__PURE__ */ jsx("span", {
502
+ className: "font-mono text-muted-foreground",
503
+ children: field.type
504
+ }),
505
+ field.description && /* @__PURE__ */ jsx("span", {
506
+ className: "truncate text-muted-foreground",
507
+ children: field.description
508
+ })
509
+ ]
510
+ }, field.name))
511
+ })]
512
+ });
513
+ }
514
+ function CodeWorkflowInterface({ iface, loading = false, error = null, onRetry, childRunId, canSignal }) {
515
+ const tr = useTr();
516
+ const [signalName, setSignalName] = useState(null);
517
+ const handlers = interfaceHandlers(iface);
518
+ const targets = declaredSignals(iface);
519
+ if (loading) return /* @__PURE__ */ jsxs("div", {
520
+ className: "space-y-2 p-4",
521
+ role: "status",
522
+ "aria-label": tr("fluidgrids.builder.codeWorkflow.interface.loading", "Loading the function's interface"),
523
+ "data-testid": "code-workflow-interface-loading",
524
+ children: [
525
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/3" }),
526
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-16 w-full" }),
527
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/4" })
528
+ ]
529
+ });
530
+ if (error) return /* @__PURE__ */ jsxs("div", {
531
+ className: "space-y-2 p-4",
532
+ "data-testid": "code-workflow-interface-error",
533
+ children: [/* @__PURE__ */ jsx("p", {
534
+ role: "alert",
535
+ className: "text-sm text-[var(--color-status-error-text)]",
536
+ children: tr("fluidgrids.builder.codeWorkflow.interface.error", "Could not load the function's interface: {{message}}", { message: error })
537
+ }), onRetry && /* @__PURE__ */ jsx(Button$1, {
538
+ variant: "outline",
539
+ size: "sm",
540
+ onClick: onRetry,
541
+ children: tr("fluidgrids.builder.codeWorkflow.interface.retry", "Try again")
542
+ })]
543
+ });
544
+ if (!iface) return /* @__PURE__ */ jsx("p", {
545
+ className: "p-4 text-sm text-muted-foreground",
546
+ children: tr("fluidgrids.builder.codeWorkflow.interface.none", "The function declares no interface.")
547
+ });
548
+ return /* @__PURE__ */ jsxs("div", {
549
+ className: "space-y-4 p-4",
550
+ "data-testid": "code-workflow-interface",
551
+ children: [
552
+ /* @__PURE__ */ jsx(FieldsTable, {
553
+ title: tr("fluidgrids.builder.codeWorkflow.interface.inputs", "Inputs"),
554
+ schema: iface.input
555
+ }),
556
+ /* @__PURE__ */ jsx(FieldsTable, {
557
+ title: tr("fluidgrids.builder.codeWorkflow.interface.outputs", "Outputs"),
558
+ schema: iface.output
559
+ }),
560
+ /* @__PURE__ */ jsxs("section", {
561
+ className: "space-y-1",
562
+ children: [/* @__PURE__ */ jsx("h4", {
563
+ className: "text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground",
564
+ children: tr("fluidgrids.builder.codeWorkflow.interface.signals", "Signals")
565
+ }), handlers.signals.length === 0 ? /* @__PURE__ */ jsx("p", {
566
+ className: "text-xs text-muted-foreground",
567
+ children: tr("fluidgrids.builder.codeWorkflow.interface.noSignals", "None declared")
568
+ }) : /* @__PURE__ */ jsx("ul", {
569
+ className: "space-y-1",
570
+ children: handlers.signals.map((name) => /* @__PURE__ */ jsxs("li", {
571
+ className: "flex items-center gap-2 text-xs",
572
+ children: [/* @__PURE__ */ jsx("code", {
573
+ className: "font-mono text-foreground",
574
+ children: name
575
+ }), canSignal && childRunId && /* @__PURE__ */ jsx(Button$1, {
576
+ variant: "outline",
577
+ size: "sm",
578
+ className: "ml-auto h-6 px-2 text-xs",
579
+ onClick: () => setSignalName(name),
580
+ "data-testid": `code-workflow-send-signal-${name}`,
581
+ children: tr("fluidgrids.builder.codeWorkflow.interface.sendSignal", "Send signal")
582
+ })]
583
+ }, name))
584
+ })]
585
+ }),
586
+ (handlers.queries.length > 0 || handlers.updates.length > 0) && /* @__PURE__ */ jsxs("section", {
587
+ className: "space-y-1 text-xs",
588
+ children: [
589
+ /* @__PURE__ */ jsx("h4", {
590
+ className: "text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground",
591
+ children: tr("fluidgrids.builder.codeWorkflow.interface.queriesUpdates", "Queries and updates")
592
+ }),
593
+ /* @__PURE__ */ jsx("p", {
594
+ className: "font-mono text-foreground",
595
+ children: [...handlers.queries, ...handlers.updates].join(", ")
596
+ }),
597
+ /* @__PURE__ */ jsx("p", {
598
+ className: "text-muted-foreground",
599
+ children: tr("fluidgrids.builder.codeWorkflow.interface.phaseC", "Running queries and updates from the builder is not available yet.")
600
+ })
601
+ ]
602
+ }),
603
+ childRunId && /* @__PURE__ */ jsx(SignalRunDialog, {
604
+ runId: childRunId,
605
+ targets,
606
+ open: signalName !== null,
607
+ onOpenChange: (open) => !open && setSignalName(null),
608
+ initialName: signalName ?? void 0
609
+ })
610
+ ]
611
+ });
612
+ }
613
+
614
+ // src/builder/components/code-workflow/code-workflow-trace.tsx
615
+ /**
616
+ * The code-workflow node's Trace tab (BOFF-9905, spec code-first 07 §5): the
617
+ * event history of the durable child run the node started in the builder's
618
+ * current (or loaded) run, the same view as the run page's History tab.
619
+ */
620
+ /** How often the child run is looked up while the builder's run executes. */
621
+ const CHILD_RUN_POLL_INTERVAL_MS = 2e3;
622
+ /**
623
+ * The child run id of `nodeId` in `runId`, read from the run's node states.
624
+ *
625
+ * While the builder's run is `active` and the node has not started its child
626
+ * yet, the lookup is repeated every 2 s until the child appears; one more
627
+ * read follows when the run stops, so a child started at the very end is
628
+ * still found.
629
+ */
630
+ function useCodeWorkflowChildRun(runId, nodeId, enabled, active = false) {
631
+ const key = enabled && runId && nodeId ? `${runId}\u0000${nodeId}` : null;
632
+ const [found, setFound] = useState({
633
+ key: null,
634
+ childRunId: void 0
635
+ });
636
+ const [loading, setLoading] = useState(false);
637
+ const childRunId = found.key === key ? found.childRunId : void 0;
638
+ const hasChild = childRunId !== void 0;
639
+ useEffect(() => {
640
+ const client = getFluidGridsClientSafe();
641
+ if (!key || !runId || !nodeId || !client || hasChild) {
642
+ setLoading(false);
643
+ return;
644
+ }
645
+ let cancelled = false;
646
+ let timer = null;
647
+ let inFlight = false;
648
+ const lookup = (first) => {
649
+ if (inFlight) return;
650
+ inFlight = true;
651
+ if (first) setLoading(true);
652
+ client.query({
653
+ query: NodeStatesDocument,
654
+ variables: { runId },
655
+ fetchPolicy: "network-only"
656
+ }).then((result) => {
657
+ throwIfResultError(result);
658
+ if (cancelled) return;
659
+ const next = childRunIdOf(result.data?.nodeStates ?? [], nodeId);
660
+ setFound({
661
+ key,
662
+ childRunId: next
663
+ });
664
+ if (next && timer) {
665
+ clearInterval(timer);
666
+ timer = null;
667
+ }
668
+ }).catch(() => {}).finally(() => {
669
+ inFlight = false;
670
+ if (!cancelled && first) setLoading(false);
671
+ });
672
+ };
673
+ lookup(true);
674
+ if (active) timer = setInterval(() => lookup(false), CHILD_RUN_POLL_INTERVAL_MS);
675
+ return () => {
676
+ cancelled = true;
677
+ if (timer) clearInterval(timer);
678
+ };
679
+ }, [
680
+ key,
681
+ runId,
682
+ nodeId,
683
+ active,
684
+ hasChild
685
+ ]);
686
+ return {
687
+ childRunId,
688
+ loading: loading && !hasChild
689
+ };
690
+ }
691
+ function CodeWorkflowTrace({ childRunId, locating, active }) {
692
+ const tr = useTr();
693
+ const history = useRunHistory(childRunId, {
694
+ enabled: !!childRunId,
695
+ live: active
696
+ });
697
+ if (!childRunId) return /* @__PURE__ */ jsx("p", {
698
+ className: "p-4 text-sm text-muted-foreground",
699
+ "data-testid": "code-workflow-trace-empty",
700
+ children: locating ? tr("fluidgrids.builder.codeWorkflow.trace.locating", "Looking for the function's run…") : tr("fluidgrids.builder.codeWorkflow.trace.none", "Run the workflow to see the function's history here.")
701
+ });
702
+ return /* @__PURE__ */ jsx("div", {
703
+ className: "p-4",
704
+ "data-testid": "code-workflow-trace",
705
+ children: /* @__PURE__ */ jsx(RunHistoryView, {
706
+ events: history.events,
707
+ loading: history.loading,
708
+ error: history.error,
709
+ active,
710
+ streaming: history.streaming,
711
+ truncated: history.truncated,
712
+ historyLength: history.historyLength,
713
+ onRefresh: () => void history.refetch(),
714
+ compact: true,
715
+ "data-testid": "code-workflow-trace-history"
716
+ })
717
+ });
718
+ }
719
+
720
+ // src/builder/components/code-workflow/code-workflow-panels.tsx
721
+ /**
722
+ * Source, Trace and Interface tabs of the code-workflow node in the node
723
+ * detail view (BOFF-9905, spec code-first 07 §5). Rendered only while the
724
+ * durable-functions flag (with code-first) is on.
725
+ */
726
+ function CodeWorkflowPanel({ tab, nodeId, args, onClose }) {
727
+ const workflowKey = useFlowStore((s) => s.workflow.workflowKey);
728
+ const version = useFlowStore((s) => s.workflow.version);
729
+ const currentRunId = useFlowStore((s) => s.execution.currentRunId);
730
+ const isExecuting = useFlowStore((s) => s.execution.isExecuting);
731
+ const { allowed: canEdit } = useFluidGridsPermission(FLUIDGRIDS_PERMISSIONS.WORKFLOW_UPDATE);
732
+ const { allowed: canSignal } = useFluidGridsPermission(FLUIDGRIDS_PERMISSIONS.WORKFLOW_RUN_EXECUTE);
733
+ const state = readCodeWorkflowState(args);
734
+ const iface = useCodeWorkflowInterface(state.workflowFn, tab === "interface");
735
+ const child = useCodeWorkflowChildRun(currentRunId, nodeId, tab === "trace" || tab === "interface", isExecuting);
736
+ if (tab === "source") return /* @__PURE__ */ jsx(CodeWorkflowSourceEditor, {
737
+ workflowKey,
738
+ version,
739
+ enabled: !!workflowKey && !!version,
740
+ canEdit,
741
+ onSaved: () => {
742
+ clearCodeWorkflowDefinitionCache();
743
+ onClose();
744
+ }
745
+ });
746
+ if (tab === "trace") return /* @__PURE__ */ jsx(CodeWorkflowTrace, {
747
+ childRunId: child.childRunId,
748
+ locating: child.loading,
749
+ active: isExecuting
750
+ });
751
+ return /* @__PURE__ */ jsx(CodeWorkflowInterface, {
752
+ iface: iface.iface,
753
+ loading: iface.loading,
754
+ error: iface.error,
755
+ onRetry: iface.retry,
756
+ childRunId: child.childRunId,
757
+ canSignal
758
+ });
759
+ }
760
+
761
+ // src/builder/components/ndv/node-detail-view.tsx
762
+ const SECTION_LABEL = "text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground";
763
+ function NodeDetailView() {
764
+ const tr = useTr();
765
+ const ndv = useFlowStore((s) => s.workflow.ndv);
766
+ const closeNdv = useFlowStore((s) => s.actions.ndv.close);
767
+ const showNodePropertiesOf = useFlowStore((s) => s.actions.sidebar.showNodePropertiesOf);
768
+ const open = !!ndv;
769
+ const config = useNodeConfig(ndv ?? null, { webhookEnabled: open });
770
+ const { node, nodes, sourceIds, selectedSource, setSelectedSource, currentOp, inputFields, inputData, outputFields } = config;
771
+ const [tab, setTab] = useState("parameters");
772
+ const { schedulePolicies } = usePhaseCFlags();
773
+ const isSchedule = schedulePolicies && node?.type === "internal:schedule";
774
+ const { allowed: canExecuteRuns } = useFluidGridsPermission(FLUIDGRIDS_PERMISSIONS.WORKFLOW_RUN_EXECUTE);
775
+ const { allowed: canUpdateWorkflow } = useFluidGridsPermission(FLUIDGRIDS_PERMISSIONS.WORKFLOW_UPDATE);
776
+ const isCodeWorkflow = useDurableFunctionNodesEnabled() && node?.type === "internal:code-workflow";
777
+ const [outputView, setOutputView] = useState("schema");
778
+ const [inputView, setInputView] = useState("schema");
779
+ const executionLogs = useFlowStore((s) => s.execution.logs);
780
+ const currentRunId = useFlowStore((s) => s.execution.currentRunId);
781
+ const sourceRun = useFlowStore((s) => s.execution.sourceRun);
782
+ const isExecuting = useFlowStore((s) => s.execution.isExecuting);
783
+ const workflowNodes = useFlowStore((s) => s.workflow.nodes);
784
+ const workflowEdges = useFlowStore((s) => s.workflow.edges);
785
+ const workflowKey = useFlowStore((s) => s.workflow.workflowKey);
786
+ const workflowId = useFlowStore((s) => s.workflow.id);
787
+ const workflowVersion = useFlowStore((s) => s.workflow.version);
788
+ const stepPlan = useFlowStore((s) => s.execution.stepPlan);
789
+ const nodeLog = useMemo(() => latestNodeLog(executionLogs, ndv?.nodeId, currentRunId), [
790
+ executionLogs,
791
+ ndv?.nodeId,
792
+ currentRunId
793
+ ]);
794
+ const guardedNavigate = useGuardedNavigate();
795
+ const traceRunId = isAgentNodeType(node?.type) && nodeLog ? currentRunId : null;
796
+ const stepPlanForNode = stepPlan?.runId === currentRunId && stepPlan.targetNodeId === ndv?.nodeId ? stepPlan : null;
797
+ const hasRealOutput = !!nodeLog?.output && Object.keys(nodeLog.output).length > 0;
798
+ const hasRealInput = inputData !== void 0;
799
+ const realOutputFields = useMemo(() => hasRealOutput ? fieldsFromValue(nodeLog.output) : [], [hasRealOutput, nodeLog]);
800
+ const workflowDbId = useFlowStore((s) => s.workflow.dbId);
801
+ const { data: pinnedDataResult, refetch: refetchPinnedData } = useWorkflowPinnedDataQuery({
802
+ variables: { id: workflowDbId },
803
+ skip: !workflowDbId || !open,
804
+ fetchPolicy: "cache-and-network"
805
+ });
806
+ const pinnedNodeData = pinnedDataResult?.workflowDefinition?.pinnedNodeData ?? {};
807
+ const isPinned = !!ndv?.nodeId && !!pinnedNodeData[ndv.nodeId];
808
+ const [pinNodeData, { loading: pinning }] = usePinNodeDataMutation();
809
+ const [unpinNodeData, { loading: unpinning }] = useUnpinNodeDataMutation();
810
+ const togglePin = async () => {
811
+ if (!workflowDbId || !ndv?.nodeId || config.readOnly) return;
812
+ try {
813
+ if (isPinned) await unpinNodeData({ variables: {
814
+ id: workflowDbId,
815
+ nodeId: ndv.nodeId
816
+ } });
817
+ else {
818
+ const nodeDataKind = (node?.data?.nodeData)?.kind;
819
+ const dataToPin = nodeLog?.output ?? starterPinnedOutput(node?.type, currentOp, nodeDataKind);
820
+ await pinNodeData({ variables: {
821
+ id: workflowDbId,
822
+ nodeId: ndv.nodeId,
823
+ data: dataToPin
824
+ } });
825
+ }
826
+ const refreshed = await refetchPinnedData();
827
+ useFlowStore.getState().actions.setWorkflow({ pinnedNodeData: asPinnedNodeData(refreshed.data?.workflowDefinition?.pinnedNodeData) });
828
+ } catch (err) {
829
+ console.error("[NodeDetailView] Failed to toggle pinned data", err);
830
+ }
831
+ };
832
+ const { executeStep, executeFromNode } = useNodeExecution();
833
+ const threePaneLayout = useMediaQuery("(min-width: 1024px)");
834
+ const [pane, setPane] = useState("parameters");
835
+ const panesRef = useRef(null);
836
+ const dragCleanupRef = useRef(null);
837
+ const [leftPct, setLeftPct] = useState(30);
838
+ const [rightPct, setRightPct] = useState(30);
839
+ const startDrag = (which) => (e) => {
840
+ e.preventDefault();
841
+ const el = panesRef.current;
842
+ if (!el) return;
843
+ const rect = el.getBoundingClientRect();
844
+ const onMove = (ev) => {
845
+ const pct = (ev.clientX - rect.left) / rect.width * 100;
846
+ if (which === "left") setLeftPct(Math.min(55, Math.max(15, pct)));
847
+ else setRightPct(Math.min(55, Math.max(15, 100 - pct)));
848
+ };
849
+ const cleanup = () => {
850
+ window.removeEventListener("mousemove", onMove);
851
+ window.removeEventListener("mouseup", cleanup);
852
+ dragCleanupRef.current = null;
853
+ };
854
+ dragCleanupRef.current = cleanup;
855
+ window.addEventListener("mousemove", onMove);
856
+ window.addEventListener("mouseup", cleanup);
857
+ };
858
+ useEffect(() => () => dragCleanupRef.current?.(), []);
859
+ const requestedTab = ndv?.tab;
860
+ useEffect(() => {
861
+ if (open) {
862
+ setTab(requestedTab ?? "parameters");
863
+ setPane("parameters");
864
+ }
865
+ }, [
866
+ open,
867
+ ndv?.nodeId,
868
+ requestedTab
869
+ ]);
870
+ const openClassicPanel = () => {
871
+ if (!ndv) return;
872
+ showNodePropertiesOf({
873
+ id: ndv.nodeId,
874
+ type: ndv.type
875
+ });
876
+ closeNdv();
877
+ };
878
+ const headerIcon = getNodeDetail(node?.type).icon;
879
+ return /* @__PURE__ */ jsx(Dialog, {
880
+ open,
881
+ onOpenChange: (o) => !o && closeNdv(),
882
+ children: /* @__PURE__ */ jsx(DialogContent, {
883
+ style: {
884
+ width: "94vw",
885
+ height: "92vh",
886
+ maxWidth: "none",
887
+ maxHeight: "92vh",
888
+ zIndex: NDV_Z_INDEX
889
+ },
890
+ className: "flex flex-col gap-0 overflow-hidden border-border bg-background p-0",
891
+ "data-testid": "ndv-modal",
892
+ children: /* @__PURE__ */ jsxs(UiStepRunBoundary, {
893
+ nodeType: node?.type,
894
+ children: [
895
+ /* @__PURE__ */ jsxs(DialogHeader, {
896
+ className: "flex shrink-0 flex-row items-center gap-3 space-y-0 border-b border-border px-4 py-3",
897
+ children: [
898
+ /* @__PURE__ */ jsx("div", {
899
+ className: "flex size-7 shrink-0 items-center justify-center rounded-md bg-muted",
900
+ children: /* @__PURE__ */ jsx(Icon, {
901
+ icon: headerIcon,
902
+ className: "size-4 text-foreground"
903
+ })
904
+ }),
905
+ /* @__PURE__ */ jsxs("div", {
906
+ className: "min-w-0 flex-1",
907
+ children: [/* @__PURE__ */ jsx(DialogTitle, {
908
+ className: "truncate text-sm font-semibold leading-tight",
909
+ children: nodeTitle(node)
910
+ }), nodeSubtitle(node) && /* @__PURE__ */ jsx(DialogDescription, {
911
+ className: "truncate text-xs leading-tight",
912
+ children: nodeSubtitle(node)
913
+ })]
914
+ }),
915
+ /* @__PURE__ */ jsx("button", {
916
+ type: "button",
917
+ onClick: openClassicPanel,
918
+ className: "rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-muted hover:text-foreground",
919
+ children: tr("fluidgrids.builder.nodeDetailView.sidePanelButton", "Side panel")
920
+ }),
921
+ /* @__PURE__ */ jsx("button", {
922
+ type: "button",
923
+ "aria-label": tr("fluidgrids.builder.nodeDetailView.closeAriaLabel", "Close"),
924
+ onClick: closeNdv,
925
+ className: "rounded-md p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",
926
+ children: /* @__PURE__ */ jsx(Icon, {
927
+ icon: "mdi:close",
928
+ className: "size-4"
929
+ })
930
+ })
931
+ ]
932
+ }),
933
+ ndv && /* @__PURE__ */ jsx(NodeExecutionActions, {
934
+ targetNodeId: ndv.nodeId,
935
+ nodes: workflowNodes,
936
+ edges: workflowEdges,
937
+ logs: executionLogs,
938
+ workflowKey: workflowKey || workflowId,
939
+ workflowVersion: workflowVersion || "1.0.0",
940
+ sourceRun,
941
+ isExecuting,
942
+ onExecuteStep: async (targetId) => {
943
+ await executeStep(targetId);
944
+ },
945
+ onContinueFromNode: async (sourceRunId, targetId) => {
946
+ const result = await executeFromNode(sourceRunId, targetId);
947
+ if (!result.success && result.quotaExhausted) closeNdv();
948
+ },
949
+ testIdPrefix: "ndv",
950
+ className: "border-t-0 border-b"
951
+ }),
952
+ stepPlanForNode && /* @__PURE__ */ jsx(StepExecutionPlanSummary, { plan: stepPlanForNode }),
953
+ !threePaneLayout && /* @__PURE__ */ jsxs("div", {
954
+ className: "flex shrink-0 items-center gap-4 border-b border-border px-4",
955
+ "data-testid": "ndv-pane-switcher",
956
+ children: [
957
+ /* @__PURE__ */ jsx(TabButton, {
958
+ active: pane === "input",
959
+ onClick: () => setPane("input"),
960
+ children: tr("fluidgrids.builder.nodeDetailView.inputSection", "Input")
961
+ }),
962
+ /* @__PURE__ */ jsx(TabButton, {
963
+ active: pane === "parameters",
964
+ onClick: () => setPane("parameters"),
965
+ children: tr("fluidgrids.builder.nodeDetailView.tabParameters", "Parameters")
966
+ }),
967
+ /* @__PURE__ */ jsx(TabButton, {
968
+ active: pane === "output",
969
+ onClick: () => setPane("output"),
970
+ children: tr("fluidgrids.builder.nodeDetailView.outputSection", "Output")
971
+ })
972
+ ]
973
+ }),
974
+ /* @__PURE__ */ jsxs("div", {
975
+ ref: panesRef,
976
+ className: "flex min-h-0 flex-1",
977
+ children: [
978
+ /* @__PURE__ */ jsxs("section", {
979
+ style: threePaneLayout ? { width: `${leftPct}%` } : void 0,
980
+ className: cn("flex min-h-0 flex-col bg-card/40", threePaneLayout ? "min-w-[180px]" : pane === "input" ? "w-full flex-1" : "hidden"),
981
+ children: [/* @__PURE__ */ jsxs("div", {
982
+ className: "flex items-center gap-2 px-4 py-2.5",
983
+ children: [
984
+ /* @__PURE__ */ jsx("span", {
985
+ className: SECTION_LABEL,
986
+ children: tr("fluidgrids.builder.nodeDetailView.inputSection", "Input")
987
+ }),
988
+ hasRealInput && /* @__PURE__ */ jsx("span", {
989
+ className: "rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-primary",
990
+ title: tr("fluidgrids.builder.nodeDetailView.realDataBadgeHint", "Showing real data from the last execution."),
991
+ children: tr("fluidgrids.builder.nodeDetailView.realDataBadge", "Live")
992
+ }),
993
+ sourceIds.length > 0 && /* @__PURE__ */ jsx(ThemedSelect, {
994
+ className: "ml-auto max-w-[60%] truncate rounded-md border border-border-default bg-bg-surface px-2 py-1 text-xs text-text-primary scheme-normal dark:scheme-dark outline-none focus:border-action-primary-border [&_option]:bg-bg-surface [&_option]:text-text-primary",
995
+ value: selectedSource ?? "",
996
+ onChange: (e) => setSelectedSource(e.target.value),
997
+ "data-testid": "ndv-source-selector",
998
+ children: sourceIds.map((sid) => {
999
+ const sn = nodes.find((n) => n.id === sid);
1000
+ return /* @__PURE__ */ jsx("option", {
1001
+ value: sid,
1002
+ children: nodeTitle(sn)
1003
+ }, sid);
1004
+ })
1005
+ }),
1006
+ (hasRealInput || inputFields.length > 0) && /* @__PURE__ */ jsxs("div", {
1007
+ className: "ml-auto flex items-center gap-1",
1008
+ children: [
1009
+ /* @__PURE__ */ jsx(ToggleChip, {
1010
+ active: inputView === "schema",
1011
+ onClick: () => setInputView("schema"),
1012
+ children: tr("fluidgrids.builder.nodeDetailView.outputViewSchema", "Schema")
1013
+ }),
1014
+ /* @__PURE__ */ jsx(ToggleChip, {
1015
+ active: inputView === "table",
1016
+ onClick: () => setInputView("table"),
1017
+ children: tr("fluidgrids.builder.nodeDetailView.outputViewTable", "Table")
1018
+ }),
1019
+ /* @__PURE__ */ jsx(ToggleChip, {
1020
+ active: inputView === "json",
1021
+ onClick: () => setInputView("json"),
1022
+ children: tr("fluidgrids.builder.nodeDetailView.outputViewJson", "JSON")
1023
+ })
1024
+ ]
1025
+ })
1026
+ ]
1027
+ }), /* @__PURE__ */ jsxs("div", {
1028
+ className: "min-h-0 flex-1 overflow-auto px-2 pb-3",
1029
+ "data-testid": "ndv-input-tree",
1030
+ children: [hasRealInput ? inputView === "schema" ? /* @__PURE__ */ jsx(FieldTree, {
1031
+ fields: inputFields,
1032
+ draggable: true
1033
+ }) : inputView === "table" ? /* @__PURE__ */ jsx(TableView, { data: inputData }) : /* @__PURE__ */ jsx(JsonView, { data: inputData }) : inputFields.length > 0 ? /* @__PURE__ */ jsx(FieldTree, {
1034
+ fields: inputFields,
1035
+ draggable: true
1036
+ }) : /* @__PURE__ */ jsx(PaneEmptyState, {
1037
+ icon: "mdi:tray-arrow-down",
1038
+ title: tr("fluidgrids.builder.nodeDetailView.noInputTitle", "No input data"),
1039
+ hint: sourceIds.length === 0 ? tr("fluidgrids.builder.nodeDetailView.noInputHintDisconnected", "Connect an upstream node to map its fields.") : tr("fluidgrids.builder.nodeDetailView.noInputHintNoFields", "The selected source has no declared output fields.")
1040
+ }), nodeLog?.inputArgs && /* @__PURE__ */ jsxs("details", {
1041
+ className: "mt-4 border-t border-border px-2 pt-3 text-xs",
1042
+ "data-testid": "ndv-executed-parameters",
1043
+ children: [
1044
+ /* @__PURE__ */ jsx("summary", {
1045
+ className: "cursor-pointer font-medium",
1046
+ children: tr("fluidgrids.builder.nodeDetailView.executedParameters", "Executed parameters (read-only)")
1047
+ }),
1048
+ /* @__PURE__ */ jsx("p", {
1049
+ className: "my-2 text-muted-foreground",
1050
+ children: tr("fluidgrids.builder.nodeDetailView.executedParametersHint", "Values passed to this node after mapping. Drag fields from the upstream source above to create mappings.")
1051
+ }),
1052
+ /* @__PURE__ */ jsx(JsonView, { data: nodeLog.inputArgs })
1053
+ ]
1054
+ })]
1055
+ })]
1056
+ }),
1057
+ threePaneLayout && /* @__PURE__ */ jsx(ResizeHandle, { onStart: startDrag("left") }),
1058
+ /* @__PURE__ */ jsxs("section", {
1059
+ className: cn("flex min-h-0 flex-1 flex-col", threePaneLayout ? "min-w-[280px]" : pane === "parameters" ? "w-full" : "hidden"),
1060
+ children: [/* @__PURE__ */ jsxs("div", {
1061
+ className: "flex shrink-0 items-center gap-4 border-b border-border px-4",
1062
+ children: [
1063
+ /* @__PURE__ */ jsx(TabButton, {
1064
+ active: tab === "parameters",
1065
+ onClick: () => setTab("parameters"),
1066
+ children: tr("fluidgrids.builder.nodeDetailView.tabParameters", "Parameters")
1067
+ }),
1068
+ isCodeWorkflow && /* @__PURE__ */ jsxs(Fragment$1, { children: [
1069
+ /* @__PURE__ */ jsx(TabButton, {
1070
+ active: tab === "source",
1071
+ onClick: () => setTab("source"),
1072
+ children: tr("fluidgrids.builder.nodeDetailView.tabSource", "Source")
1073
+ }),
1074
+ /* @__PURE__ */ jsx(TabButton, {
1075
+ active: tab === "trace",
1076
+ onClick: () => setTab("trace"),
1077
+ children: tr("fluidgrids.builder.nodeDetailView.tabTrace", "Trace")
1078
+ }),
1079
+ /* @__PURE__ */ jsx(TabButton, {
1080
+ active: tab === "interface",
1081
+ onClick: () => setTab("interface"),
1082
+ children: tr("fluidgrids.builder.nodeDetailView.tabInterface", "Interface")
1083
+ })
1084
+ ] }),
1085
+ isSchedule && /* @__PURE__ */ jsx(TabButton, {
1086
+ active: tab === "schedule",
1087
+ onClick: () => setTab("schedule"),
1088
+ children: tr("fluidgrids.builder.nodeDetailView.tabSchedule", "Schedule")
1089
+ }),
1090
+ /* @__PURE__ */ jsx(TabButton, {
1091
+ active: tab === "settings",
1092
+ onClick: () => setTab("settings"),
1093
+ children: tr("fluidgrids.builder.nodeDetailView.tabSettings", "Settings")
1094
+ })
1095
+ ]
1096
+ }), isCodeWorkflow && ndv && (tab === "source" || tab === "trace" || tab === "interface") ? /* @__PURE__ */ jsx("div", {
1097
+ className: "flex min-h-0 flex-1 flex-col overflow-auto",
1098
+ "data-testid": `ndv-code-workflow-${tab}`,
1099
+ children: /* @__PURE__ */ jsx(CodeWorkflowPanel, {
1100
+ tab,
1101
+ nodeId: ndv.nodeId,
1102
+ args: (node?.data)?.args?.state,
1103
+ onClose: closeNdv
1104
+ })
1105
+ }) : isSchedule && ndv && tab === "schedule" ? /* @__PURE__ */ jsx("div", {
1106
+ className: "flex min-h-0 flex-1 flex-col overflow-auto",
1107
+ "data-testid": "ndv-schedule",
1108
+ children: /* @__PURE__ */ jsx(SchedulePanel, {
1109
+ state: config.argsState,
1110
+ writeField: config.writeFixed,
1111
+ workflowKey: workflowDbId && workflowKey ? workflowKey : null,
1112
+ triggerNodeId: ndv.nodeId,
1113
+ canExecute: canExecuteRuns,
1114
+ canUpdate: canUpdateWorkflow
1115
+ })
1116
+ }) : tab === "parameters" || tab === "schedule" ? /* @__PURE__ */ jsx("div", {
1117
+ className: "min-h-0 flex-1 space-y-4 overflow-auto p-4",
1118
+ "data-testid": "ndv-params",
1119
+ children: /* @__PURE__ */ jsx(ReadOnlyFieldset, {
1120
+ className: "space-y-4",
1121
+ children: /* @__PURE__ */ jsx(NodeParamsForm, {
1122
+ config,
1123
+ nodeType: node?.type,
1124
+ testIdPrefix: "ndv"
1125
+ })
1126
+ })
1127
+ }) : /* @__PURE__ */ jsx("div", {
1128
+ className: "min-h-0 flex-1 overflow-auto p-4",
1129
+ "data-testid": "ndv-settings",
1130
+ children: /* @__PURE__ */ jsx(ReadOnlyFieldset, { children: /* @__PURE__ */ jsx(NodeSettingsPanel, { config }) })
1131
+ })]
1132
+ }),
1133
+ threePaneLayout && /* @__PURE__ */ jsx(ResizeHandle, { onStart: startDrag("right") }),
1134
+ /* @__PURE__ */ jsxs("section", {
1135
+ style: threePaneLayout ? { width: `${rightPct}%` } : void 0,
1136
+ className: cn("flex min-h-0 flex-col bg-card/40", threePaneLayout ? "min-w-[180px]" : pane === "output" ? "w-full flex-1" : "hidden"),
1137
+ children: [/* @__PURE__ */ jsxs("div", {
1138
+ className: "flex items-center gap-2 px-4 py-2.5",
1139
+ children: [
1140
+ /* @__PURE__ */ jsx("span", {
1141
+ className: SECTION_LABEL,
1142
+ children: tr("fluidgrids.builder.nodeDetailView.outputSection", "Output")
1143
+ }),
1144
+ hasRealOutput && /* @__PURE__ */ jsx("span", {
1145
+ className: "rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-primary",
1146
+ title: tr("fluidgrids.builder.nodeDetailView.realDataBadgeHint", "Showing real data from the last execution."),
1147
+ children: tr("fluidgrids.builder.nodeDetailView.realDataBadge", "Live")
1148
+ }),
1149
+ nodeLog?.usedPinnedData && /* @__PURE__ */ jsx("span", {
1150
+ className: "rounded bg-status-warning-bg-subtle px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-status-warning-text",
1151
+ children: tr("fluidgrids.builder.nodeDetailView.pinnedDataUsedBadge", "Pinned")
1152
+ }),
1153
+ ndv?.nodeId && workflowDbId && /* @__PURE__ */ jsxs("button", {
1154
+ type: "button",
1155
+ onClick: togglePin,
1156
+ disabled: pinning || unpinning || config.readOnly,
1157
+ "data-testid": "ndv-pin-toggle",
1158
+ title: tr(isPinned ? "fluidgrids.builder.nodeDetailView.unpinHint" : "fluidgrids.builder.nodeDetailView.pinHint", isPinned ? "Unpin — TEST runs will call this node for real again." : "Pin this output — TEST runs will replay it instead of calling the node."),
1159
+ className: cn("flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide transition-colors disabled:opacity-50", isPinned ? "bg-status-warning-bg-subtle text-status-warning-text" : "text-muted-foreground hover:text-foreground"),
1160
+ children: [/* @__PURE__ */ jsx(Icon, {
1161
+ icon: isPinned ? "mdi:pin" : "mdi:pin-outline",
1162
+ className: "size-3"
1163
+ }), tr(isPinned ? "fluidgrids.builder.nodeDetailView.unpinButton" : "fluidgrids.builder.nodeDetailView.pinButton", isPinned ? "Pinned" : "Pin")]
1164
+ }),
1165
+ traceRunId && ndv?.nodeId && /* @__PURE__ */ jsxs("button", {
1166
+ type: "button",
1167
+ onClick: () => guardedNavigate(agentTracePath(traceRunId, ndv.nodeId)),
1168
+ "data-testid": "ndv-view-agent-trace",
1169
+ title: tr("fluidgrids.builder.nodeDetailView.viewAgentTraceHint", "Open this run's Agent tab: the tool calls, tokens and cost of this agent."),
1170
+ className: "flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground transition-colors hover:text-foreground",
1171
+ children: [/* @__PURE__ */ jsx(Icon, {
1172
+ icon: "mdi:robot-outline",
1173
+ className: "size-3"
1174
+ }), tr("fluidgrids.builder.nodeDetailView.viewAgentTrace", "View trace")]
1175
+ }),
1176
+ (hasRealOutput || outputFields.length > 0) && /* @__PURE__ */ jsxs("div", {
1177
+ className: "ml-auto flex items-center gap-1",
1178
+ children: [
1179
+ /* @__PURE__ */ jsx(ToggleChip, {
1180
+ active: outputView === "schema",
1181
+ onClick: () => setOutputView("schema"),
1182
+ children: tr("fluidgrids.builder.nodeDetailView.outputViewSchema", "Schema")
1183
+ }),
1184
+ /* @__PURE__ */ jsx(ToggleChip, {
1185
+ active: outputView === "table",
1186
+ onClick: () => setOutputView("table"),
1187
+ children: tr("fluidgrids.builder.nodeDetailView.outputViewTable", "Table")
1188
+ }),
1189
+ /* @__PURE__ */ jsx(ToggleChip, {
1190
+ active: outputView === "json",
1191
+ onClick: () => setOutputView("json"),
1192
+ children: tr("fluidgrids.builder.nodeDetailView.outputViewJson", "JSON")
1193
+ })
1194
+ ]
1195
+ })
1196
+ ]
1197
+ }), /* @__PURE__ */ jsxs("div", {
1198
+ className: "min-h-0 flex-1 overflow-auto px-2 pb-3",
1199
+ "data-testid": "ndv-output-tree",
1200
+ children: [
1201
+ node && nodeLog?.status === "failed" && nodeLog.error && /* @__PURE__ */ jsx(FailedStepAiBanner, {
1202
+ step: {
1203
+ id: node.id,
1204
+ label: nodeTitle(node),
1205
+ type: node.type
1206
+ },
1207
+ error: nodeLog.error
1208
+ }),
1209
+ node && nodeLog?.status === "failed" && isSandboxRuntimeExhausted(nodeLog.errorType) && /* @__PURE__ */ jsx(SandboxRuntimeExhaustedNotice, {
1210
+ compact: true,
1211
+ className: "mb-3"
1212
+ }),
1213
+ hasRealOutput ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(OutputFiles, { output: nodeLog.output }), outputView === "schema" ? /* @__PURE__ */ jsx(FieldTree, {
1214
+ fields: realOutputFields,
1215
+ draggable: true
1216
+ }) : outputView === "table" ? /* @__PURE__ */ jsx(TableView, { data: nodeLog.output }) : /* @__PURE__ */ jsx(JsonView, { data: nodeLog.output })] }) : outputFields.length === 0 ? /* @__PURE__ */ jsx(PaneEmptyState, {
1217
+ icon: "mdi:tray-arrow-up",
1218
+ title: tr("fluidgrids.builder.nodeDetailView.noOutputTitle", "No output data"),
1219
+ hint: tr("fluidgrids.builder.nodeDetailView.noOutputHint", "This operation has no declared output fields. Run this node to see its real output here.")
1220
+ }) : outputView === "schema" ? /* @__PURE__ */ jsx(FieldTree, {
1221
+ fields: outputFields,
1222
+ draggable: true
1223
+ }) : outputView === "table" ? /* @__PURE__ */ jsx(TableView, { data: null }) : /* @__PURE__ */ jsx("pre", {
1224
+ className: "whitespace-pre-wrap break-words px-2 text-[11px] leading-relaxed text-muted-foreground",
1225
+ children: JSON.stringify(currentOp?.output_fields ?? {}, null, 2)
1226
+ })
1227
+ ]
1228
+ })]
1229
+ })
1230
+ ]
1231
+ })
1232
+ ]
1233
+ })
1234
+ })
1235
+ });
1236
+ }
1237
+ function StepExecutionPlanSummary({ plan }) {
1238
+ const tr = useTr();
1239
+ return /* @__PURE__ */ jsxs("section", {
1240
+ className: "shrink-0 border-b border-border bg-muted/30 px-4 py-2.5",
1241
+ "data-testid": "ndv-step-execution-plan",
1242
+ "aria-live": "polite",
1243
+ children: [
1244
+ /* @__PURE__ */ jsxs("div", {
1245
+ className: "flex flex-wrap items-center gap-x-3 gap-y-1",
1246
+ children: [
1247
+ /* @__PURE__ */ jsx("span", {
1248
+ className: "text-xs font-semibold text-foreground",
1249
+ children: tr("fluidgrids.builder.nodeDetailView.stepPlanTitle", "TEST execution plan")
1250
+ }),
1251
+ /* @__PURE__ */ jsx(PlanMetric, {
1252
+ label: tr("fluidgrids.builder.nodeDetailView.stepPlanExecute", "Execute"),
1253
+ count: plan.executeNodeIds.length
1254
+ }),
1255
+ /* @__PURE__ */ jsx(PlanMetric, {
1256
+ label: tr("fluidgrids.builder.nodeDetailView.stepPlanReuse", "Reuse"),
1257
+ count: plan.reusedNodeIds.length
1258
+ }),
1259
+ /* @__PURE__ */ jsx(PlanMetric, {
1260
+ label: tr("fluidgrids.builder.nodeDetailView.stepPlanPinned", "Pinned"),
1261
+ count: plan.pinnedNodeIds.length
1262
+ }),
1263
+ /* @__PURE__ */ jsx(PlanMetric, {
1264
+ label: tr("fluidgrids.builder.nodeDetailView.stepPlanBlockers", "Blockers"),
1265
+ count: plan.blockers.length
1266
+ })
1267
+ ]
1268
+ }),
1269
+ plan.sourceRunId && /* @__PURE__ */ jsxs("p", {
1270
+ className: "mt-1 text-[11px] text-muted-foreground",
1271
+ children: [
1272
+ tr("fluidgrids.builder.nodeDetailView.stepPlanSource", "Using compatible TEST data from run"),
1273
+ " ",
1274
+ /* @__PURE__ */ jsx("code", {
1275
+ className: "font-mono text-foreground",
1276
+ children: plan.sourceRunId
1277
+ })
1278
+ ]
1279
+ }),
1280
+ /* @__PURE__ */ jsxs("div", {
1281
+ className: "mt-2 grid gap-2 sm:grid-cols-2",
1282
+ children: [
1283
+ /* @__PURE__ */ jsx(PlanNodeList, {
1284
+ label: tr("fluidgrids.builder.nodeDetailView.stepPlanExecuteNodes", "Nodes to execute"),
1285
+ nodeIds: plan.executeNodeIds,
1286
+ emptyLabel: tr("fluidgrids.builder.nodeDetailView.stepPlanExecuteNodesEmpty", "No nodes need execution.")
1287
+ }),
1288
+ /* @__PURE__ */ jsx(PlanNodeList, {
1289
+ label: tr("fluidgrids.builder.nodeDetailView.stepPlanReusedNodes", "Reused nodes"),
1290
+ nodeIds: plan.reusedNodeIds,
1291
+ emptyLabel: tr("fluidgrids.builder.nodeDetailView.stepPlanReusedNodesEmpty", "No prior node data reused.")
1292
+ }),
1293
+ /* @__PURE__ */ jsx(PlanNodeList, {
1294
+ label: tr("fluidgrids.builder.nodeDetailView.stepPlanPinnedNodes", "Pinned nodes"),
1295
+ nodeIds: plan.pinnedNodeIds,
1296
+ emptyLabel: tr("fluidgrids.builder.nodeDetailView.stepPlanPinnedNodesEmpty", "No pinned data used.")
1297
+ }),
1298
+ /* @__PURE__ */ jsx(PlanNodeList, {
1299
+ label: tr("fluidgrids.builder.nodeDetailView.stepPlanBlockerNodes", "Blockers"),
1300
+ nodeIds: plan.blockers,
1301
+ emptyLabel: tr("fluidgrids.builder.nodeDetailView.stepPlanBlockerNodesEmpty", "No blockers.")
1302
+ })
1303
+ ]
1304
+ })
1305
+ ]
1306
+ });
1307
+ }
1308
+ function PlanMetric({ label, count }) {
1309
+ return /* @__PURE__ */ jsxs("span", {
1310
+ className: "text-[11px] text-muted-foreground",
1311
+ children: [
1312
+ label,
1313
+ ": ",
1314
+ /* @__PURE__ */ jsx("span", {
1315
+ className: "font-medium text-foreground",
1316
+ children: count
1317
+ })
1318
+ ]
1319
+ });
1320
+ }
1321
+ function PlanNodeList({ label, nodeIds, emptyLabel }) {
1322
+ return /* @__PURE__ */ jsxs("div", {
1323
+ className: "min-w-0 rounded-md border border-border bg-background/60 px-2 py-1.5",
1324
+ children: [/* @__PURE__ */ jsx("p", {
1325
+ className: "text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",
1326
+ children: label
1327
+ }), nodeIds.length > 0 ? /* @__PURE__ */ jsx("div", {
1328
+ className: "mt-1 flex flex-wrap gap-1",
1329
+ children: nodeIds.map((nodeId) => /* @__PURE__ */ jsx("code", {
1330
+ className: "max-w-full truncate rounded bg-muted px-1 py-0.5 font-mono text-[10px] text-foreground",
1331
+ children: nodeId
1332
+ }, `${label}-${nodeId}`))
1333
+ }) : /* @__PURE__ */ jsx("p", {
1334
+ className: "mt-1 text-[10px] text-muted-foreground",
1335
+ children: emptyLabel
1336
+ })]
1337
+ });
1338
+ }
1339
+ function ResizeHandle({ onStart }) {
1340
+ return /* @__PURE__ */ jsx("div", {
1341
+ onMouseDown: onStart,
1342
+ role: "separator",
1343
+ "aria-orientation": "vertical",
1344
+ className: "group flex w-1.5 shrink-0 cursor-col-resize items-center justify-center bg-border/60 hover:bg-primary/40",
1345
+ children: /* @__PURE__ */ jsx("div", { className: "h-8 w-0.5 rounded bg-muted-foreground/40 group-hover:bg-primary" })
1346
+ });
1347
+ }
1348
+ function ToggleChip({ active, onClick, children }) {
1349
+ return /* @__PURE__ */ jsx("button", {
1350
+ type: "button",
1351
+ onClick,
1352
+ className: cn("rounded px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide transition-colors", active ? "bg-primary/10 text-primary" : "text-muted-foreground hover:text-foreground"),
1353
+ children
1354
+ });
1355
+ }
1356
+ /** A pane with no data: the shared empty state, filling the pane's height. */
1357
+ function PaneEmptyState({ icon, title, hint }) {
1358
+ return /* @__PURE__ */ jsx(EmptyState, {
1359
+ kind: "first-use",
1360
+ illustration: "data-tables",
1361
+ size: "panel",
1362
+ className: "h-full",
1363
+ icon: /* @__PURE__ */ jsx(Icon, {
1364
+ icon,
1365
+ className: "size-7 text-muted-foreground"
1366
+ }),
1367
+ title,
1368
+ description: hint
1369
+ });
1370
+ }
1371
+
1372
+ export { NodeDetailView };