Skip to content

fix(apollo-vertex): stop augmenting ColumnMeta and widen the AI peer ranges - #1406

Closed
ruudandriessen wants to merge 2 commits into
mainfrom
t3/97b9625a
Closed

ruudandriessen wants to merge 2 commits into
mainfrom
t3/97b9625a

Conversation

@ruudandriessen

@ruudandriessen ruudandriessen commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Two problems that apps hit when upgrading @uipath/apollo-vertex to 1.3.0.

ColumnMeta augmentation leaked into consumers. data-table.tsx declared a global declare module "@tanstack/react-table" augmentation that was emitted into dist. In 1.3.0 it matches the v9 ColumnMeta<TFeatures, TData, TValue> signature, so it merged with apps' own augmentations and broke them (TS2717 on getFilterValue, TS2345 when calling it with the app's own Row<AppFeatures, TData>). The augmentation is gone. Vertex column meta is now typed through the columnMeta slot of the DataTable feature set (tableFeatures({ ..., columnMeta })), which TanStack Table v9 scopes to that feature set instead of the global interface. DataTableColumnDef keeps a typed meta, fields that apps add to their own ColumnMeta are still accepted on Vertex columns, and DataTableColumnMeta is exported so apps can opt into it. getFilterValue receives a DataTableFilterRow (a Pick of the row) because v9 Row types are not assignable across row data types; callbacks annotated with a specific Row<TData> still fit. dist no longer contains any declare module.

Two consumer fixtures are type-checked against the built package as part of pnpm build (test:types). type-tests/column-meta-augmentation declares its own augmentation; it reproduces both errors against the 1.3.0 code and passes with this change. type-tests/column-meta-without-augmentation writes typed getFilterValue callbacks on Vertex columns in an app with no augmentation, which fail with implicit any without the columnMeta slot.

Peer ranges too narrow. ^0.14.0 / ^0.8.0 on 0.x versions stop at the next minor. New ranges: @tanstack/ai >=0.14.0 <0.65.0, @tanstack/ai-client >=0.8.0 <0.37.0, eventsource-parser ^3.0.6 || ^4.0.0. The AgentHub adapter needed two changes for newer @tanstack/ai: array tool-result content is JSON-stringified for the wire format, and TOOL_CALL_END no longer carries a tool name (no client version reads it). A new test streams a tool call through ChatClient and checks the result is sent back.

Testing limits: typecheck, lint and the adapter test pass for ai / ai-client / eventsource-parser at 0.14.0/0.8.0/3.0.6, 0.41.0/0.22.0/4.0.0, 0.50.0/0.29.0/4.1.0, 0.63.0/0.36.0/4.1.1 and 0.64.0/0.36.1/4.1.1, locally. CI only runs the floor versions (devDependencies are unchanged). Releases newer than 0.64.0 / 0.36.1 are inside the repo's 14-day minimumReleaseAge window and are untested, so the ranges stop there. @tanstack/ai-client 0.13.0–0.17.0 have an upstream bug where a bare ChatClient crashes on sendMessage (missing mountWithTools on the no-op devtools bridge); useChat from @tanstack/ai-react is unaffected, and the adapter test passes on 0.15.0 when the real bridge is supplied.

Release: main already has 1.4.0 and an unreleased breaking change (931c2ce63, Proteus moved to a subpath), so these fixes will ship in 2.0.0 rather than a 1.3.1 patch.

Copilot AI balanced review requested due to automatic review settings October 19, 2026 08:17
@github-actions
github-actions Bot temporarily deployed to preview/apollo-landing October 19, 2026 08:17 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-design October 19, 2026 08:17 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-docs October 19, 2026 08:17 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-vertex October 19, 2026 08:17 Destroyed
@github-actions github-actions Bot added the size:L 100-499 changed lines. label Oct 19, 2026
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Dependency License Review

  • ✅ 1957 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1721
ISC 91
Apache-2.0 57
BSD-3-Clause 28
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
CC0-1.0 4
MIT-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.3.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.

🟡 Changes recommended

Public column definitions remain disconnected from local metadata typing, breaking existing strict consumers’ filter callbacks.

1 open issue
What changed in this PR

This PR isolates Vertex table metadata from consumer augmentations and broadens supported AI peer versions.

Changes:

  • Replaces global metadata augmentation with local types and accessors.
  • Updates AgentHub compatibility and adds a tool-call integration test.
  • Adds built-package consumer type checks to the build.
File Description
packages/​apollo-vertex/​vitest.config.ts Includes registry .test.ts files.
packages/​apollo-vertex/​type-tests/​column-meta-augmentation/​tsconfig.json Configures isolated consumer type checks.
packages/​apollo-vertex/​type-tests/​column-meta-augmentation/​app.ts Adds consumer augmentation fixture.
packages/​apollo-vertex/​tsconfig.json Excludes consumer fixtures from package compilation.
packages/​apollo-vertex/​registry/​use-data-table/​useEntityColumns.tsx Checks generated metadata locally.
packages/​apollo-vertex/​registry/​data-table/​index.ts Exports the metadata interface.
packages/​apollo-vertex/​registry/​data-table/​data-table.tsx Removes augmentation and reads local metadata.
packages/​apollo-vertex/​registry/​data-table/​data-table-view-options.tsx Uses the metadata accessor for labels.
packages/​apollo-vertex/​registry/​data-table/​data-table-filters.tsx Uses locally typed filter metadata.
packages/​apollo-vertex/​registry/​ai-chat/​adapters/​agenthub/​tools.ts Adapts schema conversion typing.
packages/​apollo-vertex/​registry/​ai-chat/​adapters/​agenthub/​stream.ts Removes names from tool-end events.
packages/​apollo-vertex/​registry/​ai-chat/​adapters/​agenthub/​messages.ts Serializes non-string tool results.
packages/​apollo-vertex/​registry/​ai-chat/​adapters/​agenthub/​adapter.test.ts Tests streamed tool execution and results.
packages/​apollo-vertex/​package.json Widens peers and integrates type checks.
packages/​apollo-vertex/​lib/​table-features.ts Defines local metadata types and accessor.
knip.jsonc Registers consumer fixtures as entries.

Review effort: Balanced

Comment thread packages/apollo-vertex/lib/table-features.ts Outdated
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage + size by package

Per-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.

Package Coverage New-line coverage Packed (gzip) Unpacked vs main
@uipath/apollo-core — — — — —
@uipath/apollo-react — — — — —
@uipath/apollo-ui-icons — — — — —
@uipath/apollo-vertex 81.5% 100.0% (1/1) 330.4 KB 1.86 MB +452 B
@uipath/apollo-wind — — — — —
@uipath/ap-chat — — — — —

"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.

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Storybook visual diff

✅ No stories are affected by this PR's changes; nothing to compare. Logs

Updated (PT): Oct 20, 2026, 12:32:42 AM

Copilot AI balanced review requested due to automatic review settings October 19, 2026 08:41
@github-actions
github-actions Bot temporarily deployed to preview/apollo-docs October 19, 2026 08:41 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-design October 19, 2026 08:41 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-landing October 19, 2026 08:41 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-vertex October 19, 2026 08:42 Destroyed

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.

🟡 Changes recommended

Public filter callbacks lose full-row methods and row-data type safety.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment on lines +45 to +46
// oxlint-disable-next-line typescript-eslint(no-explicit-any) -- one meta type serves every row data type
DataTableColumnMeta<any> {}
Copilot AI balanced review requested due to automatic review settings October 19, 2026 08:45
@github-actions
github-actions Bot temporarily deployed to preview/apollo-vertex October 19, 2026 08:46 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-docs October 19, 2026 08:46 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-landing October 19, 2026 08:46 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-design October 19, 2026 08:46 Destroyed

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.

🔵 Needs a closer look

Public filter callback typing still loses row-data safety and narrows the previously available contextual row API.

1 open issue

Review effort: Balanced

The DataTable declared a global ColumnMeta augmentation that shipped in
dist and merged into every consuming app, conflicting with apps that
declare their own ColumnMeta for their own feature set.

Type Vertex column meta through the columnMeta slot of the DataTable
feature set instead. DataTableColumnMeta stays exported, keeps fields
apps add to their own ColumnMeta, and gives getFilterValue callbacks a
DataTableFilterRow so callbacks annotated with a specific Row still fit.
Add consumer fixtures with and without an app augmentation that are
type-checked against dist on build.

Assisted-by: Anthropic:claude-opus-5-5
…r ranges

Accept @tanstack/ai >=0.14.0 <0.65.0, @tanstack/ai-client >=0.8.0 <0.37.0
and eventsource-parser ^3.0.6 || ^4.0.0. The AgentHub adapter now
stringifies array tool-result content and no longer sends a tool name on
TOOL_CALL_END, which newer @tanstack/ai versions reject.

Add a test that streams a tool call through ChatClient and checks the tool
result is sent back. It passes from 0.14.0/0.8.0/3.0.6 up to
0.64.0/0.36.1/4.1.1.

Assisted-by: Anthropic:claude-opus-5-5
Copilot AI balanced review requested due to automatic review settings October 20, 2026 07:22
@github-actions
github-actions Bot temporarily deployed to preview/apollo-landing October 20, 2026 07:22 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-docs October 20, 2026 07:22 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-design October 20, 2026 07:22 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-vertex October 20, 2026 07:22 Destroyed

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.

🔵 Needs a closer look

Public filter-callback typing still has unresolved row-data safety and source-compatibility regressions.

1 open issue

Review effort: Balanced

This branch was successfully deployed

No deployments
preview/apollo-vertex — 8f8a88b3 Deployed Oct 20, 2026 by github-actions[bot]
preview/apollo-design — 8f8a88b3 Deployed Oct 20, 2026 by github-actions[bot]
preview/apollo-docs — 8f8a88b3 Deployed Oct 20, 2026 by github-actions[bot]
preview/apollo-landing — 8f8a88b3 Deployed Oct 20, 2026 by github-actions[bot]
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