@skyhook-io/radar-app 1.13.0 → 1.13.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 (54) hide show
  1. package/package.json +2 -2
  2. package/src/App.tsx +55 -9
  3. package/src/RadarApp.tsx +3 -3
  4. package/src/api/diagnose.test.ts +268 -0
  5. package/src/api/diagnose.ts +117 -14
  6. package/src/components/diagnose/AISettings.tsx +10 -5
  7. package/src/components/diagnose/AgentSetupNotice.tsx +5 -5
  8. package/src/components/diagnose/ApplyDialog.test.tsx +72 -0
  9. package/src/components/diagnose/DiagnoseContext.tsx +228 -65
  10. package/src/components/diagnose/DiagnoseSurface.test.tsx +317 -9
  11. package/src/components/diagnose/DiagnoseSurface.tsx +621 -132
  12. package/src/components/diagnose/Home.test.tsx +293 -0
  13. package/src/components/diagnose/Home.tsx +307 -108
  14. package/src/components/diagnose/InvestigationEvidencePane.test.tsx +2170 -0
  15. package/src/components/diagnose/InvestigationEvidencePane.tsx +2253 -0
  16. package/src/components/diagnose/InvestigationResourceEvidence.test.tsx +257 -0
  17. package/src/components/diagnose/InvestigationResourceEvidence.tsx +214 -0
  18. package/src/components/diagnose/InvestigationView.test.ts +17 -0
  19. package/src/components/diagnose/InvestigationView.tsx +1911 -338
  20. package/src/components/diagnose/LocalDiagnoseAction.tsx +42 -25
  21. package/src/components/diagnose/agentCatalog.ts +1 -1
  22. package/src/components/diagnose/diagnoseEvidenceTypes.ts +151 -0
  23. package/src/components/diagnose/investigationEvidence.test.ts +3109 -0
  24. package/src/components/diagnose/investigationEvidence.ts +3492 -0
  25. package/src/components/diagnose/investigationEvidencePresentation.test.ts +447 -0
  26. package/src/components/diagnose/investigationEvidencePresentation.ts +167 -0
  27. package/src/components/diagnose/investigationExplanation.test.ts +63 -0
  28. package/src/components/diagnose/investigationExplanation.ts +22 -0
  29. package/src/components/diagnose/investigationResourceEvidenceModel.ts +322 -0
  30. package/src/components/diagnose/investigationSourceFocus.test.ts +143 -0
  31. package/src/components/diagnose/investigationSourceFocus.ts +98 -0
  32. package/src/components/diagnose/investigationState.test.ts +695 -0
  33. package/src/components/diagnose/investigationState.ts +451 -0
  34. package/src/components/diagnose/parts.test.tsx +864 -3
  35. package/src/components/diagnose/parts.tsx +1340 -536
  36. package/src/components/diagnose/target.test.ts +39 -0
  37. package/src/components/diagnose/target.ts +36 -0
  38. package/src/components/diagnose/useDisclosureReveal.ts +117 -0
  39. package/src/components/execution/BatchExecutionView.render.test.tsx +35 -0
  40. package/src/components/execution/BatchExecutionView.tsx +2 -3
  41. package/src/components/execution/execution-definition.test.ts +19 -0
  42. package/src/components/execution/execution-definition.ts +2 -0
  43. package/src/components/gitops/GitOpsView.tsx +25 -3
  44. package/src/components/home/MCPSetupDialog.tsx +2 -2
  45. package/src/components/home/mcpToolCatalog.test.ts +22 -0
  46. package/src/components/home/mcpToolCatalog.ts +3 -2
  47. package/src/components/issues/IssuesPane.tsx +5 -1
  48. package/src/components/nav/navigation.test.ts +26 -0
  49. package/src/components/nav/navigation.ts +10 -0
  50. package/src/components/settings/SettingsDialog.tsx +11 -13
  51. package/src/components/workload/WorkloadView.tsx +1 -1
  52. package/src/context/DiagnoseCustomization.tsx +11 -8
  53. package/src/index.css +63 -79
  54. package/src/index.ts +1 -1
package/src/index.css CHANGED
@@ -1,4 +1,5 @@
1
1
  @import "tailwindcss";
