Skip to content

feat(onboarding): choose modules at first login (Lightweight / Advanced / Custom)#202

Merged
jakub-przepiora merged 8 commits into
developfrom
feat/onboarding-module-selection
Jul 24, 2026
Merged

feat(onboarding): choose modules at first login (Lightweight / Advanced / Custom)#202
jakub-przepiora merged 8 commits into
developfrom
feat/onboarding-module-selection

Conversation

@jakub-przepiora

Copy link
Copy Markdown
Contributor

Adds a module-selection step to the first-login onboarding wizard so a new admin turns on only the feature areas they need, instead of the full menu. Verified end-to-end in a running instance.

What it does

The wizard now opens with a "Choose your modules" step (step 1 of 5: Modules → Line → Product → Process → Work Order). Three one-click choices:

  • Lightweight (recommended): core production tracking + Reports only.
  • Advanced: adds Maintenance & Quality, Connectivity, Packaging (shop-floor operations).
  • Custom: tick exactly which of the 7 optional modules to enable (opens pre-checked with the Advanced set).

Core areas (Dashboard, Orders, Production, Admin) are always on. Changeable anytime in Settings → System → Modules.

Reuse, not reinvent

Writes the selection to the existing system_settings.enabled_modules via ModuleRegistry — the same mechanism the Settings page and TabAccessMiddleware/TabRegistry already use. So disabled areas are hidden from the nav and their routes 404, with no new storage, migration, or gating.

Changes

  • ModuleRegistry: PRESETS const + modulesForPreset() helper.
  • OnboardingController: modules()/storeModules(); index() → modules step; step props renumbered (1→2…).
  • 2 routes; new Pages/onboarding/Modules.jsx; OnboardingLayout stepper (5 steps); step-label fixes.
  • i18n en/pl parity.

Tests / verification

  • OnboardingWizardTest extended: 20 cases (index→modules redirect; light/advanced/custom presets save the right set; invalid preset/module → 422; empty custom disables all; non-admin forbidden).
  • E2E in a live instance: first-login module step renders (5-step stepper, 3 presets) → Custom reveals the checklist → Lightweight saved enabled_modules=['reports'] → dashboard nav shows only core + Reports (6 modules hidden) → /admin/connectivity404.
  • Full suite green locally (1962). Pint clean; frontend builds.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

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.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3afa5cb5-4595-4e15-ab2d-cf0579e2929e

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/onboarding-module-selection

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.

@jakub-przepiora
jakub-przepiora merged commit c8e30ee into develop Jul 24, 2026
2 checks passed
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.

1 participant