@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
@@ -25,7 +25,7 @@ import {
25
25
  } from "lucide-react";
26
26
  import { Tooltip } from "../ui/Tooltip";
27
27
  import { useAnimatedUnmount } from "../../hooks/useAnimatedUnmount";
28
- import { TRANSITION_BACKDROP, TRANSITION_DRAWER } from "../../utils/animation";
28
+ import { TRANSITION_BACKDROP, TRANSITION_DRAWER, overlayTransitionStyle } from "../../utils/animation";
29
29
  import {
30
30
  useDiagnose,
31
31
  useDiagnoseLayout,
@@ -46,10 +46,7 @@ import {
46
46
  import { AgentSetupNotice } from "./AgentSetupNotice";
47
47
  import { ConsentCard } from "./parts";
48
48
  import { buildLaunchCommand, launchAgentLabel, openInTerminal } from "./launch";
49
- import {
50
- type RunSummary,
51
- type ExecutionProfile,
52
- } from "../../api/diagnose";
49
+ import { type RunSummary, type ExecutionProfile } from "../../api/diagnose";
53
50
  import { routePath } from "../../api/config";
54
51
  import { useCapabilitiesContext } from "../../contexts/CapabilitiesContext";
55
52
  import { useContexts } from "../../api/client";
@@ -399,13 +396,17 @@ export function DiagnoseSurface({
399
396
  }, []);
400
397
  // Injected settings action: undefined = Radar's own Settings dialog;
401
398
  // null = hide the gear + links.
402
- const { consentCopy, onOpenSettings: hostOpenSettings, renderRunActions } =
403
- useDiagnoseCustomization();
399
+ const {
400
+ consentCopy,
401
+ onOpenSettings: hostOpenSettings,
402
+ renderRunActions,
403
+ } = useDiagnoseCustomization();
404
404
  const { embedded } = useNavCustomization();
405
405
  const openSettings =
406
406
  hostOpenSettings === undefined ? openDiagnoseSettings : hostOpenSettings;
407
407
  const {
408
408
  maximized,
409
+ fullWidthForced,
409
410
  setMaximized,
410
411
  panelWidth: width,
411
412
  setPanelWidth: setWidth,
@@ -421,8 +422,7 @@ export function DiagnoseSurface({
421
422
  view: d.view,
422
423
  surfaceWidth,
423
424
  });
424
- const historyOverlay =
425
- !persistentHistory && historyOverlayOpen;
425
+ const historyOverlay = !persistentHistory && historyOverlayOpen;
426
426
  const { shouldRender: historyOverlayPresent, isOpen: historySlideOpen } =
427
427
  useAnimatedUnmount(historyOverlay);
428
428
  const dismissHistory = useCallback(() => {
@@ -541,9 +541,11 @@ export function DiagnoseSurface({
541
541
 
542
542
  // Absolute within the body frame: maximized fills it; docked is a right slot.
543
543
  // topInset clears the header (the frame spans the full column incl. the header).
544
- const positionStyle: React.CSSProperties = maximized
545
- ? { top: topInset, left: 0, right: 0, bottom: 0 }
546
- : { top: topInset, right: 0, bottom: 0, width, maxWidth: "100%" };
544
+ // A forced fill keeps the docked single-pane layout; only the frame grows.
545
+ const positionStyle: React.CSSProperties =
546
+ maximized || fullWidthForced
547
+ ? { top: topInset, left: 0, right: 0, bottom: 0 }
548
+ : { top: topInset, right: 0, bottom: 0, width, maxWidth: "100%" };
547
549
 
548
550
  // The detail pane (right side when expanded; the whole body when docked).
549
551
  // Keyed by run id so toggling Expand doesn't remount a focused run's view.
@@ -769,11 +771,14 @@ export function DiagnoseSurface({
769
771
  <div
770
772
  className={`items-center gap-1 ${headerPresentation.runActionsClass || "flex"}`}
771
773
  >
772
- {renderRunActions?.({ run: visibleRunDetail, onRunUpdated: d.updateRunSummary })}
774
+ {renderRunActions?.({
775
+ run: visibleRunDetail,
776
+ onRunUpdated: d.updateRunSummary,
777
+ })}
773
778
  <InvestigationMenu run={visibleRunDetail} />
774
779
  </div>
775
780
  )}
776
- {(!maximized || d.canRestoreWorkspace) && (
781
+ {!fullWidthForced && (!maximized || d.canRestoreWorkspace) && (
777
782
  <Tooltip
778
783
  content={maximized ? "Restore" : "Expand"}
779
784
  position="bottom"
@@ -819,6 +824,7 @@ export function DiagnoseSurface({
819
824
  aria-hidden="true"
820
825
  onClick={dismissHistory}
821
826
  className={`absolute inset-0 z-10 bg-black/20 ${TRANSITION_BACKDROP} motion-reduce:transition-none ${historySlideOpen ? "opacity-100" : "opacity-0"} ${historyOverlay ? "" : "pointer-events-none"}`}
827
+ style={overlayTransitionStyle(historySlideOpen, "drawer")}
822
828
  />
823
829
  )}
824
830
  {showHistory && (