Skip to content

Conversation

@norman-abramovitz
Copy link
Contributor

@norman-abramovitz norman-abramovitz commented Sep 19, 2025

[This pull request introduces significant updates to modernize the build and runtime environment, upgrade Angular and related dependencies, and migrate charting components from ngx-charts to ng2-charts (Chart.js). It also adds Docker Compose support for local MySQL development in jetstream, improves build configuration, and enhances compatibility with modern browsers and tools.

Build and Dependency Upgrades:

  • Upgraded Angular and related dependencies from v14 to v20 in package.json, src/frontend/packages/cf-autoscaler/package.json, and updated peer dependencies accordingly. This includes major version bumps for @ngrx, rxjs, and other core libraries. [1] [2]
  • Updated the browserslist configuration to target only the latest versions of major browsers for improved build speed and modern compatibility.
  • Added Tailwind CSS and PostCSS configuration (postcss.config.js) and related dependencies for enhanced styling capabilities. [1] [2]

Charting Library Migration:

  • Replaced @swimlane/ngx-charts with ng2-charts (Chart.js) in the autoscaler modules and components, updating both imports and component usage in templates and tests. [1] [2] [3] [4] [5] [6] [7]

Build Configuration and Tooling:

  • Modified angular.json to add style preprocessor include paths, enable Angular CLI build cache, and update build targets to use buildTarget instead of browserTarget. [1] [2] [3]
  • Added .claude/settings.local.json to define permissions for build and find commands.

Docker and Local Development:

  • Introduced a docker-compose.yml file to support local MySQL service for development and testing.

Code Modernization and Minor Fixes:

  • Updated YAML parsing in protractor.conf.js to use the modern yaml.load method.
  • Set standalone: false in Angular component decorators for compatibility with Angular 20. [1] [2] [3]
  • Cleaned up unused SCSS and adjusted routing module configuration for Angular 20 best practices. [1] [2]
  • Switched to the new Tailwind-based snackbar service in the autoscaler tab extension.

These changes collectively modernize the codebase, improve performance and maintainability, and ensure compatibility with the latest Angular ecosystem.

References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23]](b55e4e3)

Switches Angular Material theme import to v15 path and updates theme variable usage in theme.scss. Updates sass-loader configuration to use the modern API and explicit 'sass' implementation. Adds 'sass' and 'sass-loader' dependencies to package.json.
Refactored theme.scss to use the latest Angular Material theming API, replacing deprecated mixins and palette definitions. Updated SASS handler comment for clarity.
Refactored theme.scss to use the latest Angular Material theming API, replacing deprecated mixins and palette definitions. Updated SASS handler comment for clarity.

Update To angular 20

Update Sass config and theme for Angular Material v15

Switches Angular Material theme import to v15 path and updates theme variable usage in theme.scss. Updates sass-loader configuration to use the modern API and explicit 'sass' implementation. Adds 'sass' and 'sass-loader' dependencies to package.json.
Commented out Angular Material theming imports and mixins across theme SCSS files to resolve build errors. Added fallback SASS functions and variables for theming and breakpoints. Disabled custom SASS handler configuration in devkit to restore build compatibility. Updated import paths for rxjs-spy and ts-md5 to fix module resolution issues. Added documentation in BUILD_FIXES.md to track changes and next steps for restoring full theming functionality.
Migrates theme.scss to use Angular Material v20's new theming API with @use and define-theme. Adds a legacy theme structure for backward compatibility and updates theme application to use mat.all-component-themes and mat.core.
Commented out the jetstream docs module in go.mod and main.go to exclude it from the build process. Updated .gitignore to ignore the jetstream.exe binary.
Refactored SCSS theme files to use the modern Angular Material v20 API, replacing deprecated functions and imports. Updated SASS build configuration to support the new theming approach. This improves compatibility with Angular Material v20 and prepares the codebase for future updates.
Updated SCSS theme files to use Angular Material v2 theming API for improved compatibility with existing component themes. Re-enabled steppers and log viewer theme mixins, simplified theme.scss, and adjusted theme helpers and component styles to use new palette and color functions. Also imported prebuilt Material theme CSS and disabled dark theme support in styles.
Updated theme.scss and component theme files to use Angular Material v20 API and custom Stratos theming. Removed deprecated imports, added fallback functions for palette and contrast handling, and replaced unavailable mixins with CSS equivalents. This improves compatibility and maintainability with the latest Angular Material version.
Deleted numerous SCSS theme files and related assets from the frontend packages, removing the old theming system. Added Tailwind CSS and related plugins to dependencies, introduced new theme configuration and service files, and updated build configuration to support Tailwind. This modernizes the styling approach and prepares the project for utility-first CSS development.
Enabled the Angular CLI cache in angular.json for improved build performance. Updated Tailwind CSS and related plugins in package.json, removing old versions and adding @tailwindcss/forms, @tailwindcss/typography, and tailwindcss as dependencies. Adjusted package-lock.json to reflect these changes and dependency updates.

