@skyhook-io/radar-app 1.18.0 → 1.18.1

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 (69) hide show
  1. package/README.md +6 -0
  2. package/package.json +2 -3
  3. package/src/App.tsx +22 -6
  4. package/src/api/client.gitops-destination.test.tsx +55 -0
  5. package/src/api/client.resource-list.test.ts +76 -0
  6. package/src/api/client.ts +61 -20
  7. package/src/api/quotas.ts +9 -20
  8. package/src/api/radarFeatures.ts +2 -0
  9. package/src/api/resourceLists.test.ts +84 -0
  10. package/src/api/resourceLists.ts +71 -0
  11. package/src/components/cnpg/CNPGView.tsx +1 -0
  12. package/src/components/compare/CompareResourcePicker.test.tsx +58 -0
  13. package/src/components/compare/CompareViewRoute.tsx +5 -1
  14. package/src/components/compare/useCompareCandidates.ts +1 -1
  15. package/src/components/compare/useCompareLauncher.tsx +4 -2
  16. package/src/components/diagnose/StoryExcerpt.tsx +24 -5
  17. package/src/components/diagnose/investigationEvidence/adapters/listCoverage.test.ts +415 -0
  18. package/src/components/diagnose/investigationEvidence/adapters/resource.ts +107 -8
  19. package/src/components/diagnose/investigationEvidence/bodies/inventory.tsx +66 -16
  20. package/src/components/diagnose/investigationEvidence/builder.ts +13 -1
  21. package/src/components/diagnose/investigationEvidence/excerpt.ts +2 -0
  22. package/src/components/diagnose/investigationEvidence/observations.ts +1 -0
  23. package/src/components/diagnose/investigationEvidence/projection.test.ts +24 -1
  24. package/src/components/diagnose/investigationEvidence/types.ts +15 -0
  25. package/src/components/diagnose/toolCallLabel.test.ts +9 -0
  26. package/src/components/diagnose/toolCallLabel.ts +2 -0
  27. package/src/components/execution/BatchExecutionView.image-browse.test.tsx +46 -0
  28. package/src/components/execution/BatchExecutionView.tsx +6 -4
  29. package/src/components/gitops/GitOpsView.identity.test.tsx +113 -0
  30. package/src/components/gitops/GitOpsView.tsx +62 -40
  31. package/src/components/gitops/useDestinationCluster.ts +2 -1
  32. package/src/components/helm/ArtifactHubSourceSearch.test.tsx +124 -0
  33. package/src/components/helm/ArtifactHubSourceSearch.tsx +240 -0
  34. package/src/components/helm/ChartBrowser.tsx +5 -4
  35. package/src/components/helm/TrackChartSourceDialog.render.test.tsx +269 -96
  36. package/src/components/helm/TrackChartSourceDialog.tsx +607 -104
  37. package/src/components/home/mcpToolCatalog.ts +10 -0
  38. package/src/components/resource/PrometheusCharts.overlays.test.ts +45 -0
  39. package/src/components/resource/PrometheusCharts.tsx +2 -2
  40. package/src/components/resources/ResourcesView.tsx +29 -67
  41. package/src/components/resources/renderers/PodRenderer.tsx +4 -1
  42. package/src/components/settings/MyPermissionsDialog.tsx +12 -9
  43. package/src/components/traffic/TrafficSourcePill.test.tsx +110 -0
  44. package/src/components/traffic/TrafficSourcePill.tsx +111 -0
  45. package/src/components/traffic/TrafficView.tsx +9 -55
  46. package/src/components/ui/DiagnosticsOverlay.test.ts +25 -0
  47. package/src/components/ui/DiagnosticsOverlay.tsx +2 -1
  48. package/src/components/ui/Omnibar.note.test.tsx +141 -0
  49. package/src/components/ui/Omnibar.tsx +82 -18
  50. package/src/components/ui/RadarOmnibar.test.tsx +183 -0
  51. package/src/components/ui/RadarOmnibar.tsx +38 -4
  52. package/src/components/ui/UpdateNotification.manual.test.tsx +177 -0
  53. package/src/components/ui/UpdateNotification.test.tsx +2 -1
  54. package/src/components/ui/UpdateNotification.tsx +29 -5
  55. package/src/components/ui/omnibar-match.test.ts +15 -8
  56. package/src/components/ui/omnibar-match.ts +11 -6
  57. package/src/components/ui/searchCoverage.fixtures.ts +16 -0
  58. package/src/components/ui/searchCoverageNote.test.ts +245 -0
  59. package/src/components/ui/searchCoverageNote.ts +222 -0
  60. package/src/components/whats-new/WhatsNew.test.ts +10 -0
  61. package/src/components/whats-new/WhatsNew.tsx +5 -4
  62. package/src/components/whats-new/WhatsNewDialog.test.tsx +20 -0
  63. package/src/components/whats-new/releaseNotes.ts +57 -5
  64. package/src/components/workload/WorkloadView.tsx +8 -2
  65. package/src/hooks/useResourceCounts.ts +2 -0
  66. package/src/index.css +2 -4
  67. package/src/index.ts +7 -0
  68. package/src/utils/artifacthub.test.ts +18 -0
  69. package/src/utils/artifacthub.ts +9 -0
@@ -1,5 +1,5 @@
1
1
  import type { LucideIcon } from 'lucide-react'
2
- import { Bot, Database, GitCompareArrows, HardDrive, Hourglass, Layers, Network, RefreshCcw, Scale, ScrollText, SlidersHorizontal, Undo2 } from 'lucide-react'
2
+ import { Bot, Database, GitCompareArrows, HardDrive, Hourglass, Layers, Network, RefreshCcw, Scale, ScrollText, Search, SlidersHorizontal, Undo2 } from 'lucide-react'
3
3
  import { compareVersions } from '../../utils/version'
4
4
 
5
5
  export interface ReleaseHighlight {
@@ -41,12 +41,65 @@ export interface ReleaseNotes {
41
41
 
42
42
  export const CHANGELOG_URL = 'https://radarhq.io/changelog'
43
43
 
44
+ // Read .agents/skills/whats-new/SKILL.md before authoring or regrouping notes.
44
45
  // One entry per release that has something to announce. A user sees the
45
46
  // entries for the releases they haven't seen yet, composed into one dialog, so
46
47
  // a patch upgrade, or one that skips releases, still gets them. Every minor and
47
48
  // major release must have its own entry: scripts/check-whats-new.sh refuses to
48
49
  // release one without it.
49
50
  export const RELEASE_NOTES: ReleaseNotes[] = [
51
+ {
52
+ version: 'v1.18.0',
53
+ highlights: [
54
+ {
55
+ id: 'trivy-cve-search',
56
+ icon: Search,
57
+ title: 'Investigate CVEs across your cluster',
58
+ description: 'Search Trivy findings by CVE, package or image, including in resource tables. MCP agents can inventory declared runtime versions.',
59
+ leadDescription: 'With Trivy Operator installed, search globally or within report tables by CVE, package, failed check ID or image to find matching scan reports, then open a report for installed and fixed package versions. Partial searches say what could not be checked. MCP agents can also inventory runtime versions declared by running images and compare supported versions with a fixed release. Missing or unreadable declarations stay unknown; image metadata does not verify a fix.',
60
+ importance: 8,
61
+ },
62
+ {
63
+ id: 'mcp-guidance-waits-controls',
64
+ icon: Bot,
65
+ title: 'More capable agents through MCP',
66
+ description: 'MCP agents get built-in tool guidance and can wait for rollouts, readiness or deletion. An optional read-only mode exposes only read tools.',
67
+ importance: 5,
68
+ },
69
+ {
70
+ id: 'investigation-change-evidence',
71
+ icon: GitCompareArrows,
72
+ title: 'See more of what changed',
73
+ description: 'Investigations show more spec edits, NetworkPolicy changes, Secret rotations and stale env readers, and flag incomplete history.',
74
+ importance: 5,
75
+ },
76
+ {
77
+ id: 'workload-blockers',
78
+ icon: Network,
79
+ title: 'Better issue detection and warnings',
80
+ description: 'Issues catch more network, storage and scheduling problems, add diagnostic context, and flag checks that could not complete.',
81
+ importance: 5,
82
+ path: '/issues',
83
+ cta: 'Open Issues',
84
+ },
85
+ {
86
+ id: 'log-viewer-improvements',
87
+ icon: ScrollText,
88
+ title: 'Log viewer improvements',
89
+ description: 'Keep your place in fast-moving logs, select text without auto-scroll, and wait for containers to start with clearer status messages.',
90
+ importance: 4,
91
+ },
92
+ ],
93
+ improvements: [
94
+ 'Resource tables remember your column order for each kind',
95
+ 'Open terminals and browse files in native sidecars',
96
+ 'Node drains keep results visible and name remaining Pods',
97
+ 'Audits recognize shared Pod CPU and memory budgets',
98
+ 'Helm upgrades need a confirmed source; find public sources on ArtifactHub',
99
+ 'Prometheus reconnects automatically when it appears',
100
+ 'Argo CD views confirm when a local resource is missing',
101
+ ],
102
+ },
50
103
  {
51
104
  version: 'v1.17.0',
52
105
  highlights: [
@@ -217,7 +270,7 @@ export function releaseNotesFor(
217
270
  ): ReleaseNotes | undefined {
218
271
  if (!version) return undefined
219
272
  const normalized = version.startsWith('v') ? version : `v${version}`
220
- return catalog.find(notes => notes.version === normalized)
273
+ return catalog.find(notes => notes.version === normalized || releaseLine(notes.version) === normalized)
221
274
  }
222
275
 
223
276
  /** The release line a catalog entry covers, e.g. v1.15 for v1.15.0: its patches show the same notes. */
@@ -264,9 +317,8 @@ export function unreadReleases(
264
317
  export const RELEASE_WEIGHTS = [1, 0.75, 0.5]
265
318
  export const MAX_CARDS = 5
266
319
  export const MAX_LINES = 8
267
- // The dialog opens by itself only when the cards it shows add up to this.
268
- // A release of mostly 4-6s stays behind the unread dot; one with a few solid
269
- // features, or a skipped release with them, opens it.
320
+ // A fuller set of useful improvements can merit an announcement even without
321
+ // a single release-defining feature.
270
322
  export const AUTO_OPEN_SCORE = 25
271
323
 
272
324
  export interface ComposedHighlight extends ReleaseHighlight {
@@ -816,6 +816,11 @@ export function WorkloadView({
816
816
  const liveIssues = useCronJobCoverage ? cronJobIssues.data?.issues : ordinaryIssues.data
817
817
  const issuesPending = useCronJobCoverage ? cronJobIssues.isPending : ordinaryIssues.isPending
818
818
  const schedulingEvidence = cronJobIssues.data?.scheduling_report?.uid === resource?.metadata?.uid ? cronJobIssues.data?.scheduling_report : undefined
819
+ const [schedulingTimelineFocus, setSchedulingTimelineFocus] = useState<{ uid: string; id: string }>()
820
+ const viewSchedulingReport = useCallback(() => {
821
+ setSchedulingTimelineFocus(schedulingEvidence?.event_id ? { uid: schedulingEvidence.uid, id: schedulingEvidence.event_id } : undefined)
822
+ handleTabChange('timeline')
823
+ }, [schedulingEvidence, handleTabChange])
819
824
  const { data: auditFindings } = useResourceAudit(apiKind, namespace, name, effectiveGroup)
820
825
  const hasOperationalIssues = Boolean(liveIssues?.length)
821
826
  const {
@@ -1162,6 +1167,7 @@ export function WorkloadView({
1162
1167
  refetch={refetchResourceAndRuns}
1163
1168
  // Timeline
1164
1169
  allEvents={allEvents}
1170
+ timelineFocusEvent={schedulingTimelineFocus?.uid === resource?.metadata?.uid ? schedulingTimelineFocus : undefined}
1165
1171
  historyTruncated={!historyFallback && historyTruncated}
1166
1172
  onLoadOlderHistory={historyFallback ? undefined : loadOlderHistory}
1167
1173
  loadingOlderHistory={!historyFallback && loadingOlderHistory}
@@ -1298,10 +1304,10 @@ export function WorkloadView({
1298
1304
  }}
1299
1305
  renderOverviewLead={() => (
1300
1306
  <div className="flex flex-col gap-4">
1301
- <CronJobSchedulingContext evidence={schedulingEvidence} onViewTimeline={() => handleTabChange('timeline')} />
1307
+ <CronJobSchedulingContext evidence={schedulingEvidence} onViewTimeline={viewSchedulingReport} />
1302
1308
  <ResourceIssuesSection
1303
1309
  issues={liveIssues}
1304
- renderDetailSection={schedulingEvidence?.state === 'reported' ? ({ issue }) => issue.kind === 'CronJob' && issue.reason === schedulingEvidence.reason ? <CronJobSchedulingDetails evidence={schedulingEvidence} onViewTimeline={() => handleTabChange('timeline')} /> : null : undefined}
1310
+ renderDetailSection={schedulingEvidence?.state === 'reported' ? ({ issue }) => issue.kind === 'CronJob' && issue.reason === schedulingEvidence.reason ? <CronJobSchedulingDetails evidence={schedulingEvidence} onViewTimeline={viewSchedulingReport} /> : null : undefined}
1305
1311
  compact={!expanded}
1306
1312
  subjectResource={{ kind: apiKind, namespace, name, group: rest.group }}
1307
1313
  onResourceClick={
@@ -1,9 +1,11 @@
1
+ import type { ResourceCoverage } from '@skyhook-io/k8s-ui'
1
2
  import { useQuery } from '@tanstack/react-query'
2
3
  import { debugNamespaceLog, fetchJSON, isStillLoadingError } from '../api/client'
3
4
  import { useConnection } from '../context/ConnectionContext'
4
5
 
5
6
  export interface ResourceCountsResponse {
6
7
  counts: Record<string, number>
8
+ coverage?: Record<string, ResourceCoverage>
7
9
  forbidden?: string[]
8
10
  reasons?: Record<string, string>
9
11
  unavailable?: string[]
package/src/index.css CHANGED
@@ -53,10 +53,8 @@
53
53
  }
54
54
 
55
55
  /*
56
- * Tailwind v4 theme tokens. Migrated from the legacy v3 tailwind.config.js
57
- * to CSS-first @theme so library consumers (e.g. radar-hub-web) don't need
58
- * to pick up radar's Node config or its `@tailwindcss/typography` plugin
59
- * when they consume this package from npm.
56
+ * Tailwind v4 theme tokens live in CSS so library consumers (e.g.
57
+ * radar-hub-web) get the same theme when they import this package's styles.
60
58
  */
61
59
  @theme {
62
60
  --color-investigation-assessment: light-dark(#edf3fc, #182237);
package/src/index.ts CHANGED
@@ -96,7 +96,14 @@ export type {
96
96
  OmnibarHandle,
97
97
  OmnibarRecent,
98
98
  OmnibarSearchResult,
99
+ OmnibarNote,
100
+ OmnibarNotePart,
99
101
  } from './components/ui/Omnibar';
100
102
  export { bestScore } from './components/ui/command-items';
101
103
  export type { CommandItem } from './components/ui/command-items';
102
104
  export type { SearchHit, SearchMatchedField } from './api/client';
105
+
106
+ export { fetchResourceList, type ResourceListOptions } from './api/client';
107
+ export { normalizeResourceList, type ResourceListBody, type ResourceListResult } from './api/resourceLists';
108
+ export type { ResourceCoverage, ResourceReadCoverage, ResourceListResponse } from '@skyhook-io/k8s-ui';
109
+ export type { SearchCoverageEntry } from './components/ui/searchCoverageNote';
@@ -0,0 +1,18 @@
1
+ import { describe, expect, it } from 'vitest'
2
+ import { artifactHubPublisher, isArtifactHubOfficial } from './artifacthub'
3
+
4
+ describe('ArtifactHub display metadata', () => {
5
+ const repository = { name: 'repository', url: 'https://charts.example.test' }
6
+ it('prefers the publisher display name and supports older responses', () => {
7
+ expect(artifactHubPublisher({ ...repository, organizationDisplayName: 'Publisher Team', organizationName: 'publisher', userAlias: 'account' })).toBe('Publisher Team')
8
+ expect(artifactHubPublisher({ ...repository, organizationName: 'publisher', userAlias: 'account' })).toBe('publisher')
9
+ expect(artifactHubPublisher({ ...repository, userAlias: 'account' })).toBe('account')
10
+ expect(artifactHubPublisher(repository)).toBe('repository')
11
+ })
12
+ it('recognizes either official scope without treating verified as official', () => {
13
+ const chart = { packageId: 'id', name: 'chart', version: '1.0.0', stars: 0, repository }
14
+ expect(isArtifactHubOfficial({ ...chart, official: true })).toBe(true)
15
+ expect(isArtifactHubOfficial({ ...chart, repository: { ...repository, official: true } })).toBe(true)
16
+ expect(isArtifactHubOfficial({ ...chart, repository: { ...repository, verifiedPublisher: true } })).toBe(false)
17
+ })
18
+ })
@@ -0,0 +1,9 @@
1
+ import type { ArtifactHubChart, ArtifactHubRepository } from '../types'
2
+
3
+ export function artifactHubPublisher(repository: ArtifactHubRepository): string {
4
+ return repository.organizationDisplayName || repository.organizationName || repository.userAlias || repository.name
5
+ }
6
+
7
+ export function isArtifactHubOfficial(chart: ArtifactHubChart): boolean {
8
+ return Boolean(chart.official || chart.repository.official)
9
+ }