@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.
@@ -2,7 +2,7 @@ import { renderToStaticMarkup } from "react-dom/server";
2
2
  import { afterEach, describe, expect, it, vi } from "vitest";
3
3
 
4
4
  import type { RunSummary } from "../../api/diagnose";
5
- import { RecentList } from "./Home";
5
+ import { InvestigationHome, RecentList } from "./Home";
6
6
 
7
7
  const NOW = new Date(2026, 8, 2, 14, 30);
8
8
  const time = (day: number, hour: number) =>
@@ -291,3 +291,25 @@ describe("RecentList", () => {
291
291
  expect(visible(html)).toContain("disk error");
292
292
  });
293
293
  });
294
+
295
+ describe("InvestigationHome", () => {
296
+ it("points users toward history or a focused resource investigation", () => {
297
+ const html = renderToStaticMarkup(
298
+ <InvestigationHome agentLabel="Codex" />,
299
+ );
300
+ const text = visible(html);
301
+ expect(text).toContain("Choose an investigation");
302
+ expect(text).toContain("start a focused investigation with Codex");
303
+ expect(html).not.toContain("textarea");
304
+ });
305
+
306
+ it("offers first-time users a focused path through Issues", () => {
307
+ const html = renderToStaticMarkup(
308
+ <InvestigationHome agentLabel="Codex" onBrowseIssues={() => {}} />,
309
+ );
310
+ const text = visible(html);
311
+ expect(text).toContain("Pick a problem from Issues");
312
+ expect(text).toContain("Browse issues");
313
+ expect(html).not.toContain("textarea");
314
+ });
315
+ });
@@ -1,6 +1,13 @@
1
1
  // Server-side runs keep background and running investigations visible in both
2
2
  // the docked Home view and the maximized workspace's master pane.
3
- import { CircleAlert, Loader2, Server, Sparkles, Square } from "lucide-react";
3
+ import {
4
+ ArrowRight,
5
+ CircleAlert,
6
+ Loader2,
7
+ Server,
8
+ Sparkles,
9
+ Square,
10
+ } from "lucide-react";
4
11
  import { type RunSummary } from "../../api/diagnose";
5
12
  import {
6
13
  groupQualifiesLaneId,
@@ -109,6 +116,46 @@ export function statusWord(status: RunSummary["status"]): {
109
116
  }
110
117
  }
111
118
 
119
+ export function InvestigationHome({
120
+ agentLabel,
121
+ onBrowseIssues,
122
+ }: {
123
+ agentLabel: string;
124
+ onBrowseIssues?: () => void;
125
+ }) {
126
+ return (
127
+ <div className="flex min-h-full w-full items-center justify-center px-4 py-8 sm:px-6">
128
+ <section className="mx-auto max-w-2xl text-center">
129
+ <span className="mx-auto flex h-10 w-10 items-center justify-center rounded-xl bg-accent-muted text-accent">
130
+ <Sparkles className="h-5 w-5" />
131
+ </span>
132
+ <h1 className="mt-4 text-xl font-semibold text-theme-text-primary">
133
+ Choose an investigation
134
+ </h1>
135
+ <p className="mx-auto mt-1 max-w-md text-sm text-theme-text-tertiary">
136
+ {onBrowseIssues
137
+ ? "Pick a problem from Issues, then choose "
138
+ : "Select one from your history, or open a resource and choose "}
139
+ <span className="font-medium text-theme-text-secondary">
140
+ Investigate
141
+ </span>{" "}
142
+ to start a focused investigation with {agentLabel}.
143
+ </p>
144
+ {onBrowseIssues && (
145
+ <button
146
+ type="button"
147
+ onClick={onBrowseIssues}
148
+ className="btn-brand mt-4 inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm font-medium"
149
+ >
150
+ Browse issues
151
+ <ArrowRight className="h-3.5 w-3.5" />
152
+ </button>
153
+ )}
154
+ </section>
155
+ </div>
156
+ );
157
+ }
158
+
112
159
  export function RecentList({
113
160
  agentLabel,
114
161
  runs,
@@ -246,8 +293,7 @@ export function RecentList({
246
293
  ? `${parsed.account} · ${parsed.region}`
247
294
  : r.context;
248
295
  const readableKind = pluralToKind(r.kind);
249
- const kind =
250
- groupsByKind.get(readableKind)!.size > 1
296
+ const kind = groupsByKind.get(readableKind)!.size > 1
251
297
  ? `${readableKind} · ${r.group || "core"}`
252
298
  : readableKind;
253
299
  const initialIssue = r.health?.topReason?.trim();