Skip to content

Conversation

@evereq
Copy link
Member

@evereq evereq commented Jan 9, 2026

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

    • Agent renderer: switch webpack target to web, add browser polyfills (crypto, stream, buffer, process), and define globals to fix the blank page.
    • Always-on widget: hide body overflow to remove the visible scrollbar.
    • CI workflows: use AGENT_APP_* env vars and set version bump scripts to stage mode (false); fix desktop target env mismatch.
  • Performance

    • Angular UI: enable module concatenation, improve Terser settings, and trim verbose flags (separate debug script).
    • Nx: increase parallel to 3, enable caching for Angular/custom-webpack targets, and clear implicitDependencies to avoid unnecessary rebuilds.
    • Package builds: slim Gauzy UI package build to ui-config/ui-core/ui-auth paths for faster builds.

Written for commit 7c1f2e6. Summary will update on new commits.

rahul-rocket and others added 4 commits January 8, 2026 19:48
* 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]>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 9, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch stage

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@evereq evereq merged commit f325aad into stage-apps Jan 9, 2026
15 of 17 checks passed
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 9, 2026

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 incorrectly true), ensuring staging builds create prereleases instead of production releases
  • Standardized agent workflow environment variables from DESKTOP_AGENT_* to AGENT_* 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-rebuild overrides into separate top-level entries
  • Cleaned up implicit dependencies across multiple package configurations

UI Improvements:

  • Added overflow: hidden style 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
Loading

Comment on lines +24 to +30
fallback: {
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify'),
util: require.resolve('util/'),
buffer: require.resolve('buffer/'),
process: require.resolve('process/browser')
}
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants