You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@amoro.apache.org by "Nam0101 (via GitHub)" <gi...@apache.org> on 2026/03/31 12:03:29 UTC
[PR] UI/UX: Mock API server enabled in production build masks real error/loading UX [amoro]
Nam0101 opened a new pull request, #4156:
URL: https://github.com/apache/amoro/pull/4156
Hi there! 👋
While exploring the codebase, I noticed a minor opportunity for improvement in `amoro-web/vite.config.ts`.
**Context:**
`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.
**Proposed fix:**
Disable fake server in production and gate it by mode: `export default defineConfig(({ mode }) => ({ ... plugins: [ ... vitePluginFakeServer({ enableProd: false, ... }) ] }))` or conditionally include the plugin only when `mode === 'development'`.
**Files changed:**
- `amoro-web/vite.config.ts` (modified)
*(Note: Tested the changes locally to ensure everything works as expected. Let me know if you need any adjustments, happy to help!)*
——
**NamNV**
📍 Hanoi, Vietnam
📧 nam.nv205106@gmail.com
Closes #4155
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@amoro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI/UX: Mock API server enabled in production build masks real error/loading UX [amoro]
Posted by "czy006 (via GitHub)" <gi...@apache.org>.
czy006 commented on PR #4156:
URL: https://github.com/apache/amoro/pull/4156#issuecomment-4188597206
enableProd has no effect on real production. The frontend is built into static assets served by the AMS Spring Boot backend. The Vite dev server (and its mock middleware) never runs in production. The high severity claim is inaccurate.
It breaks a valid dev workflow. enableProd: true allows developers to run vite preview with mock data to test the production build without a backend. This change silently disables that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@amoro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI/UX: Mock API server enabled in production build masks real error/loading UX [amoro]
Posted by "Nam0101 (via GitHub)" <gi...@apache.org>.
Nam0101 closed pull request #4156: UI/UX: Mock API server enabled in production build masks real error/loading UX
URL: https://github.com/apache/amoro/pull/4156
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@amoro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org