@skyhook-io/radar-app 1.16.1 → 1.16.3

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 (73) hide show
  1. package/package.json +5 -5
  2. package/src/App.tsx +51 -9
  3. package/src/RadarApp.tsx +10 -2
  4. package/src/api/client.ts +61 -49
  5. package/src/api/client.updateResource.test.tsx +58 -0
  6. package/src/api/cnpg.ts +95 -0
  7. package/src/api/diagnose.ts +26 -0
  8. package/src/api/httpErrors.ts +12 -0
  9. package/src/api/timelineSource.ts +1 -1
  10. package/src/components/ConnectionErrorView.test.tsx +2 -0
  11. package/src/components/ConnectionErrorView.tsx +2 -1
  12. package/src/components/NoClusterAccessBanner.tsx +68 -0
  13. package/src/components/cnpg/CNPGClusterActivity.tsx +49 -0
  14. package/src/components/cnpg/CNPGClusterLogs.tsx +62 -0
  15. package/src/components/cnpg/CNPGDeclarations.tsx +311 -0
  16. package/src/components/cnpg/CNPGDetailPage.tsx +228 -0
  17. package/src/components/cnpg/CNPGDrawerTrail.tsx +37 -0
  18. package/src/components/cnpg/CNPGOperator.tsx +234 -0
  19. package/src/components/cnpg/CNPGOverview.tsx +307 -0
  20. package/src/components/cnpg/CNPGPooling.tsx +116 -0
  21. package/src/components/cnpg/CNPGProtection.tsx +320 -0
  22. package/src/components/cnpg/CNPGSummaryHost.tsx +143 -0
  23. package/src/components/cnpg/CNPGView.tsx +156 -0
  24. package/src/components/cnpg/paths.ts +13 -0
  25. package/src/components/cnpg/routes.test.ts +60 -0
  26. package/src/components/cnpg/routes.ts +112 -0
  27. package/src/components/cnpg/shared.tsx +290 -0
  28. package/src/components/cnpg/useCNPGSidebarWorkspace.ts +88 -0
  29. package/src/components/diagnose/AgentControls.tsx +1 -1
  30. package/src/components/diagnose/AssessmentCard.tsx +11 -1
  31. package/src/components/diagnose/DiagnoseContext.tsx +35 -22
  32. package/src/components/diagnose/DiagnoseSurface.tsx +12 -8
  33. package/src/components/diagnose/Home.tsx +1 -1
  34. package/src/components/diagnose/InvestigationEvidencePane.tsx +1 -1
  35. package/src/components/diagnose/InvestigationRefusalAction.test.tsx +156 -0
  36. package/src/components/diagnose/InvestigationRefusalAction.tsx +14 -0
  37. package/src/components/diagnose/InvestigationView.tsx +199 -65
  38. package/src/components/diagnose/investigationSourceFocus.ts +6 -6
  39. package/src/components/diagnose/investigationState.test.ts +83 -1
  40. package/src/components/diagnose/investigationState.ts +43 -0
  41. package/src/components/diagnose/launch.ts +2 -2
  42. package/src/components/diagnose/useDisclosureReveal.ts +1 -1
  43. package/src/components/dock/BottomDock.tsx +1 -1
  44. package/src/components/dock/DockContext.tsx +27 -2
  45. package/src/components/dock/LocalTerminalContext.test.tsx +210 -0
  46. package/src/components/dock/LocalTerminalTab.test.tsx +122 -0
  47. package/src/components/dock/LocalTerminalTab.tsx +81 -6
  48. package/src/components/helm/ChartBrowser.tsx +6 -7
  49. package/src/components/helm/HelmCompareRoute.tsx +108 -115
  50. package/src/components/helm/HelmReleaseDrawer.tsx +26 -44
  51. package/src/components/helm/InstallWizard.tsx +5 -2
  52. package/src/components/helm/TrackChartSourceDialog.tsx +10 -2
  53. package/src/components/helm/ValuesViewer.tsx +1 -1
  54. package/src/components/logs/LogsViewer.tsx +3 -0
  55. package/src/components/logs/WorkloadLogsViewer.tsx +3 -0
  56. package/src/components/resources/ResourceDetailDrawer.tsx +6 -0
  57. package/src/components/resources/ResourcesView.tsx +6 -38
  58. package/src/components/settings/LocalConfigurationDetails.tsx +21 -15
  59. package/src/components/settings/LocalConnectionSettings.tsx +41 -10
  60. package/src/components/timeline/TimelineList.test.ts +47 -29
  61. package/src/components/timeline/TimelineList.tsx +57 -11
  62. package/src/components/timeline/TimelineView.tsx +9 -2
  63. package/src/components/timeline/TimelineView.urlparams.test.ts +6 -0
  64. package/src/components/whats-new/WhatsNew.test.ts +107 -28
  65. package/src/components/whats-new/WhatsNew.tsx +146 -86
  66. package/src/components/whats-new/WhatsNewDialog.test.tsx +132 -10
  67. package/src/components/whats-new/releaseNotes.ts +156 -25
  68. package/src/components/workload/WorkloadView.tsx +30 -4
  69. package/src/context/DiagnoseCustomization.tsx +13 -3
  70. package/src/contexts/CapabilitiesContext.tsx +9 -1
  71. package/src/hooks/useResourceCounts.ts +49 -0
  72. package/src/index.ts +4 -2
  73. package/src/components/helm/RoleGatedPanel.tsx +0 -47
package/src/index.ts CHANGED
@@ -30,12 +30,14 @@ export type {
30
30
  export type {
31
31
  RenderDiagnoseAction,
32
32
  RenderInvestigationRunActions,
33
+ RenderInvestigationRefusalAction,
33
34
  DiagnoseConsentCopy,
34
35
  } from './context/DiagnoseCustomization';
36
+ export type { InvestigationRefusal } from './api/diagnose';
35
37
 
36
38
  // Standalone AI investigation surface — mount the investigation panel outside a
37
- // full <RadarApp>. It uses the nearest React Router for durable drawer/workspace
38
- // URLs, or supplies one when mounted standalone. The backend set via setApiBase()
39
+ // full <RadarApp>. It uses the nearest React Router for durable drawer and
40
+ // investigations-page URLs, or supplies one when mounted standalone. The backend set via setApiBase()
39
41
  // picks the cluster, so hosts remount <DiagnoseProvider key={cluster}> to switch.
40
42
  // Mount order: ThemeProvider > DiagnoseCustomizationProvider > DiagnoseProvider
41
43
  // > DiagnoseSurface, under a @tanstack/react-query QueryClientProvider.
@@ -1,47 +0,0 @@
1
- import { Lock } from 'lucide-react'
2
- import { useCloudRole, type CloudRole } from '../../api/client'
3
-
4
- interface RoleGatedPanelProps {
5
- /** Minimum Cloud tier required to view the children. */
6
- min: CloudRole
7
- /** Human-readable name of the gated content, e.g. "release manifests". */
8
- feature: string
9
- children: React.ReactNode
10
- }
11
-
12
- /**
13
- * RoleGatedPanel wraps tab-content surfaces that require a Cloud role
14
- * (member+) to view. Renders the children when the gate passes; renders
15
- * an explanatory empty state when the caller's role is insufficient.
16
- *
17
- * Why a per-tab gate rather than hiding tabs from the list: viewers
18
- * should learn what the platform offers and what their tier can't do,
19
- * not have features silently vanish. This mirrors how the action
20
- * buttons (Uninstall, Upgrade, etc.) are rendered visible-but-disabled
21
- * with a role-aware tooltip.
22
- *
23
- * Bypasses for non-Cloud users (OSS, OIDC, etc.) — `canAtLeast` returns
24
- * true when no Cloud role is present. The backend gate has the same
25
- * shape, so the frontend stays in lockstep.
26
- */
27
- export function RoleGatedPanel({ min, feature, children }: RoleGatedPanelProps) {
28
- const { role, canAtLeast } = useCloudRole()
29
- if (canAtLeast(min)) {
30
- return <>{children}</>
31
- }
32
- return (
33
- <div className="flex flex-col items-center justify-center h-full py-12 px-6 text-center">
34
- <div className="rounded-full bg-theme-surface p-3 mb-3">
35
- <Lock className="w-5 h-5 text-theme-text-tertiary" aria-hidden />
36
- </div>
37
- <div className="text-sm font-medium text-theme-text-primary">
38
- Your role can't view {feature}
39
- </div>
40
- <div className="mt-1 max-w-md text-xs text-theme-text-secondary">
41
- You're signed in as <span className="inline-code">{role ?? 'viewer'}</span>.
42
- This view requires <span className="inline-code">{min}</span> or higher.
43
- Ask a {min} or owner if you need access.
44
- </div>
45
- </div>
46
- )
47
- }