2
+
2
3
  /*
3
4
  * Tailwind v4 JIT scans only sources under this CSS file's package (web/).
4
5
  * k8s-ui is a workspace package whose TSX files also use Tailwind classes;
@@ -15,6 +16,25 @@
15
16
  @import "@fontsource-variable/dm-sans";
16
17
  @import "@fontsource/dm-mono";
17
18
 
19
+ @container investigation (min-width: 1000px) {
20
+ .investigation-split-enabled .investigation-evidence-jump { display: none; }
21
+ }
22
+
23
+ @layer components {
24
+ .investigation-assessment {
25
+ background: var(--color-investigation-assessment);
26
+ border-color: var(--color-investigation-assessment-border);
27
+ }
28
+ .investigation-evidence {
29
+ background: var(--color-investigation-evidence);
30
+ border-color: var(--color-investigation-evidence-border);
31
+ }
32
+ .investigation-next-steps {
33
+ background: var(--color-investigation-next-steps);
34
+ border-color: var(--color-investigation-next-steps-border);
35
+ }
36
+ }
37
+
18
38
  /*
19
39
  * Tailwind v4 theme tokens. Migrated from the legacy v3 tailwind.config.js
20
40
  * to CSS-first @theme so library consumers (e.g. radar-hub-web) don't need
@@ -22,6 +42,12 @@
22
42
  * when they consume this package from npm.
23
43
  */
