feat(ui): Lazy loading
The Issue & Context
The Argo CD UI previously loaded a large, monolithic JavaScript bundle that included top-level routes, settings panels, and heavy application features, causing slow initial load times and excessive render-blocking resources.
Root Cause Analysis
Key UI components and routes were bundled together in a single large JavaScript file, leading to high download size and blocking rendering of the initial UI.
Solution Strategy & Architectural Pattern
Introduced React.lazy() with dynamic import() to code-split top-level routes, settings panels, and heavy application features like tree view, terminal, logs, and diffs, along with error boundaries and chunk-naming for safe production splitting.
Key Takeaway for Contributors
Strategic use of lazy loading and code splitting can drastically reduce initial JavaScript payloads and improve frontend performance without sacrificing functionality.