Migrate to Tailwind-based theming system

Replaces Angular Material theming with a new Tailwind CSS-based theme system. Adds a dedicated theme package with configuration, services, and documentation. Updates PostCSS config to use @tailwindcss/postcss, adjusts styles.scss to import Tailwind and remove legacy SCSS, and updates dependencies accordingly.
Replaces Angular Material and custom SCSS with Tailwind CSS utility classes in Stratos title and analysis report selector components. Updates core module to import FormsModule and ReactiveFormsModule. Adds a comprehensive developer guide for the new Tailwind-based theme system.
Replaces Angular Material theming, palettes, and component classes with Tailwind CSS utilities and CSS custom properties throughout the frontend. Removes Angular Material and CDK dependencies from SCSS, TypeScript, and HTML files, updates custom theme systems, and refactors UI components (cards, buttons, toolbars, spinners, toggles, etc.) to use Tailwind-compatible markup and styles. Introduces custom type for SortDirection to replace Angular Material's type. This migration modernizes the UI stack, reduces dependency on Angular Material, and enables easier customization and theming using Tailwind CSS.
Removed most Angular Material imports from md.module.ts and eliminated CDK table dependency from shared.module.ts. Replaced MatSnackBar usage in kubedash-configuration.component.ts with console logging and comments for future notification system. Refactored HelmReleaseHistoryTabComponent to use a dedicated HelmReleaseHistoryDataSource class for table data, improving code structure and maintainability. Also removed a debug log from the SASS build handler.
Removed @ajsf/core and @ajsf/material dependencies and replaced the Material JSON Schema Form with a new Tailwind-based JSON Schema Form component. Updated Cloud Foundry and Kubernetes modules and components to use the new TailwindJsonSchemaFormComponent. Added new TailwindJsonSchemaFormComponent, its module, template, and styles.
Refactored all usages of Angular Material's MatSnackBar to use the new TailwindSnackBarService and TailwindSnackBarRef across multiple components and services. This change standardizes snackbar notifications to use the Tailwind-based implementation, improving UI consistency and maintainability.
Updated all autoscaler credential and policy step components to use TailwindErrorStateMatcher and TailwindShowOnDirtyErrorStateMatcher instead of Angular Material's ErrorStateMatcher and ShowOnDirtyErrorStateMatcher. This aligns error handling with Tailwind-based UI components.
Introduces Tailwind-based services and components to replace Angular Material equivalents, including paginator, sidenav, sort, and JSON schema form. Updates references in Cloud Foundry components to use new Tailwind dialog services and injection tokens. Also extends the material replacements module to re-export the new Tailwind implementations for use throughout the application.
Updated various components to import Tailwind services and error state matchers from the '@stratosui/core' package instead of relative paths. This change improves maintainability and consistency across the codebase.
@norman-abramovitz norman-abramovitz marked this pull request as ready for review November 5, 2025 23:51
@norman-abramovitz norman-abramovitz marked this pull request as draft November 6, 2025 00:03
wayneeseguin and others added 27 commits November 5, 2025 19:50
Complete overhaul of build, release, and CI/CD systems.
Eliminates bootstrap complexity, simplifies workflows,
and automates releases with comprehensive documentation.

- Add automatic devkit build via preinstall hook (build/ensure-devkit.cjs)
- Add post-install orchestration (build/post-setup.cjs)
- Add unified version management (build/version-bump.sh)
- Add cross-platform backend builds (build/cross-compile.sh)
- Add backend version tracking (src/jetstream/VERSION)
- Update package.json with preinstall/postinstall hooks
- Eliminate manual bootstrap requirement
- Rewrite Makefile with 25+ organized targets
- Add colored output with emoji indicators
- Add comprehensive help system
- Add automatic platform detection
- Integrate cross-compilation for 6 platforms
- Add development, build, test, and release targets
- Match Kevin's vision for simple, beautiful commands
- Add 7-archive packaging script (build/package.sh)
  - 6 platform binaries: linux/darwin/windows × amd64/arm64
  - 1 source archive via git
- Add SHA256 checksum generation (build/create-checksums.sh)
- Add git tag automation (build/create-git-tag.sh)
- Add complete release workflow with validation
- Add PR testing workflow (.github/workflows/pr.yml)
  - Automated lint, test, and build checks
  - Matrix testing for 7 frontend packages
  - Quality gate enforcement
- Add release automation (.github/workflows/release.yml)
  - Triggered by version tags
  - Builds all platforms automatically
  - Creates GitHub releases with all artifacts
  - Triggers Docker builds for production
- Add Docker build workflow (.github/workflows/docker.yml)
  - Multi-arch builds (linux/amd64, linux/arm64)
  - Automated registry push
  - Image verification
- Add contributor guide (docs/contributing_guide.md)
  - Development workflow and best practices
  - Architecture overview and testing guide
- Add release manager guide (docs/release_guide.md)
  - Complete release process documentation
  - Pre-release checklists and validation
- Add DevOps deployment guide (docs/devops_guide.md)
  - Docker and Kubernetes deployment
  - Configuration, monitoring, and scaling

Breaking Changes:
- Bootstrap no longer required (now: just 'bun install')
- New Makefile targets (backwards compatible)
- Version tracking in src/jetstream/VERSION
 Test Files  181 passed | 1 skipped (182)
      Tests  485 passed | 6 skipped (491)
Test Files  240 passed | 1 skipped (241)
      Tests  309 passed | 1 skipped (310)
 Test Files  565 passed | 3 skipped (568)
      Tests  1003 passed | 9 skipped (1012)
Test Files  565 passed | 3 skipped (568)
      Tests  1003 passed | 9 skipped (1012)
The _custom-import.module.ts file is auto-generated by the extension-generator
during the build process and should not be tracked in version control.

This was causing build failures on fresh clones because the tracked version
contained stale imports (GitRoutingModule) that don't exist in the git package.

Changes:
- Added _custom-import.module.ts to .gitignore
- Removed the tracked file from git

The file will now be generated correctly during builds based on actual package
metadata, fixing the "Module '@stratosui/git' has no exported member
'GitRoutingModule'" error on fresh clones.
Introduced git-routing.module.ts to the git package and updated public_api.ts to export the new module. This enables routing functionality for the git package.
Converted build scripts from CommonJS to ES module syntax, updating imports/exports and direct execution checks. Also added 'routingModule' to the git package.json for improved module configuration.
This fixes multiple issues that prevented fresh clones from building:

- Added automation to build custom Angular builders (@stratos/builders) during postinstall
- Fixed backend.js path in angular.json to reference correct location (dist-devkit/src/)
- Added "type": "module" to devkit package.json for proper ES module support
- Fixed ES module imports to include .js extensions as required by Node.js
- Added extension module generation during postinstall
- Applied git skip-worktree flags to build-modified files (index.html)
- Added build-builders script for manual rebuilds if needed

Fresh clones should now work correctly after just running
`make install` and `make build`.
Devkit changes:
- Rename build.js to build.cjs (CommonJS build script)
- Add __dirname polyfill using import.meta.url in backend.ts, main.ts,
  and index.transform.ts
- Add .js extensions to all relative imports (required by ES modules)

Build script changes:
- Rename extension-generator.js to .mjs (uses ES module syntax)
- Update references in angular.json, bootstrap, build-orchestrator.js,
  and post-setup.cjs
- Remove workaround that temporarily renamed files to .cjs

Fixes fresh clone build errors:
- "require is not defined in ES module scope"
- "__dirname is not defined in ES module scope"
Remove TypeScript devDependency from @stratos/builders to prevent nested
installation, and add TypeScript override in root package.json to enforce
version consistency across all dependencies.
Ignore compiled TypeScript output in tools/builders/*/dist/ to prevent
build artifacts from being committed.
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