apache / apache/amoro

fix: mock api server enabled in production build masks real error/loading ux

Open Beginner friendly
#4,155 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.2k
Forks
395
Avg merge
4d 10h
Merged PRs (30d)
33

Description

## Description

`vitePluginFakeServer` is configured with `enableProd: true`, so mock endpoints can be active in production. This can cause the UI to always receive successful mocked data, hiding real backend latency/failures and preventing users from seeing real loading, empty, and error states. It also risks shipping stale/fake data paths.

**Severity**: `high`
**File**: `amoro-web/vite.config.ts`

## Expected Behavior

The code should handle this case properly to avoid unexpected errors or degraded quality.

Contributor guide

Open the contributing guide

Research direction

Start in amoro-web/vite.config.ts and inspect the vitePluginFakeServer configuration, especially enableProd. Verify the production build no longer activates mock endpoints, then check the resulting build or available frontend checks to confirm real loading, empty, and error states are not masked.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vite
Domain
build-system, frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.