@skyhook-io/radar-app 1.18.2 → 1.20.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 (228) hide show
  1. package/README.md +1 -1
  2. package/package.json +7 -7
  3. package/src/App.tsx +31 -6
  4. package/src/api/application-evidence.ts +63 -0
  5. package/src/api/argoSync.test.ts +22 -0
  6. package/src/api/client.audit-gating.test.tsx +48 -0
  7. package/src/api/client.kueuePosition.test.ts +32 -0
  8. package/src/api/client.kueueQueueWorkloads.test.tsx +71 -0
  9. package/src/api/client.resource-identity.test.ts +3 -0
  10. package/src/api/client.resourceIssues.test.tsx +239 -0
  11. package/src/api/client.resourcePath.test.ts +3 -0
  12. package/src/api/client.ts +285 -55
  13. package/src/api/config.ts +21 -0
  14. package/src/api/diagnose.test.ts +33 -2
  15. package/src/api/diagnose.ts +97 -3
  16. package/src/api/radarFeatures.render.test.tsx +33 -1
  17. package/src/api/radarFeatures.test.ts +47 -0
  18. package/src/api/radarFeatures.ts +41 -1
  19. package/src/api/rbac.settled.test.tsx +42 -0
  20. package/src/api/rbac.test.ts +18 -0
  21. package/src/api/rbac.ts +37 -7
  22. package/src/api/traffic.ts +9 -4
  23. package/src/api/usage-data.fixtures.ts +3 -1
  24. package/src/api/usage-data.test.tsx +134 -0
  25. package/src/api/usage-data.ts +35 -7
  26. package/src/api/workloadPodsPolling.test.ts +26 -0
  27. package/src/components/CloudConnectFlow.test.tsx +86 -0
  28. package/src/components/CloudConnectFlow.tsx +65 -27
  29. package/src/components/CloudFunnelButton.test.tsx +140 -5
  30. package/src/components/CloudFunnelButton.tsx +50 -9
  31. package/src/components/ConnectionErrorView.test.tsx +34 -0
  32. package/src/components/ConnectionErrorView.tsx +35 -11
  33. package/src/components/ContextSwitcher.tsx +5 -2
  34. package/src/components/SwitchAwareConnectionError.test.tsx +43 -0
  35. package/src/components/SwitchAwareConnectionError.tsx +85 -0
  36. package/src/components/application-evidence/ApplicationEvidenceAction.flow.test.tsx +234 -0
  37. package/src/components/application-evidence/ApplicationEvidenceAction.test.tsx +144 -0
  38. package/src/components/application-evidence/ApplicationEvidenceAction.tsx +218 -0
  39. package/src/components/capacity/CapacityDemand.tsx +3 -2
  40. package/src/components/capacity/demandSummary.test.ts +38 -0
  41. package/src/components/capacity/shared.tsx +12 -1
  42. package/src/components/cost/ApplicationCostTab.tsx +4 -0
  43. package/src/components/cost/CostTrendChart.tsx +2 -0
  44. package/src/components/cost/WorkloadCostTab.tsx +4 -0
  45. package/src/components/cost/source.test.ts +5 -0
  46. package/src/components/cost/source.ts +11 -0
  47. package/src/components/diagnose/AIMarkdown.tsx +4 -1
  48. package/src/components/diagnose/ActivityTurn.tsx +34 -14
  49. package/src/components/diagnose/AgentControls.tsx +53 -6
  50. package/src/components/diagnose/AgentSetupNotice.test.tsx +17 -0
  51. package/src/components/diagnose/AgentSetupNotice.tsx +22 -4
  52. package/src/components/diagnose/AgentSigninNotice.test.tsx +98 -0
  53. package/src/components/diagnose/AgentSigninNotice.tsx +61 -0
  54. package/src/components/diagnose/AnalysisStory.test.tsx +22 -0
  55. package/src/components/diagnose/AnalysisStory.tsx +17 -4
  56. package/src/components/diagnose/AssessmentCard.tsx +39 -8
  57. package/src/components/diagnose/ContinueInAgentButton.mounted.test.tsx +182 -0
  58. package/src/components/diagnose/ContinueInAgentButton.test.tsx +128 -0
  59. package/src/components/diagnose/ContinueInAgentButton.tsx +303 -0
  60. package/src/components/diagnose/DiagnoseContext.capacity.test.tsx +113 -0
  61. package/src/components/diagnose/DiagnoseContext.question.test.tsx +245 -0
  62. package/src/components/diagnose/DiagnoseContext.tsx +272 -10
  63. package/src/components/diagnose/DiagnoseSurface.test.tsx +54 -0
  64. package/src/components/diagnose/DiagnoseSurface.tsx +151 -134
  65. package/src/components/diagnose/EvidenceCard.tsx +67 -14
  66. package/src/components/diagnose/ExampleInvestigationLink.tsx +20 -0
  67. package/src/components/diagnose/Home.test.tsx +208 -5
  68. package/src/components/diagnose/Home.tsx +187 -36
  69. package/src/components/diagnose/InvestigationCapacityNotice.test.tsx +246 -0
  70. package/src/components/diagnose/InvestigationCapacityNotice.tsx +241 -0
  71. package/src/components/diagnose/InvestigationEvidencePane.story.test.tsx +97 -6
  72. package/src/components/diagnose/InvestigationEvidencePane.test.tsx +57 -0
  73. package/src/components/diagnose/InvestigationEvidencePane.tsx +59 -11
  74. package/src/components/diagnose/InvestigationEvidenceSections.tsx +50 -23
  75. package/src/components/diagnose/InvestigationView.tsx +249 -54
  76. package/src/components/diagnose/LocalDiagnoseAction.history.test.tsx +450 -0
  77. package/src/components/diagnose/LocalDiagnoseAction.tsx +365 -39
  78. package/src/components/diagnose/NextStepJump.test.tsx +92 -0
  79. package/src/components/diagnose/NextStepJump.tsx +75 -0
  80. package/src/components/diagnose/QuestionComposer.test.tsx +553 -0
  81. package/src/components/diagnose/QuestionComposer.tsx +495 -0
  82. package/src/components/diagnose/QuestionFocus.test.tsx +38 -0
  83. package/src/components/diagnose/QuestionFocus.tsx +123 -0
  84. package/src/components/diagnose/ResourcePicker.tsx +206 -0
  85. package/src/components/diagnose/StoryExcerpt.tsx +12 -3
  86. package/src/components/diagnose/assessmentCopy.ts +5 -0
  87. package/src/components/diagnose/exampleInvestigation.events.json +191 -0
  88. package/src/components/diagnose/exampleInvestigation.loadFailure.test.tsx +94 -0
  89. package/src/components/diagnose/exampleInvestigation.test.tsx +248 -0
  90. package/src/components/diagnose/exampleInvestigation.ts +121 -0
  91. package/src/components/diagnose/investigationCase.runs.test.tsx +328 -0
  92. package/src/components/diagnose/investigationCase.test.tsx +9 -1
  93. package/src/components/diagnose/investigationCase.ts +33 -1
  94. package/src/components/diagnose/investigationEvidence/adapters/applicationFindings.test.ts +739 -0
  95. package/src/components/diagnose/investigationEvidence/adapters/coverage.test.tsx +46 -0
  96. package/src/components/diagnose/investigationEvidence/adapters/diagnose.ts +58 -2
  97. package/src/components/diagnose/investigationEvidence/adapters/issues.ts +9 -0
  98. package/src/components/diagnose/investigationEvidence/adapters/posture.ts +29 -1
  99. package/src/components/diagnose/investigationEvidence/adapters/prometheus.test.ts +40 -0
  100. package/src/components/diagnose/investigationEvidence/adapters/prometheus.ts +27 -1
  101. package/src/components/diagnose/investigationEvidence/bodies/metrics.test.tsx +111 -0
  102. package/src/components/diagnose/investigationEvidence/bodies/metrics.tsx +67 -16
  103. package/src/components/diagnose/investigationEvidence/builder.ts +30 -0
  104. package/src/components/diagnose/investigationEvidence/excerpt.test.ts +18 -5
  105. package/src/components/diagnose/investigationEvidence/excerpt.ts +22 -11
  106. package/src/components/diagnose/investigationEvidence/index.ts +1 -1
  107. package/src/components/diagnose/investigationEvidence/navigation.tsx +2 -0
  108. package/src/components/diagnose/investigationEvidence/observations.ts +121 -2
  109. package/src/components/diagnose/investigationEvidence/projection.test.ts +85 -3
  110. package/src/components/diagnose/investigationEvidence/types.ts +7 -0
  111. package/src/components/diagnose/investigationEvidencePartition.ts +6 -1
  112. package/src/components/diagnose/investigationFocus.test.ts +271 -0
  113. package/src/components/diagnose/investigationFocus.ts +132 -0
  114. package/src/components/diagnose/investigationState.ts +28 -0
  115. package/src/components/diagnose/lastInvestigation.test.ts +95 -0
  116. package/src/components/diagnose/lastInvestigation.ts +58 -0
  117. package/src/components/diagnose/launch.test.ts +125 -1
  118. package/src/components/diagnose/launch.ts +57 -10
  119. package/src/components/diagnose/parts.test.tsx +20 -0
  120. package/src/components/diagnose/questionSuggestions.test.ts +111 -0
  121. package/src/components/diagnose/questionSuggestions.ts +150 -0
  122. package/src/components/diagnose/storyParts.test.tsx +13 -0
  123. package/src/components/diagnose/target.test.ts +143 -2
  124. package/src/components/diagnose/target.ts +109 -7
  125. package/src/components/diagnose/testdata/story-runs.json +474 -0
  126. package/src/components/diagnose/toolCallLabel.test.ts +10 -4
  127. package/src/components/diagnose/verdictText.test.tsx +87 -0
  128. package/src/components/diagnose/verdictText.ts +68 -0
  129. package/src/components/execution/BatchExecutionView.tsx +24 -11
  130. package/src/components/execution/JobSetAdmission.test.tsx +42 -0
  131. package/src/components/execution/JobSetAdmission.tsx +18 -3
  132. package/src/components/execution/JobSetMemberComparison.tsx +2 -1
  133. package/src/components/execution/runState.test.ts +14 -0
  134. package/src/components/execution/runState.ts +8 -0
  135. package/src/components/gitops/GitOpsView.rollbackGate.test.tsx +202 -0
  136. package/src/components/gitops/GitOpsView.syncRequest.test.tsx +369 -0
  137. package/src/components/gitops/GitOpsView.tsx +86 -17
  138. package/src/components/gitops/RemoteDestinationCloudHint.tsx +2 -3
  139. package/src/components/gitops/destination-toast.test.ts +1 -1
  140. package/src/components/gitops/destination-toast.ts +2 -2
  141. package/src/components/home/ClusterHealthCard.tsx +13 -39
  142. package/src/components/home/HomeAgentBlock.test.tsx +141 -0
  143. package/src/components/home/HomeAgentBlock.tsx +103 -0
  144. package/src/components/home/HomeDiagramCard.tsx +47 -0
  145. package/src/components/home/HomeView.tsx +86 -47
  146. package/src/components/home/MCPSetupDialog.test.tsx +95 -5
  147. package/src/components/home/MCPSetupDialog.tsx +30 -5
  148. package/src/components/home/ProblemsPanel.investigate.test.tsx +171 -0
  149. package/src/components/home/ProblemsPanel.test.tsx +3 -1
  150. package/src/components/home/RadarVersionLine.test.tsx +0 -14
  151. package/src/components/home/RadarVersionLine.tsx +3 -28
  152. package/src/components/home/TopologyPreview.test.tsx +73 -0
  153. package/src/components/home/TopologyPreview.tsx +120 -233
  154. package/src/components/home/TrafficSummary.test.tsx +63 -0
  155. package/src/components/home/TrafficSummary.tsx +135 -138
  156. package/src/components/home/mcpToolCatalog.ts +23 -10
  157. package/src/components/issues/IssuesPane.test.ts +11 -0
  158. package/src/components/issues/IssuesPane.tsx +15 -5
  159. package/src/components/issues/uncheckedSources.test.ts +20 -1
  160. package/src/components/issues/uncheckedSources.ts +18 -0
  161. package/src/components/kueue/KueuePendingPosition.tsx +35 -0
  162. package/src/components/kueue/useRelatedObjects.test.tsx +219 -0
  163. package/src/components/kueue/useRelatedReads.test.ts +56 -0
  164. package/src/components/kueue/useRelatedReads.ts +205 -0
  165. package/src/components/logs/MultiPodLogsTab.test.tsx +93 -0
  166. package/src/components/logs/MultiPodLogsTab.tsx +120 -0
  167. package/src/components/logs/PodLogsUnavailable.test.tsx +18 -0
  168. package/src/components/logs/PodLogsUnavailable.tsx +21 -0
  169. package/src/components/logs/RayClusterLogsTab.reselect.test.tsx +67 -0
  170. package/src/components/logs/RayClusterLogsTab.test.tsx +167 -0
  171. package/src/components/logs/RayClusterLogsTab.tsx +109 -0
  172. package/src/components/logs/ScheduledWorkloadLogsViewer.tsx +3 -2
  173. package/src/components/logs/rayClusterPods.ts +32 -0
  174. package/src/components/outageSince.test.ts +21 -0
  175. package/src/components/outageSince.ts +10 -0
  176. package/src/components/resource/PrometheusCharts.overlays.test.ts +12 -0
  177. package/src/components/resource/PrometheusCharts.tsx +3 -40
  178. package/src/components/resources/crd/CRDSchemaTab.test.tsx +28 -0
  179. package/src/components/resources/crd/CRDSchemaTab.tsx +13 -0
  180. package/src/components/resources/crd/host.tsx +14 -0
  181. package/src/components/resources/renderers/CustomResourceDefinitionRenderer.test.tsx +27 -0
  182. package/src/components/resources/renderers/CustomResourceDefinitionRenderer.tsx +12 -0
  183. package/src/components/resources/renderers/JobAdmissionRenderers.test.tsx +4 -1
  184. package/src/components/resources/renderers/JobAdmissionRenderers.tsx +4 -3
  185. package/src/components/resources/renderers/KueueHostRenderers.test.tsx +117 -0
  186. package/src/components/resources/renderers/KueueQueueRenderers.test.tsx +97 -0
  187. package/src/components/resources/renderers/KueueQueueRenderers.tsx +139 -0
  188. package/src/components/resources/renderers/KueueWorkloadRenderer.test.tsx +7 -1
  189. package/src/components/resources/renderers/KueueWorkloadRenderer.tsx +47 -7
  190. package/src/components/resources/renderers/OpenTelemetryCollectorRenderer.test.tsx +67 -0
  191. package/src/components/resources/renderers/OpenTelemetryCollectorRenderer.tsx +31 -0
  192. package/src/components/resources/renderers/RayClusterRenderer.test.tsx +81 -3
  193. package/src/components/resources/renderers/RayClusterRenderer.tsx +19 -4
  194. package/src/components/traffic/TrafficView.tsx +3 -3
  195. package/src/components/ui/Omnibar.investigate.test.tsx +105 -0
  196. package/src/components/ui/Omnibar.tsx +47 -3
  197. package/src/components/ui/RadarOmnibar.test.tsx +1 -0
  198. package/src/components/ui/RadarOmnibar.tsx +11 -0
  199. package/src/components/ui/command-items-crd.test.tsx +23 -0
  200. package/src/components/ui/command-items.ts +2 -1
  201. package/src/components/useContextSwitchFlow.test.tsx +61 -0
  202. package/src/components/useContextSwitchFlow.tsx +21 -4
  203. package/src/components/whats-new/WhatsNew.test.ts +10 -3
  204. package/src/components/whats-new/WhatsNew.tsx +5 -1
  205. package/src/components/whats-new/WhatsNewDialog.test.tsx +18 -4
  206. package/src/components/whats-new/releaseNotes.ts +136 -4
  207. package/src/components/workload/RelatedFindingsSection.test.tsx +126 -0
  208. package/src/components/workload/RelatedFindingsSection.tsx +80 -0
  209. package/src/components/workload/WorkloadView.test.ts +10 -1
  210. package/src/components/workload/WorkloadView.tsx +85 -98
  211. package/src/components/workload/issueResourceOpener.test.ts +20 -0
  212. package/src/components/workload/issueResourceOpener.ts +17 -0
  213. package/src/context/ConnectionContext.tsx +133 -60
  214. package/src/context/ConnectionProvider.retry.test.tsx +176 -0
  215. package/src/context/ContextSwitchContext.tsx +14 -1
  216. package/src/context/DiagnoseCustomization.tsx +3 -0
  217. package/src/context/clusterConnected.ts +10 -0
  218. package/src/contexts/CapabilitiesContext.tsx +6 -4
  219. package/src/hooks/useAgentSignin.test.tsx +190 -0
  220. package/src/hooks/useAgentSignin.ts +160 -0
  221. package/src/hooks/useApproveAfterSignin.test.tsx +108 -0
  222. package/src/hooks/useElementSize.ts +30 -0
  223. package/src/integrations/resourceHost.test.tsx +1 -0
  224. package/src/integrations/resourceHost.ts +5 -1
  225. package/src/integrations/resourceHosts.test.tsx +21 -4
  226. package/src/integrations/resourceHosts.tsx +12 -0
  227. package/src/main.tsx +5 -0
  228. package/src/utils/related-findings.ts +46 -0
@@ -68,6 +68,9 @@ export function InvestigationEvidencePane({
68
68
  onViewActivity,
69
69
  onOpenResource,
70
70
  onOpenTimeline,
71
+ withoutTarget = false,
72
+ assessmentPending = false,
73
+ showUncited = false,
71
74
  afterEvidence,
72
75
  recordNotes,
73
76
  storyShell = false,
@@ -91,7 +94,6 @@ export function InvestigationEvidencePane({
91
94
  report: string;
92
95
  evidence?: DiagnosisEvidenceItem[];
93
96
  };
94
- /** Open the story fully instead of the bounded preview — when the layout has room for it. */
95
97
  collecting: boolean;
96
98
  animateGroupIds: ReadonlySet<string>;
97
99
  onViewSource: (
@@ -115,6 +117,13 @@ export function InvestigationEvidencePane({
115
117
  /** Explicit Activity → Findings navigation, including repeat clicks. */
116
118
  revealRequest?: { sourceId: string; requestId: number };
117
119
  onRevealReady?: (sourceId: string) => void;
120
+ /** A question with no resource: every result is "about another resource",
121
+ * so withheld ones are counted as uncited instead. */
122
+ withoutTarget?: boolean;
123
+ /** No assessment yet: nothing has been cited, so nothing is "uncited". */
124
+ assessmentPending?: boolean;
125
+ /** The run stopped without an assessment; withheld results are shown. */
126
+ showUncited?: boolean;
118
127
  }) {
119
128
  const [expandedGroupIds, setExpandedGroupIds] = useState<ReadonlySet<string>>(
120
129
  new Set(),
@@ -142,6 +151,7 @@ export function InvestigationEvidencePane({
142
151
  rootCauseEvidence,
143
152
  investigationCase,
144
153
  storyMode,
154
+ showUncited,
145
155
  );
146
156
  const hasCurrentEvidence =
147
157
  partition.main.length + partition.workload.length > 0;
@@ -352,7 +362,10 @@ export function InvestigationEvidencePane({
352
362
  projection.groups.map((group) => [group.id, group] as const),
353
363
  );
354
364
  const renderStoryPlacement = useCallback(
355
- (target: StoryPlacementTarget, { compact }: { compact: boolean }) => {
365
+ (
366
+ target: StoryPlacementTarget,
367
+ { compact, preview }: { compact: boolean; preview: boolean },
368
+ ) => {
356
369
  const group = target.item.groupId
357
370
  ? groupsById.get(target.item.groupId)
358
371
  : undefined;
@@ -366,6 +379,7 @@ export function InvestigationEvidencePane({
366
379
  onViewSource={onViewSource}
367
380
  spanFullRow
368
381
  compact={compact}
382
+ storyPreview={preview}
369
383
  noteMode="chip"
370
384
  gapRoles={storyGapRoles}
371
385
  />
@@ -408,8 +422,16 @@ export function InvestigationEvidencePane({
408
422
  // A card behind the fold may be mounted and inert, or not mounted at all
409
423
  // before the fold first opens; either way the fold opens first and the
410
424
  // card is found once it has settled.
425
+ const [storyReveal, setStoryReveal] = useState<{
426
+ domId: string;
427
+ requestId: number;
428
+ }>();
411
429
  const revealStoryTarget = useCallback(
412
430
  (target: StoryPlacementTarget) => {
431
+ setStoryReveal((previous) => ({
432
+ domId: target.domId,
433
+ requestId: (previous?.requestId ?? 0) + 1,
434
+ }));
413
435
  const land = (placed: HTMLElement) => {
414
436
  placed.scrollIntoView({
415
437
  block: "center",
@@ -454,10 +476,16 @@ export function InvestigationEvidencePane({
454
476
  partition.earlier.length;
455
477
  const resultsSummary = [
456
478
  partition.hiddenBroader > 0
457
- ? `${partition.hiddenBroader} about other resources not shown`
479
+ ? withoutTarget
480
+ ? assessmentPending
481
+ ? `${partition.hiddenBroader} not shown yet`
482
+ : `${partition.hiddenBroader} not cited, not shown`
483
+ : `${partition.hiddenBroader} about other resources not shown`
458
484
  : undefined,
459
485
  partition.hiddenMetrics > 0
460
- ? `${partition.hiddenMetrics} broader metric ${partition.hiddenMetrics === 1 ? "result" : "results"} not shown`
486
+ ? withoutTarget && assessmentPending
487
+ ? `${partition.hiddenMetrics} metric ${partition.hiddenMetrics === 1 ? "result" : "results"} not shown yet`
488
+ : `${partition.hiddenMetrics} ${withoutTarget ? "uncited" : "broader"} metric ${partition.hiddenMetrics === 1 ? "result" : "results"} not shown`
461
489
  : undefined,
462
490
  projection.limitations.length > 0
463
491
  ? `${projection.limitations.length} ${projection.limitations.length === 1 ? "check" : "checks"} limited`
@@ -485,9 +513,17 @@ export function InvestigationEvidencePane({
485
513
  className="text-xs text-theme-text-tertiary"
486
514
  data-testid="investigation-hidden-evidence"
487
515
  >
488
- {partition.hiddenBroader === 1
489
- ? "1 result about another resource is not shown; it appears here when the assessment cites it."
490
- : `${partition.hiddenBroader} results about other resources are not shown; they appear here when the assessment cites them.`}
516
+ {withoutTarget && assessmentPending
517
+ ? partition.hiddenBroader === 1
518
+ ? "1 result is held for the assessment; it appears here if the assessment cites it."
519
+ : `${partition.hiddenBroader} results are held for the assessment; the ones it cites appear here.`
520
+ : withoutTarget
521
+ ? partition.hiddenBroader === 1
522
+ ? "1 result the assessment didn’t cite is not shown; it appears here when the assessment cites it."
523
+ : `${partition.hiddenBroader} results the assessment didn’t cite are not shown; they appear here when the assessment cites them.`
524
+ : partition.hiddenBroader === 1
525
+ ? "1 result about another resource is not shown; it appears here when the assessment cites it."
526
+ : `${partition.hiddenBroader} results about other resources are not shown; they appear here when the assessment cites them.`}
491
527
  </p>
492
528
  ) : null}
493
529
 
@@ -496,15 +532,20 @@ export function InvestigationEvidencePane({
496
532
  className="text-xs text-theme-text-tertiary"
497
533
  data-testid="investigation-hidden-metrics"
498
534
  >
499
- {partition.hiddenMetrics === 1
500
- ? "1 broader metric result is not shown; it appears here when the assessment cites it."
501
- : `${partition.hiddenMetrics} broader metric results are not shown; they appear here when the assessment cites them.`}
535
+ {withoutTarget && assessmentPending
536
+ ? partition.hiddenMetrics === 1
537
+ ? "1 metric result is held for the assessment; it appears here if the assessment cites it."
538
+ : `${partition.hiddenMetrics} metric results are held for the assessment; the ones it cites appear here.`
539
+ : partition.hiddenMetrics === 1
540
+ ? `1 ${withoutTarget ? "uncited" : "broader"} metric result is not shown; it appears here when the assessment cites it.`
541
+ : `${partition.hiddenMetrics} ${withoutTarget ? "uncited" : "broader"} metric results are not shown; they appear here when the assessment cites them.`}
502
542
  </p>
503
543
  ) : null}
504
544
 
505
545
  {!hasCurrentEvidence ? (
506
546
  <EmptyCollection
507
547
  collecting={collecting}
548
+ withoutTarget={withoutTarget}
508
549
  hasEarlierEvidence={partition.earlier.length > 0}
509
550
  onViewActivity={onViewActivity}
510
551
  />
@@ -512,7 +553,13 @@ export function InvestigationEvidencePane({
512
553
 
513
554
  <CollapsedEvidenceCollection
514
555
  id="investigation-workload-evidence"
515
- title="More evidence about this resource"
556
+ title={
557
+ withoutTarget || showUncited
558
+ ? partition.main.length > 0
559
+ ? "More evidence collected"
560
+ : "Evidence collected"
561
+ : "More evidence about this resource"
562
+ }
516
563
  description=""
517
564
  groups={partition.workload}
518
565
  totalCount={partition.workload.length + partition.earlier.length}
@@ -703,6 +750,7 @@ export function InvestigationEvidencePane({
703
750
  onGroupOpenChange,
704
751
  revealSourceId: caseReveal?.sourceId ?? revealRequest?.sourceId,
705
752
  revealRequestId: caseReveal?.requestId ?? revealRequest?.requestId,
753
+ storyReveal,
706
754
  caseByGroup: investigationCaseByGroup(investigationCase),
707
755
  excludedByItem: new Map(
708
756
  (investigationCase?.ruledOut ?? []).map((entry) => [
@@ -6,6 +6,7 @@ import {
6
6
  CircleAlert,
7
7
  Info,
8
8
  SearchCheck,
9
+ XCircle,
9
10
  } from "lucide-react";
10
11
  import { Collapse, CollapseChevron } from "@skyhook-io/k8s-ui";
11
12
  import type { EvidenceCoverageGroup } from "./investigationEvidencePresentation";
@@ -25,9 +26,14 @@ import { investigationEvidenceFullRowFlags } from "./investigationEvidencePartit
25
26
  import { EvidenceCard } from "./EvidenceCard";
26
27
 
27
28
  /**
28
- * Hypotheses the agent dropped, each pointing at the Radar observation whose
29
- * result contradicted it. Entries whose item could not be placed on an
30
- * observation are filtered out by the resolver and never rendered here.
29
+ * Hypotheses the agent dropped, each with the claim of the Radar observation
30
+ * whose result contradicted it, so the reason reads without a click. The
31
+ * agent writes a hypothesis as a statement, which on its own reads like a
32
+ * finding; the heading, the mark and the screen-reader prefix say it is not
33
+ * the cause. The exclusion is the agent's reading, so the heading keeps the
34
+ * Agent tag in panel mode, where no "Agent analysis" label sits above it.
35
+ * Entries whose item could not be placed on an observation are filtered out
36
+ * by the resolver and never rendered here.
31
37
  */
32
38
  export function RuledOutBlock({
33
39
  entries,
@@ -47,32 +53,39 @@ export function RuledOutBlock({
47
53
  id={headingId}
48
54
  className="flex items-center gap-2 text-xs font-semibold text-theme-text-secondary"
49
55
  >
50
- Also checked
56
+ Ruled out
51
57
  <span className="text-[10px] font-semibold uppercase tracking-wide text-accent-text">
52
58
  Agent
53
59
  </span>
54
60
  </h3>
55
- <ul className="mt-1.5 space-y-1.5">
61
+ <ul className="mt-1.5 space-y-2">
56
62
  {entries.map((entry, position) => {
57
63
  const observation = entry.item.observation!;
58
64
  return (
59
- <li
60
- key={position}
61
- className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-0.5 text-xs"
62
- >
63
- <span className="min-w-0 text-theme-text-secondary [overflow-wrap:anywhere]">
64
- {entry.hypothesis}
65
- </span>
66
- <button
67
- type="button"
68
- onClick={() => onReveal(entry.item)}
69
- className="shrink-0 rounded text-accent-text hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50"
70
- >
71
- See {observation.title}
72
- {entry.item.placement === "revision"
73
- ? " (earlier observation)"
74
- : ""}
75
- </button>
65
+ <li key={position} className="flex min-w-0 gap-2 text-xs">
66
+ <XCircle
67
+ className="mt-0.5 h-3.5 w-3.5 shrink-0 text-theme-text-tertiary"
68
+ aria-hidden
69
+ />
70
+ <div className="min-w-0">
71
+ <p className="font-medium text-theme-text-secondary [overflow-wrap:anywhere]">
72
+ <span className="sr-only">Ruled out: </span>
73
+ {entry.hypothesis}
74
+ </p>
75
+ <p className="text-theme-text-tertiary [overflow-wrap:anywhere]">
76
+ {entry.item.claim ? <>{entry.item.claim} </> : null}
77
+ <button
78
+ type="button"
79
+ onClick={() => onReveal(entry.item)}
80
+ className="rounded text-accent-text hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50"
81
+ >
82
+ See {ruledOutEvidenceLabel(observation)}
83
+ {entry.item.placement === "revision"
84
+ ? " (earlier observation)"
85
+ : ""}
86
+ </button>
87
+ </p>
88
+ </div>
76
89
  </li>
77
90
  );
78
91
  })}
@@ -81,6 +94,16 @@ export function RuledOutBlock({
81
94
  );
82
95
  }
83
96
 
97
+ // An issue's title is only its reason ("IPExhaustion"), which says neither
98
+ // that it is an issue nor which resource it is on; two entries can cite the
99
+ // same reason on different resources.
100
+ function ruledOutEvidenceLabel(
101
+ observation: NonNullable<InvestigationCaseItem["observation"]>,
102
+ ): string {
103
+ if (observation.data.type !== "issue") return observation.title;
104
+ return `${observation.title} issue on ${observation.data.issue.name}`;
105
+ }
106
+
84
107
  export function AssessmentEvidenceQualification({
85
108
  resolution,
86
109
  onViewActivity,
@@ -121,10 +144,12 @@ export function EmptyCollection({
121
144
  collecting,
122
145
  hasEarlierEvidence,
123
146
  onViewActivity,
147
+ withoutTarget = false,
124
148
  }: {
125
149
  collecting: boolean;
126
150
  hasEarlierEvidence: boolean;
127
151
  onViewActivity: () => void;
152
+ withoutTarget?: boolean;
128
153
  }) {
129
154
  return (
130
155
  <div className="rounded-lg border border-dashed border-theme-border px-4 py-5 text-center">
@@ -148,7 +173,9 @@ export function EmptyCollection({
148
173
  ? "The Activity pane remains the live record while the agent investigates."
149
174
  : hasEarlierEvidence
150
175
  ? "Earlier observations remain below. This does not prove that those conditions resolved."
151
- : "Investigation details are still available in Activity. This does not mean the resource is healthy."}
176
+ : withoutTarget
177
+ ? "Investigation details are still available in Activity. This does not mean nothing is wrong."
178
+ : "Investigation details are still available in Activity. This does not mean the resource is healthy."}
152
179
  </p>
153
180
  <button
154
181
  type="button"