@skyhook-io/radar-app 1.14.0 → 1.14.2

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 (63) hide show
  1. package/package.json +2 -2
  2. package/src/App.tsx +6 -4
  3. package/src/api/client.ts +3 -0
  4. package/src/api/diagnose.ts +31 -1
  5. package/src/components/CloudConnectFlow.tsx +173 -13
  6. package/src/components/CloudFunnelButton.tsx +4 -2
  7. package/src/components/ConnectionErrorView.tsx +9 -10
  8. package/src/components/DebugOverlay.tsx +10 -6
  9. package/src/components/cloudConnectHandoff.test.ts +109 -4
  10. package/src/components/cloudConnectHandoff.ts +154 -2
  11. package/src/components/curl/ServiceCurlButton.tsx +19 -26
  12. package/src/components/diagnose/AgentCase.tsx +18 -5
  13. package/src/components/diagnose/AnalysisStory.test.tsx +308 -0
  14. package/src/components/diagnose/AnalysisStory.tsx +564 -0
  15. package/src/components/diagnose/DiagnoseContext.test.ts +10 -0
  16. package/src/components/diagnose/DiagnoseContext.tsx +25 -8
  17. package/src/components/diagnose/DiagnoseSurface.tsx +20 -14
  18. package/src/components/diagnose/InvestigationEvidencePane.story.test.tsx +771 -0
  19. package/src/components/diagnose/InvestigationEvidencePane.test.tsx +8 -33
  20. package/src/components/diagnose/InvestigationEvidencePane.tsx +809 -168
  21. package/src/components/diagnose/InvestigationResourceEvidence.test.tsx +30 -0
  22. package/src/components/diagnose/InvestigationResourceEvidence.tsx +20 -0
  23. package/src/components/diagnose/InvestigationView.tsx +493 -529
  24. package/src/components/diagnose/investigationCase.test.tsx +267 -129
  25. package/src/components/diagnose/investigationCase.ts +122 -77
  26. package/src/components/diagnose/investigationEvidence/adapters/resource.test.ts +27 -0
  27. package/src/components/diagnose/investigationEvidence/adapters/resource.ts +28 -0
  28. package/src/components/diagnose/investigationEvidence/builder.ts +11 -2
  29. package/src/components/diagnose/investigationEvidence/identity.test.ts +25 -7
  30. package/src/components/diagnose/investigationEvidence/identity.ts +4 -4
  31. package/src/components/diagnose/investigationEvidence/observations.ts +24 -0
  32. package/src/components/diagnose/investigationEvidence/projection.test.ts +36 -3
  33. package/src/components/diagnose/investigationEvidence/types.ts +2 -0
  34. package/src/components/diagnose/investigationEvidencePresentation.test.ts +2 -0
  35. package/src/components/diagnose/investigationEvidencePresentation.ts +3 -0
  36. package/src/components/diagnose/investigationState.test.ts +316 -58
  37. package/src/components/diagnose/investigationState.ts +257 -44
  38. package/src/components/diagnose/investigationStory.test.ts +161 -0
  39. package/src/components/diagnose/investigationStory.ts +207 -0
  40. package/src/components/diagnose/parts.test.tsx +9 -6
  41. package/src/components/diagnose/parts.tsx +977 -193
  42. package/src/components/diagnose/storyParts.test.tsx +426 -0
  43. package/src/components/diagnose/toolCallLabel.test.ts +51 -0
  44. package/src/components/diagnose/toolCallLabel.ts +135 -0
  45. package/src/components/diagnose/useDisclosureReveal.ts +10 -11
  46. package/src/components/helm/HelmCompareRoute.tsx +18 -4
  47. package/src/components/helm/HelmReleaseDrawer.tsx +11 -26
  48. package/src/components/helm/InstallWizard.tsx +8 -3
  49. package/src/components/home/MCPSetupDialog.tsx +15 -9
  50. package/src/components/portforward/PortForwardManager.tsx +6 -13
  51. package/src/components/resource/PrometheusChartsGrid.tsx +3 -3
  52. package/src/components/resource/WorkloadMetricsHelpDialog.tsx +3 -3
  53. package/src/components/resource/WorkloadMetricsSection.tsx +15 -21
  54. package/src/components/resources/PodFilePreview.tsx +3 -3
  55. package/src/components/resources/renderers/ServiceRenderer.tsx +2 -1
  56. package/src/components/settings/SettingsDialog.tsx +4 -2
  57. package/src/components/ui/CommandPalette.tsx +10 -6
  58. package/src/components/ui/DiagnosticsOverlay.tsx +10 -6
  59. package/src/components/ui/Disclosure.tsx +47 -0
  60. package/src/components/ui/Markdown.tsx +23 -11
  61. package/src/components/ui/ShortcutHelpOverlay.tsx +3 -1
  62. package/src/components/ui/UpdateNotification.tsx +18 -2
  63. package/src/index.css +19 -6
@@ -529,7 +529,7 @@ describe("InvestigationEvidencePane hierarchy and provenance", () => {
529
529
  expect(html).not.toContain("Secret values are never shown");
530
530
  expect(html).not.toContain("aria-expanded=");
531
531
  expect(html).toContain(
532
- 'aria-label="View source for Secret dev/skyhook-agent"',
532
+ 'aria-label="View result for Secret dev/skyhook-agent"',
533
533
  );
534
534
  expect(html).not.toContain("Relationship to target not established");
535
535
  });
