Skip to content

fix(ui): Make feast UI load in Vite without process.env and arrow_down imports - #6724

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

fix(ui): Make feast UI load in Vite without process.env and arrow_down imports#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
@kchawlani19 kchawlani19 changed the title fix(ui): make Feast UI Vite-compatible by removing browser-only process/env and EUI dynamic icon breakage fix(ui): make feast ui vite-compatible by removing browser-only process/env and eui dynamic icon breakage Aug 10, 2026
@kchawlani19
kchawlani19 force-pushed the fix/ui-vite-arrowdown-5429 branch from 0b5b96b to 66102de Compare August 10, 2026 12:43
@kchawlani19 kchawlani19 changed the title fix(ui): make feast ui vite-compatible by removing browser-only process/env and eui dynamic icon breakage fix(ui): Make feast UI load in Vite without process.env and arrow_down imports Aug 10, 2026
@codecov-commenter

codecov-commenter commented Aug 10, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.76%. Comparing base (037c4cd) to head (e6daf25).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6724   +/-   ##
=======================================
  Coverage   46.76%   46.76%           
=======================================
  Files         415      415           
  Lines       50392    50392           
  Branches     7214     7214           
=======================================
+ Hits        23567    23568    +1     
  Misses      25171    25171           
+ Partials     1654     1653    -1     
Flag Coverage Δ
go-feature-server 30.58% <ø> (ø)
python-unit 48.09% <ø> (+<0.01%) ⬆️
see 1 file with indirect coverage changes

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 037c4cd...e6daf25. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ependency and arrow_down icon import path

Signed-off-by: kchawlani19 <kchawlan@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: kchawlani19 <kchawlan@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@kchawlani19
kchawlani19 force-pushed the fix/ui-vite-arrowdown-5429 branch from 66102de to e6daf25 Compare August 10, 2026 13:02
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.

2 participants