-
Notifications
You must be signed in to change notification settings - Fork 714
Stage #9326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stage #9326
Conversation
[Fix] Angular UI Build Speed
* fix: blank page window in agent and remove scrollbar on widget * fix: remove visible overflow * fix: remove unused path alias and clean up global polyfill definition
…9324) * fix: build desktop target env mismatch and agent build repo mismatch * fix: agent app name inconsistent
* Merge pull request #9320 from ever-co/fix/angular-build-optimization [Fix] Angular UI Build Speed * fix: blank page window in agent and remove scrollbar on widget (#9323) * fix: blank page window in agent and remove scrollbar on widget * fix: remove visible overflow * fix: remove unused path alias and clean up global polyfill definition * fix: build desktop target env mismatch and agent build repo mismatch (#9324) * fix: build desktop target env mismatch and agent build repo mismatch * fix: agent app name inconsistent --------- Co-authored-by: Rahul R. <[email protected]> Co-authored-by: syns <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 22 files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
This PR updates build configurations and CI/CD workflows for staging deployments. Key changes include:
Build Optimizations:
- Increased NX parallel builds from 1 to 3 for faster builds
- Enabled caching for Angular builds in NX configuration
- Enabled module concatenation in Gauzy webpack config for better performance
- Removed verbose flags from build scripts to reduce output noise
CI/CD Updates:
- Fixed staging workflows to use
isProd=false(was incorrectlytrue), ensuring staging builds create prereleases instead of production releases - Standardized agent workflow environment variables from
DESKTOP_AGENT_*toAGENT_*for naming consistency
Dependency Management:
- Refactored package.json build scripts for Gauzy to use UI-specific packages (
ui-config,ui-core,ui-auth) instead of backend packages - Reorganized npm overrides structure, splitting nested
electron-rebuildoverrides into separate top-level entries - Cleaned up implicit dependencies across multiple package configurations
UI Improvements:
- Added
overflow: hiddenstyle to always-on component to prevent unwanted scrolling
Critical Issue:
The agent webpack config changes introduce a blocking bug - it references polyfill packages (crypto-browserify, stream-browserify, util, buffer, process) in the fallback configuration that don't exist in package.json, which will cause build failures.
Confidence Score: 1/5
- Not safe to merge - contains a critical build-breaking bug in the agent webpack configuration
- The agent webpack config references missing polyfill dependencies that will cause build failures. The target was changed from 'electron-renderer' to 'web' and polyfill fallbacks were added, but the required packages (crypto-browserify, stream-browserify, util, buffer, process) are not in package.json. This is a P0 blocking issue that will definitely break the build.
- apps/agent/config/custom-webpack.config.js - Missing polyfill dependencies will cause build failure
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| .github/workflows/agent-stage.yml | 5/5 | Environment variable names updated and isProd parameter changed from true to false for staging builds |
| apps/agent/config/custom-webpack.config.js | 1/5 | Changed target from electron-renderer to web and added polyfill fallbacks that reference missing dependencies, which will cause build failures |
| apps/gauzy/config/custom-webpack.config.js | 5/5 | Enabled concatenateModules optimization and added multiple minification passes with explanatory comments |
| nx.json | 5/5 | Increased parallel builds from 1 to 3 and enabled caching for Angular builds to improve build performance |
| package.json | 4/5 | Updated build scripts to remove verbose flags, refactored gauzy package dependencies, reorganized overrides structure, and moved node-abi dependency |
| packages/core/project.json | 5/5 | Removed implicitDependencies on contracts, config, and common packages |
Sequence Diagram
sequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions
participant Script as bump-version-electron.js
participant Webpack as Webpack Build
participant NX as NX Build System
Dev->>GH: Push to stage-apps branch
GH->>Script: Run with isProd=false (stage workflows)
Script->>Script: Set releaseType='prerelease'
Script->>Script: Set publish path with '-pre' suffix
GH->>NX: Build with parallel=3, caching enabled
NX->>Webpack: Build agent app
Webpack->>Webpack: Apply custom-webpack.config.js
Webpack--xWebpack: FAILS - Missing polyfill packages
Note over Webpack: crypto-browserify, stream-browserify<br/>buffer, util, process packages<br/>not found in node_modules
alt Build Success Path (other apps)
NX->>GH: Build artifacts ready
GH->>GH: Package and release as prerelease
end
| fallback: { | ||
| crypto: require.resolve('crypto-browserify'), | ||
| stream: require.resolve('stream-browserify'), | ||
| util: require.resolve('util/'), | ||
| buffer: require.resolve('buffer/'), | ||
| process: require.resolve('process/browser') | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P0] The fallback polyfills reference packages that don't exist in package.json (crypto-browserify, stream-browserify, util/, buffer/, process/browser). This will cause build failures when webpack tries to resolve these modules. Either add these packages to devDependencies or remove the fallback configuration if the target change to 'web' doesn't actually require polyfills.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/agent/config/custom-webpack.config.js
Line: 24:30
Comment:
[P0] The fallback polyfills reference packages that don't exist in package.json (`crypto-browserify`, `stream-browserify`, `util/`, `buffer/`, `process/browser`). This will cause build failures when webpack tries to resolve these modules. Either add these packages to devDependencies or remove the fallback configuration if the target change to 'web' doesn't actually require polyfills.
How can I resolve this? If you propose a fix, please make it concise.


PR
Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.
Summary by cubic
Improve build speed and reliability on stage. Fix the Agent blank screen and remove the widget scrollbar, and align CI workflows/env vars for consistent stage builds.
Bug Fixes
Performance
Written for commit 7c1f2e6. Summary will update on new commits.