@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.
- package/package.json +2 -2
- package/src/App.tsx +6 -4
- package/src/api/client.ts +3 -0
- package/src/api/diagnose.ts +31 -1
- package/src/components/CloudConnectFlow.tsx +173 -13
- package/src/components/CloudFunnelButton.tsx +4 -2
- package/src/components/ConnectionErrorView.tsx +9 -10
- package/src/components/DebugOverlay.tsx +10 -6
- package/src/components/cloudConnectHandoff.test.ts +109 -4
- package/src/components/cloudConnectHandoff.ts +154 -2
- package/src/components/curl/ServiceCurlButton.tsx +19 -26
- package/src/components/diagnose/AgentCase.tsx +18 -5
- package/src/components/diagnose/AnalysisStory.test.tsx +308 -0
- package/src/components/diagnose/AnalysisStory.tsx +564 -0
- package/src/components/diagnose/DiagnoseContext.test.ts +10 -0
- package/src/components/diagnose/DiagnoseContext.tsx +25 -8
- package/src/components/diagnose/DiagnoseSurface.tsx +20 -14
- package/src/components/diagnose/InvestigationEvidencePane.story.test.tsx +771 -0
- package/src/components/diagnose/InvestigationEvidencePane.test.tsx +8 -33
- package/src/components/diagnose/InvestigationEvidencePane.tsx +809 -168
- package/src/components/diagnose/InvestigationResourceEvidence.test.tsx +30 -0
- package/src/components/diagnose/InvestigationResourceEvidence.tsx +20 -0
- package/src/components/diagnose/InvestigationView.tsx +493 -529
- package/src/components/diagnose/investigationCase.test.tsx +267 -129
- package/src/components/diagnose/investigationCase.ts +122 -77
- package/src/components/diagnose/investigationEvidence/adapters/resource.test.ts +27 -0
- package/src/components/diagnose/investigationEvidence/adapters/resource.ts +28 -0
- package/src/components/diagnose/investigationEvidence/builder.ts +11 -2
- package/src/components/diagnose/investigationEvidence/identity.test.ts +25 -7
- package/src/components/diagnose/investigationEvidence/identity.ts +4 -4
- package/src/components/diagnose/investigationEvidence/observations.ts +24 -0
- package/src/components/diagnose/investigationEvidence/projection.test.ts +36 -3
- package/src/components/diagnose/investigationEvidence/types.ts +2 -0
- package/src/components/diagnose/investigationEvidencePresentation.test.ts +2 -0
- package/src/components/diagnose/investigationEvidencePresentation.ts +3 -0
- package/src/components/diagnose/investigationState.test.ts +316 -58
- package/src/components/diagnose/investigationState.ts +257 -44
- package/src/components/diagnose/investigationStory.test.ts +161 -0
- package/src/components/diagnose/investigationStory.ts +207 -0
- package/src/components/diagnose/parts.test.tsx +9 -6
- package/src/components/diagnose/parts.tsx +977 -193
- package/src/components/diagnose/storyParts.test.tsx +426 -0
- package/src/components/diagnose/toolCallLabel.test.ts +51 -0
- package/src/components/diagnose/toolCallLabel.ts +135 -0
- package/src/components/diagnose/useDisclosureReveal.ts +10 -11
- package/src/components/helm/HelmCompareRoute.tsx +18 -4
- package/src/components/helm/HelmReleaseDrawer.tsx +11 -26
- package/src/components/helm/InstallWizard.tsx +8 -3
- package/src/components/home/MCPSetupDialog.tsx +15 -9
- package/src/components/portforward/PortForwardManager.tsx +6 -13
- package/src/components/resource/PrometheusChartsGrid.tsx +3 -3
- package/src/components/resource/WorkloadMetricsHelpDialog.tsx +3 -3
- package/src/components/resource/WorkloadMetricsSection.tsx +15 -21
- package/src/components/resources/PodFilePreview.tsx +3 -3
- package/src/components/resources/renderers/ServiceRenderer.tsx +2 -1
- package/src/components/settings/SettingsDialog.tsx +4 -2
- package/src/components/ui/CommandPalette.tsx +10 -6
- package/src/components/ui/DiagnosticsOverlay.tsx +10 -6
- package/src/components/ui/Disclosure.tsx +47 -0
- package/src/components/ui/Markdown.tsx +23 -11
- package/src/components/ui/ShortcutHelpOverlay.tsx +3 -1
- package/src/components/ui/UpdateNotification.tsx +18 -2
- package/src/index.css +19 -6
|
@@ -16,6 +16,36 @@ function render(resource: InvestigationKubernetesResource): string {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
describe("InvestigationResourceEvidence", () => {
|
|
19
|
+
it("hides a multi-line sensitive value instead of rendering it as a block", () => {
|
|
20
|
+
const html = render({
|
|
21
|
+
apiVersion: "v1",
|
|
22
|
+
kind: "ConfigMap",
|
|
23
|
+
metadata: { namespace: "dev", name: "certs" },
|
|
24
|
+
data: {
|
|
25
|
+
"tls.key":
|
|
26
|
+
"-----BEGIN RSA PRIVATE KEY-----\nMIIEabc\n-----END RSA PRIVATE KEY-----",
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
expect(html).toContain("Value hidden");
|
|
30
|
+
expect(html).not.toMatch(/<pre[^>]*>-----BEGIN/);
|
|
31
|
+
expect(html).not.toContain("MIIEabc");
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it("renders a file-shaped ConfigMap value as a block under its key", () => {
|
|
35
|
+
const html = render({
|
|
36
|
+
apiVersion: "v1",
|
|
37
|
+
kind: "ConfigMap",
|
|
38
|
+
metadata: { namespace: "kourier-system", name: "kourier-bootstrap" },
|
|
39
|
+
data: {
|
|
40
|
+
"envoy-bootstrap.yaml":
|
|
41
|
+
"dynamic_resources:\n ads_config:\n transport_api_version: V3\n api_type: GRPC\n",
|
|
42
|
+
LOG_LEVEL: "info",
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
expect(html).toMatch(/colspan="2"/i);
|
|
46
|
+
expect(html).toMatch(/<pre[^>]*>dynamic_resources:\n {2}ads_config:/);
|
|
47
|
+
expect(html).toContain("LOG_LEVEL");
|
|
48
|
+
});
|
|
19
49
|
it("keeps every ConfigMap key inspectable in a bounded table and hides sensitive-looking values", () => {
|
|
20
50
|
const html = render({
|
|
21
51
|
apiVersion: "v1",
|
|
@@ -51,6 +51,26 @@ function ConfigMapEvidence({
|
|
|
51
51
|
</colgroup>
|
|
52
52
|
<tbody className="divide-y divide-theme-border/70">
|
|
53
53
|
{entries.map((entry) => {
|
|
54
|
+
// A file-shaped value (YAML, a config) reads as a block under
|
|
55
|
+
// its key, not squeezed into the right-hand column.
|
|
56
|
+
const value = entry.value ?? "";
|
|
57
|
+
const block =
|
|
58
|
+
!entry.sensitive &&
|
|
59
|
+
!entry.binary &&
|
|
60
|
+
(value.includes("\n") || value.length > 80);
|
|
61
|
+
if (block)
|
|
62
|
+
return (
|
|
63
|
+
<tr key={`data-${entry.key}`}>
|
|
64
|
+
<td colSpan={2} className="px-2.5 py-1.5 align-top">
|
|
65
|
+
<span className="block font-mono text-xs font-medium text-theme-text-secondary">
|
|
66
|
+
{entry.key}
|
|
67
|
+
</span>
|
|
68
|
+
<pre className="mt-1 max-h-48 overflow-auto whitespace-pre font-mono text-xs leading-relaxed text-theme-text-primary">
|
|
69
|
+
{value}
|
|
70
|
+
</pre>
|
|
71
|
+
</td>
|
|
72
|
+
</tr>
|
|
73
|
+
);
|
|
54
74
|
return (
|
|
55
75
|
<tr key={`${entry.binary ? "binary" : "data"}-${entry.key}`}>
|
|
56
76
|
<th
|