Skip to content

feat(apollo-vertex): add registry dependency validation script [AGVSOL-2062]#428

Open
KokoMilev wants to merge 1 commit intomainfrom
feat/apollo-vertex-registry-validation
Open

feat(apollo-vertex): add registry dependency validation script [AGVSOL-2062]#428
KokoMilev wants to merge 1 commit intomainfrom
feat/apollo-vertex-registry-validation

Conversation

@KokoMilev
Copy link
Copy Markdown
Contributor

@KokoMilev KokoMilev commented Mar 31, 2026

Summary

Prevents issues like #413 from happening again by automatically catching missing registry entries at build time.

  • Replace next build with tsc --noEmit in the registry CI check — next build only type-checks files in the build graph, silently skipping components not imported by any page
  • Add --overwrite to shadcn add — without it, shadcn silently skips installation on file conflicts, so tsc --noEmit runs against an empty app and always passes
  • Add explicit target paths for data-table registry files — preserves the subdirectory structure during installation instead of flattening files into components/ui/
  • Re-export DataTableColumnHeader from data-table.tsx — works around a known shadcn bug where barrel imports are rewritten to the main file

shadcn barrel import bug

shadcn has a known bug (shadcn-ui/ui#7309) where imports targeting a barrel index.ts in a multi-file component get rewritten to the main file instead. For example:

// Source code
import { DataTableColumnHeader } from "@/components/ui/data-table";

// After shadcn install — rewrites to the main file, bypassing index.ts
import { DataTableColumnHeader } from "@/components/ui/data-table/data-table";

Since data-table.tsx only exported DataTable and DataTableProps, the import broke. The fix is to re-export DataTableColumnHeader from data-table.tsx so both resolution paths work. This is documented in AGENTS.md for future contributors.

Copilot AI review requested due to automatic review settings March 31, 2026 14:08
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 31, 2026

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

Project Deployment Review Updated (PT)
apollo-canvas 🟢 Ready Preview, Logs Apr 01, 2026, 08:29:22 AM
apollo-landing 🟢 Ready Preview, Logs Apr 01, 2026, 08:27:18 AM
apollo-ui-react 🟢 Ready Preview, Logs Apr 01, 2026, 08:27:46 AM
apollo-vertex 🟢 Ready Preview, Logs Apr 01, 2026, 08:28:43 AM
apollo-wind 🟢 Ready Preview, Logs Apr 01, 2026, 08:27:20 AM

@github-actions github-actions bot added the size:L 100-499 changed lines. label Mar 31, 2026
@github-actions
Copy link
Copy Markdown

Dependency License Review

  • 1924 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 3 package(s) excluded (see details below)
License distribution
License Packages
MIT 1689
ISC 89
Apache-2.0 56
BSD-3-Clause 28
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 5
MIT OR Apache-2.0 3
MIT-0 3
CC0-1.0 3
LGPL-3.0-or-later 2
(MIT OR Apache-2.0) 2
Unlicense 2
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
@img/sharp-libvips-linuxmusl-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 build-time guardrail in apollo-vertex to prevent shadcn-registry install breakages by ensuring registry component source files don’t import other registry modules that aren’t declared in registry.json (files[] / registryDependencies).

Changes:

  • Added scripts/validate-registry.ts to validate registry import-to-dependency consistency.
  • Updated registry.json to add missing registryDependencies: ["button"] for alert-dialog, carousel, pagination, and calendar.
  • Wired the validator into pnpm registry:build so it runs after shadcn build and before index generation.

Reviewed changes

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

File Description
apps/apollo-vertex/scripts/validate-registry.ts New registry dependency validation script (import scanning + failure reporting).
apps/apollo-vertex/registry.json Adds missing registryDependencies entries for components that import @/components/ui/button.
apps/apollo-vertex/package.json Runs the validation script as part of registry:build.

@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch from b7ca248 to 22e1103 Compare March 31, 2026 14:19
Copilot AI review requested due to automatic review settings March 31, 2026 14:32
@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch from 22e1103 to 83799be Compare March 31, 2026 14:32
@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch 2 times, most recently from 34bd439 to a018762 Compare March 31, 2026 14:35
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch from a018762 to 69e75d3 Compare March 31, 2026 14:40
Copilot AI review requested due to automatic review settings March 31, 2026 14:44
@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch from 69e75d3 to ffe4453 Compare March 31, 2026 14:44
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

@KokoMilev KokoMilev marked this pull request as ready for review March 31, 2026 15:00
@KokoMilev KokoMilev requested a review from a team as a code owner March 31, 2026 15:00
@KokoMilev KokoMilev requested review from alincadariu and frankkluijtmans and removed request for a team March 31, 2026 15:00
@KokoMilev KokoMilev enabled auto-merge (rebase) March 31, 2026 15:00
@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch from ffe4453 to 5b57f31 Compare March 31, 2026 15:01
@KokoMilev KokoMilev marked this pull request as draft April 1, 2026 08:12
auto-merge was automatically disabled April 1, 2026 08:12

Pull request was converted to draft

Copilot AI review requested due to automatic review settings April 1, 2026 08:45
@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch from 5b57f31 to 81a184d Compare April 1, 2026 08:45
@github-actions github-actions bot removed the size:L 100-499 changed lines. label Apr 1, 2026
@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch from 81a184d to ef9a60b Compare April 1, 2026 08:52
Copilot AI review requested due to automatic review settings April 1, 2026 09:48
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

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

Comments suppressed due to low confidence (1)

apps/apollo-vertex/registry.json:1003

  • The use-data-table registry item now only lists types.ts, constants.ts, useDataTable.tsx, and usePersistedSorting.ts, but useDataTable.tsx imports useColumnVisibility and usePersistedColumnOrder, and those in turn import usePersistedColumns. If these files aren’t included in files[], consumers installing @uipath/use-data-table will get TypeScript/module resolution failures. Re-add the missing hook files (and any other direct/indirect relative imports) to this item’s files[].
      "name": "use-data-table",
      "type": "registry:hook",
      "title": "useDataTable",
      "description": "A generic data table hook that manages sorting, filtering, pagination, column visibility, and column order with localStorage persistence.",
      "dependencies": ["@tanstack/react-table", "@mantine/hooks@^9.0.0"],
      "files": [
        {
          "path": "registry/use-data-table/types.ts",
          "type": "registry:hook"
        },
        { "path": "lib/constants.ts", "type": "registry:lib" },
        {
          "path": "registry/use-data-table/useDataTable.tsx",
          "type": "registry:hook"
        },
        {
          "path": "registry/use-data-table/usePersistedSorting.ts",
          "type": "registry:hook"
        }
      ]

@@ -589,10 +590,6 @@
{
"path": "registry/data-table/sortable-column-list.tsx",
"type": "registry:ui"
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The data-table registry item no longer includes registry/use-data-table/useReactTableCompat.ts, but registry/data-table/data-table.tsx imports it via the @/hooks/useReactTableCompat path alias. Installing @uipath/data-table via shadcn will therefore produce an unresolved import unless this file is included (either re-add it to files[] for data-table or add an appropriate registryDependencies entry that guarantees it is installed).

Suggested change
"type": "registry:ui"
"type": "registry:ui"
},
{
"path": "registry/use-data-table/useReactTableCompat.ts",
"type": "registry:ui"

Copilot uses AI. Check for mistakes.
@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch from 01a0549 to 86d6b9a Compare April 1, 2026 09:58
Copilot AI review requested due to automatic review settings April 1, 2026 11:12
@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch from 86d6b9a to ddbfa31 Compare April 1, 2026 11:12
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

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

@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch from ddbfa31 to ef9a60b Compare April 1, 2026 11:18
Copilot AI review requested due to automatic review settings April 1, 2026 12:35
@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch from 3b27cc1 to 05f28bd Compare April 1, 2026 12:35
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch from 05f28bd to 8acadf7 Compare April 1, 2026 12:43
@github-actions github-actions bot added size:XS 0-9 changed lines. and removed size:S 10-29 changed lines. labels Apr 1, 2026
Copilot AI review requested due to automatic review settings April 1, 2026 14:11
@github-actions github-actions bot added size:M 30-99 changed lines. and removed size:XS 0-9 changed lines. labels Apr 1, 2026
@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch from 31d6827 to a284882 Compare April 1, 2026 14:13
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch from a284882 to 0551ce0 Compare April 1, 2026 14:51
…mports

Replace next build with tsc --noEmit in registry CI to catch unresolved
imports. Add --overwrite flag to shadcn add so file conflicts don't skip
installation silently. Add explicit target paths for data-table registry
files to preserve subdirectory structure. Re-export DataTableColumnHeader
from data-table.tsx since shadcn rewrites barrel imports to the main file.
Copilot AI review requested due to automatic review settings April 1, 2026 15:26
@KokoMilev KokoMilev force-pushed the feat/apollo-vertex-registry-validation branch from 0551ce0 to bb3ffeb Compare April 1, 2026 15:26
@KokoMilev KokoMilev marked this pull request as ready for review April 1, 2026 15:29
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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants