mirror of
https://github.com/mvschwarz/openrig.git
synced 2026-11-07 05:56:21 -10:00
Vault specialist: add specialist visibility in library review
Add Specialist Agent summary card to LibraryReview for service-backed rigs, showing canonical identity (vault.specialist). Update test mocks to canonical topology and summary mentioning specialist. Non-service rigs explicitly tested to show no specialist card. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This commit is contained in:
1 parent
f03241e8c7
commit
051474c0f4
3 files changed
+23
-5
No files matched your search
@@ -108,6 +108,17 @@ function LibraryRigReviewContent({ review }: { review: LibraryRigReview }) {
|
||||
{review.services && (
|
||||
<WorkflowSummaryCard label="Type" value="Agent-Managed App" testId="lib-rig-type" />
|
||||
)}
|
||||
{review.services && reviewPods.length > 0 && (() => {
|
||||
const specialistPod = reviewPods.find((p) => p.members.some((m) => m.id === "specialist"));
|
||||
if (!specialistPod) return null;
|
||||
return (
|
||||
<WorkflowSummaryCard
|
||||
label="Specialist Agent"
|
||||
value={`${specialistPod.id}.specialist`}
|
||||
testId="lib-rig-specialist"
|
||||
/>
|
||||
);
|
||||
})()}
|
||||
<WorkflowSummaryCard
|
||||
label={review.format === "pod_aware" ? "Pods" : "Nodes"}
|
||||
value={review.format === "pod_aware" ? reviewPods.length : reviewNodes.length}
|
||||
|
||||
@@ -27,9 +27,9 @@ describe("LibraryReview", () => {
|
||||
kind: "rig",
|
||||
name: "secrets-manager",
|
||||
version: "0.2",
|
||||
summary: "HashiCorp Vault in dev mode",
|
||||
summary: "HashiCorp Vault in dev mode with a dedicated Vault specialist agent",
|
||||
format: "pod_aware",
|
||||
pods: [{ id: "dev", label: "Dev", members: [{ id: "impl", agentRef: "local:agents/impl", runtime: "claude-code" }], edges: [] }],
|
||||
pods: [{ id: "vault", label: "Vault", members: [{ id: "specialist", agentRef: "local:agents/apps/vault-specialist", runtime: "claude-code" }], edges: [] }],
|
||||
edges: [],
|
||||
graph: { nodes: [], edges: [] },
|
||||
raw: "name: secrets-manager\n",
|
||||
@@ -68,6 +68,11 @@ describe("LibraryReview", () => {
|
||||
expect(screen.getByTestId("library-review-rig")).toBeDefined();
|
||||
});
|
||||
|
||||
// Specialist card shows canonical identity
|
||||
const specialistCard = screen.getByTestId("lib-rig-specialist");
|
||||
expect(specialistCard).toBeDefined();
|
||||
expect(specialistCard.textContent).toContain("vault.specialist");
|
||||
|
||||
// Environment tab exists
|
||||
expect(screen.getByTestId("lib-tab-environment")).toBeDefined();
|
||||
|
||||
@@ -150,6 +155,8 @@ describe("LibraryReview", () => {
|
||||
expect(screen.queryByTestId("lib-tab-environment")).toBeNull();
|
||||
// No setup prompt button
|
||||
expect(screen.queryByTestId("copy-setup-prompt")).toBeNull();
|
||||
// No specialist card
|
||||
expect(screen.queryByTestId("lib-rig-specialist")).toBeNull();
|
||||
});
|
||||
|
||||
it("opens the matching agent spec from a rig member row", async () => {
|
||||
|
||||
@@ -174,7 +174,7 @@ describe("SpecsPanel filter chips and richer rows", () => {
|
||||
sourcePath: "/specs/rigs/launch/secrets-manager/rig.yaml",
|
||||
relativePath: "rigs/launch/secrets-manager/rig.yaml",
|
||||
updatedAt: "2026-04-09T00:00:00Z",
|
||||
summary: "HashiCorp Vault in dev mode",
|
||||
summary: "HashiCorp Vault in dev mode with a dedicated Vault specialist agent",
|
||||
hasServices: true,
|
||||
},
|
||||
{
|
||||
@@ -253,10 +253,10 @@ describe("SpecsPanel filter chips and richer rows", () => {
|
||||
expect(screen.getByTestId("filter-rigs")).toBeDefined();
|
||||
expect(screen.getByTestId("filter-agents")).toBeDefined();
|
||||
|
||||
// Service-backed rig shows APP badge and summary
|
||||
// Service-backed rig shows APP badge and summary mentioning specialist
|
||||
const appRow = screen.getByTestId("library-entry-app-1");
|
||||
expect(appRow.textContent).toContain("APP");
|
||||
expect(screen.getByText("HashiCorp Vault in dev mode")).toBeDefined();
|
||||
expect(appRow.textContent).toContain("specialist");
|
||||
|
||||
// Builtin launch-path rig shows Stable badge
|
||||
const rigRow = screen.getByTestId("library-entry-rig-1");
|
||||
|
||||
Reference in new issue
Block a user