Skip to content

feat(apollo-vertex): custom evaluator renderer registry for solution-tests#881

Open
RobinMennens-UiPath wants to merge 2 commits into
mainfrom
feat/solution-tests-custom-evaluators
Open

feat(apollo-vertex): custom evaluator renderer registry for solution-tests#881
RobinMennens-UiPath wants to merge 2 commits into
mainfrom
feat/solution-tests-custom-evaluators

Conversation

@RobinMennens-UiPath

Copy link
Copy Markdown
Contributor

What & why

Back-port of the solution-tests custom-evaluator work from the FINS vertical solution (UiPath/fins-vertical-solution#604). Adds a custom evaluator renderer registry so a consumer can register its own evaluator result components — keyed by evaluator id — through the existing SolutionTestsConfig, without editing the registry component.

This is the frontend counterpart to the solution-test backend, where a vertical registers custom evaluators (e.g. a custom LLM-as-a-judge with a tailored prompt but the same {score, justification} output). The FE just needs to map that new evaluator id to a component — usually the existing generic card.

Changes (registry/solution-tests)

  • config.tsSolutionTestsConfig.evaluatorRenderers?: EvaluatorRenderers, defaulted in resolveConfig.
  • evaluators/registry.tsxresolveEvaluatorRenderer(id, verticalRenderers?) resolves vertical > built-in > generic fallback. Renderer-specific config is bound at registration, not threaded through the runtime call site: genericRenderer({ label }) captures a display label; makeRenderer(schema, Component, bound) spreads bound props into the component. So EvaluatorRenderer's runtime signature stays uniform as renderers gain params.
  • evaluator-results-view.tsx — reads evaluatorRenderers from context and passes it to the resolver.
  • evaluators/generic-evaluator-result.tsx — takes the display label as a bound prop (label ?? evaluatorId).
  • constants.ts — removed the standalone EVALUATOR_LABELS table; built-in labels now live on their registry entries (single source of truth).
  • index.ts — exports makeRenderer, genericRenderer, resolveEvaluatorRenderer, GENERIC_RENDERER, the evaluator-id constants, and the renderer types.

Checks

tsc --noEmit, oxlint --type-aware, and depcruise registry all pass (the 10 dep-cruiser warnings are pre-existing in shell/ai-chat, unrelated).

🤖 Generated with Claude Code

…tests

Verticals can register custom evaluator result renderers keyed by evaluator id
via `SolutionTestsConfig.evaluatorRenderers`, merged over the built-ins
(`resolveEvaluatorRenderer` precedence: vertical > built-in > generic). This is
the FE counterpart to the solution-test backend's custom evaluator builders.

Renderer-specific config is bound at registration, not threaded through the
runtime call site: `genericRenderer({ label })` captures a display label and
`makeRenderer(schema, Component, bound)` spreads bound props into the component,
so `EvaluatorRenderer`'s runtime signature never changes as renderers gain
params. Labels now live on the registry entries; the standalone EVALUATOR_LABELS
table is removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EioRufJjChLWS7wQ2DsCLd
Copilot AI review requested due to automatic review settings July 3, 2026 15:07
@RobinMennens-UiPath RobinMennens-UiPath requested a review from a team as a code owner July 3, 2026 15:07
@github-actions

github-actions Bot commented Jul 3, 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 Jul 03, 2026, 08:43:51 AM
apollo-docs 🟢 Ready Preview, Logs Jul 03, 2026, 08:43:51 AM
apollo-landing 🟢 Ready Preview, Logs Jul 03, 2026, 08:43:51 AM
apollo-vertex 🟢 Ready Preview, Logs Jul 03, 2026, 08:43:51 AM

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1945 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1715
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 configurable evaluator-renderer registry to the apps/apollo-vertex/registry/solution-tests feature so consuming verticals can register custom evaluator result components (keyed by evaluator id) via SolutionTestsConfig, without modifying the built-in registry.

Changes:

  • Extends SolutionTestsConfig with evaluatorRenderers and defaults it in resolveConfig.
  • Introduces a renderer registration/resolution API (makeRenderer, genericRenderer, resolveEvaluatorRenderer) with precedence vertical > built-in > generic fallback.
  • Moves built-in evaluator display labels into the built-in registry entries and removes the standalone EVALUATOR_LABELS map.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
apps/apollo-vertex/registry/solution-tests/index.ts Exports the new renderer helpers/types and built-in evaluator id constants for consumers.
apps/apollo-vertex/registry/solution-tests/evaluators/registry.tsx Implements renderer creation/binding and resolution with vertical override support.
apps/apollo-vertex/registry/solution-tests/evaluators/generic-evaluator-result.tsx Accepts a bound label prop (fallback to evaluator id) for the generic evaluator card.
apps/apollo-vertex/registry/solution-tests/evaluator-results-view.tsx Pulls evaluatorRenderers from config context and passes them into renderer resolution.
apps/apollo-vertex/registry/solution-tests/constants.ts Removes the EVALUATOR_LABELS mapping now embedded in the registry.
apps/apollo-vertex/registry/solution-tests/config.ts Adds evaluatorRenderers to config types and applies a default {} in resolveConfig.

Comment on lines +41 to +45
export function makeRenderer<TDetails, TExtra extends object>(
schema: z.ZodType<TDetails>,
Component: ComponentType<EvaluatorResultProps<TDetails>>,
) {
Component: ComponentType<EvaluatorResultProps<TDetails> & TExtra>,
bound: TExtra,
): EvaluatorRenderer {
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage + size by package

Per-package bundle size on this PR (no JS/TS source changes detected under packages/* or web-packages/*).

Package Coverage New-line coverage Packed (gzip) Unpacked vs main
@uipath/apollo-core 9.0% 43.82 MB 57.31 MB ±0
@uipath/apollo-react 34.5% 7.27 MB 27.60 MB ±0
@uipath/apollo-wind 40.1% 392.6 KB 2.55 MB +15 B
@uipath/ap-chat 85.8% 43.41 MB 55.85 MB ±0

"Coverage" is each package's own coverage.include scope (e.g. apollo-core instruments only scripts/). "Packed"/"Unpacked" come from npm pack --dry-run and only cover built packages — "—" means not measured this run (package not affected / not built). "vs main" is the packed (gzipped) delta against the last successful main build (the package-sizes artifact from the Release workflow); "—" there means no main baseline was available this run. The baseline is main's latest build, not this PR's exact merge-base, so it includes any drift since the branch diverged. Packages with no vitest config are omitted.

Wrap the resolveEvaluatorRenderer call per biome (lineWidth 100) to fix the
Format CI check.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EioRufJjChLWS7wQ2DsCLd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:apollo-vertex size:L 100-499 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants