Replace the admin user Banned select with a toggle #1012

Closed
opened 2026-11-05 11:07:13 -06:00 by Codex · 2 comments
Member

The admin user edit form should represent the existing boolean ban state with a direct on/off control.

The change must preserve both banning and unbanning behavior when the form is submitted.

Scope

  • Update the Banned control on the admin user edit Blade page from a select menu to a toggle or checkbox.
  • Keep the current admin authorization, user-edit route, and unrelated account fields unchanged.
  • Ensure the submitted value is normalized so an unchecked toggle explicitly persists the unbanned state.

Acceptance Criteria

  • The admin user edit page renders Banned as a toggle or checkbox and no longer renders a select input for that field.
  • The control is checked when the account is banned and unchecked when it is not banned.
  • Submitting the form with the toggle enabled persists the banned state.
  • Submitting the form with the toggle disabled persists the unbanned state.
  • Existing admin authorization and validation behavior remain intact.

Test Coverage Required

  • Feature coverage verifies the edit page exposes a toggle or checkbox for Banned rather than a select.
  • Feature coverage verifies both enabled and disabled submissions persist the corresponding account state.
  • Existing admin user-edit behavior for authorization and unrelated fields remains covered.

Progress Checklist

  • Locate the Banned field in the admin user edit Blade template.
  • Confirm the existing request/controller persistence path and boolean representation.
  • Implement the toggle and unchecked-value normalization.
  • Add or update focused feature tests for rendering, banning, and unbanning.
The admin user edit form should represent the existing boolean ban state with a direct on/off control. The change must preserve both banning and unbanning behavior when the form is submitted. ## Scope - Update the Banned control on the admin user edit Blade page from a select menu to a toggle or checkbox. - Keep the current admin authorization, user-edit route, and unrelated account fields unchanged. - Ensure the submitted value is normalized so an unchecked toggle explicitly persists the unbanned state. ## Acceptance Criteria - The admin user edit page renders Banned as a toggle or checkbox and no longer renders a select input for that field. - The control is checked when the account is banned and unchecked when it is not banned. - Submitting the form with the toggle enabled persists the banned state. - Submitting the form with the toggle disabled persists the unbanned state. - Existing admin authorization and validation behavior remain intact. ## Test Coverage Required - Feature coverage verifies the edit page exposes a toggle or checkbox for Banned rather than a select. - Feature coverage verifies both enabled and disabled submissions persist the corresponding account state. - Existing admin user-edit behavior for authorization and unrelated fields remains covered. ## Progress Checklist - [x] Locate the Banned field in the admin user edit Blade template. - [x] Confirm the existing request/controller persistence path and boolean representation. - [x] Implement the toggle and unchecked-value normalization. - [x] Add or update focused feature tests for rendering, banning, and unbanning.
Codex changed title from Change Account Banned Select Input Into Toggle to Replace the admin user Banned select with a toggle 2026-11-05 11:07:44 -06:00
Codex self-assigned this 2026-11-06 12:36:07 -06:00
Author
Member

Replace the admin user edit form’s Banned select with a styled toggle.

A hidden N value makes unchecked submissions explicitly save the unbanned state, while checked submissions retain the existing Y value. The toggle preserves submitted state after validation errors and uses the existing controller, authorization, and ban behavior.

Verification: 72 feature tests passed (404 assertions), including toggle rendering, banning/unbanning, validation, admin authorization, profile fields, session invalidation, and Fider synchronization. Pint, PHPStan, frontend build, and diff checks passed.

Fixes #1012

Replace the admin user edit form’s Banned select with a styled toggle. A hidden N value makes unchecked submissions explicitly save the unbanned state, while checked submissions retain the existing Y value. The toggle preserves submitted state after validation errors and uses the existing controller, authorization, and ban behavior. Verification: 72 feature tests passed (404 assertions), including toggle rendering, banning/unbanning, validation, admin authorization, profile fields, session invalidation, and Fider synchronization. Pint, PHPStan, frontend build, and diff checks passed. Fixes #1012
Author
Member

Merged PR #1020 is deployed to development and production from master revision ce26c706fb. Both release manifests end in +pr1020-ce26c706, and the deployed Blade template SHA-256 matches the merged source. Compiled Blade syntax checks and view-cache rebuilds passed; unrelated application files, assets, and configuration were checksum-guarded. No migrations, dependency changes, or account/domain-data writes were performed.

The toggle submits Y when enabled and an explicit hidden N when disabled. Validation failures retain the submitted state. Existing authorization, validation, ban/session behavior, and unrelated account fields are preserved. Selecting the banned role still forces a ban, so clearing the toggle alone does not override that role; unbanning does not introduce account restoration or external-service reactivation.

Verification before merge: 72 feature tests passed with 404 assertions, plus Pint, PHPStan, the frontend build, and diff checks. Post-deployment HTTPS smoke checks passed for home/login on both sites, and unauthenticated admin edit requests redirect to login. No live accounts were banned or unbanned during deployment verification.

Rollback backups:

  • Development: /home/mvgldev/deploy-backups/pr1020-ce26c706-4a24jgz5
  • Production: /home/mvgl/deploy-backups/pr1020-ce26c706-7muf7x_d

Each deployment account retains ~/deploy-staging/pr1020-ce26c706/deploy.py. Run it as the matching account with ~/bin on PATH and --rollback to restore the prior template/release manifest and rebuild the view cache.

Merged PR #1020 is deployed to development and production from master revision ce26c706fb3decc045975e6b161b10c17fb412f6. Both release manifests end in +pr1020-ce26c706, and the deployed Blade template SHA-256 matches the merged source. Compiled Blade syntax checks and view-cache rebuilds passed; unrelated application files, assets, and configuration were checksum-guarded. No migrations, dependency changes, or account/domain-data writes were performed. The toggle submits Y when enabled and an explicit hidden N when disabled. Validation failures retain the submitted state. Existing authorization, validation, ban/session behavior, and unrelated account fields are preserved. Selecting the banned role still forces a ban, so clearing the toggle alone does not override that role; unbanning does not introduce account restoration or external-service reactivation. Verification before merge: 72 feature tests passed with 404 assertions, plus Pint, PHPStan, the frontend build, and diff checks. Post-deployment HTTPS smoke checks passed for home/login on both sites, and unauthenticated admin edit requests redirect to login. No live accounts were banned or unbanned during deployment verification. Rollback backups: - Development: /home/mvgldev/deploy-backups/pr1020-ce26c706-4a24jgz5 - Production: /home/mvgl/deploy-backups/pr1020-ce26c706-7muf7x_d Each deployment account retains ~/deploy-staging/pr1020-ce26c706/deploy.py. Run it as the matching account with ~/bin on PATH and --rollback <backup-path> to restore the prior template/release manifest and rebuild the view cache.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MyVideoGameList/myvideogamelist.com#1012
No description provided.