@skyhook-io/radar-app 1.17.0 → 1.18.0

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 (347) hide show
  1. package/README.md +1 -1
  2. package/package.json +11 -11
  3. package/src/App.tsx +138 -116
  4. package/src/api/actions.errorCode.test.ts +40 -0
  5. package/src/api/actions.test.ts +48 -0
  6. package/src/api/actions.ts +79 -0
  7. package/src/api/apiResources.navigation.test.tsx +232 -0
  8. package/src/api/apiResources.ts +46 -3
  9. package/src/api/client.gitopsPoll.test.ts +99 -0
  10. package/src/api/client.helmPreview.test.tsx +48 -0
  11. package/src/api/client.helmSource.test.ts +39 -0
  12. package/src/api/client.namespaceSwitch.hook.test.tsx +54 -0
  13. package/src/api/client.namespaceSwitch.test.ts +107 -0
  14. package/src/api/client.resourceAvailability.test.ts +24 -0
  15. package/src/api/client.ts +580 -103
  16. package/src/api/client.workloadRuns.test.ts +53 -0
  17. package/src/api/cnpg-ha.live.test.ts +140 -0
  18. package/src/api/cnpg-ha.test.ts +78 -0
  19. package/src/api/cnpg-ha.ts +19 -0
  20. package/src/api/cnpg-history.ts +123 -0
  21. package/src/api/cnpg-inspect.ts +102 -0
  22. package/src/api/cnpg-protection.ts +112 -0
  23. package/src/api/cnpg-recovery.test.tsx +60 -0
  24. package/src/api/cnpg-recovery.ts +262 -0
  25. package/src/api/cnpg-sessions.ts +175 -0
  26. package/src/api/cnpg-storage.ts +138 -0
  27. package/src/api/cnpg.legacy-reads.test.ts +43 -0
  28. package/src/api/cnpg.pooler-runtime.test.ts +15 -0
  29. package/src/api/cnpg.ts +428 -10
  30. package/src/api/config.test.ts +23 -1
  31. package/src/api/config.ts +7 -3
  32. package/src/api/diagnose.ts +4 -1
  33. package/src/api/drain-plan.test.ts +70 -40
  34. package/src/api/policy.ts +5 -5
  35. package/src/api/radarFeatures.render.test.tsx +47 -3
  36. package/src/api/radarFeatures.ts +5 -1
  37. package/src/api/reviewedActionMutation.test.tsx +164 -0
  38. package/src/api/reviewedActionMutation.ts +66 -0
  39. package/src/api/timelineSource.test.ts +9 -0
  40. package/src/api/timelineSource.ts +8 -0
  41. package/src/api/traffic.scope.render.test.tsx +60 -0
  42. package/src/api/traffic.ts +3 -1
  43. package/src/components/audit/AuditView.tsx +9 -0
  44. package/src/components/capacity/CapacityActivity.tsx +3 -31
  45. package/src/components/capacity/CapacityDemand.tsx +4 -36
  46. package/src/components/capacity/CapacityOverview.tsx +217 -56
  47. package/src/components/capacity/CapacityPoolDetail.tsx +6 -55
  48. package/src/components/capacity/CapacityView.test.tsx +323 -0
  49. package/src/components/capacity/ClusterSchedulingCard.tsx +2 -10
  50. package/src/components/capacity/certaintyGlyph.test.tsx +2 -9
  51. package/src/components/capacity/routes.ts +42 -0
  52. package/src/components/capacity/shared.tsx +11 -129
  53. package/src/components/capacity/workspaceRoute.ts +18 -0
  54. package/src/components/cnpg/CNPGActionHost.compatibility.test.tsx +30 -0
  55. package/src/components/cnpg/CNPGArchivingRepair.tsx +191 -0
  56. package/src/components/cnpg/CNPGBlockingSessions.test.tsx +50 -0
  57. package/src/components/cnpg/CNPGBlockingSessions.tsx +333 -0
  58. package/src/components/cnpg/CNPGClusterActivity.test.tsx +11 -0
  59. package/src/components/cnpg/CNPGClusterActivity.tsx +18 -9
  60. package/src/components/cnpg/CNPGClusterLogs.compatibility.test.tsx +130 -0
  61. package/src/components/cnpg/CNPGClusterLogs.empty.test.tsx +29 -0
  62. package/src/components/cnpg/CNPGClusterLogs.test.ts +9 -0
  63. package/src/components/cnpg/CNPGClusterLogs.tsx +81 -24
  64. package/src/components/cnpg/CNPGClusterTabs.test.tsx +152 -0
  65. package/src/components/cnpg/CNPGClusterTabs.tsx +187 -0
  66. package/src/components/cnpg/CNPGClustersKindView.tsx +46 -0
  67. package/src/components/cnpg/CNPGConfiguration.test.tsx +223 -0
  68. package/src/components/cnpg/CNPGConfiguration.tsx +190 -0
  69. package/src/components/cnpg/CNPGCreateClusterDialog.test.tsx +113 -0
  70. package/src/components/cnpg/CNPGCreateClusterDialog.tsx +74 -0
  71. package/src/components/cnpg/CNPGDeclarations.test.ts +107 -0
  72. package/src/components/cnpg/CNPGDeclarations.tsx +236 -78
  73. package/src/components/cnpg/CNPGDetailPage.test.tsx +62 -0
  74. package/src/components/cnpg/CNPGDetailPage.tsx +159 -98
  75. package/src/components/cnpg/CNPGDrawerTrail.tsx +2 -2
  76. package/src/components/cnpg/CNPGInvestigationAction.test.tsx +30 -0
  77. package/src/components/cnpg/CNPGOperator.test.tsx +34 -0
  78. package/src/components/cnpg/CNPGOperator.tsx +78 -30
  79. package/src/components/cnpg/CNPGOperatorBanner.tsx +39 -0
  80. package/src/components/cnpg/CNPGOperatorConditions.test.tsx +45 -0
  81. package/src/components/cnpg/CNPGOperatorConditions.tsx +16 -0
  82. package/src/components/cnpg/CNPGOperatorConfig.test.tsx +27 -0
  83. package/src/components/cnpg/CNPGOperatorDiagnosis.tsx +247 -0
  84. package/src/components/cnpg/CNPGOverview.test.tsx +171 -0
  85. package/src/components/cnpg/CNPGOverview.tsx +238 -63
  86. package/src/components/cnpg/CNPGParametersInEffect.test.tsx +51 -0
  87. package/src/components/cnpg/CNPGParametersInEffect.tsx +120 -0
  88. package/src/components/cnpg/CNPGPerformance.prerequisite.test.tsx +48 -0
  89. package/src/components/cnpg/CNPGPerformance.test.tsx +73 -0
  90. package/src/components/cnpg/CNPGPerformance.tsx +477 -0
  91. package/src/components/cnpg/CNPGPooling.test.tsx +89 -0
  92. package/src/components/cnpg/CNPGPooling.tsx +97 -40
  93. package/src/components/cnpg/CNPGProtection.test.tsx +145 -0
  94. package/src/components/cnpg/CNPGProtection.tsx +228 -122
  95. package/src/components/cnpg/CNPGReplicationTab.test.tsx +87 -0
  96. package/src/components/cnpg/CNPGReplicationTab.tsx +212 -0
  97. package/src/components/cnpg/CNPGReplicationView.tsx +264 -0
  98. package/src/components/cnpg/CNPGStorage.test.tsx +140 -0
  99. package/src/components/cnpg/CNPGStorage.tsx +619 -0
  100. package/src/components/cnpg/CNPGSummaryHost.overview.test.tsx +44 -0
  101. package/src/components/cnpg/CNPGSummaryHost.test.tsx +23 -0
  102. package/src/components/cnpg/CNPGSummaryHost.tsx +230 -55
  103. package/src/components/cnpg/CNPGTrends.denied.test.tsx +33 -0
  104. package/src/components/cnpg/CNPGTrends.missing.test.tsx +69 -0
  105. package/src/components/cnpg/CNPGTrends.test.ts +38 -0
  106. package/src/components/cnpg/CNPGTrends.tsx +702 -0
  107. package/src/components/cnpg/CNPGView.tsx +34 -21
  108. package/src/components/cnpg/CNPGWorkspace.compatibility.test.tsx +90 -0
  109. package/src/components/cnpg/actions/CNPGClusterActions.dialog.test.tsx +79 -0
  110. package/src/components/cnpg/actions/CNPGClusterActions.test.tsx +142 -0
  111. package/src/components/cnpg/actions/CNPGClusterActions.tsx +853 -0
  112. package/src/components/cnpg/actions/CNPGConnectButton.read.test.tsx +40 -0
  113. package/src/components/cnpg/actions/CNPGConnectButton.test.ts +25 -0
  114. package/src/components/cnpg/actions/CNPGConnectButton.tsx +131 -0
  115. package/src/components/cnpg/actions/CNPGDestroyInstanceDialog.tsx +185 -0
  116. package/src/components/cnpg/actions/CNPGInstanceActions.test.tsx +38 -0
  117. package/src/components/cnpg/actions/CNPGInstanceActions.tsx +74 -0
  118. package/src/components/cnpg/actions/CNPGMaintenanceBanner.tsx +53 -0
  119. package/src/components/cnpg/actions/CNPGPoolerActions.test.tsx +35 -0
  120. package/src/components/cnpg/actions/CNPGPoolerActions.tsx +79 -0
  121. package/src/components/cnpg/actions/CNPGReportDialog.test.tsx +12 -0
  122. package/src/components/cnpg/actions/CNPGReportDialog.tsx +91 -0
  123. package/src/components/cnpg/actions/CNPGScheduleActions.run.test.tsx +58 -0
  124. package/src/components/cnpg/actions/CNPGScheduleActions.test.tsx +54 -0
  125. package/src/components/cnpg/actions/CNPGScheduleActions.tsx +208 -0
  126. package/src/components/cnpg/actions/actionModel.test.ts +111 -0
  127. package/src/components/cnpg/actions/actionModel.ts +127 -0
  128. package/src/components/cnpg/actions/renderCNPGHeaderActions.tsx +60 -0
  129. package/src/components/cnpg/actions/useCNPGWriteGuard.tsx +58 -0
  130. package/src/components/cnpg/actions/useOpenCNPGPsql.ts +22 -0
  131. package/src/components/cnpg/archivingRepair.test.ts +104 -0
  132. package/src/components/cnpg/archivingRepair.ts +145 -0
  133. package/src/components/cnpg/baseBackup.test.ts +36 -0
  134. package/src/components/cnpg/baseBackup.ts +36 -0
  135. package/src/components/cnpg/blocking.test.ts +59 -0
  136. package/src/components/cnpg/blocking.ts +131 -0
  137. package/src/components/cnpg/coverageText.test.ts +27 -0
  138. package/src/components/cnpg/creation/CNPGTargetFields.tsx +110 -0
  139. package/src/components/cnpg/creation/targetModel.test.ts +137 -0
  140. package/src/components/cnpg/creation/targetModel.ts +149 -0
  141. package/src/components/cnpg/fleetStatus.test.ts +46 -0
  142. package/src/components/cnpg/fleetStatus.ts +43 -0
  143. package/src/components/cnpg/formFields.ts +2 -0
  144. package/src/components/cnpg/grantText.test.tsx +11 -0
  145. package/src/components/cnpg/host.test.tsx +24 -0
  146. package/src/components/cnpg/host.tsx +101 -0
  147. package/src/components/cnpg/inspectModel.test.ts +120 -0
  148. package/src/components/cnpg/inspectModel.ts +140 -0
  149. package/src/components/cnpg/logicalSlots.test.ts +30 -0
  150. package/src/components/cnpg/logicalSlots.ts +29 -0
  151. package/src/components/cnpg/lsn.test.ts +40 -0
  152. package/src/components/cnpg/lsn.ts +43 -0
  153. package/src/components/cnpg/operations/CNPGFleetOperation.tsx +30 -0
  154. package/src/components/cnpg/operations/CNPGOperationTracker.test.tsx +247 -0
  155. package/src/components/cnpg/operations/CNPGOperationTracker.tsx +255 -0
  156. package/src/components/cnpg/operations/model.test.ts +510 -0
  157. package/src/components/cnpg/operations/model.ts +499 -0
  158. package/src/components/cnpg/operations/presentation.test.ts +80 -0
  159. package/src/components/cnpg/operations/presentation.ts +84 -0
  160. package/src/components/cnpg/operations/store.ts +98 -0
  161. package/src/components/cnpg/operatorStatus.test.ts +134 -0
  162. package/src/components/cnpg/operatorStatus.ts +194 -0
  163. package/src/components/cnpg/paths.test.ts +54 -0
  164. package/src/components/cnpg/paths.ts +47 -4
  165. package/src/components/cnpg/protection/CNPGAttachArchiveDialog.tsx +185 -0
  166. package/src/components/cnpg/protection/CNPGCreateScheduleDialog.tsx +196 -0
  167. package/src/components/cnpg/protection/CNPGProtectionSetup.test.tsx +121 -0
  168. package/src/components/cnpg/protection/CNPGProtectionSetup.tsx +452 -0
  169. package/src/components/cnpg/protection/CNPGScheduleInput.tsx +115 -0
  170. package/src/components/cnpg/protection/CNPGScheduleRepairButton.tsx +120 -0
  171. package/src/components/cnpg/protection/scheduleModel.test.ts +19 -0
  172. package/src/components/cnpg/protection/scheduleModel.ts +16 -0
  173. package/src/components/cnpg/recovery/CNPGRecoveryPoint.tsx +220 -0
  174. package/src/components/cnpg/recovery/CNPGRestoreButton.test.tsx +29 -0
  175. package/src/components/cnpg/recovery/CNPGRestoreButton.tsx +26 -0
  176. package/src/components/cnpg/recovery/CNPGRestoreChecks.test.tsx +23 -0
  177. package/src/components/cnpg/recovery/CNPGRestoreChecks.tsx +153 -0
  178. package/src/components/cnpg/recovery/CNPGRestoreDialog.back.test.tsx +149 -0
  179. package/src/components/cnpg/recovery/CNPGRestoreDialog.test.tsx +46 -0
  180. package/src/components/cnpg/recovery/CNPGRestoreDialog.tsx +333 -0
  181. package/src/components/cnpg/recovery/CNPGRestoreProgress.tsx +182 -0
  182. package/src/components/cnpg/recovery/CNPGRestoreValidation.tsx +216 -0
  183. package/src/components/cnpg/recovery/restoreModel.test.ts +709 -0
  184. package/src/components/cnpg/recovery/restoreModel.ts +685 -0
  185. package/src/components/cnpg/recovery/restoreOperation.ts +56 -0
  186. package/src/components/cnpg/refresh.test.ts +38 -0
  187. package/src/components/cnpg/refresh.ts +17 -0
  188. package/src/components/cnpg/refreshNotice.test.tsx +29 -0
  189. package/src/components/cnpg/routes.test.ts +34 -3
  190. package/src/components/cnpg/routes.ts +60 -48
  191. package/src/components/cnpg/runtimeAssessment.ts +198 -0
  192. package/src/components/cnpg/runtimeModel.test.ts +175 -0
  193. package/src/components/cnpg/runtimeModel.ts +196 -0
  194. package/src/components/cnpg/runtimeParts.test.tsx +17 -0
  195. package/src/components/cnpg/runtimeParts.tsx +79 -0
  196. package/src/components/cnpg/shared.test.tsx +59 -0
  197. package/src/components/cnpg/shared.tsx +100 -182
  198. package/src/components/cnpg/storageModel.test.ts +107 -0
  199. package/src/components/cnpg/storageModel.ts +101 -0
  200. package/src/components/cnpg/trendSamples.test.ts +148 -0
  201. package/src/components/cnpg/trendSamples.ts +222 -0
  202. package/src/components/cnpg/useCNPGClusterAssessment.ts +30 -0
  203. package/src/components/cnpg/useCNPGKubectlContext.test.tsx +45 -0
  204. package/src/components/cnpg/useCNPGKubectlContext.ts +13 -0
  205. package/src/components/cnpg/useCNPGNavigate.test.tsx +58 -0
  206. package/src/components/cnpg/useCNPGNavigate.ts +21 -0
  207. package/src/components/cnpg/useCNPGPoolerLive.ts +46 -0
  208. package/src/components/cnpg/useCNPGScreenParams.ts +24 -0
  209. package/src/components/cnpg/useCNPGSidebarWorkspace.ts +66 -16
  210. package/src/components/cnpg/workspaceRoute.ts +23 -0
  211. package/src/components/cost/ApplicationCostTab.test.ts +7 -0
  212. package/src/components/cost/ApplicationCostTab.tsx +7 -7
  213. package/src/components/cost/CostView.test.ts +2 -1
  214. package/src/components/cost/CostView.tsx +0 -2
  215. package/src/components/cost/WorkloadCostTab.tsx +2 -4
  216. package/src/components/cost/errors.ts +3 -1
  217. package/src/components/cost/source.test.ts +10 -0
  218. package/src/components/cost/source.ts +5 -1
  219. package/src/components/diagnose/DiagnoseSurface.tsx +3 -3
  220. package/src/components/diagnose/InvestigationChangesEvidence.test.tsx +352 -0
  221. package/src/components/diagnose/InvestigationEvidencePane.test.tsx +101 -0
  222. package/src/components/diagnose/InvestigationView.tsx +2 -1
  223. package/src/components/diagnose/investigationEvidence/adapters/changes.test.ts +123 -0
  224. package/src/components/diagnose/investigationEvidence/adapters/changes.ts +192 -3
  225. package/src/components/diagnose/investigationEvidence/adapters/issues.ts +73 -43
  226. package/src/components/diagnose/investigationEvidence/adapters/prometheus.ts +64 -2
  227. package/src/components/diagnose/investigationEvidence/adapters/resource.test.ts +37 -0
  228. package/src/components/diagnose/investigationEvidence/adapters/testdata/get-changes-created.json +323 -0
  229. package/src/components/diagnose/investigationEvidence/bodies/streams.tsx +144 -15
  230. package/src/components/diagnose/investigationEvidence/observations.ts +20 -0
  231. package/src/components/diagnose/investigationEvidence/parse.ts +57 -1
  232. package/src/components/diagnose/investigationEvidence/projection.test.ts +123 -0
  233. package/src/components/diagnose/investigationEvidence/types.ts +11 -0
  234. package/src/components/diagnose/investigationEvidencePresentation.test.ts +18 -0
  235. package/src/components/diagnose/investigationState.test.ts +36 -1
  236. package/src/components/diagnose/investigationState.ts +8 -0
  237. package/src/components/diagnose/launch.ts +2 -2
  238. package/src/components/dock/BottomDock.tsx +8 -3
  239. package/src/components/dock/TerminalTab.test.tsx +17 -0
  240. package/src/components/dock/TerminalTab.tsx +7 -3
  241. package/src/components/dock/WorkloadLogsTab.tsx +3 -0
  242. package/src/components/execution/BatchExecutionView.render.test.tsx +29 -1
  243. package/src/components/execution/BatchExecutionView.tsx +23 -8
  244. package/src/components/execution/cluster-template-runs.render.test.tsx +42 -0
  245. package/src/components/gitops/ArgoResourceDiffLoader.tsx +4 -2
  246. package/src/components/gitops/GitOpsView.tsx +23 -23
  247. package/src/components/helm/HelmCompareRoute.test.tsx +59 -0
  248. package/src/components/helm/HelmCompareRoute.tsx +57 -26
  249. package/src/components/helm/HelmReleaseDrawer.test.ts +55 -3
  250. package/src/components/helm/HelmReleaseDrawer.tsx +186 -64
  251. package/src/components/helm/HelmReleaseNotes.test.tsx +42 -0
  252. package/src/components/helm/HelmReleaseNotes.tsx +26 -0
  253. package/src/components/helm/OwnedResources.tsx +2 -2
  254. package/src/components/helm/TrackChartSourceDialog.render.test.tsx +192 -0
  255. package/src/components/helm/TrackChartSourceDialog.test.ts +51 -0
  256. package/src/components/helm/TrackChartSourceDialog.tsx +179 -176
  257. package/src/components/helm/ValuesDiffPreview.tsx +4 -1
  258. package/src/components/helm/ValuesViewer.test.tsx +301 -0
  259. package/src/components/helm/ValuesViewer.tsx +169 -78
  260. package/src/components/home/ActivitySummary.tsx +2 -1
  261. package/src/components/home/ClusterHealthCard.tsx +4 -4
  262. package/src/components/home/CostCard.test.tsx +100 -0
  263. package/src/components/home/CostCard.tsx +2 -2
  264. package/src/components/home/HelmSummary.tsx +2 -2
  265. package/src/components/home/HomeView.tsx +32 -12
  266. package/src/components/home/MCPSetupDialog.test.tsx +30 -0
  267. package/src/components/home/MCPSetupDialog.tsx +13 -6
  268. package/src/components/home/ProblemsPanel.test.tsx +82 -0
  269. package/src/components/home/TopologyPreview.tsx +2 -2
  270. package/src/components/home/mcpToolCatalog.ts +18 -2
  271. package/src/components/issues/IssuesPane.render.test.tsx +143 -0
  272. package/src/components/issues/IssuesPane.test.ts +65 -1
  273. package/src/components/issues/IssuesPane.tsx +213 -26
  274. package/src/components/issues/UncheckedSourceHelp.test.tsx +42 -0
  275. package/src/components/issues/UncheckedSourceHelp.tsx +24 -0
  276. package/src/components/issues/uncheckedSources.test.ts +43 -0
  277. package/src/components/issues/uncheckedSources.ts +74 -0
  278. package/src/components/logs/ScheduledWorkloadLogsViewer.tsx +4 -2
  279. package/src/components/resource/PVCUsageBar.render.test.tsx +32 -0
  280. package/src/components/resource/PVCUsageBar.test.tsx +24 -0
  281. package/src/components/resource/PVCUsageBar.tsx +15 -6
  282. package/src/components/resource/WorkloadMetricsHelpDialog.test.tsx +3 -1
  283. package/src/components/resource/WorkloadMetricsHelpDialog.tsx +1 -1
  284. package/src/components/resources/CompositeRenderer.tsx +4 -4
  285. package/src/components/resources/ImageFilesystemModal.test.tsx +68 -0
  286. package/src/components/resources/ImageFilesystemModal.tsx +11 -4
  287. package/src/components/resources/PodFilesystemModal.tsx +2 -2
  288. package/src/components/resources/ResourceDetailDrawer.tsx +2 -2
  289. package/src/components/resources/ResourcesView.scope.render.test.tsx +58 -0
  290. package/src/components/resources/ResourcesView.tsx +44 -15
  291. package/src/components/resources/renderers/FluxHelmReleaseRenderer.test.tsx +111 -0
  292. package/src/components/resources/renderers/FluxHelmReleaseRenderer.tsx +67 -0
  293. package/src/components/resources/renderers/KyvernoPolicyCoverage.scope.render.test.tsx +64 -0
  294. package/src/components/resources/renderers/KyvernoPolicyCoverage.tsx +6 -7
  295. package/src/components/settings/LocalIntegrationStatus.test.tsx +52 -0
  296. package/src/components/settings/LocalIntegrationStatus.tsx +3 -4
  297. package/src/components/settings/SettingsDialog.tsx +49 -30
  298. package/src/components/timeline/TimelineList.tsx +22 -24
  299. package/src/components/timeline/TimelineLoadError.test.tsx +62 -0
  300. package/src/components/timeline/TimelineLoadError.tsx +96 -0
  301. package/src/components/timeline/TimelineView.tsx +18 -45
  302. package/src/components/timeline/ViewModeToggle.tsx +20 -0
  303. package/src/components/timeline/useStickyError.test.tsx +47 -0
  304. package/src/components/timeline/useStickyError.ts +15 -0
  305. package/src/components/traffic/TrafficFilterSidebar.test.tsx +77 -0
  306. package/src/components/traffic/TrafficFilterSidebar.tsx +42 -31
  307. package/src/components/traffic/TrafficView.tsx +12 -12
  308. package/src/components/traffic/trafficFilters.test.ts +20 -1
  309. package/src/components/traffic/trafficFilters.ts +13 -0
  310. package/src/components/ui/DiagnosticsOverlay.tsx +34 -2
  311. package/src/components/ui/Markdown.test.tsx +65 -0
  312. package/src/components/ui/Markdown.tsx +144 -127
  313. package/src/components/ui/Omnibar.tsx +13 -2
  314. package/src/components/ui/Toast.tsx +1 -1
  315. package/src/components/ui/omnibar-match.test.ts +30 -0
  316. package/src/components/ui/omnibar-match.ts +18 -0
  317. package/src/components/whats-new/releaseNotes.ts +63 -1
  318. package/src/components/workload/CronJobSchedulingEvidence.test.tsx +35 -0
  319. package/src/components/workload/CronJobSchedulingEvidence.tsx +37 -0
  320. package/src/components/workload/NodeDrainStatus.test.tsx +253 -0
  321. package/src/components/workload/NodeDrainStatus.tsx +55 -0
  322. package/src/components/workload/WorkloadView.test.ts +10 -1
  323. package/src/components/workload/WorkloadView.tsx +63 -243
  324. package/src/components/workspace/layout.test.tsx +29 -0
  325. package/src/components/workspace/layout.tsx +259 -0
  326. package/src/components/workspace/table.ts +7 -0
  327. package/src/context/ConnectionContext.test.ts +27 -1
  328. package/src/context/ConnectionContext.tsx +17 -7
  329. package/src/contexts/CapabilitiesContext.tsx +1 -1
  330. package/src/integrations/resourceHost.test.tsx +55 -0
  331. package/src/integrations/resourceHost.ts +99 -0
  332. package/src/integrations/resourceHosts.test.tsx +142 -0
  333. package/src/integrations/resourceHosts.tsx +121 -0
  334. package/src/integrations/workspaceRoute.ts +20 -0
  335. package/src/integrations/workspaceRoutes.test.ts +40 -0
  336. package/src/integrations/workspaceRoutes.ts +22 -0
  337. package/src/integrations/workspaceScreens.tsx +14 -0
  338. package/src/utils/drawer-trail.ts +35 -0
  339. package/src/utils/kindFilterStore.test.ts +147 -0
  340. package/src/utils/kindFilterStore.ts +91 -0
  341. package/src/utils/navigation.test.ts +13 -1
  342. package/src/utils/navigation.ts +53 -2
  343. package/src/utils/page-links.ts +21 -0
  344. package/src/utils/tabStorage.ts +40 -0
  345. package/src/utils/viewMemory.test.ts +78 -0
  346. package/src/utils/viewMemory.ts +54 -0
  347. package/src/utils/wails-clipboard.ts +4 -2
@@ -1,8 +1,4 @@
1
- import { RayJobRenderer } from '../resources/renderers/RayJobRenderer'
2
- import { JobRenderer, JobSetRenderer } from '../resources/renderers/JobAdmissionRenderers'
3
- import { RayClusterRenderer } from '../resources/renderers/RayClusterRenderer'
4
- import { RayServiceRenderer } from '../resources/renderers/RayServiceRenderer'
5
- import { KueueWorkloadRenderer } from '../resources/renderers/KueueWorkloadRenderer'
1
+ import { decorateResourceDiagnose, resourceDetailRedirect, resourceDetailSlots, resourceLogs, resourceRendererOverrides } from '../../integrations/resourceHosts'
6
2
  import { useMemo, useEffect, useCallback, useRef, useState, type ReactNode } from 'react'
7
3
  import { useQueries, useQueryClient } from '@tanstack/react-query'
8
4
  import { Navigate, useNavigate, useLocation, useSearchParams } from 'react-router-dom'
@@ -11,13 +7,11 @@ import { clsx } from 'clsx'
11
7
  import { Terminal, Stethoscope } from 'lucide-react'
12
8
  import {
13
9
  WorkloadView as BaseWorkloadView,
14
- isApiGroup,
15
10
  EditableYamlView,
16
11
  FetchResult,
17
12
  Section,
18
13
  type WorkloadTabType,
19
14
  type WorkloadExtraTab,
20
- type RendererOverrides,
21
15
  type GitOpsOwnerRef,
22
16
  type HelmOwnerRef,
23
17
  type AppRow,
@@ -42,6 +36,7 @@ import {
42
36
  import type { ServicePortRenderProps } from '@skyhook-io/k8s-ui/components/resources/renderers/ServiceRenderer'
43
37
  import { isJobSetV1Alpha2 } from '@skyhook-io/k8s-ui/components/resources/resource-utils-jobset-lws'
44
38
  import type { SelectedResource, ResourceRef, Relationships, ResourceWithRelationships } from '../../types'
39
+ import { CronJobSchedulingContext, CronJobSchedulingDetails } from './CronJobSchedulingEvidence'
45
40
  import { useHistoryPaging } from './historyPaging'
46
41
  import { findInheritedGitOpsLookupRef, useResolvedGitOpsOwner } from '../../hooks/useResolvedGitOpsOwner'
47
42
  import { useGitOpsWriteGuard } from '../../hooks/useGitOpsWriteGuard'
@@ -52,6 +47,7 @@ import {
52
47
  pluralToKind,
53
48
  relatedResourcePath,
54
49
  buildWorkloadPath,
50
+ namespacesFromSearch,
55
51
  type NavigateToResource,
56
52
  } from '../../utils/navigation'
57
53
  import {
@@ -87,6 +83,7 @@ import {
87
83
  useCordonNode,
88
84
  useUncordonNode,
89
85
  useDrainNode,
86
+ useNodeDrainActivity,
90
87
  useDrainPlan,
91
88
  useCascadeDeletePreview,
92
89
  useResourceEvents,
@@ -104,7 +101,7 @@ import { WorkloadCostTab } from '../cost/WorkloadCostTab'
104
101
  import { isOpenCostWorkloadKind } from '../cost/kinds'
105
102
  import { isRadarFeatureUnsupported } from '../../api/radarFeatures'
106
103
  import { useTrafficAvailable } from '../../api/traffic'
107
- import { useResourceAudit, useResourceIssues, useResources, useTrace, fetchTraceWithProbes, fetchInClusterCapability, runInClusterMerged } from '../../api/client'
104
+ import { useResourceAudit, useResourceIssues, useSubjectIssues, useRadarFeature, useTrace, fetchTraceWithProbes, fetchInClusterCapability, runInClusterMerged } from '../../api/client'
108
105
  import { AuditAlerts, getRadarUpgradeRequirement, ResourceIssuesSection, ReachabilityView, TraceSummary, InClusterConsentDialog, traceFingerprint, staticPollUnreliable, summarizeInClusterTests, type Trace as NetworkTrace, type InClusterCapability, inClusterConsentGiven, consentRequestRows } from '@skyhook-io/k8s-ui'
109
106
  import { WorkloadLogsViewer } from '../logs/WorkloadLogsViewer'
110
107
  import { ScheduledWorkloadLogsViewer } from '../logs/ScheduledWorkloadLogsViewer'
@@ -128,42 +125,12 @@ import {
128
125
  defaultPathForPort,
129
126
  } from '../curl/ServiceCurlButton'
130
127
  import { useToast } from '../ui/Toast'
131
- import { Tooltip } from '../ui/Tooltip'
132
- import { PodRenderer } from '../resources/renderers/PodRenderer'
133
- import { KarpenterNodePoolRenderer } from '../resources/renderers/KarpenterNodePoolRenderer'
134
- import { NodeRenderer } from '../resources/renderers/NodeRenderer'
135
- import { ServiceRenderer } from '../resources/renderers/ServiceRenderer'
136
- import { WorkloadRenderer } from '../resources/renderers/WorkloadRenderer'
137
- import { CompositeRenderer } from '../resources/CompositeRenderer'
138
- import { ServiceAccountRenderer } from '../resources/renderers/ServiceAccountRenderer'
139
- import { RoleRenderer } from '../resources/renderers/RoleRenderer'
140
- import { RoleBindingRenderer } from '../resources/renderers/RoleBindingRenderer'
141
- import { NamespaceRenderer } from '../resources/renderers/NamespaceRenderer'
142
- import { CAPIClusterRenderer } from '../resources/renderers/CAPIClusterRenderer'
143
- import { HPARenderer } from '../resources/renderers/HPARenderer'
144
- import { PVCRenderer } from '../resources/renderers/PVCRenderer'
145
- import { RolloutRenderer } from '../resources/renderers/RolloutRenderer'
146
- import { KyvernoPolicyCoverage } from '../resources/renderers/KyvernoPolicyCoverage'
147
- import { KyvernoPolicyQueued } from '../resources/renderers/KyvernoPolicyQueued'
148
- import { CNPGObjectStoreRenderer } from '../resources/renderers/CNPGObjectStoreRenderer'
149
- import { VeleroBSLRenderer } from '../resources/renderers/VeleroBSLRenderer'
150
- import { VeleroBackupRenderer } from '../resources/renderers/VeleroBackupRenderer'
151
- import { VeleroRestoreRenderer } from '../resources/renderers/VeleroRestoreRenderer'
152
- import { CNPGClusterRenderer } from '../resources/renderers/CNPGClusterRenderer'
153
- import { CNPGImageCatalogRenderer } from '../resources/renderers/CNPGImageCatalogRenderer'
154
- import {
155
- CNPGDatabaseRenderer,
156
- CNPGPublicationRenderer,
157
- CNPGSubscriptionRenderer,
158
- } from '../resources/renderers/CNPGDeclarativeRenderer'
159
128
  import { CreateResourceDialog } from '../shared/CreateResourceDialog'
160
- import { renderCNPGSummary } from '../cnpg/CNPGSummaryHost'
161
- import { CNPGClusterLogs } from '../cnpg/CNPGClusterLogs'
162
- import { cnpgDetailKindFor, cnpgDetailPath } from '../cnpg/routes'
163
129
  import { cleanYamlForDuplicate } from '../../utils/skeleton-yaml'
164
130
  import { useDesktopDownload } from '../../hooks/useDesktopDownload'
165
131
  import { useCompareLauncher } from '../compare/useCompareLauncher'
166
132
  import { useDiagnoseCustomization } from '../../context/DiagnoseCustomization'
133
+ import { NodeDrainStatus } from './NodeDrainStatus'
167
134
 
168
135
  type TabType = WorkloadTabType
169
136
  const BATCH_EXECUTION_KINDS = new Set([
@@ -186,41 +153,6 @@ export function supportsBatchExecution(kind: string, apiKind: string, group?: st
186
153
  return true
187
154
  }
188
155
 
189
- // Stable reference — web renderer wrappers inject platform hooks internally
190
- const rendererOverrides: RendererOverrides = {
191
- RayJobRenderer,
192
- JobRenderer,
193
- JobSetRenderer,
194
- RayServiceRenderer,
195
- RayClusterRenderer,
196
- KueueWorkloadRenderer,
197
- CAPIClusterRenderer,
198
- PodRenderer,
199
- KarpenterNodePoolRenderer,
200
- NodeRenderer,
201
- ServiceRenderer,
202
- WorkloadRenderer,
203
- CompositeRenderer,
204
- ServiceAccountRenderer,
205
- RoleRenderer,
206
- RoleBindingRenderer,
207
- NamespaceRenderer,
208
- HPARenderer,
209
- PVCRenderer,
210
- RolloutRenderer,
211
- KyvernoPolicyCoverage,
212
- KyvernoPolicyQueued,
213
- CNPGObjectStoreRenderer,
214
- VeleroBSLRenderer,
215
- VeleroBackupRenderer,
216
- VeleroRestoreRenderer,
217
- CNPGClusterRenderer,
218
- CNPGDatabaseRenderer,
219
- CNPGPublicationRenderer,
220
- CNPGSubscriptionRenderer,
221
- CNPGImageCatalogRenderer,
222
- }
223
-
224
156
  // ============================================================================
225
157
  // ROUTE WRAPPER — parses kind/ns/name from URL
226
158
  // ============================================================================
@@ -289,16 +221,8 @@ export function WorkloadViewRoute({ onNavigateToResource }: WorkloadViewRoutePro
289
221
  )
290
222
  }
291
223
 
292
- const cnpgPlural = cnpgDetailKindFor(kind, group)
293
- if (cnpgPlural) {
294
- const params = new URLSearchParams(searchParams)
295
- params.delete('apiGroup')
296
- const tab = params.get('tab')
297
- if (cnpgPlural === 'clusters' && (tab === 'timeline' || tab === 'events')) params.set('tab', 'activity')
298
- const base = cnpgDetailPath({ plural: cnpgPlural, namespace, name })
299
- const qs = params.toString()
300
- return <Navigate replace to={qs ? `${base}?${qs}` : base} state={location.state} />
301
- }
224
+ const detailPath = resourceDetailRedirect({ kind, group, namespace, name }, searchParams)
225
+ if (detailPath) return <Navigate replace to={detailPath} state={location.state} />
302
226
 
303
227
  return (
304
228
  <WorkloadView
@@ -341,6 +265,16 @@ interface WorkloadViewProps {
341
265
  pushTabHistory?: boolean
342
266
  breadcrumb?: ReactNode
343
267
  extraTabs?: WorkloadExtraTab[]
268
+ tabOrder?: string[]
269
+ subheader?: ReactNode
270
+ specTab?: { label?: string; icon?: ReactNode; lead?: ReactNode; render?: () => ReactNode }
271
+ titlePrefix?: ReactNode
272
+ inlineBadges?: boolean
273
+ namespaceNote?: ReactNode
274
+ renderStatusBadge?: (resource: any) => ReactNode
275
+ statusNote?: ReactNode
276
+ onRefresh?: () => Promise<unknown>
277
+ hideKindBadge?: boolean
344
278
  }
345
279
 
346
280
  interface ImageTargetOwnershipContext {
@@ -359,6 +293,7 @@ function useActionsBarProps(
359
293
  name: string,
360
294
  group: string | undefined,
361
295
  cascadeEnabled: boolean,
296
+ nodeUID: string,
362
297
  ) {
363
298
  const { showCopied } = useToast()
364
299
  const { features } = useCapabilitiesContext()
@@ -437,7 +372,8 @@ function useActionsBarProps(
437
372
  const canNodeWrite = useCanNodeWrite()
438
373
  const cordonMutation = useCordonNode()
439
374
  const uncordonMutation = useUncordonNode()
440
- const drainMutation = useDrainNode()
375
+ const drainMutation = useDrainNode(nodeUID)
376
+ const { activity: drainActivity } = useNodeDrainActivity(name, nodeUID)
441
377
  const drainPlanMutation = useDrainPlan()
442
378
 
443
379
  const { renderAction: renderDiagnose } = useDiagnoseCustomization()
@@ -463,7 +399,7 @@ function useActionsBarProps(
463
399
  name: string
464
400
  className?: string
465
401
  }) => <PortForwardButton type={type} namespace={ns} name={n} className={className} />,
466
- renderDiagnose,
402
+ renderDiagnose: decorateResourceDiagnose(renderDiagnose),
467
403
  onDelete: (
468
404
  params: Parameters<typeof deleteMutation.mutate>[0],
469
405
  callbacks?: { onSuccess?: () => void },
@@ -471,7 +407,8 @@ function useActionsBarProps(
471
407
  isDeleting: deleteMutation.isPending,
472
408
  cascadeDependents: cascadePreview?.dependents,
473
409
  cascadeLoading,
474
- cascadeRootResolved: cascadeError ? false : cascadePreview?.rootResolved,
410
+ cascadeRootResolved: cascadePreview?.rootResolved,
411
+ cascadePreviewFailed: Boolean(cascadeError),
475
412
  onRestart: rolloutAllows('restart')
476
413
  ? (params: Parameters<typeof restartWorkloadMutation.mutate>[0]) =>
477
414
  restartWorkloadMutation.mutate(params)
@@ -542,7 +479,7 @@ function useActionsBarProps(
542
479
  isUncordoningNode: uncordonMutation.isPending,
543
480
  onDrainNode: (params: Parameters<typeof drainMutation.mutate>[0]) =>
544
481
  drainMutation.mutate(params),
545
- isDrainingNode: drainMutation.isPending,
482
+ isDrainingNode: nodeUID ? drainActivity?.status === 'pending' : drainMutation.isPending,
546
483
  onPlanDrain: (params: Parameters<typeof drainPlanMutation.mutate>[0]) =>
547
484
  drainPlanMutation.mutate(params),
548
485
  onPlanDrainReset: () => drainPlanMutation.reset(),
@@ -565,6 +502,8 @@ export function WorkloadView({
565
502
  }: WorkloadViewProps) {
566
503
  const [searchParams, setSearchParams] = useSearchParams()
567
504
  const location = useLocation()
505
+ const viewNamespacesKey = namespacesFromSearch(searchParams).join(',')
506
+ const viewNamespaces = useMemo(() => (viewNamespacesKey ? viewNamespacesKey.split(',') : []), [viewNamespacesKey])
568
507
  const apiKind = kindToPluralWithGroup(kindProp, rest.group ?? '')
569
508
  const queryClient = useQueryClient()
570
509
  const [imageTargetOwnership, setImageTargetOwnership] =
@@ -632,6 +571,8 @@ export function WorkloadView({
632
571
  const batchRunsQuery = useWorkloadRuns(apiKind, namespace, name, expanded && batchExecution, {
633
572
  refetchActive: true,
634
573
  clusterScoped: batchKind === 'ClusterWorkflowTemplate',
574
+ namespaces: viewNamespaces,
575
+ ownerUID: batchKind === 'CronJob' ? resource?.metadata?.uid : undefined,
635
576
  })
636
577
  const relatedTimelineEvents = useMemo(
637
578
  () => batchKind === 'JobSet' ? [] : workloadRunTimelineEvents(batchRunsQuery.data?.runs ?? []),
@@ -645,9 +586,11 @@ export function WorkloadView({
645
586
  () => (isDiagnoseKind(apiKind, effectiveGroup) ? [] : (relationships?.services ?? [])),
646
587
  [apiKind, effectiveGroup, relationships],
647
588
  )
589
+ const onRefresh = rest.onRefresh
648
590
  const refetchResourceAndRuns = useCallback(async () => {
649
591
  await Promise.all([
650
592
  refetchResource(),
593
+ onRefresh?.(),
651
594
  ...(apiKind === 'rayjobs' && effectiveGroup === 'ray.io' ? [
652
595
  queryClient.refetchQueries({ queryKey: ['resource', 'jobs', namespace, name, 'batch'], type: 'active' }),
653
596
  ...(resource?.spec?.clusterSelector?.['ray.io/cluster'] ? [queryClient.refetchQueries({ queryKey: ['resource', 'rayclusters', namespace, resource.spec.clusterSelector['ray.io/cluster'], 'ray.io'], type: 'active' })] : []),
@@ -661,7 +604,7 @@ export function WorkloadView({
661
604
  ...(apiKind === 'rayclusters' ? { type: 'active' as const } : {}),
662
605
  }),
663
606
  ])
664
- }, [apiKind, effectiveGroup, name, namespace, queryClient, refetchResource, resource?.spec?.clusterSelector])
607
+ }, [apiKind, effectiveGroup, name, namespace, queryClient, refetchResource, resource?.spec?.clusterSelector, onRefresh])
665
608
  const podWorkloadOwner = useMemo(
666
609
  () => podWorkloadOwnerFromRelationships(apiKind, namespace, relationships, resource),
667
610
  [apiKind, namespace, relationships, resource],
@@ -853,6 +796,7 @@ export function WorkloadView({
853
796
  name,
854
797
  effectiveGroup,
855
798
  !resourceLoading && Boolean(resource),
799
+ apiKind === 'nodes' && !effectiveGroup ? resource?.metadata?.uid ?? '' : '',
856
800
  )
857
801
  const desktopDownload = useDesktopDownload()
858
802
 
@@ -864,7 +808,14 @@ export function WorkloadView({
864
808
  // would flip the query key when the manifest arrives, drop liveIssues, and flash
865
809
  // the renderer banners. The backend canonicalizes a plural kind via discovery,
866
810
  // so using the normalized API kind resolves direct links and app navigation alike.
867
- const { data: liveIssues, isPending: issuesPending } = useResourceIssues(apiKind, rest.group, namespace, name)
811
+ const isCronJob = apiKind === 'cronjobs' && (!effectiveGroup || effectiveGroup === 'batch')
812
+ const { support: coverageSupport } = useRadarFeature('resourceIssueCoverage')
813
+ const useCronJobCoverage = isCronJob && coverageSupport === 'supported'
814
+ const ordinaryIssues = useResourceIssues(apiKind, rest.group, namespace, name, !useCronJobCoverage)
815
+ const cronJobIssues = useSubjectIssues(useCronJobCoverage ? { kind: 'CronJob', group: 'batch', namespace, name, uid: resource?.metadata?.uid } : null, useCronJobCoverage && Boolean(resource))
816
+ const liveIssues = useCronJobCoverage ? cronJobIssues.data?.issues : ordinaryIssues.data
817
+ const issuesPending = useCronJobCoverage ? cronJobIssues.isPending : ordinaryIssues.isPending
818
+ const schedulingEvidence = cronJobIssues.data?.scheduling_report?.uid === resource?.metadata?.uid ? cronJobIssues.data?.scheduling_report : undefined
868
819
  const { data: auditFindings } = useResourceAudit(apiKind, namespace, name, effectiveGroup)
869
820
  const hasOperationalIssues = Boolean(liveIssues?.length)
870
821
  const {
@@ -1247,12 +1198,11 @@ export function WorkloadView({
1247
1198
  group={effectiveGroup}
1248
1199
  selectedRunKey={selectedRunKey}
1249
1200
  onSelectRun={handleSelectedRunChange}
1201
+ viewNamespaces={viewNamespaces}
1250
1202
  />
1251
1203
  )}
1252
- renderSummary={({ apiKind: ak, namespace: ns, name: n, resource: res, context, onNavigate }) =>
1253
- renderCNPGSummary({ apiKind: ak, namespace: ns, name: n, group: effectiveGroup, resource: res, context, onNavigate })
1254
- }
1255
- renderExpandedOverview={({ kind: k, apiKind, namespace: ns, name: n, resource: res }) =>
1204
+ {...resourceDetailSlots({ kind: apiKind, group: resource?.apiVersion ? resourceGroup : effectiveGroup, namespace, name }, rest.extraTabs)}
1205
+ renderExpandedOverview={({ kind: k, apiKind, namespace: ns, name: n, resource: res, leadContent }) =>
1256
1206
  supportsBatchExecution(k, apiKind, effectiveGroup, res?.apiVersion) &&
1257
1207
  res ? (
1258
1208
  <BatchExecutionFullscreen
@@ -1262,11 +1212,13 @@ export function WorkloadView({
1262
1212
  name={n}
1263
1213
  resource={res}
1264
1214
  selectedRunKey={selectedRunKey}
1215
+ leadContent={leadContent}
1265
1216
  canViewLogs={baseActionsBarProps.canViewLogs}
1266
1217
  onSelectRun={handleSelectedRunChange}
1267
1218
  onSwitchToLogs={() => handleTabChange('logs')}
1268
1219
  onSwitchToTimeline={() => handleTabChange('timeline')}
1269
1220
  onNavigateToResource={rest.onNavigateToResource}
1221
+ viewNamespaces={viewNamespaces}
1270
1222
  />
1271
1223
  ) : null
1272
1224
  }
@@ -1316,7 +1268,10 @@ export function WorkloadView({
1316
1268
  onDuplicate={handleDuplicate}
1317
1269
  onDownload={desktopDownload}
1318
1270
  actionsBarProps={actionsBarProps}
1319
- rendererOverrides={rendererOverrides}
1271
+ rendererOverrides={resourceRendererOverrides}
1272
+ renderOverviewIntro={apiKind === 'nodes' && !effectiveGroup && resource?.metadata?.uid
1273
+ ? () => <NodeDrainStatus name={name} nodeUID={resource.metadata.uid} />
1274
+ : undefined}
1320
1275
  renderOverviewExtra={({ kind: k, namespace: ns, name: n, group: g, context }) => {
1321
1276
  // Network entry kinds (Service/Ingress/Route/Gateway) ARE the diagnosis
1322
1277
  // target: DiagnoseInlineSection renders in the drawer, no hint. Workload
@@ -1334,7 +1289,6 @@ export function WorkloadView({
1334
1289
  <>
1335
1290
  {diagnoseInline}
1336
1291
  {diagnoseHint}
1337
- <FluxSourceConsumersSection kind={k} namespace={ns} name={n} />
1338
1292
  <AuditOverviewSection
1339
1293
  findings={auditFindings ?? []}
1340
1294
  onViewAll={() => navigateRouter('/checks')}
@@ -1343,8 +1297,12 @@ export function WorkloadView({
1343
1297
  )
1344
1298
  }}
1345
1299
  renderOverviewLead={() => (
1300
+ <div className="flex flex-col gap-4">
1301
+ <CronJobSchedulingContext evidence={schedulingEvidence} onViewTimeline={() => handleTabChange('timeline')} />
1346
1302
  <ResourceIssuesSection
1347
1303
  issues={liveIssues}
1304
+ renderDetailSection={schedulingEvidence?.state === 'reported' ? ({ issue }) => issue.kind === 'CronJob' && issue.reason === schedulingEvidence.reason ? <CronJobSchedulingDetails evidence={schedulingEvidence} onViewTimeline={() => handleTabChange('timeline')} /> : null : undefined}
1305
+ compact={!expanded}
1348
1306
  subjectResource={{ kind: apiKind, namespace, name, group: rest.group }}
1349
1307
  onResourceClick={
1350
1308
  rest.onNavigateToResource
@@ -1358,7 +1316,9 @@ export function WorkloadView({
1358
1316
  : undefined
1359
1317
  }
1360
1318
  />
1319
+ </div>
1361
1320
  )}
1321
+ hasOverviewLead={hasOperationalIssues || Boolean(schedulingEvidence && schedulingEvidence.state !== 'reported')}
1362
1322
  hasOperationalIssues={hasOperationalIssues}
1363
1323
  operationalIssuesPending={issuesPending}
1364
1324
  onOpenGitOpsResource={gitopsOwnerObject ? handleOpenGitOpsResource : undefined}
@@ -1393,13 +1353,14 @@ export function WorkloadView({
1393
1353
  )
1394
1354
  }
1395
1355
 
1396
- function collectServingRefs(relationships: Relationships | undefined): ResourceRef[] {
1356
+ export function collectServingRefs(relationships: Relationships | undefined): ResourceRef[] {
1397
1357
  if (!relationships) return []
1398
1358
  return dedupeResourceRefs([
1399
1359
  ...(relationships.services ?? []),
1400
1360
  ...(relationships.ingresses ?? []),
1401
1361
  ...(relationships.gateways ?? []),
1402
1362
  ...(relationships.routes ?? []),
1363
+ ...(relationships.routedFrom ?? []),
1403
1364
  ])
1404
1365
  }
1405
1366
 
@@ -1510,6 +1471,7 @@ function LogsTabContent({
1510
1471
  onConsumeInitialContainer,
1511
1472
  selectedRunKey,
1512
1473
  onSelectRun,
1474
+ viewNamespaces,
1513
1475
  }: {
1514
1476
  kind: string
1515
1477
  apiKind: string
@@ -1524,6 +1486,7 @@ function LogsTabContent({
1524
1486
  onConsumeInitialContainer: () => void
1525
1487
  selectedRunKey: string
1526
1488
  onSelectRun: (runKey: string) => void
1489
+ viewNamespaces: string[]
1527
1490
  }) {
1528
1491
  if (SCHEDULED_LOG_KINDS.has(kind) && supportsBatchExecution(kind, apiKind, group, resource?.apiVersion)) {
1529
1492
  return (
@@ -1534,14 +1497,14 @@ function LogsTabContent({
1534
1497
  name={name}
1535
1498
  selectedRunKey={selectedRunKey}
1536
1499
  onSelectRun={onSelectRun}
1500
+ viewNamespaces={viewNamespaces}
1537
1501
  />
1538
1502
  </div>
1539
1503
  )
1540
1504
  }
1541
1505
 
1542
- if (kind === 'Cluster' && isApiGroup(resource?.apiVersion, 'postgresql.cnpg.io')) {
1543
- return <CNPGClusterLogs namespace={namespace} name={name} />
1544
- }
1506
+ const integrationLogs = resourceLogs({ kind, group, namespace, name }, resource)
1507
+ if (integrationLogs) return integrationLogs
1545
1508
 
1546
1509
  // Workload kinds with stable pod selectors use the aggregated workload logs viewer
1547
1510
  if (WORKLOAD_LOG_KINDS.has(kind) && (kind !== 'Job' || isCoreBatchJob(apiKind, group))) {
@@ -2217,137 +2180,6 @@ function DiagnoseInlineSection({ kind, namespace, name, group, onOpenReachabilit
2217
2180
  )
2218
2181
  }
2219
2182
 
2220
- // FluxSourceConsumersSection lists the reconcilers (Kustomization, HelmRelease)
2221
- // that reference this Flux source CR — the inverse of `spec.sourceRef`. Renders
2222
- // only when the focused resource is a Flux source kind; otherwise null. Sources
2223
- // can have many consumers (one repo feeding multiple apps), so this answers
2224
- // "if I edit this source, what gets affected on the next reconcile?".
2225
- //
2226
- // Filtering happens client-side off the namespaced reconciler lists — these
2227
- // are typically small (tens, not thousands) and the dynamic informer cache
2228
- // makes the request cheap. If a cluster ever has thousands of HelmReleases,
2229
- // a dedicated /api/gitops/consumers endpoint would be the right move; today
2230
- // it'd be premature.
2231
- // Outer component is cheap — it does only the kind check and decides whether
2232
- // to mount the data-fetching child. Without this split, useResources would
2233
- // fire two API calls on EVERY workload drawer open (Pod, Deployment, Service,
2234
- // …), since the hook has no `enabled` flag and can't be conditionally called
2235
- // (Rules of Hooks). The hooks only need to run when the focused resource is
2236
- // actually a Flux source CR.
2237
- function FluxSourceConsumersSection({
2238
- kind,
2239
- namespace,
2240
- name,
2241
- }: {
2242
- kind: string
2243
- namespace: string
2244
- name: string
2245
- }) {
2246
- // The inner WorkloadView de-pluralizes the URL's plural form, which gives
2247
- // "Gitrepository" (single-uppercase) rather than the wire-correct
2248
- // "GitRepository" — so we match lowercase. spec.sourceRef.kind on consumers
2249
- // is always wire-correct, so we look that up separately.
2250
- const sourceKind = FLUX_SOURCE_KIND_BY_LOWER.get(kind.toLowerCase()) ?? null
2251
- if (!sourceKind) return null
2252
- return <FluxSourceConsumersInner sourceKind={sourceKind} namespace={namespace} name={name} />
2253
- }
2254
-
2255
- function FluxSourceConsumersInner({
2256
- sourceKind,
2257
- namespace,
2258
- name,
2259
- }: {
2260
- sourceKind: string
2261
- namespace: string
2262
- name: string
2263
- }) {
2264
- const navigate = useNavigate()
2265
- const { data: kustomizations } = useResources<any>(
2266
- 'kustomizations',
2267
- undefined,
2268
- 'kustomize.toolkit.fluxcd.io',
2269
- )
2270
- const { data: helmReleases } = useResources<any>(
2271
- 'helmreleases',
2272
- undefined,
2273
- 'helm.toolkit.fluxcd.io',
2274
- )
2275
-
2276
- const consumers: Array<{
2277
- kind: 'Kustomization' | 'HelmRelease'
2278
- namespace: string
2279
- name: string
2280
- plural: string
2281
- }> = []
2282
- for (const k of kustomizations ?? []) {
2283
- const ref = k?.spec?.sourceRef ?? {}
2284
- const refNs = ref.namespace || k?.metadata?.namespace
2285
- if (ref.kind === sourceKind && ref.name === name && refNs === namespace) {
2286
- consumers.push({
2287
- kind: 'Kustomization',
2288
- namespace: k.metadata.namespace,
2289
- name: k.metadata.name,
2290
- plural: 'kustomizations',
2291
- })
2292
- }
2293
- }
2294
- for (const h of helmReleases ?? []) {
2295
- const ref = h?.spec?.chart?.spec?.sourceRef ?? {}
2296
- const refNs = ref.namespace || h?.metadata?.namespace
2297
- if (ref.kind === sourceKind && ref.name === name && refNs === namespace) {
2298
- consumers.push({
2299
- kind: 'HelmRelease',
2300
- namespace: h.metadata.namespace,
2301
- name: h.metadata.name,
2302
- plural: 'helmreleases',
2303
- })
2304
- }
2305
- }
2306
-
2307
- if (consumers.length === 0) {
2308
- return (
2309
- <section className="rounded-lg border border-theme-border bg-theme-surface p-4 shadow-theme-sm">
2310
- <h3 className="mb-2 text-sm font-semibold text-theme-text-primary">Consumed by</h3>
2311
- <p className="text-xs text-theme-text-tertiary">
2312
- No Kustomization or HelmRelease references this source.
2313
- </p>
2314
- </section>
2315
- )
2316
- }
2317
-
2318
- return (
2319
- <section className="rounded-lg border border-theme-border bg-theme-surface p-4 shadow-theme-sm">
2320
- <h3 className="mb-3 text-sm font-semibold text-theme-text-primary">
2321
- Consumed by ({consumers.length})
2322
- </h3>
2323
- <div className="flex flex-wrap gap-1.5">
2324
- {consumers.map((c) => (
2325
- <Tooltip
2326
- key={`${c.kind}/${c.namespace}/${c.name}`}
2327
- content={`${c.kind} ${c.namespace}/${c.name}`}
2328
- >
2329
- <button
2330
- onClick={() =>
2331
- navigate(
2332
- `/gitops/detail/${c.plural}/${encodeURIComponent(c.namespace)}/${encodeURIComponent(c.name)}`,
2333
- )
2334
- }
2335
- className="inline-flex items-center gap-1.5 rounded border border-theme-border bg-theme-surface px-1.5 py-0.5 text-[11px] text-theme-text-secondary hover:border-skyhook-500/60 hover:text-skyhook-500 transition-colors"
2336
- >
2337
- <span className="text-theme-text-tertiary">
2338
- {c.kind === 'HelmRelease' ? 'HR' : 'K'}
2339
- </span>
2340
- <span>
2341
- {c.namespace}/{c.name}
2342
- </span>
2343
- </button>
2344
- </Tooltip>
2345
- ))}
2346
- </div>
2347
- </section>
2348
- )
2349
- }
2350
-
2351
2183
  // Drawer mode: single chart + category tabs (compact for ~500px width).
2352
2184
  // Full-screen mode: multi-chart grid so CPU + Memory + Network can be
2353
2185
  // compared side-by-side without tab switching.
@@ -2422,18 +2254,6 @@ function DrawerMetricsContent({
2422
2254
  )
2423
2255
  }
2424
2256
 
2425
- // FLUX_SOURCE_KIND_BY_LOWER maps lowercase kind (what the inner WorkloadView
2426
- // produces via its plural-to-singular fallback) to the wire-correct
2427
- // PascalCase form that consumers carry in spec.sourceRef.kind. HelmChart is
2428
- // intentionally absent — it's an auto-generated internal CR, not something
2429
- // users create or point reconcilers at directly.
2430
- const FLUX_SOURCE_KIND_BY_LOWER = new Map<string, string>([
2431
- ['gitrepository', 'GitRepository'],
2432
- ['helmrepository', 'HelmRepository'],
2433
- ['ocirepository', 'OCIRepository'],
2434
- ['bucket', 'Bucket'],
2435
- ])
2436
-
2437
2257
  // Read-only manifest view for an object in the workload's neighborhood (the
2438
2258
  // YAML tab's object rail). Read-only by design — editing an arbitrary related
2439
2259
  // object belongs on that resource's own page.
@@ -0,0 +1,29 @@
1
+ // @vitest-environment jsdom
2
+ import { act } from 'react'
3
+ import { createRoot } from 'react-dom/client'
4
+ import { expect, it, vi } from 'vitest'
5
+ import { Mono } from './layout'
6
+
7
+ ;(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true
8
+
9
+ it('uses normal word boundaries with overflow wrapping and keeps the complete value in a hover tooltip', () => {
10
+ vi.useFakeTimers()
11
+ const host = document.createElement('div')
12
+ document.body.append(host)
13
+ const root = createRoot(host)
14
+ const image = 'ghcr.io/cloudnative-pg/postgresql:17.4-standard-bookworm'
15
+ act(() => root.render(<Mono>{image}</Mono>))
16
+ const mono = host.querySelector('.font-mono')!
17
+ expect(mono.classList.contains('break-all')).toBe(false)
18
+ expect(mono.classList.contains('break-normal')).toBe(true)
19
+ expect(mono.textContent).toBe(image)
20
+ expect(mono.classList.contains('[overflow-wrap:anywhere]')).toBe(true)
21
+ const trigger = mono.parentElement!
22
+ act(() => trigger.dispatchEvent(new MouseEvent('mouseenter', { bubbles: true })))
23
+ act(() => trigger.dispatchEvent(new MouseEvent('mouseover', { bubbles: true })))
24
+ act(() => vi.advanceTimersByTime(500))
25
+ expect(document.body.querySelector('.fixed')?.textContent).toBe(image)
26
+ act(() => root.unmount())
27
+ host.remove()
28
+ vi.useRealTimers()
29
+ })