Remove uncalled code and unreachable validations, and bring the Ash resource snapshots up to date closes #631 #633

Merged
simon merged 7 commits from issue/mitgliederverwaltung-631 into main 2026-11-02 10:39:48 +01:00
Owner

closes #631

Description of the implemented changes

The changes were:

  • Bugfixing
  • New Feature
  • Breaking Change
  • Refactoring

Code hygiene: uncalled code and unreachable validations are gone, the system actor cache has tests, and resources, snapshots and migrations agree again, with CI now keeping them in line.

What has been changed?

  • Remove the unused Vereinfacht required member fields
  • Remove the member field visibility actions nothing calls
  • Rely on the accept lists for immutable fields and drop the validations behind them
  • Cover the cache that the sandbox bypass hides
  • Bring the resource snapshots in line with the migrations and add the missing ash_required function
  • Fail when resources, snapshots and migrations disagree
  • Record the added database function under Unreleased

Definition of Done

Code Quality

  • No new technical depths
  • Linting passed
  • Documentation is added were needed

Accessibility

  • New elements are properly defined with html-tags
  • Colour contrast follows WCAG criteria
  • Aria labels are added when needed
  • Everything is accessible by keyboard
  • Tab-Order is comprehensible
  • All interactive elements have a visible focus

Testing

  • Tests for new code are written
  • All tests pass
  • axe-core dev tools show no critical or major issues

Additional Notes

  • The only migration adds the ash_required SQL function that ash_postgres generates calls to. It changes no tables or data; rollback removes the function. Tested as an upgrade from main on a seeded database: row counts unchanged, schema diff only that function.
  • Do not regenerate the snapshot changes by hand: a plain mix ash.codegen on main would add the existing join_requests.reviewed_by_display column and offer to drop the long-renamed properties tables. The column is therefore a snapshot-only change, and the stale snapshot directories are deleted.
  • just lint and Drone now run mix ash.codegen --check. A resource change without its migration and snapshot turns CI red, and so does a dependency update that raises the Ash functions version, including Renovate PRs, until the migration is generated.
  • update_member_field_visibility/2, update_single_member_field_visibility/2 and Mv.Membership.Setting.Changes.UpdateSingleMemberFieldVisibility are removed; the form uses update_single_member_field/2.
  • The larger commits are the Setting action removal (mostly deleted code and tests) and the snapshot commit (mostly generated or deleted snapshot files).
  • This does not replace #31: the check compares code and snapshots, it does not run migrations against data.
closes #631 ## Description of the implemented changes The changes were: - [x] Bugfixing - [ ] New Feature - [ ] Breaking Change - [x] Refactoring Code hygiene: uncalled code and unreachable validations are gone, the system actor cache has tests, and resources, snapshots and migrations agree again, with CI now keeping them in line. ## What has been changed? - Remove the unused Vereinfacht required member fields - Remove the member field visibility actions nothing calls - Rely on the accept lists for immutable fields and drop the validations behind them - Cover the cache that the sandbox bypass hides - Bring the resource snapshots in line with the migrations and add the missing ash_required function - Fail when resources, snapshots and migrations disagree - Record the added database function under Unreleased ## Definition of Done ### Code Quality - [ ] No new technical depths - [x] Linting passed - [x] Documentation is added were needed ### Accessibility - [ ] New elements are properly defined with html-tags - [ ] Colour contrast follows WCAG criteria - [ ] Aria labels are added when needed - [ ] Everything is accessible by keyboard - [ ] Tab-Order is comprehensible - [ ] All interactive elements have a visible focus ### Testing - [x] Tests for new code are written - [x] All tests pass - [ ] axe-core dev tools show no critical or major issues ## Additional Notes - The only migration adds the `ash_required` SQL function that ash_postgres generates calls to. It changes no tables or data; rollback removes the function. Tested as an upgrade from `main` on a seeded database: row counts unchanged, schema diff only that function. - Do not regenerate the snapshot changes by hand: a plain `mix ash.codegen` on `main` would add the existing `join_requests.reviewed_by_display` column and offer to drop the long-renamed `properties` tables. The column is therefore a snapshot-only change, and the stale snapshot directories are deleted. - `just lint` and Drone now run `mix ash.codegen --check`. A resource change without its migration and snapshot turns CI red, and so does a dependency update that raises the Ash functions version, including Renovate PRs, until the migration is generated. - `update_member_field_visibility/2`, `update_single_member_field_visibility/2` and `Mv.Membership.Setting.Changes.UpdateSingleMemberFieldVisibility` are removed; the form uses `update_single_member_field/2`. - The larger commits are the Setting action removal (mostly deleted code and tests) and the snapshot commit (mostly generated or deleted snapshot files). - This does not replace #31: the check compares code and snapshots, it does not run migrations against data.
simon merged commit 1a1a38c067 into main 2026-11-02 10:39:48 +01:00
simon deleted branch issue/mitgliederverwaltung-631 2026-11-02 10:39:48 +01:00
Sign in to join this conversation.
No description provided.