@skyhook-io/radar-app 1.13.2 → 1.13.4

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.
@@ -8,7 +8,10 @@ import {
8
8
  prefersReducedMotion,
9
9
  useDisclosureReveal,
10
10
  } from "./useDisclosureReveal";
11
- import { investigationExplanation } from "./investigationExplanation";
11
+ import {
12
+ investigationExplanation,
13
+ supportsAssessmentExplanation,
14
+ } from "./investigationExplanation";
12
15
  import {
13
16
  initialInvestigationPane,
14
17
  investigationEvidenceShouldMarkUnread,
@@ -88,6 +91,7 @@ import {
88
91
  import {
89
92
  InvestigationEvidencePane,
90
93
  partitionInvestigationEvidence,
94
+ type InvestigationTimelineScope,
91
95
  } from "./InvestigationEvidencePane";
92
96
  import type { DiagnosisResourceRef } from "./diagnoseEvidenceTypes";
93
97
  import { formatInvestigationTarget } from "./target";
@@ -150,18 +154,30 @@ export function InvestigationView({
150
154
  agentLabel,
151
155
  maximized,
152
156
  onOpenResource,
157
+ onOpenTimeline,
153
158
  }: {
154
159
  run: RunSummary;
155
160
  agentLabel: string;
156
161
  maximized: boolean;
157
162
  /** Opens an unambiguous evidence subject in Radar's native resource views. */
158
163
  onOpenResource?: (ref: DiagnosisResourceRef) => void;
164
+ /** Opens Radar's Timeline filtered to the resource a changes card is about. */
165
+ onOpenTimeline?: (scope: InvestigationTimelineScope) => void;
159
166
  }) {
160
167
  const { kind, namespace, name } = run;
161
168
  // Apply is off for hosted agents (read-only server-side). Keyed on the selected
162
169
  // agent, which matches run.agent unless a deployment mixes hosted + local agents.
163
- const { refreshRuns, openInvestigation, startError, dismissError, hosted } =
164
- useDiagnose();
170
+ const {
171
+ refreshRuns,
172
+ openInvestigation,
173
+ startError,
174
+ dismissError,
175
+ hosted,
176
+ agents,
177
+ } = useDiagnose();
178
+ const explanationEnabled = supportsAssessmentExplanation(
179
+ agents.find((agent) => agent.name === run.agent),
180
+ );
165
181
  // Investigate again means look again, so it asks for a new session explicitly and only
166
182
  // carries the issue forward — being handed the previous answer is the one
167
183
  // thing someone clicking this doesn't want.
@@ -754,15 +770,14 @@ export function InvestigationView({
754
770
  const sequence = assessment.resultSequence;
755
771
  if (!sequence || !assessment.diagnosis?.rootCause) return undefined;
756
772
  const saved = investigationExplanation(turns, sequence);
757
- // This intent is implemented by the local run manager; hosted continuation
758
- // alone does not imply support for assessment-bound explanation turns.
759
- if ((readOnly || hosted) && saved.status === "idle") return undefined;
773
+ if ((readOnly || !explanationEnabled) && saved.status === "idle")
774
+ return undefined;
760
775
  const state =
761
776
  explanationRequest?.sequence === sequence ? explanationRequest : saved;
762
777
  return {
763
778
  ...state,
764
779
  onGenerate:
765
- !hosted && !interactionsBlocked
780
+ explanationEnabled && !interactionsBlocked
766
781
  ? () => askExplanation(sequence)
767
782
  : undefined,
768
783
  openRequest:
@@ -2063,6 +2078,7 @@ export function InvestigationView({
2063
2078
  onViewSource={viewActivitySource}
2064
2079
  onViewActivity={viewActivity}
2065
2080
  onOpenResource={stale ? undefined : onOpenResource}
2081
+ onOpenTimeline={stale ? undefined : onOpenTimeline}
2066
2082
  revealRequest={evidenceRevealRequest}
2067
2083
  onRevealReady={revealEvidenceSource}
2068
2084
  afterEvidence={
@@ -162,10 +162,9 @@ export function IssueDiagnoseButton({
162
162
  // investigations). Self-hides when no agent CLI is present.
163
163
  export function GlobalDiagnoseButton() {
164
164
  const d = useDiagnose();
165
- const { runningKeys } = useDiagnoseLayout();
165
+ const { runningCount } = useDiagnoseLayout();
166
166
  if (d.setupState === "off") return null;
167
167
  const ready = d.available;
168
- const runningCount = runningKeys.size;
169
168
  const agentSuffix = d.hosted
170
169
  ? `powered by ${d.agentLabel}`
171
170
  : `runs your own ${d.agentLabel} locally`;
@@ -181,7 +180,7 @@ export function GlobalDiagnoseButton() {
181
180
  position="bottom"
182
181
  >
183
182
  <button
184
- onClick={d.openHome}
183
+ onClick={() => d.openWorkspace()}
185
184
  className="relative rounded-md bg-theme-elevated p-1.5 text-theme-text-secondary transition-colors hover:bg-theme-hover hover:text-theme-text-primary"
186
185
  aria-label={
187
186
  runningCount > 0