@@ -870,7 +870,7 @@ describe("InvestigationEvidencePane hierarchy and provenance", () => {
870
870
  onViewSource={onViewSource}
871
871
  />,
872
872
  ),
873
- ).toContain("View Get Resource source used for this assessment");
873
+ ).toContain("View Get Resource result used for this assessment");
874
874
  expect(html).toContain("Evidence coverage is incomplete");
875
875
  expect(html).toContain("couldn't summarize this investigation step");
876
876
  expect(html.match(new RegExp(anchor, "g"))).toHaveLength(1);
@@ -1142,7 +1142,7 @@ describe("InvestigationEvidencePane hierarchy and provenance", () => {
1142
1142
  expect(html).not.toContain("strongest");
1143
1143
  expect(html).not.toContain("main proof");
1144
1144
  expect(html).toContain("CrashLoopBackOff");
1145
- expect(html).toContain('aria-label="View source for CrashLoopBackOff"');
1145
+ expect(html).toContain('aria-label="View result for CrashLoopBackOff"');
1146
1146
  expect(html).toContain(
1147
1147
  `id="${investigationEvidenceSourceDomId(source.id)}"`,
1148
1148
  );
@@ -1266,7 +1266,7 @@ describe("InvestigationEvidencePane hierarchy and provenance", () => {
1266
1266
  );
1267
1267
  projection.groups[0].latest.tone = "neutral";
1268
1268
  const html = render(projection);
1269
- expect(html).toContain("More evidence about this workload");
1269
+ expect(html).toContain("More evidence about this resource");
1270
1270
  expect(html).not.toContain("with warnings or errors");
1271
1271
  expect(
1272
1272
  investigationEvidenceRevealCollection(
@@ -1748,7 +1748,7 @@ describe("InvestigationEvidencePane honest result states", () => {
1748
1748
  expect(receipt).toBeDefined();
1749
1749
 
1750
1750
  const html = render(projection);
1751
- expect(html).toContain("More evidence about this workload");
1751
+ expect(html).toContain("More evidence about this resource");
1752
1752
  expect(html).toContain("No warning events");
1753
1753
  expect(html).not.toContain("What Radar did not find");
1754
1754
  expect(html).not.toContain(`${receipt!.id}-body`);
@@ -2002,7 +2002,7 @@ describe("InvestigationEvidencePane honest result states", () => {
2002
2002
  expect(html).toContain(
2003
2003
  "Only part of this investigation result was saved, so Radar could not summarize it here.",
2004
2004
  );
2005
- expect(html).toContain('aria-label="View source for Issue scan"');
2005
+ expect(html).toContain('aria-label="View result for Issue scan"');
2006
2006
  expect(source.primaryGroupId).toBeUndefined();
2007
2007
  expect(html).toContain(
2008
2008
  `id="${investigationEvidenceSourceDomId(source.id)}"`,
@@ -2108,6 +2108,7 @@ describe("InvestigationEvidencePane honest result states", () => {
2108
2108
  sources: [],
2109
2109
  evidenceRefSources: [],
2110
2110
  citableSources: [],
2111
+ targetPods: [],
2111
2112
  coverage: { attempted: 0, projected: 0, limited: 0, checked: 0 },
2112
2113
  };
2113
2114
  const collecting = render(empty, true);
@@ -2260,7 +2261,7 @@ describe("Track A evidence bodies and deep links", () => {
2260
2261
  ]);
2261
2262
  const html = render(projection, false, undefined, undefined, () => {});
2262
2263
  expect(html).toContain("MongoServerError: Authentication failed.");
2263
- expect(html).toContain("Unfiltered log tail");
2264
+ expect(html).toContain("Log tail · filter matched nothing");
2264
2265
  expect(html).toContain(
2265
2266
  "Open current Pod shop/api-68c7b766dc-fmphn in Radar",
2266
2267
  );
@@ -2706,32 +2707,6 @@ describe("cited broader cards and coverage rows", () => {
2706
2707
  ]);
2707
2708
  expect(cited.hiddenBroader).toBe(1);
2708
2709
 
2709
- // A later turn's citations widen the selection; they never take one away.
2710
- // Replacing the assessment's resolution with a follow-up's used to push
2711
- // the assessment's own cited evidence back into the withheld count.
2712
- // A later turn's citation widens the selection; it never takes one away,
2713
- // and it carries the source that cited it so a broader card can actually
2714
- // be promoted rather than selected-but-withheld.
2715
- const withheld = projection.groups.find(
2716
- (group) => !cited.collectionByGroup.has(group.id),
2717
- );
2718
- expect(withheld).toBeDefined();
2719
- const widened = partitionInvestigationEvidence(
2720
- projection.groups,
2721
- resolution,
2722
- undefined,
2723
- [
2724
- {
2725
- groupId: withheld!.id,
2726
- source: withheld!.latest.source,
2727
- },
2728
- ],
2729
- );
2730
- for (const group of cited.main) {
2731
- expect(widened.main).toContain(group);
2732
- }
2733
- expect(widened.main).toContain(withheld);
2734
- expect(widened.hiddenBroader).toBe(cited.hiddenBroader - 1);
2735
2710
  const html = render(projection, false, undefined, resolution);
2736
2711
  expect(html).toContain("6/12 pods Unschedulable");
2737
2712
  expect(html).toContain(