24
44
  @theme {
45
+ --color-investigation-assessment: light-dark(#edf3fc, #182237);
46
+ --color-investigation-assessment-border: light-dark(#d3dff0, #2b3b56);
47
+ --color-investigation-evidence: light-dark(#f3f0fa, #211e30);
48
+ --color-investigation-evidence-border: light-dark(#e0d8ee, #39314b);
49
+ --color-investigation-next-steps: light-dark(#edf6f5, #172a2c);
50
+ --color-investigation-next-steps-border: light-dark(#cfe4e0, #2a4546);
25
51
  /* Fonts — DM Sans for UI, DM Mono for code/metric panes. */
26
52
  --font-sans: "DM Sans Variable", "DM Sans", system-ui, sans-serif;
27
53
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
@@ -44,8 +70,8 @@
44
70
  --color-accent: var(--accent);
45
71
 
46
72
  /* Border radius — rounder than Tailwind defaults to match the brand. */
47
- --radius: 0.375rem; /* default (was 0.25rem) */
48
- --radius-md: 0.5rem; /* was 0.375rem */
73
+ --radius: 0.375rem; /* default (was 0.25rem) */
74
+ --radius-md: 0.5rem; /* was 0.375rem */
49
75
  --radius-lg: 0.625rem; /* was 0.5rem */
50
76
  --radius-xl: 0.875rem; /* was 0.75rem */
51
77
 
@@ -54,12 +80,26 @@
54
80
  }
55
81
 
56
82
  @keyframes fadeInOut {
57
- 0%, 100% { opacity: 0; transform: translateY(-8px); }
58
- 15%, 85% { opacity: 1; transform: translateY(0); }
83
+ 0%,
84
+ 100% {
85
+ opacity: 0;
86
+ transform: translateY(-8px);
87
+ }
88
+ 15%,
89
+ 85% {
90
+ opacity: 1;
91
+ transform: translateY(0);
92
+ }
59
93
  }
60
94
 
61
95
  /* Global: pointer cursor for all interactive elements */
62
- button, [role="button"], a, label, select, summary, [tabindex]:not([tabindex="-1"]) {
96
+ button,
97
+ [role="button"],
98
+ a,
99
+ label,
100
+ select,
101
+ summary,
102
+ [tabindex]:not([tabindex="-1"]) {
63
103
  cursor: pointer;
64
104
  }
65
105
 
@@ -69,7 +109,7 @@ button, [role="button"], a, label, select, summary, [tabindex]:not([tabindex="-1
69
109
 
70
110
  :root {
71
111
  /* Font settings */
72
- font-family: 'DM Sans Variable', 'DM Sans', system-ui, sans-serif;
112
+ font-family: "DM Sans Variable", "DM Sans", system-ui, sans-serif;
73
113
  line-height: 1.5;
74
114
  font-weight: 400;
75
115
  }
@@ -91,7 +131,6 @@ body {
91
131
  flex-direction: column;
92
132
  }
93
133
 
94
-
95
134
  /* ============================================
96
135
  REACT FLOW CUSTOMIZATIONS
97
136
  ============================================ */
@@ -218,8 +257,14 @@ body {
218
257
  }
219
258
 
220
259
  @keyframes slide-out-to-right {
221
- from { transform: translateX(0); opacity: 1; }
222
- to { transform: translateX(100%); opacity: 0; }
260
+ from {
261
+ transform: translateX(0);
262
+ opacity: 1;
263
+ }
264
+ to {
265
+ transform: translateX(100%);
266
+ opacity: 0;
267
+ }
223
268
  }
224
269
 
225
270
  .animate-out {
@@ -271,8 +316,12 @@ body {
271
316
  }
272
317
 
273
318
  @keyframes status-enter {
274
- from { opacity: 0; }
275
- to { opacity: 1; }
319
+ from {
320
+ opacity: 0;
321
+ }
322
+ to {
323
+ opacity: 1;
324
+ }
276
325
  }
277
326
  .animate-status-enter {
278
327
  animation: status-enter 140ms ease-out both;
@@ -315,24 +364,8 @@ body {
315
364
 
316
365
  /* Synthesis "thinking" dot — a calm breathing pulse (not a spinner) for the staged
317
366
  pre-verdict beats. */
318
- @keyframes synth-pulse {
319
- 0%,
320
- 100% {
321
- opacity: 0.35;
322
- transform: scale(0.85);
323
- }
324
- 50% {
325
- opacity: 1;
326
- transform: scale(1.15);
327
- }
328
- }
329
- .animate-synth-pulse {
330
- animation: synth-pulse 1.1s ease-in-out infinite;
331
- }
332
-
333
- /* Result-reveal choreography. The card eases in; the root-cause label gets an accent
334
- underline that sweeps out; the whole card pulses its accent border once to mark
335
- "diagnosis ready." Sequenced via animation-delay relative to one mount. */
367
+ /* Results enter with the same short spatial motion as new transcript/evidence rows.
368
+ Avoid pulsing glows or staged pauses: the evidence itself should carry emphasis. */
336
369
  @keyframes result-in {
337
370
  from {
338
371
  opacity: 0;
@@ -346,51 +379,6 @@ body {
346
379
  .animate-result-in {
347
380
  animation: result-in 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
348
381
  }
349
- @keyframes underline-sweep {
350
- from {
351
- transform: scaleX(0);
352
- }
353
- to {
354
- transform: scaleX(1);
355
- }
356
- }
357
- .animate-underline-sweep {
358
- transform-origin: left;
359
- animation: underline-sweep 460ms cubic-bezier(0.16, 1, 0.3, 1) 120ms both;
360
- }
361
- /* Richer verdict reveal — a colored ring around the border plus an UNEVEN, breathing
362
- outer glow (two soft peaks), held longer (~2.4s). Tinted per verdict via --glow
363
- (amber root-cause, emerald healthy, accent remediation, slate inconclusive). */
364
- @keyframes verdict-reveal {
365
- 0% {
366
- box-shadow:
367
- 0 0 0 0 color-mix(in oklab, var(--glow, var(--accent)) 0%, transparent),
368
- 0 0 0 0 transparent;
369
- }
370
- 18% {
371
- box-shadow:
372
- 0 0 0 1px color-mix(in oklab, var(--glow, var(--accent)) 60%, transparent),
373
- 0 0 20px 2px color-mix(in oklab, var(--glow, var(--accent)) 42%, transparent);
374
- }
375
- 44% {
376
- box-shadow:
377
- 0 0 0 1px color-mix(in oklab, var(--glow, var(--accent)) 32%, transparent),
378
- 0 0 10px 1px color-mix(in oklab, var(--glow, var(--accent)) 20%, transparent);
379
- }
380
- 68% {
381
- box-shadow:
382
- 0 0 0 1px color-mix(in oklab, var(--glow, var(--accent)) 50%, transparent),
383
- 0 0 24px 3px color-mix(in oklab, var(--glow, var(--accent)) 38%, transparent);
384
- }
385
- 100% {
386
- box-shadow:
387
- 0 0 0 0 transparent,
388
- 0 0 0 0 transparent;
389
- }
390
- }
391
- .animate-verdict-reveal {
392
- animation: verdict-reveal 2400ms cubic-bezier(0.32, 0.72, 0, 1) 120ms both;
393
- }
394
382
  @media (prefers-reduced-motion: reduce) {
395
383
  .ai-shimmer {
396
384
  animation: none;
@@ -398,10 +386,7 @@ body {
398
386
  -webkit-text-fill-color: currentColor;
399
387
  color: var(--text-secondary);
400
388
  }
401
- .animate-synth-pulse,
402
- .animate-result-in,
403
- .animate-underline-sweep,
404
- .animate-verdict-reveal {
389
+ .animate-result-in {
405
390
  animation: none;
406
391
  }
407
392
  }
@@ -428,7 +413,6 @@ body {
428
413
  animation: slide-in-from-right 0.2s ease-out;
429
414
  }
430
415
 
431
-
432
416
  /* ============================================
433
417
  XTERM TERMINAL STYLES
434
418
  ============================================ */
package/src/index.ts CHANGED
@@ -31,7 +31,7 @@ export type {
31
31
  DiagnoseConsentCopy,
32
32
  } from './context/DiagnoseCustomization';
33
33
 
34
- // Standalone AI-diagnose surface — mount the investigation panel outside a
34
+ // Standalone AI investigation surface — mount the investigation panel outside a
35
35
  // full <RadarApp>. No router dependency, no client-side cluster state: the
36
36
  // backend set via setApiBase() picks the cluster, so hosts remount
37
37
  // <DiagnoseProvider key={cluster}> to switch. Mount order: ThemeProvider >