From ab1d482b54a0ee7cd79670f2e65e589f64e0a8d9 Mon Sep 17 00:00:00 2001 From: Randy Bruno Piverger <21374229+Randy424@users.noreply.github.com> Date: Fri, 15 May 2026 13:26:30 -0700 Subject: [PATCH] ACM-33619 Add dev workflow docs and fix CLAUDE.md port values Add Testing, Linting, Building, i18n, and Commit Requirements sections to README.md under Development. Fix swapped ACM_PORT and MCE_PORT defaults in CLAUDE.md to match port-defaults.sh. Signed-off-by: Randy Bruno Piverger <21374229+Randy424@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 4 ++-- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 4c3412382a1..f0e222ad7cf 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -81,8 +81,8 @@ All ports are customizable via environment variables defined in `port-defaults.s - `FRONTEND_PORT` (default 3000) - Standalone console - `BACKEND_PORT` (default 4000) - Backend APIs - `CONSOLE_PORT` (default 9000) - OpenShift console -- `ACM_PORT` (default 3001) - ACM plugin -- `MCE_PORT` (default 3002) - MCE plugin +- `MCE_PORT` (default 3001) - MCE plugin +- `ACM_PORT` (default 3002) - ACM plugin ### Authentication Flow 1. Frontend uses `acm-access-token-cookie` for user tokens diff --git a/README.md b/README.md index e3c890cae02..601ed50587c 100644 --- a/README.md +++ b/README.md @@ -196,6 +196,53 @@ Enabling this feature will allow the user to create a cluster that only contains ## Development +### Testing + +```bash +npm test # Run all tests (frontend + backend) +npm run test:frontend # Run frontend tests only +npm run test:backend # Run backend tests only +npm test -- # Run tests matching a file pattern +``` + +### Linting and Formatting + +```bash +npm run check # Run linting, formatting, and type checking +npm run check:fix # Auto-fix all linting and formatting issues +npm run lint # Lint frontend and backend code +npm run lint:fix # Auto-fix linting issues +``` + +### Building + +```bash +npm run build # Production build for frontend and backend +``` + +### Internationalization + +```bash +npm run i18n # Validate i18n translation files +npm run i18n:fix # Auto-fix i18n issues +``` + +### Commit Requirements + +All commits must include a `Signed-off-by` trailer. This is enforced by a Husky pre-commit hook — commits without it will be rejected. + +Add it automatically with the `-s` flag: + +```bash +git commit -s -m "Your commit message" +``` + +This produces a trailer in the format: + +```text +Signed-off-by: Your Name +``` + ### Feature Flags It is possible to enable/disable certain features by changing `spec.overrides.components[*].enabled` values from the ACM MultiClusterHub. In order to take a particular flag into account just add a new entry to `FEATURE_FLAGS` from `frontend/src/utils/flags/consts.ts` file, meaning the key as the name for the feature flag on console application side, and the value as the `spec.overrides.components[*].name`.