Skip to content

feat(apollo-vertex): add Solution Tests view + template#782

Draft
frankkluijtmans wants to merge 1 commit into
frankkluijtmans/solution-tests-hooksfrom
frankkluijtmans/kpi-card-height-fixes
Draft

feat(apollo-vertex): add Solution Tests view + template#782
frankkluijtmans wants to merge 1 commit into
frankkluijtmans/solution-tests-hooksfrom
frankkluijtmans/kpi-card-height-fixes

Conversation

@frankkluijtmans

@frankkluijtmans frankkluijtmans commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

The UI + registry wiring for the Solution Tests component. Stacked on #790 (the data layer) — the view consumes the adapter/context/config/hooks from there, so this targets the solution-tests-hooks branch and should merge after #790.

Contents:

  • SolutionTestsView + KPI bar, tabs, expandable rows, run-details dialog, evaluator results, JSON viewer, delete-confirm, user-message popover
  • index.ts barrel + registry.json entry (installable as @uipath/solution-tests) + tsconfig path alias
  • SolutionTestsTemplate demo (in-memory mock) + the Templates docs page and nav entry

Testing

pnpm typecheck, pnpm lint, pnpm format:check, and pnpm registry:build all pass (the registry item bundles all 20 files across both PRs).

Split out of the original combined PR per review feedback — data layer in #790, components here.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings June 5, 2026 14:53
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-design 🟢 Ready Preview, Logs Jun 11, 2026, 04:45:46 AM
apollo-docs 🟢 Ready Preview, Logs Jun 11, 2026, 04:45:46 AM
apollo-landing 🟢 Ready Preview, Logs Jun 11, 2026, 04:45:46 AM
apollo-ui-react 🟢 Ready Preview, Logs Jun 11, 2026, 04:45:46 AM
apollo-vertex 🟢 Ready Preview, Logs Jun 11, 2026, 04:45:46 AM

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1902 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1672
ISC 89
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new, domain-neutral Solution Tests page-level template to the Apollo Vertex registry (adapter + config driven, i18n-ready), and enhances the shared DataTable with an expand/collapse-all header toggle when expandable rows are enabled.

Changes:

  • Introduces the registry/solution-tests feature (types, adapter contract, config, context/provider, view, dialogs, expanded row content, KPI bar, message rendering).
  • Adds a previewable template + docs page + i18n strings, and a tsconfig alias for @/components/ui/solution-tests.
  • Updates the shared data table to render an expand/collapse-all affordance in the expand column header for expandable tables.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
apps/apollo-vertex/tsconfig.json Adds path alias for @/components/ui/solution-tests.
apps/apollo-vertex/templates/SolutionTestsTemplate.tsx Client-side demo template wiring provider + config to the view.
apps/apollo-vertex/templates/solution-tests/mock-db.ts In-memory mock data for template preview.
apps/apollo-vertex/templates/solution-tests/mock-adapter.ts Mock adapter implementing the Solution Tests adapter contract.
apps/apollo-vertex/registry/solution-tests/index.ts Public entrypoint exports for the Solution Tests registry feature.
apps/apollo-vertex/registry/solution-tests/types.ts Domain-neutral view models + status enums + user-message types.
apps/apollo-vertex/registry/solution-tests/adapter.ts Adapter interface defining reads/writes for wiring to any backend.
apps/apollo-vertex/registry/solution-tests/config.ts Config shape + defaults for subject-specific labels/columns/behavior.
apps/apollo-vertex/registry/solution-tests/context.tsx Provider/context wiring adapter + resolved config to the component tree.
apps/apollo-vertex/registry/solution-tests/use-solution-tests-data.ts React Query data + mutation orchestration for the view.
apps/apollo-vertex/registry/solution-tests/status-maps.ts Status→badge mappings and per-status class overrides.
apps/apollo-vertex/registry/solution-tests/utils.ts Formatting helpers and small status/result utilities.
apps/apollo-vertex/registry/solution-tests/user-messages.ts Parsing + severity derivation + icon/color/style maps for user messages.
apps/apollo-vertex/registry/solution-tests/user-messages-view.tsx UI components to render message stacks + tooltip icon.
apps/apollo-vertex/registry/solution-tests/solution-tests-view.tsx Main page-level Solution Tests UI (tabs, tables, actions).
apps/apollo-vertex/registry/solution-tests/kpi-bar.tsx KPI cards + score trend chart.
apps/apollo-vertex/registry/solution-tests/expanded-agents.tsx Expanded-row content for baseline agent outputs.
apps/apollo-vertex/registry/solution-tests/expanded-run-tests.tsx Expanded-row content for batch run test runs + run details launcher.
apps/apollo-vertex/registry/solution-tests/run-details-dialog.tsx Run details dialog with per-agent results + baseline actions.
apps/apollo-vertex/registry/solution-tests/result-expanded-content.tsx Per-result expanded content (JSON panels, evaluator results, errors).
apps/apollo-vertex/registry/solution-tests/evaluator-results-view.tsx Evaluator results list rendering with threshold coloring.
apps/apollo-vertex/registry/solution-tests/json-viewer-dialog.tsx Generic dialog for viewing JSON (expected output).
apps/apollo-vertex/registry/solution-tests/delete-confirm-dialog.tsx Confirmation dialog for deleting a test.
apps/apollo-vertex/registry/data-table/data-table.tsx Adds expand/collapse-all toggle in the expand header when expandable.
apps/apollo-vertex/registry.json Registers the new solution-tests registry component with deps.
apps/apollo-vertex/locales/en.json Adds i18n keys used by Solution Tests UI and table toggle labels.
apps/apollo-vertex/app/templates/solution-tests/page.mdx Adds docs page + preview + install/configuration snippet.
apps/apollo-vertex/app/templates/_meta.ts Adds “Solution tests” entry under Templates nav.

Comment on lines +30 to +48
const { data, isLoading, error } = useQuery({
queryKey: QUERY_KEY,
queryFn: () => fetchData(adapter),
});

const tests = data?.tests ?? [];
const batchRuns = data?.batchRuns ?? [];

const hasActiveRuns = batchRuns.some(
(r) => r.Status === RunStatus.Pending || r.Status === RunStatus.Running,
);

// Poll while runs are active (syncing with an external timer).
useQuery({
queryKey: [...QUERY_KEY, "polling"],
queryFn: () => fetchData(adapter),
refetchInterval: config.pollIntervalMs,
enabled: hasActiveRuns,
});
Comment on lines +157 to +166
async updateBaseline(resultId) {
await delay();
const result = db.results.find((r) => r.Id === resultId);
if (!result) return { success: false, message: "Result not found" };
const job = db.jobs.find((j) => j.ProcessName === result.ProcessName);
if (job) {
job.SourceRunResultId = resultId;
job.ProcessVersion = result.ProcessVersion;
}
return { success: true };
Comment on lines +3 to +4
import { useTranslation } from "react-i18next";
import { Button } from "@/components/ui/button";
@@ -0,0 +1,51 @@
"use client";

import { useSolutionTestsConfig } from "./context";
Comment on lines +3 to +4
import { useState, useCallback } from "react";
import { useQuery } from "@tanstack/react-query";
@@ -0,0 +1,211 @@
"use client";

import { useState, useCallback } from "react";
@@ -0,0 +1,181 @@
"use client";

import { useTranslation } from "react-i18next";
@@ -0,0 +1,147 @@
"use client";

import { useTranslation } from "react-i18next";
@@ -0,0 +1,507 @@
"use client";

import { useState, useCallback } from "react";
@@ -0,0 +1,518 @@
"use client";

import { useState } from "react";
@frankkluijtmans frankkluijtmans changed the title feat(apollo-vertex): Solution Tests template + data table expand/collapse-all 🚧 feat(apollo-vertex): Solution Tests template + data table expand/collapse-all Jun 5, 2026
@frankkluijtmans frankkluijtmans force-pushed the frankkluijtmans/kpi-card-height-fixes branch from 51bd37c to c907341 Compare June 5, 2026 15:26
Copilot AI review requested due to automatic review settings June 8, 2026 09:04
@frankkluijtmans frankkluijtmans force-pushed the frankkluijtmans/kpi-card-height-fixes branch from c907341 to b9242b3 Compare June 8, 2026 09:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated 6 comments.

Comment on lines +43 to +47
useQuery({
queryKey: [...QUERY_KEY, "polling"],
queryFn: () => fetchData(adapter),
refetchInterval: config.pollIntervalMs,
enabled: hasActiveRuns,
Comment on lines +77 to +85
const runAllMutation = useMutation({
mutationFn: () => adapter.runTests(),
onSuccess: (result) => {
assertOk(result, t("failed_to_run_tests"));
toast.success(t("all_tests_triggered"));
invalidate();
},
onError: onMutationError(),
});
Comment on lines +87 to +95
const runTestMutation = useMutation({
mutationFn: (testId: string) => adapter.runTests([testId]),
onSuccess: (result) => {
assertOk(result, t("failed_to_run_test"));
toast.success(t("test_triggered"));
invalidate();
},
onError: onMutationError(),
});
Comment on lines +107 to +115
const forceStopBatchMutation = useMutation({
mutationFn: (batchId: string) => adapter.forceStopBatch(batchId),
onSuccess: (result) => {
assertOk(result, t("failed_to_force_stop_batch"));
toast.success(t("force_stop_initiated"));
invalidate();
},
onError: onMutationError(),
});
Comment on lines +117 to +126
const deleteMutation = useMutation({
mutationFn: (testId: string) => adapter.deleteTest(testId),
onSuccess: (result) => {
assertOk(result, t("failed_to_delete_test"));
toast.success(t("test_deleted"));
invalidate();
},
onError: onMutationError(),
onSettled: () => setDeleteConfirmId(null),
});
Comment on lines +89 to +101
const forceStopMutation = useMutation({
mutationFn: (runId: string) => adapter.forceStopRun(runId),
onSuccess: (result) => {
if (!result.success) {
throw new Error(result.message ?? t("failed_to_force_stop_run"));
}
toast.success(t("force_stop_initiated"));
onRefresh();
},
onError: () => {
toast.error(t("failed_to_force_stop_run"));
},
});
@frankkluijtmans frankkluijtmans changed the title 🚧 feat(apollo-vertex): Solution Tests template + data table expand/collapse-all feat(apollo-vertex): add Solution Tests page-level template Jun 8, 2026
@frankkluijtmans frankkluijtmans force-pushed the frankkluijtmans/kpi-card-height-fixes branch from b9242b3 to 1a24a5c Compare June 8, 2026 09:58
Copilot AI review requested due to automatic review settings June 8, 2026 12:53
@frankkluijtmans frankkluijtmans force-pushed the frankkluijtmans/kpi-card-height-fixes branch from 1a24a5c to c2b61f8 Compare June 8, 2026 12:53
@frankkluijtmans frankkluijtmans changed the title feat(apollo-vertex): add Solution Tests page-level template feat(apollo-vertex): add Solution Tests view + template Jun 8, 2026
@frankkluijtmans frankkluijtmans changed the base branch from main to frankkluijtmans/solution-tests-hooks June 8, 2026 12:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.

Comment on lines +163 to +172
async updateBaseline(resultId) {
await delay();
const result = db.results.find((r) => r.Id === resultId);
if (!result) return { success: false, message: "Result not found" };
const job = db.jobs.find((j) => j.ProcessName === result.ProcessName);
if (job) {
job.SourceRunResultId = resultId;
job.ProcessVersion = result.ProcessVersion;
}
return { success: true };
Comment on lines +263 to +270
<Button
variant="ghost"
size="sm"
disabled={state.isDeleting}
onClick={() => state.setDeleteConfirmId(test.Id)}
>
<Trash2 className="size-3 text-destructive" />
</Button>
Comment on lines +57 to +60
<Tooltip>
<TooltipTrigger asChild>
<Icon className={`size-3.5 ${colorClass}`} />
</TooltipTrigger>
Comment on lines +38 to +42
<span
className={`text-sm font-semibold ${score != null && score >= passThreshold ? "text-green-600" : "text-red-500"}`}
>
{scoreStr}
</span>
Comment on lines +111 to +113
<span className="text-3xl font-bold">
{testsPassing == null ? "-" : `${testsPassing}/${testsTotal}`}
</span>
@frankkluijtmans frankkluijtmans force-pushed the frankkluijtmans/solution-tests-hooks branch from 1258a4c to e3b6b1c Compare June 8, 2026 13:26
@frankkluijtmans frankkluijtmans force-pushed the frankkluijtmans/kpi-card-height-fixes branch from c2b61f8 to 4e82eec Compare June 8, 2026 13:29
@frankkluijtmans frankkluijtmans force-pushed the frankkluijtmans/solution-tests-hooks branch from e3b6b1c to b9d2ae2 Compare June 8, 2026 13:34
@frankkluijtmans frankkluijtmans force-pushed the frankkluijtmans/kpi-card-height-fixes branch from 4e82eec to 9fa912e Compare June 8, 2026 13:34
@frankkluijtmans frankkluijtmans force-pushed the frankkluijtmans/solution-tests-hooks branch from b9d2ae2 to cf96c5b Compare June 8, 2026 14:35
@frankkluijtmans frankkluijtmans force-pushed the frankkluijtmans/kpi-card-height-fixes branch from 9fa912e to 3d0c309 Compare June 8, 2026 14:36
@frankkluijtmans frankkluijtmans force-pushed the frankkluijtmans/solution-tests-hooks branch from cf96c5b to 7992e7f Compare June 10, 2026 15:57
@frankkluijtmans frankkluijtmans force-pushed the frankkluijtmans/kpi-card-height-fixes branch from 3d0c309 to b943803 Compare June 10, 2026 15:57
The UI + registry wiring for the Solution Tests component, stacked on the data
layer PR (#790). The view is presentational (dumb): data + handlers arrive via
props/render-props from a smart container that calls the collection hooks. The
demo renders the dumb view with in-memory mock data (no vs-core), mirroring the
GroupMembershipGuard demo.
@frankkluijtmans frankkluijtmans force-pushed the frankkluijtmans/solution-tests-hooks branch from 7992e7f to fde61bb Compare June 11, 2026 11:40
@frankkluijtmans frankkluijtmans force-pushed the frankkluijtmans/kpi-card-height-fixes branch from b943803 to 7ed497c Compare June 11, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:apollo-vertex size:XXL 1,000+ changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants