Bug/maintenance mode#632
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors tenant maintenance mode handling by moving the maintenance toggle into a dedicated update flow, improving the maintenance-mode UI, and adjusting migrations and tenant event handling to support the new behavior.
Changes:
- Move the tenant maintenance toggle out of the general “edit tenant details” form into a dedicated “update maintenance” form + route + handler.
- Add a dedicated maintenance-mode page layout and show it from tenant middleware when a tenant is in maintenance-related states.
- Introduce a dedicated CQRS command + tests for maintenance toggling, and adjust tenant events/types accordingly.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pool/web/view/page/page_utils.ml | Adds a dedicated maintenance page utility (title + illustration + text). |
| pool/web/view/page/page_root_tenant.ml | Adds a status column in the tenant list and introduces a separate maintenance form on tenant detail. |
| pool/web/middleware/middleware_tenant.ml | Fixes request-handling flow and switches maintenance response to the new maintenance page utility. |
| pool/web/handler/root_tenant_update.ml | Removes maintenance handling from detail updates and adds a dedicated update_maintenance handler. |
| pool/test/tenant_test.ml | Updates the existing “update tenant details” test and adds a new “update tenant maintenance” test. |
| pool/test/command.ml | Registers the new tenant maintenance command test case. |
| pool/routes/routes.ml | Adds a new POST route for /update-maintenance. |
| pool/cqrs_command/pool_tenant_command.ml | Removes maintenance toggle from EditDetails and adds UpdateMaintenance command. |
| pool/app/pool_tenant/pool_tenant.mli | Adjusts tenant update/event types for the maintenance refactor. |
| pool/app/pool_tenant/event.ml | Updates event handling for maintenance events and removes status changes from DetailsEdited. |
| pool/app/pool_database/root.ml | Registers several migrations as root-only steps. |
| pool/app/pool_database/migrations/migration_202503130858.ml | Adds migration_root variant and minor SQL formatting cleanup. |
| pool/app/pool_database/migrations/migration_202503061915.ml | Adds migration_root variant. |
| pool/app/pool_database/migrations/migration_202502271318.ml | Adds migration_root variant. |
| pool/app/pool_common/locales/i18n_en.ml | Updates English maintenance text. |
| pool/app/pool_common/locales/i18n_de.ml | Updates German maintenance text. |
| CHANGELOG.md | Notes the maintenance toggle fix on the root tenant page. |
mabiede
force-pushed
the
bug/maintenance-mode
branch
from
July 16, 2026 14:03
a680a5e to
516b83c
Compare
PossessedC0bra
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.