safaehar opened a new pull request, #74663: URL: https://github.com/apache/airflow/pull/74663
Airflow currently includes every UI page in the initial JavaScript payload, even though a browser only needs the modules for the active route. This increases download, parse, and execution work before the UI can respond. Use React Router's lazy route modules to load page components on demand while keeping the base layout and error boundary available immediately. Routes that require wrapper components or configured props retain their existing rendering behavior through dedicated lazy loaders. Production bundle comparison against current `main`: | Initial static JavaScript | `main` | This PR | Reduction | | --- | ---: | ---: | ---: | | Raw | 7,779,813 bytes | 2,562,705 bytes | 67.1% | | Gzip | 2,289,844 bytes | 698,535 bytes | 69.5% | Validation: - Airflow pre-commit UI compile, lint, format, and TypeScript checks - Production UI asset compilation - `pnpm test src/router.test.tsx` (18 tests) - Optimized Vite production build --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Codex (GPT-5) Generated-by: Codex (GPT-5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) --- Drafted-by: Codex (GPT-5) (no human review before posting) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
