Repository navigation
fix(apollo-vertex): stop augmenting ColumnMeta and widen the AI peer ranges - #1406
ruudandriessen wants to merge 2 commits into
Conversation
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
🟡 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
📊 Coverage + size by packagePer-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
"Coverage" is each package's own |
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 |
a716736 to
1eb7e59
Compare
1eb7e59 to
ba0a4dd
Compare
| // oxlint-disable-next-line typescript-eslint(no-explicit-any) -- one meta type serves every row data type | ||
| DataTableColumnMeta<any> {} |
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
ba0a4dd to
8f8a88b
Compare

Two problems that apps hit when upgrading
@uipath/apollo-vertexto 1.3.0.ColumnMetaaugmentation leaked into consumers.data-table.tsxdeclared a globaldeclare module "@tanstack/react-table"augmentation that was emitted intodist. In 1.3.0 it matches the v9ColumnMeta<TFeatures, TData, TValue>signature, so it merged with apps' own augmentations and broke them (TS2717 ongetFilterValue, TS2345 when calling it with the app's ownRow<AppFeatures, TData>). The augmentation is gone. Vertex column meta is now typed through thecolumnMetaslot of the DataTable feature set (tableFeatures({ ..., columnMeta })), which TanStack Table v9 scopes to that feature set instead of the global interface.DataTableColumnDefkeeps a typedmeta, fields that apps add to their ownColumnMetaare still accepted on Vertex columns, andDataTableColumnMetais exported so apps can opt into it.getFilterValuereceives aDataTableFilterRow(aPickof the row) because v9Rowtypes are not assignable across row data types; callbacks annotated with a specificRow<TData>still fit.distno longer contains anydeclare module.Two consumer fixtures are type-checked against the built package as part of
pnpm build(test:types).type-tests/column-meta-augmentationdeclares its own augmentation; it reproduces both errors against the 1.3.0 code and passes with this change.type-tests/column-meta-without-augmentationwrites typedgetFilterValuecallbacks on Vertex columns in an app with no augmentation, which fail with implicitanywithout thecolumnMetaslot.Peer ranges too narrow.
^0.14.0/^0.8.0on 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, andTOOL_CALL_ENDno longer carries a tool name (no client version reads it). A new test streams a tool call throughChatClientand 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
minimumReleaseAgewindow and are untested, so the ranges stop there.@tanstack/ai-client0.13.0–0.17.0 have an upstream bug where a bareChatClientcrashes onsendMessage(missingmountWithToolson the no-op devtools bridge);useChatfrom@tanstack/ai-reactis 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.