Skip to content

feat(apollo-vertex): charts insights adapter [AGVSOL-3412]#754

Open
pieman1313 wants to merge 1 commit into
mainfrom
feat/vertex-insights-adapter
Open

feat(apollo-vertex): charts insights adapter [AGVSOL-3412]#754
pieman1313 wants to merge 1 commit into
mainfrom
feat/vertex-insights-adapter

Conversation

@pieman1313
Copy link
Copy Markdown
Contributor

ports over the stand alone adapter from apollo-dashboarding to our insights adapter
I tested it locally with a custom page with 2 charts hitting insights, but I`m not adding the test page to this pr / vertex
I can add a temporary commit if anyone wants to test as well

@pieman1313 pieman1313 requested a review from a team as a code owner May 27, 2026 06:20
Copilot AI review requested due to automatic review settings May 27, 2026 06:20
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

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

Project Deployment Review Updated (PT)
apollo-design 🟢 Ready Preview, Logs May 26, 2026, 11:24:40 PM
apollo-docs 🟢 Ready Preview, Logs May 26, 2026, 11:24:40 PM
apollo-landing 🟢 Ready Preview, Logs May 26, 2026, 11:24:40 PM
apollo-ui-react 🟢 Ready Preview, Logs May 26, 2026, 11:24:40 PM
apollo-vertex 🟢 Ready Preview, Logs May 26, 2026, 11:24:40 PM

@github-actions
Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1901 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1671
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

Copy link
Copy Markdown

Copilot AI left a comment

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 insights-adapter registry package that implements DataAdapter against the UiPath Insights standalone-query API, alongside a charts-core refactor that replaces the legacy Aggregation model with a richer MetricExpression/DataModelField model shared by both Data Fabric and Insights adapters.

Changes:

  • New insights-adapter registry package: ts-rest contract, schemas (filters, aggregates with recursive expressions, query), chart adapters (bar/distribution/kpi/line/multi-line/table), client-side binning, and a /api/insights/[...path] proxy.
  • charts-core refactor: removed models/aggregation.ts; added models/expression.ts (typed AggregationKind, DataModelAggregate), models/field.ts (typed fields incl. currency/boolean/percentage/duration), data-query-response-schema.ts, chart-data-mapper.ts, and getMetricFieldType/buildField helpers. All chart-with-adapter components now format via metric.expression.
  • Extracted shared proxyToUiPath helper used by both /api/datafabric and /api/insights routes, enforcing the service segment at path[2].

Reviewed changes

Copilot reviewed 58 out of 59 changed files in this pull request and generated no comments.

Show a summary per file
File Description
apps/apollo-vertex/registry/insights-adapter/** New Insights adapter: contract, schemas, chart adapters, binning, filter mapping, query helpers.
apps/apollo-vertex/app/api/insights/[...path]/route.ts New Insights proxy route delegating to proxyToUiPath.
apps/apollo-vertex/app/api/datafabric/[...path]/route.ts Refactored to delegate to shared proxyToUiPath.
apps/apollo-vertex/lib/api-proxy.ts New shared UiPath proxy helper with service segment guard.
apps/apollo-vertex/registry/charts-core/models/expression.ts New typed metric expression model replacing Aggregation.
apps/apollo-vertex/registry/charts-core/models/field.ts New typed field model (numeric/string/datetime/percentage/duration/currency/boolean).
apps/apollo-vertex/registry/charts-core/data-query-response-schema.ts Promoted to charts-core (was data-fabric-adapter local).
apps/apollo-vertex/registry/charts-core/chart-data-mapper.ts Promoted generic mapper to charts-core.
apps/apollo-vertex/registry/charts-core/util/get-metric-field-type.ts / build-field.ts New helpers for expression → field type and field construction.
apps/apollo-vertex/registry/charts-core/util/format/format-metric-value.ts Uses MetricExpression, supports currency/boolean field formats.
apps/apollo-vertex/registry/charts-core/util/data-type-alignment.ts Extended alignment to currency/percentage/duration.
apps/apollo-vertex/registry/charts-core/chart-models.ts / table-data-model.ts / charts-core.ts Aligned to new field/expression types and re-exports.
apps/apollo-vertex/registry/charts-core/models/configurations/base-chart-configuration.ts Added optional filterTableId for Insights tableWith wrapping.
apps/apollo-vertex/registry/{bar,line,multi-line,distribution,kpi}-chart/*-with-adapter.tsx Format calls migrated to metric.expression.
apps/apollo-vertex/registry/data-fabric-adapter/** Migrated to charts-core's expression/field model; throws on filtered/unsupported aggregations; uses shared mapper.
apps/apollo-vertex/registry/ai-chat/tools/data-fabric/util/{chart-helpers,entities}.ts, data-fabric-table/table-data-model.ts AI chat tool helpers updated to expression model + buildField.
apps/apollo-vertex/registry.json Promotes charts-core entries, drops removed data-fabric files, registers new insights-adapter package.
apps/apollo-vertex/tsconfig.json Adds @/lib/insights-adapter path alias.
apps/apollo-vertex/app/components/*/page.mdx Docs updated with new metric expression shape and Insights install instructions.

@@ -0,0 +1,57 @@
import { type NextRequest, NextResponse } from "next/server";

const UPSTREAM_ORIGIN = "https://alpha.uipath.com";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

will this always be alpha? 🤔
shouldn't be configurable for the consumer?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is only the proxy, consumers will not instal this; either way, we only whitelisted this app towards alpha, and its specific for this vercel app

@pieman1313 pieman1313 requested a review from alincadariu May 27, 2026 14:23
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.

3 participants