Skip to content

fix(ui): make Feast UI Vite-compatible by removing browser-only process/env and EUI dynamic icon breakage - #6724

Open
kchawlani19 wants to merge 1 commit into
feast-dev:masterfrom
kchawlani19:fix/ui-vite-arrowdown-5429
Open

fix(ui): make Feast UI Vite-compatible by removing browser-only process/env and EUI dynamic icon breakage#6724
kchawlani19 wants to merge 1 commit into
feast-dev:masterfrom
kchawlani19:fix/ui-vite-arrowdown-5429

Conversation

@kchawlani19

@kchawlani19 kchawlani19 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Problem

Importing @feast-dev/feast-ui in a Vite app fails at runtime, blocking the documented module-integration path.

Observed failures included:

  • ReferenceError: process is not defined
  • Failed to fetch dynamically imported module: .../assets/arrow_down?import

Root cause

Two Vite-incompatible runtime paths were involved:

  • Direct process.env reads in browser-executed UI code (FeastUI and CurlGeneratorTab).
  • EUI icon import behavior that triggers unresolved arrow_down dynamic module loading in this packaging context.

Fix

  • Added a safe env helper (getProcessEnv) and replaced direct process.env access in:
    • ui/src/FeastUI.tsx
    • ui/src/pages/feature-views/CurlGeneratorTab.tsx
  • Replaced EuiSelect in ProjectSelector with a native <select> to avoid the dynamic icon import path that causes arrow_down resolution failures.
  • Replaced the user-menu chevron icon usage in Layout with a local inline SVG glyph.
  • Added/updated focused tests:
    • ui/src/utils/environment.test.ts
    • ui/src/components/ProjectSelector.test.tsx

Test plan

  • cd ui && npx jest src/utils/environment.test.ts src/components/ProjectSelector.test.tsx src/FeastUISansProviders.test.tsx --runInBand
  • cd ui && npm run build:lib

Risk / rollback

Risk is low-to-medium and limited to UI behavior:

  • Minor styling/accessibility behavior differences from EuiSelect -> native <select>.
  • User-menu chevron changed to inline SVG.

Rollback is straightforward by reverting this PR commit.

@kchawlani19
kchawlani19 requested a review from a team as a code owner August 10, 2026 11:24
@kchawlani19
kchawlani19 force-pushed the fix/ui-vite-arrowdown-5429 branch from e5ceb05 to 0b5b96b Compare August 10, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant